/*
 * Design tokens.
 * Brand values are fixed. Semantic values (--color-bg, --color-text…) change
 * with the colour mode; components use the semantic ones.
 */

:root {
  color-scheme: dark;
  --color-brand: #C63831;
  --color-brand-hover: #A82F29;
  --color-brand-press: #8A2722;
  --color-ivory: #F5F3EF;
  --color-ink: #111111;
  --color-secondary: #736F69;
  --color-white: #FFFFFF;
  --color-stone: #D8D3CB;
  --color-graphite: #1A1918;
  --color-ash: #34312E;
  --color-mist: #A8A39C;
  --color-brand-light: #E4685F;

  --font-heading: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* Alias titres « display » (Cormorant). Sans ça, var(--font-display) tombe sur Inter. */
  --font-display: var(--font-heading);
  /* Titres : une seule ligne pour changer la graisse (maquette = 300). */
  --font-display-weight: 300;

  --text-display: 84px;
  --text-h1: 64px;
  --text-h2: 48px;
  --text-h3: 28px;
  --text-lede: 18px;
  --text-body: 16px;
  --text-card: 15px;
  --text-small: 14px;
  --text-ui: 13px;
  --swatch-size: 12px;
  --product-card-swatch-row: 20px;
  /* Column gap 4–8 px; row gap = space under price → next photo. */
  --shop-grid-gap: 4px;
  --shop-grid-gap-mobile: 4px;
  --shop-grid-row-gap: 48px;
  --shop-grid-row-gap-mobile: 32px;
  --leading-tight: 1.05;
  --leading-heading: 1.15;
  --leading-body: 1.6;
  --tracking-ui: 0.08em;

  --spacing-2xs: 4px;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 64px;
  --spacing-2xl: 96px;

  --container-width: 1440px;
  --content-width: 1200px;
  --measure: 68ch;
  --page-gutter: 32px;
  /* Header bar + logo — one size on all templates (see navigation.css). */
  --header-height: 88px;
  --header-logo-height: 64px;
  --header-logo-height-sticky: 52px;
  /* Measured by JS when the announcement bar is present; 0 when absent. */
  --thiek-announce-h: 0px;
  --target-size: 44px;

  /* Phase V2 — Accueil / pages maquette (1440). border-box: frame = content + gutters. */
  --v2-content-width: 1320px;
  --v2-page-gutter: 40px;
  --v2-frame-width: 1400px;
  --text-hero: 72px;
  --text-home-h2: 56px;
  --text-home-h2-sm: 44px;
  --text-home-shop: 52px;
  --text-home-contact: 64px;
  --text-contact-hero: 96px;
  --text-sak-hero: 112px;
  --text-sak-subtitle: 32px;
  --text-sak-quote: 44px;
  --text-sak-fact: 34px;
  --spacing-section: 120px;
  --spacing-section-sm: 80px;
  --spacing-section-md: 110px;
  --spacing-section-lg: 130px;
  --spacing-section-xs: 40px;
  --home-gallery-portrait-h: 656px;
  --home-gallery-landscape-h: 320px;
  --home-artist-image-h: 860px;
  --home-hero-h: 900px;
  --home-event-display: 160px;

  /* Shopify-style radii. Nested control = parent radius − inset (8 − 4 = 4). Square edges stay 0. */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-full: 50%;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 160ms;
  --duration: 240ms;

  --z-header: 50;
  --z-toast: 90;
  --control-height: 48px;
  --overlay: rgb(17 17 17 / 72%);

  /* Light mode values; dark overrides below. */
  --color-bg: var(--color-ivory);
  --color-surface: var(--color-white);
  --color-surface-2: var(--color-stone);
  --color-text: var(--color-ink);
  --color-muted: var(--color-secondary);
  --color-line: var(--color-stone);
  --color-border: var(--color-line);
  --color-accent-text: var(--color-brand);
  --color-error: #6e2e2a;
  --color-focus: var(--color-brand);
  --color-header-bg: rgb(245 243 239 / 92%);
  /* Form controls and other UI boundaries need 3:1 against the page. */
  --color-control-border: var(--color-secondary);
  --color-disabled-bg: var(--color-stone);
  /* Darker than --color-secondary so disabled copy stays ≥ 4.5:1 on stone. */
  --color-disabled-text: #4a4640;
  --color-skeleton: var(--color-stone);

  /* Sections that stay black in both modes. */
  --color-inverse-bg: var(--color-ink);
  --color-inverse-text: var(--color-ivory);
  --color-inverse-muted: var(--color-mist);
  --color-inverse-line: var(--color-ash);
}

/*
 * Dark mode (default). #736F69 on #111111 is ~3.8:1 and #C63831 is ~3.45:1,
 * both under WCAG AA for small text, hence the lighter muted and accent text.
 * Fills and borders keep #C63831.
 * .thiek-inverse gives a block the dark values in both modes.
 */
html[data-theme="dark"],
.thiek-inverse {
  color-scheme: dark;
  --color-bg: var(--color-ink);
  --color-surface: var(--color-graphite);
  --color-surface-2: var(--color-ash);
  --color-text: var(--color-ivory);
  --color-muted: var(--color-mist);
  --color-line: var(--color-ash);
  --color-border: var(--color-line);
  --color-accent-text: var(--color-brand-light);
  /* Lighter than #6E2E2A so errors stay ≥ 4.5:1 on ink. */
  --color-error: #e8a09a;
  --color-focus: var(--color-brand-light);
  --color-header-bg: rgb(17 17 17 / 92%);
  --color-control-border: var(--color-secondary);
  --color-disabled-bg: var(--color-ash);
  --color-disabled-text: var(--color-mist);
  --color-skeleton: var(--color-ash);
}

html[data-theme="light"] {
  color-scheme: light;
}
