/* ==========================================================================
   Vitamin Horgoš — variables.css (ORBIS rebuild)
   Design tokens: colour, type, spacing, shape and motion. Every stylesheet reads from here.
   The first block is the ORBIS-derived system (reference/DESIGN_BRIEF.md); the second keeps the
   pre-rebuild token names pointing at the new values, so feature stylesheets re-skin with it.
   ========================================================================== */

:root {
  /* ---------- Grounds ---------- */
  --ground-black: #15110F;          /* header bar, footer, route, product cards on dark */
  --ground-raised: #201A17;         /* cards and inputs on the black ground */
  --ground-burgundy: #4A0E12;       /* feature and CTA bands */
  --ground-burgundy-deep: #2E080B;  /* the far end of burgundy gradients */
  --cream: #F5F0E8;                 /* light ground A */
  --warm-white: #FAF7F2;            /* light ground B, cards on cream */
  --plate: #ECE5D9;                 /* light plate behind packshots */

  /* ---------- Accents ---------- */
  --gold: #D4AF5E;                  /* eyebrows, numbers, emblems, hairlines, hover borders (on dark): 7.4:1 on burgundy, 9:1 on black */
  --gold-ink: #654A12;              /* gold used as TEXT on light grounds: 7.3:1 on cream, 7.7:1 on warm white (AAA) */
  --gold-soft: rgba(201, 162, 77, 0.35);
  --red: #D71920;                   /* primary button and small highlights: one red element per screen */
  --red-dark: #A3141A;              /* primary hover / pressed */
  --red-wine: #7A1216;

  /* ---------- Text ---------- */
  --ink: #15110F;                   /* headings on light: 17:1 on cream */
  --ink-body: #463C36;              /* body on light: 9:1 on cream */
  --on-dark: #F5F0E8;               /* headings on dark: 16:1 on black */
  --on-dark-body: rgba(245, 240, 232, 0.76); /* body on dark: ≥ 9:1 on black, ≥ 7:1 on burgundy */

  /* ---------- Lines and shadows ---------- */
  --line-dark: rgba(201, 162, 77, 0.35);
  --line-dark-soft: rgba(245, 240, 232, 0.12);
  --line-light: #E6DCCB;
  --line-light-strong: #D2C3A6;
  --field-border: #857563;          /* input and checkbox boundaries: ≥ 3:1 on cream / warm white (WCAG 1.4.11) */
  /* one shadow scale (soft → lifted → float; --shadow-dark for cards on dark grounds) */
  /* final polish §3.5: nothing on a card is heavier than 0 12px 32px rgba(21, 17, 15, .18) */
  --shadow-soft: 0 1px 2px rgba(21, 17, 15, 0.06), 0 8px 24px rgba(21, 17, 15, 0.12);
  --shadow-lifted: 0 12px 32px rgba(21, 17, 15, 0.18);
  --shadow-dark: 0 12px 32px rgba(21, 17, 15, 0.18);
  --hero-overlay: radial-gradient(120% 90% at 50% 40%, rgba(74, 14, 18, 0.55) 0%, rgba(21, 17, 15, 0.78) 100%);

  /* ---------- Type ---------- */
  --font-serif: "Cormorant Garamond", "Cormorant Fallback", Garamond, "Times New Roman", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", "Jakarta Fallback", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --t-h1: clamp(2.75rem, 1.6rem + 3.6vw, 4.75rem);      /* 44 → 76px */
  --t-h2: clamp(2.25rem, 1.55rem + 2.2vw, 3rem);        /* 36 → 48px (Orbis H2) */
  --t-h3: clamp(1.625rem, 1.35rem + 0.9vw, 1.875rem);   /* 26 → 30px */
  --t-card: 1.5rem;                                     /* 24px card titles */
  --t-lead: clamp(1.25rem, 1.1rem + 0.45vw, 1.375rem);  /* 20 → 22px */
  --t-body: 1.1875rem;                                  /* 19px */
  --t-card-body: 1.0625rem;                             /* 17px card descriptions, tables */
  --t-ui: 0.9375rem;                                    /* 15px nav and buttons, uppercase */
  --t-eyebrow: 0.9375rem;                               /* 15px eyebrows, meta rows, captions (premium 10) */
  --t-label: 0.625rem;                                  /* 10px footer column labels */
  --lh-body: 1.7;
  --lh-title: 1.1;
  --track-ui: 0.12em;
  --track-eyebrow: 0.16em;
  --measure: 40rem;                                     /* ≈ 68 characters of 19px body */

  /* ---------- Shape ---------- */
  --radius: 6px;
  --btn-h: 56px;
  --tap: 48px;
  --focus-ring: 3px solid var(--gold);

  /* ---------- Spacing (8px grid) ---------- */
  --sp-4: 0.25rem;
  --sp-8: 0.5rem;
  --sp-12: 0.75rem;
  --sp-16: 1rem;
  --sp-24: 1.5rem;
  --sp-32: 2rem;
  --sp-48: 3rem;
  --sp-64: 4rem;
  --sp-80: 5rem;
  --sp-96: 6rem;
  --sp-112: 7rem;
  --sp-128: 8rem;
  --sp-160: 10rem;
  --section-y: var(--sp-160);
  --container: 1180px;
  --gutter: var(--sp-32);
  --header-h: 96px;               /* premium 2: 96px bar with a 64px logo; 72px once scrolled (≥1280) */
  --fab-bottom: 24px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-l: env(safe-area-inset-left, 0px);

  /* ---------- Motion ---------- */
  /* premium 3, §5.10: one easing and one duration scale (200 / 350 / 500 / 800 ms) for the whole site */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: var(--ease-out);
  --dur-hover: 350ms;
  --dur-reveal: 700ms;
  --dur-marquee: 60s;
  /* choreography (premium 10): eyebrow → headline → paragraph → actions 80ms apart; cards in rows of three 60ms
     apart; hairlines draw from the left in 500ms; nothing rises more than 12px, nothing scales */
  --rise: 12px;
  --seq-step: 80ms;
  --card-step: 60ms;
  --dur-line: 500ms;
  --dur-page-fade: 350ms;
  --emblem-rest: 0.45;

  /* ---------- Layers ---------- */
  --z-header: 100;
  --z-fab: 90;
  --z-asst: 200;
  --z-modal: 300;
  --z-veil: 1000;

  /* ==========================================================================
     Legacy names → new values (feature stylesheets: shop, account, stages, kompas, lists,
     kitchen, spec, season, share, search, story, reel). Gold replaces the old green accent,
     burgundy/black replace the old burgundy layers, corners are 6px, surfaces are flat.
     ========================================================================== */
  --brand-red: var(--red);
  --brand-red-hover: var(--red-dark);
  --brand-red-deep: var(--ground-burgundy);
  --brand-red-deeper: var(--ground-black);
  --brand-red-raised: var(--ground-raised);
  --brand-green: var(--gold-ink);
  --brand-green-hover: #5E4513;
  --brand-green-light: var(--gold);
  --accent-paprika: #C8202A;
  --accent-horgoski-zacin: #E0A21B;
  --accent-dodaci-jelima: #D45A1F;
  --accent-cajevi: #3E7F3A;
  --accent-poh: #E07B12;
  --accent-supe: #C9861A;
  --accent-poslastice: #7A4A2E;
  --accent-zacini: #5B6B2F;
  --accent-ostalo: #44617A;
  --cream-50: var(--warm-white);
  --cream-200: #ECE4D6;
  --cream-300: #DCCFB8;
  --white: #FFFFFF;
  --text: var(--ink);
  --text-muted: var(--ink-body);
  --on-dark-muted: var(--on-dark-body);
  --hairline: var(--line-light);
  --hairline-strong: var(--line-light-strong);
  --hairline-dark: var(--line-dark-soft);
  --container-legacy: 1320px;
  --header-h-scrolled: var(--header-h);
  --logo-h: 64px;
  --logo-scale-scrolled: 1;
  --font-display: var(--font-serif);
  --font-body: var(--font-sans);
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --fs-display: var(--t-h1);
  --fs-h2: var(--t-h2);
  --fs-h3: var(--t-h3);
  --fs-h4: var(--t-card);
  --fs-lead: var(--t-lead);
  --fs-body: var(--t-body);
  --fs-small: var(--t-card-body);
  --fs-nav: var(--t-ui);
  --fs-micro: var(--t-eyebrow);
  --fs-counter: clamp(3rem, 5vw, 4.5rem);
  --fs-marquee: clamp(2rem, 4vw, 3.5rem);
  --fs-ghost: clamp(5rem, 14vw, 14rem);
  --fs-ghost-xl: clamp(6rem, 18vw, 18rem);
  --fs-ghost-404: clamp(10rem, 32vw, 26rem);
  --fs-initial: clamp(5rem, 10vw, 8rem);
  --fs-year: clamp(2.75rem, 5vw, 4rem);
  --lh-display: 1.05;
  --lh-heading: var(--lh-title);
  --lh-snug: 1.35;
  --tracking-display: 0em;
  --tracking-micro: var(--track-eyebrow);
  --measure-lead: 34em;
  --measure-body: var(--measure);
  --mask-side: 0.05em;
  --mask-foot: 0.12em;
  --mask-pad: 0.18em;
  --edge-w: 1px;
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 600;
  --r-sm: var(--radius);
  --r-md: var(--radius);
  --r-lg: var(--radius);
  --r-pill: var(--radius);
  --glass-bg: rgba(245, 240, 232, 0.04);
  --glass-bg-hover: rgba(245, 240, 232, 0.07);
  --glass-border: var(--line-dark);
  --glass-blur: 0px;
  --card-bg: var(--warm-white);
  --card-border: var(--line-light);
  --shadow-card: var(--shadow-soft);
  --shadow-lift: var(--shadow-lifted);
  --shadow-float: 0 30px 80px -30px rgba(46, 8, 11, 0.6);
  --glow-red: none;
  --grain: none;
  --grain-opacity: 0;
  --deco-paprika: none;
  --deco-leaf: none;
  --deco-opacity: 0;
  --dur-micro: 200ms;
  --dur-hero: 700ms;
  --dur-page: 800ms;
  --stagger: 60ms;
  --z-cursor: 1100;
  --z-intro: 1200;                  /* premium 3: the preloader is above everything (inline <head> CSS uses the same 1200) */

  color-scheme: light;
}

@media (max-width: 1024px) {
  :root {
    --section-y: var(--sp-112);   /* fixed rhythm: 160 / 112 / 80 */
    --header-h: 76px;
    --logo-h: 48px;   /* final polish §3.6: 64 on desktop, 48 below */
  }
}
@media (max-width: 768px) {
  :root {
    --section-y: var(--sp-80);
    --gutter: 1.25rem;
    --header-h: 72px;
    --logo-h: 48px;
    --t-body: 1.125rem;     /* 18px on phones */
    --fab-bottom: 16px;
  }
}
