/* === BASE.CSS — Reset + design tokens === */

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root, [data-theme="light"] {
  /* Surfaces — warm parchment with gold warmth */
  --color-bg: #faf8f3;
  --color-surface: #fdfcf8;
  --color-surface-2: #f5f1e8;
  --color-surface-offset: #ede8da;
  --color-divider: #ddd7c8;
  --color-border: #cfc9b8;

  /* Text */
  --color-text: #1e1b14;
  --color-text-muted: #6b6655;
  --color-text-faint: #b0a990;
  --color-text-inverse: #fdfcf8;

  /* Primary — deep sapphire blue (Jewish blue / Israeli flag) */
  --color-primary: #1a4b8c;
  --color-primary-hover: #133a6e;
  --color-primary-active: #0d2950;
  --color-primary-highlight: #d0dff5;

  /* Gold accent — warm gold for highlights */
  --color-gold: #c8921a;
  --color-gold-light: #f2d98a;
  --color-gold-highlight: #fdf4db;

  /* Success / Error / Warning */
  --color-success: #2e7d32;
  --color-error: #c62828;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(30,27,20,.07);
  --shadow-md: 0 4px 16px rgba(30,27,20,.09);
  --shadow-lg: 0 12px 40px rgba(30,27,20,.13);

  /* Transitions */
  --transition: 180ms cubic-bezier(0.16,1,0.3,1);

  /* Type scale */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-hero: clamp(2.6rem, 1rem + 5.5vw, 5.5rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  /* Content widths */
  --content-default: 1160px;
  --content-narrow: 720px;

  /* Fonts */
  --font-display: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
}

[data-theme="dark"] {
  --color-bg: #141210;
  --color-surface: #1a1814;
  --color-surface-2: #201e19;
  --color-surface-offset: #252219;
  --color-divider: #2e2b22;
  --color-border: #3a3628;
  --color-text: #e8e3d8;
  --color-text-muted: #968f7e;
  --color-text-faint: #5a5548;
  --color-text-inverse: #1a1814;
  --color-primary: #6b9fd8;
  --color-primary-hover: #4d87cc;
  --color-primary-active: #3370b8;
  --color-primary-highlight: #1e2e45;
  --color-gold: #e8ac30;
  --color-gold-light: #f5d67a;
  --color-gold-highlight: #2a2010;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.25);
  --shadow-md: 0 4px 16px rgba(0,0,0,.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #141210; --color-surface: #1a1814; --color-surface-2: #201e19;
    --color-surface-offset: #252219; --color-divider: #2e2b22; --color-border: #3a3628;
    --color-text: #e8e3d8; --color-text-muted: #968f7e; --color-text-faint: #5a5548;
    --color-text-inverse: #1a1814; --color-primary: #6b9fd8;
    --color-primary-hover: #4d87cc; --color-primary-active: #3370b8;
    --color-primary-highlight: #1e2e45; --color-gold: #e8ac30;
    --color-gold-light: #f5d67a; --color-gold-highlight: #2a2010;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.25);
    --shadow-md: 0 4px 16px rgba(0,0,0,.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.4);
  }
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-16);
}
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
h1,h2,h3,h4,h5,h6 { text-wrap: balance; line-height: 1.15; font-family: var(--font-display); }
p, li, figcaption { text-wrap: pretty; }

::selection { background: color-mix(in oklab, var(--color-primary) 25%, transparent); color: var(--color-text); }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: var(--radius-sm); }

a, button, [role="button"] {
  transition: color var(--transition), background var(--transition),
    border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
}
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration:0.01ms!important; transition-duration:0.01ms!important; }
}
