/* ============================================================================
   Kulturhuset Stories — design tokens

   Ported from the Webflow build (kulturhuset.webflow.shared.a5b77c295.css) so
   the migrated site is token-for-token the same system, not a lookalike. The
   Webflow swatch names are kept as the BASE ramp because the brand assets and
   the client's own notes refer to them; everything the markup touches goes
   through the SEMANTIC layer below it.

   Change a token here and the whole site restyles.
   ========================================================================== */

/* ── Fonts ────────────────────────────────────────────────────────────────
   Three families, as Webflow had them:

     Minion Pro   — display serif. ONLY a Regular (400) face exists, and the
                    Webflow build set headings to 900, so every heading is a
                    SYNTHESISED bold. That is reproduced here deliberately:
                    it is what the live site looks like. Ship a real Minion
                    Pro Bold into assets/fonts/ and add a 700 @font-face and
                    the headings sharpen up with no markup change.
     Gotham       — the workhorse grotesque. NOTE there is no 400 face in the
                    family (Webflow never uploaded Gotham Book under this
                    name), so CSS weight matching resolves 400 → Medium 500.
                    Menu item names therefore render in Medium. Kept as-is.
     Gotham Book  — a SEPARATE family in Webflow, used by the nav and body.

   All faces are subset to Latin + Latin Extended-A (Swedish, Nordic, German,
   French, Polish … are all covered) and converted .otf → woff2: 1.1 MB of
   OpenType became 182 KB. */

