/* ==========================================================================
   Vintner — design tokens  ·  demo: Tenuta Castelvecchio
   Dark "cellar" theme: lees-black with a warm wine undertone, candle-cream text.
   One accent at a time, and it follows the WINE on screen ([data-wine] on <html>):
   red (garnet) · rose (blush) · amber (orange wine) · verjus (young green).
   Each wine has a SURFACE colour (--accent, with --on-accent text on top) and a
   lighter TEXT colour (--accent-text) that is AA-safe on the dark background.
   Fonts: Fraunces (display, variable opsz/wght/SOFT/WONK, roman + italic)
          Instrument Sans (UI, body, labels). Two families only.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic-latin-ext.woff2") format("woff2");
  font-weight: 300 700; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-ext.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-italic-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: italic; font-display: swap;
  font-stretch: 100%;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-italic-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: italic; font-display: swap;
  font-stretch: 100%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  font-stretch: 100%;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  font-stretch: 100%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Registered so the page accent can cross-fade when the wine changes */
@property --accent      { syntax: "<color>"; inherits: true; initial-value: #b4304f; }
@property --on-accent   { syntax: "<color>"; inherits: true; initial-value: #fbf1e4; }
@property --accent-text { syntax: "<color>"; inherits: true; initial-value: #f08ea1; }
html { transition: --accent 0.9s var(--ease-out, ease), --on-accent 0.9s ease, --accent-text 0.9s var(--ease-out, ease); }

:root {
  /* ---- Colour: palette ------------------------------------------------ */
  --c-lees: #2a0d16;        /* base: wine lees, almost black */
  --c-lees-deep: #1f0911;   /* sunken sections, footer */
  --c-cask: #38141f;        /* raised surfaces, cards */
  --c-barrel: #461a27;      /* hover / lifted surfaces */
  --c-bone: #efe4d2;        /* candle cream: text on dark */
  --c-clay: #a99c8c;        /* muted text on dark (AA: 7.1:1 on lees) */
  --c-paper: #efe4d2;       /* light "label paper" surface used sparingly */
  --c-paper-ink: #1c1214;   /* text on label paper */
  --c-danger: #ff8a7a;
  --c-ok: #b9d889;

  /* The four wines: surface / text-on-surface / text-on-dark */
  --w-red: #b4304f;     --w-red-on: #fbf1e4;     --w-red-text: #f08ea1;
  --w-rose: #e9a8a2;    --w-rose-on: #2a0e12;    --w-rose-text: #e9a8a2;
  --w-amber: #d9903f;   --w-amber-on: #1e1006;   --w-amber-text: #e6a95f;
  --w-verjus: #c8d57f;  --w-verjus-on: #172007;  --w-verjus-text: #c8d57f;

  /* ---- Colour: semantic ------------------------------------------------ */
  --bg: var(--c-lees);
  --bg-sunk: var(--c-lees-deep);
  --bg-raised: var(--c-cask);
  --bg-lift: var(--c-barrel);
  --fg: var(--c-bone);
  --fg-muted: var(--c-clay);
  --line: rgba(239, 228, 210, 0.16);
  --line-strong: rgba(239, 228, 210, 0.55);
  --field-line: rgba(239, 228, 210, 0.38);
  --accent: var(--w-red);
  --on-accent: var(--w-red-on);
  --accent-text: var(--w-red-text);

  /* ---- Typography ------------------------------------------------------ */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --fv-display: "SOFT" 50, "WONK" 1;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fw-display: 360;
  --fw-body: 400;

  /* fluid scale (320 → 1440) */
  --fs-mega: clamp(4rem, 0.8rem + 13.5vw, 15rem);
  --fs-display-xl: clamp(3.25rem, 1rem + 9vw, 10.5rem);
  --fs-display-l: clamp(2.8rem, 1rem + 6.4vw, 7.2rem);
  --fs-h1: clamp(2.5rem, 1.1rem + 4.7vw, 5.4rem);
  --fs-h2: clamp(1.9rem, 1.1rem + 2.9vw, 3.6rem);
  --fs-h3: clamp(1.45rem, 1.05rem + 1.5vw, 2.15rem);
  --fs-h4: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem);
  --fs-lead: clamp(1.15rem, 1.02rem + 0.6vw, 1.45rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.72rem;
  --lh-display: 0.92;
  --lh-heading: 1.02;
  --lh-body: 1.62;
  --ls-display: -0.03em;
  --ls-label: 0.16em;

  /* ---- Spacing (base 4) -------------------------------------------------- */
  --s-1: 0.25rem; --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;
  --s-9: 6rem;    --s-10: 8rem;   --s-11: 11rem;
  --section-y: clamp(5rem, 3rem + 8vw, 10rem);

  /* ---- Layout ---------------------------------------------------------- */
  --container: 1440px;
  --gutter: clamp(1.25rem, 0.5rem + 2.6vw, 2.5rem);
  --col-gap: clamp(1rem, 0.6rem + 1.2vw, 1.75rem);
  --nav-h: 84px;

  /* ---- Shape: soft arch (cellar vault) for hero imagery, 2px otherwise ---- */
  --r-sm: 0;
  --r-md: 0;
  --r-pill: 999px;
  --r-vault: 999px 999px 0 0;

  /* ---- Elevation & light ---------------------------------------------- */
  --glow: 0 0 80px color-mix(in srgb, var(--accent) 45%, transparent);
  --shadow-card: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  --shadow-pop: 0 24px 80px -12px rgba(0, 0, 0, 0.85);

  /* ---- Motion ---------------------------------------------------------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-pour: cubic-bezier(0.5, 0, 0.1, 1);
  --dur-1: 160ms; --dur-2: 280ms; --dur-3: 520ms; --dur-4: 900ms;

  /* ---- Z-index scale --------------------------------------------------- */
  --z-nav: 100; --z-menu: 90; --z-modal: 300; --z-toast: 400; --z-curtain: 900; --z-cursor: 1000;
}

/* Wine accent switcher: <html data-wine="rose"> re-tints the whole page */
[data-wine="red"]    { --accent: var(--w-red);    --on-accent: var(--w-red-on);    --accent-text: var(--w-red-text); }
[data-wine="rose"]   { --accent: var(--w-rose);   --on-accent: var(--w-rose-on);   --accent-text: var(--w-rose-text); }
[data-wine="amber"]  { --accent: var(--w-amber);  --on-accent: var(--w-amber-on);  --accent-text: var(--w-amber-text); }
[data-wine="verjus"] { --accent: var(--w-verjus); --on-accent: var(--w-verjus-on); --accent-text: var(--w-verjus-text); }

/* Alternate surface: label paper (light band) for tech sheets and the shop grid */
[data-surface="paper"] {
  --bg: var(--c-paper); --bg-raised: #e4d7c1; --bg-lift: #d9cab0; --bg-sunk: #e4d7c1;
  --fg: var(--c-paper-ink); --fg-muted: #5e4f4a;
  --line: rgba(28, 18, 20, 0.16); --line-strong: rgba(28, 18, 20, 0.85); --field-line: rgba(28, 18, 20, 0.4);
  --accent: #8c1f3a; --on-accent: #fbf1e4; --accent-text: #8c1f3a;
}

/* Pages that keep a pure black base instead of burgundy (<html data-bg="black">) */
html[data-bg="black"] { --c-lees: #0a0607; --c-lees-deep: #050304; --c-cask: #150f11; --c-barrel: #211719; }
