/* ── Custom Properties ── */
:root {
  /* Google brand colors */
  --color-blue: #4285F4;
  --color-red: #EA4335;
  --color-yellow: #FBBC05;
  --color-green: #34A853;
  --color-dark: #202124;
  --color-gray-900: #3c4043;
  --color-gray-700: #5f6368;
  --color-gray-500: #9aa0a6;
  --color-gray-300: #dadce0;
  --color-gray-100: #f1f3f4;
  --color-gray-50: #f8f9fa;
  --color-white: #ffffff;

  /* Semantic */
  --color-primary: var(--color-blue);
  --color-accent: var(--color-green);
  --color-surface: var(--color-white);
  --color-background: var(--color-gray-50);
  --color-text: var(--color-dark);
  --color-text-muted: var(--color-gray-700);
  --color-border: var(--color-gray-300);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(60,64,67,0.3), 0 1px 3px rgba(60,64,67,0.15);
  --shadow-md: 0 1px 3px rgba(60,64,67,0.3), 0 4px 8px rgba(60,64,67,0.15);
  --shadow-lg: 0 1px 3px rgba(60,64,67,0.3), 0 8px 16px rgba(60,64,67,0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Fonts */
  --font-heading: 'Google Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, sans-serif;
  --font-mono: 'Roboto Mono', ui-monospace, monospace;

  /* Text sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input { font: inherit; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.3; color: var(--color-text); }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ── Utility Classes ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: 500; font-size: var(--text-base);
  transition: all var(--transition-base);
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.badge {
  display: inline-block; padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 500;
}

/* ── Sepia Theme ── */
body.sepia {
  --color-background: #f4ecd8;
  --color-surface: #faf6eb;
  --color-text: #5b4636;
  --color-text-muted: #8b7355;
  --color-border: #d4c5a9;
  --color-gray-50: #f7f1e3;
  --color-gray-100: #ede4d0;
  --color-gray-300: #d4c5a9;
  --color-gray-700: #8b7355;
  --color-gray-900: #5b4636;
  --color-dark: #5b4636;
  --color-white: #faf6eb;
  --color-primary: #a0522d;
  --color-accent: #6b8e23;
  --color-blue: #7b6b4a;
  --color-green: #6b8e23;
  --shadow-sm: 0 1px 2px rgba(91,70,54,0.15), 0 1px 3px rgba(91,70,54,0.08);
  --shadow-md: 0 1px 3px rgba(91,70,54,0.15), 0 4px 8px rgba(91,70,54,0.08);
  --shadow-lg: 0 1px 3px rgba(91,70,54,0.15), 0 8px 16px rgba(91,70,54,0.08);
}
body.sepia .image-view img {
  filter: sepia(20%) brightness(0.97);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  :root { --text-3xl: 1.75rem; --text-4xl: 2rem; }
}