@font-face {
  font-family: "Minion Pro";
  src: url("/assets/fonts/MinionPro-Regular.5cdb841f628f7308.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham Book";
  src: url("/assets/fonts/Gotham-Book.e26e10b36c7bbcf4.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("/assets/fonts/Gotham-Light.a2d7ddbf00d6a2e6.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("/assets/fonts/Gotham-Medium.e0293b67814d39b1.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("/assets/fonts/Gotham-Bold.efb3ac166ab47a3d.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("/assets/fonts/Gotham-Black.8e8f7d2b22d6b5c0.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ── BASE: the Webflow swatches, verbatim ───────────────────────────────
     Do not reference these from markup. They exist so a designer comparing
     this build against the Webflow project finds the same hex in the same
     named slot. Point the SEMANTIC tokens below at them instead. */

  /* Neutral — warm greys running to a near-black that is not quite #000. */
  --swatch-neutral-50: #fdfdfc;
  --swatch-neutral-100: #f2f2ec;
  --swatch-neutral-200: #e2e1d5;
  --swatch-neutral-300: #c9c7b0;
  --swatch-neutral-400: #aba885;
  --swatch-neutral-500: #918d66;
  --swatch-neutral-600: #787551;
  --swatch-neutral-700: #626042;
  --swatch-neutral-800: #535239;
  --swatch-neutral-900: #474633;
  --swatch-neutral-950: #000101;

  /* Primary — cream through gold to the dark brown the headings are set in. */
  --swatch-primary-50: #fdfbeb;
  --swatch-primary-100: #f9f4cc;
  --swatch-primary-200: #f3e894;
  --swatch-primary-300: #ecd85d;
  --swatch-primary-400: #e7c638;
  --swatch-primary-500: #e0aa20;
  --swatch-primary-600: #c68519;
  --swatch-primary-700: #a46119;
  --swatch-primary-800: #864d1a;
  --swatch-primary-900: #6e4019;
  --swatch-primary-950: #3f2109;

  /* Secondary — amber. */
  --swatch-secondary-50: #fff9eb;
  --swatch-secondary-100: #ffe6ad;
  --swatch-secondary-200: #ffdb88;
  --swatch-secondary-300: #ffc24a;
  --swatch-secondary-400: #ffaa20;
  --swatch-secondary-500: #f98607;
  --swatch-secondary-600: #dd6002;
  --swatch-secondary-700: #b74006;
  --swatch-secondary-800: #94310c;
  --swatch-secondary-900: #7a290d;
  --swatch-secondary-950: #461302;

  /* Brand accents — the three pastels from the brand sheet. Unused by the
     current pages; kept so the palette survives the migration intact. */
  --swatch-accent-sage: #d6e1ca;
  --swatch-accent-blue: #a7b5cf;
  --swatch-accent-peach: #fbcfb5;

  /* ── SEMANTIC: what the markup actually uses ───────────────────────────── */

  /* Surfaces. The page is cream with a paper texture laid over it; menu
     cards repeat the same cream so a card reads as a sheet on a sheet. */
  --color-bg: var(--swatch-primary-50);
  --color-surface: var(--swatch-primary-50);
  --color-surface-sunken: var(--swatch-primary-100);
  --color-invert: var(--swatch-neutral-950);

  /* Text. --color-heading is the warm brown; body copy is the near-black.
     Both clear WCAG AA comfortably on --color-bg (13.0:1 and 19.6:1). */
  --color-text: var(--swatch-neutral-950);
  --color-heading: var(--swatch-primary-950);
  --color-text-on-invert: var(--swatch-primary-50);

  /* Muted tones. The Webflow build drew the footer and other asides with
     opacity:0.2 on near-black, which lands at roughly 1.6:1 against the
     cream — far under the 4.5:1 floor and the one contrast failure carried
     over from the old site. These two tokens replace that trick: same warm,
     receding feel, measured against --color-bg.
       --color-muted      7.0:1  — small print, captions, footer
       --color-muted-soft 4.6:1  — the lightest tone still allowed on text */
  --color-muted: var(--swatch-neutral-800);
  --color-muted-soft: var(--swatch-neutral-600);

  /* Lines. 1.5px is the Webflow --border-width--main and it is what gives the
     menu-card corner brackets their weight; keep it in px, it is a hairline. */
  --color-line: var(--swatch-neutral-950);
  --color-line-soft: color-mix(in srgb, var(--swatch-neutral-950) 18%, transparent);
  --border-w: 1.5px;
  /* Deliberately thicker than the hairline: a focus ring is the only
     thing telling a keyboard user where they are. 2px over the brand
     orange gives 3.6:1 on the cream, clearing SC 1.4.11's 3:1. */
  --focus-ring-w: 2px;

  /* Interactive */
  --color-link: var(--swatch-primary-950);
  --color-link-hover: var(--swatch-primary-700);
  --color-focus: var(--swatch-secondary-600);

  /* Accents used by interaction states. The Webflow build hovers nav links
     to the brand brown and the menu tabs to its gold. */
  --color-accent-gold: var(--swatch-primary-500);

  /* State */
  --color-soldout: var(--swatch-neutral-600);

  /* ── Typography ─────────────────────────────────────────────────────────
     Gotham Book leads the body stack. The Webflow build let body copy fall
     through to Arial (the brand family was declared but never applied to
     <body>), so menu descriptions render in Arial on the live site. That
     reads as an oversight rather than a decision, so the brand font is
     applied here. To go back to the old rendering, swap --font-body for
     the system stack — one token, nothing else changes. */
  --font-display: "Minion Pro", Georgia, "Times New Roman", serif;
  --font-body: "Gotham Book", "Helvetica Neue", Arial, sans-serif;
  --font-alt: "Gotham", "Helvetica Neue", Arial, sans-serif;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;
  --fw-black: 900;

  /* ── Fluid size scale ───────────────────────────────────────────────────
     Ported verbatim from Webflow's responsive block. Every step is a clamp
     between a phone value and a desktop value, so type and spacing scale
     together and nothing snaps at a breakpoint. The names keep Webflow's
     "what it is at full size" convention: --size-6rem IS 6rem on a wide
     screen and 3.5rem on a narrow one. */
  --size-0-125: 0.125rem;
  --size-0-25: 0.25rem;
  --size-0-5: 0.5rem;
  --size-0-75: 0.75rem;
  --size-1: 1rem;
  --size-1-25: 1.25rem;
  --size-1-5: 1.5rem;
  --size-2: clamp(1.75rem, 1.678rem + 0.36vw, 2rem);
  --size-2-5: clamp(2rem, 1.858rem + 0.71vw, 2.5rem);
  --size-3: clamp(2.25rem, 2.036rem + 1.07vw, 3rem);
  --size-3-5: clamp(2.375rem, 2.053rem + 1.61vw, 3.5rem);
  --size-4: clamp(2.5rem, 2.072rem + 2.14vw, 4rem);
  --size-4-5: clamp(2.75rem, 2.25rem + 2.5vw, 4.5rem);
  --size-5: clamp(3rem, 2.428rem + 2.86vw, 5rem);
  --size-5-5: clamp(3.25rem, 2.608rem + 3.21vw, 5.5rem);
  --size-6: clamp(3.5rem, 2.786rem + 3.57vw, 6rem);
  --size-6-5: clamp(3.75rem, 2.964rem + 3.93vw, 6.5rem);
  --size-7: clamp(4rem, 3.142rem + 4.29vw, 7rem);
  --size-7-5: clamp(4.25rem, 3.322rem + 4.64vw, 7.5rem);
  --size-8: clamp(4.5rem, 3.5rem + 5vw, 8rem);
  --size-8-5: clamp(4.75rem, 3.678rem + 5.36vw, 8.5rem);
  --size-9: clamp(5rem, 3.858rem + 5.71vw, 9rem);
  --size-9-5: clamp(5.25rem, 4.036rem + 6.07vw, 9.5rem);
  --size-10: clamp(5.5rem, 4.214rem + 6.43vw, 10rem);
  --size-11: clamp(5.75rem, 4.25rem + 7.5vw, 11rem);
  --size-12: clamp(6rem, 4.286rem + 8.57vw, 12rem);
  --size-13: clamp(6.5rem, 4.642rem + 9.29vw, 13rem);
  --size-14: clamp(7rem, 5rem + 10vw, 14rem);
  --size-15: clamp(7.5rem, 5.358rem + 10.71vw, 15rem);
  --size-16: clamp(8rem, 5.714rem + 11.43vw, 16rem);

  /* Type ramp — Webflow mapped each heading level onto the scale above. */
  --fs-display: var(--size-7);
  --fs-h1: var(--size-6);
  --fs-h2: var(--size-5);
  --fs-h3: var(--size-4);
  --fs-h4: var(--size-3);
  --fs-h5: var(--size-2);
  --fs-h6: var(--size-1-5);
  /* Measured off the Webflow build at three widths: 21.40px at 520,
     22.91px at 1024, 24.16px at 1440. A static 1.25rem missed all three. */
  --fs-large: clamp(1.25rem, 1.24rem + 0.3vw, 1.75rem);
  /* Body copy IS fluid, just gently: the Webflow build runs 16.14px at 520
     and 16.78px at 1440, a deliberately quiet ramp so running text stays
     readable while the headings do the scaling. This was a flat 1.25rem
     (20px), which was both static and four points too big. */
  --fs-body: clamp(1rem, 0.986rem + 0.07vw, 1.125rem);
  --fs-small: 0.875rem;

  --lh-heading: 1;
  --lh-h3: 1.1;
  --lh-body: 1.5;
  --lh-loose: 1.65;

  --tr-heading: 0;
  --tr-caps: 0.03em;

  /* ── Spacing & layout ───────────────────────────────────────────────── */
  --gap-xs: var(--size-1);
  --gap-sm: var(--size-1-5);
  --gap-md: var(--size-3);
  --gap-lg: var(--size-5);

  --gutter: clamp(1rem, 0.428rem + 2.86vw, 3rem);
  --section-y: var(--size-8);
  --max-page: 80rem;
  --max-prose: 60ch;

  /* The menu card is a fixed 45rem sheet on desktop (720px in the Webflow
     build) that shrinks to the viewport on a phone, because the cards sit in
     a horizontal scroller and a fluid card would make the scroll meaningless. */
  --menu-card-w: min(45rem, 88vw);
  --menu-corner: var(--size-4);

  --tap-min: 2.75rem;

  /* ── Motion ─────────────────────────────────────────────────────────── */
  --ease-out: cubic-bezier(0.2, 0.7, 0.25, 1);
  --ease-circ-out: cubic-bezier(0, 0.55, 0.45, 1);
  --dur-fast: 150ms;
  /* Hover colour changes. The Webflow build used 200ms; a little longer
     reads as a wash rather than a switch, which is what was asked for. */
  --dur-hover: 300ms;
  --dur: 250ms;
  --dur-slow: 450ms;
  --dur-reveal: 700ms;
  /* How long the menu rail takes to centre a card. The Webflow build used
     250ms, which read as a jump once the cards were side by side; this is
     slow enough to see the panels move past. */
  --dur-scroll: 520ms;
}

/* The scroller easing and the reveal both read these, so reduced motion has
   to neutralise them here rather than in a dozen rules. site.js reads
   --dur-scroll too, which is why it is a token and not a constant in the JS. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 1ms;
    --dur-hover: 1ms;
    --dur: 1ms;
    --dur-slow: 1ms;
    --dur-reveal: 1ms;
  }
}
