/* Vin de la Neu — scroll site. Palette sampled from the bottle: paper, glass green, wax white, red script. */
@font-face { font-family: "Libre Baskerville"; src: url("../assets/fonts/libre-baskerville-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("../assets/fonts/libre-baskerville-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../assets/fonts/montserrat-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --snow: #ece9e2;
  --paper: #f6f4ef;
  --ink: #20241d;
  --forest: #0d3515;
  --moss: #d3dcc6;
  --night: #0f130f;
  --red: #a9242b;
  --serif: "Libre Baskerville", "Baskerville", "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
body[data-theme="snow"]   { --bg: var(--snow);   --fg: var(--ink);   --muted: #5d6258; --ghost: #dcd8ce; --accent: var(--red); --line: rgba(32, 36, 29, .18); }
body[data-theme="moss"]   { --bg: var(--moss);   --fg: var(--ink);   --muted: #4f5a48; --ghost: #c3cdb4; --accent: var(--forest); --line: rgba(32, 36, 29, .2); }
body[data-theme="forest"] { --logo-filter: invert(1); --bg: var(--forest); --fg: var(--paper); --muted: #b9c8b3; --ghost: #15451d; --accent: #e9c9a0; --line: rgba(246, 244, 239, .22); }
body[data-theme="night"]  { --logo-filter: invert(1); --bg: var(--night);  --fg: var(--paper); --muted: #a9b0a4; --ghost: #1b211a; --accent: #9fce8a; --line: rgba(246, 244, 239, .2); }
body[data-theme="red"]    { --logo-filter: invert(1); --bg: var(--red);    --fg: var(--paper); --muted: #f3d5d2; --ghost: #b8303a; --accent: var(--paper); --line: rgba(246, 244, 239, .28); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; font-weight: 420;
  transition: background-color .9s var(--ease), color .6s var(--ease);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
p { margin: 0 0 1.15em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; line-height: 1.02; text-transform: uppercase; letter-spacing: .02em; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 4.3vw, 4.2rem); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 20; background: var(--fg); color: var(--bg); padding: .6rem 1rem; }
.skip:focus { top: 1rem; }

/* ---------- stage (fixed WebGL canvas between the ghost type and the copy) ---------- */
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 11; pointer-events: none; filter: drop-shadow(0 2.2vh 2.4vh rgba(0, 0, 0, .22)); opacity: 0; transition: opacity .8s var(--ease); }
#stage.is-ready { opacity: 1; }

.fallback-bottle { display: none; position: fixed; left: 50%; top: 50%; height: 80vh; width: auto; transform: translate(-50%, -50%); z-index: 2; pointer-events: none; }
.no-webgl .fallback-bottle { display: block; }
.no-webgl #stage { display: none; }

/* ---------- nav ---------- */
/* Solid bar in the page colour: copy disappears under it instead of colliding with the links. */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: .7rem var(--gutter); background: var(--bg); transition: background-color .9s var(--ease); }
.nav__brand { display: block; line-height: 0; }
.logo { display: block; height: 3.6rem; width: auto; filter: var(--logo-filter, none); transition: filter .6s var(--ease); }
.footer__logo { position: relative; z-index: 3; height: clamp(5rem, 9vw, 7.5rem); align-self: flex-start; flex: none; }
.nav__links { display: flex; gap: clamp(1rem, 2.2vw, 2.2rem); }
.nav__links a { white-space: nowrap; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; text-decoration: none; padding: .4rem 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.nav__links a:hover, .nav__links a[aria-current="true"] { background-size: 100% 1px; }
.nav__toggle { display: none; font: inherit; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: inherit; background: none; border: 0; padding: .6rem 0; cursor: pointer; }

/* ---------- altimeter: scroll progress as metres above sea level ---------- */
.altimeter { position: fixed; right: calc(var(--gutter) / 2); top: 50%; transform: translate(50%, -50%); z-index: 9; display: flex; flex-direction: column; align-items: center; gap: .7rem; font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.altimeter__value, .altimeter__label { writing-mode: vertical-rl; white-space: nowrap; }
.altimeter__value b { font-family: var(--serif); font-size: 1rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.altimeter__track { width: 1px; height: 7rem; background: var(--line); position: relative; }
.altimeter__track i { position: absolute; inset: auto 0 0 0; height: 100%; background: currentColor; transform-origin: bottom; transform: scaleY(0); }
.altimeter__label { color: var(--muted); }

/* ---------- scenes ---------- */
.scene { position: relative; min-height: 100vh; min-height: 100svh; padding: clamp(6rem, 16vh, 11rem) var(--gutter) clamp(5rem, 14vh, 9rem); }
.head, .copy { position: relative; z-index: 3; }
.copy { max-width: 33rem; }
.copy p { color: var(--muted); }
.copy .lead { color: var(--fg); font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.5; font-weight: 480; }
.head { margin-bottom: clamp(1.6rem, 4vh, 3rem); max-width: 40rem; }
.kicker { font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 1rem; color: var(--muted); }
.stage-gap { display: none; }
.scene--right .head, .scene--right .copy { margin-left: auto; width: min(33rem, 100%); }
.link { display: inline-block; margin-top: .6rem; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding-bottom: .35rem; border-bottom: 1px solid currentColor; }
.link::after { content: " →"; }

/* hero */
.scene--hero { display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(2rem, 6vh, 4rem); overflow: hidden; }
.hero__type { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; text-transform: uppercase; color: var(--ghost); line-height: .86; pointer-events: none; user-select: none; padding-top: 4vh; }
.hero__line { font-size: clamp(2.6rem, 11.5vw, 13rem); letter-spacing: .06em; white-space: nowrap; }
.hero__line--big { font-size: clamp(7rem, 31vw, 36rem); letter-spacing: .03em; }
.hero__foot { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 2rem; }
.hero__year { margin: 0 0 .4rem; font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.hero__vintage h1 { font-size: clamp(2rem, 4vw, 3.6rem); }
.hero__claim { margin: 0; max-width: 24rem; justify-self: end; grid-column: 3; font-size: 1rem; }
.hero__scroll { grid-column: 2; grid-row: 1; font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; padding-bottom: 1.6rem; position: relative; }
.hero__scroll::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 1.1rem; background: currentColor; animation: drip 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* aroma marquee: sits behind the bottle */
.marquee { position: absolute; left: 0; right: 0; bottom: clamp(2rem, 9vh, 6rem); z-index: 1; overflow: hidden; pointer-events: none; }
.marquee__track { display: flex; width: max-content; animation: slide 46s linear infinite; }
.marquee__track span { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(3rem, 9vw, 9rem); line-height: 1.1; color: var(--ghost); white-space: nowrap; padding-right: .5em; }
.marquee__track span::after { content: "·"; padding-left: .5em; }
@keyframes slide { to { transform: translateX(-50%); } }
#decima { padding-bottom: clamp(12rem, 34vh, 20rem); }

/* figures */
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem; margin: 2.6rem 0 0; padding-top: 2rem; border-top: 1px solid var(--line); }
.figures div { margin: 0; }
.figures dt { font-family: var(--serif); font-weight: 700; font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.1; white-space: nowrap; }
.figures dd { margin: .35rem 0 0; font-size: .82rem; color: var(--muted); line-height: 1.4; }

/* vintages */
.scene--wide .annate__head { position: relative; z-index: 3; margin-bottom: clamp(2rem, 6vh, 4rem); }
.annate { position: relative; z-index: 3; list-style: none; margin: 0; padding: 0; max-width: 58rem; }
.annata { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: 1rem 3rem; padding: clamp(1.8rem, 4vh, 2.8rem) 0; border-top: 1px solid var(--line); }
.annata h3 { font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1; letter-spacing: 0; }
.annata p { color: var(--muted); max-width: 36rem; }
.annata .annata__count { color: var(--fg); font-weight: 600; margin-bottom: 0; }

/* footer */
.scene--footer { display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; padding-bottom: 1.6rem; overflow: hidden; }
.footer__top, .footer__grid, .footer__legal { position: relative; z-index: 3; }
.footer__top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 2rem; }
.footer__cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.button { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 1.05rem 1.5rem; background: var(--fg); color: var(--bg); border: 1px solid var(--fg); transition: background-color .3s var(--ease), color .3s var(--ease); }
.button:hover { background: transparent; color: var(--fg); }
.button--ghost { background: transparent; color: var(--fg); }
.button--ghost:hover { background: var(--fg); color: var(--bg); }
.footer__grid { display: flex; flex-wrap: wrap; gap: 2rem 6rem; }
.footer__grid address { font-style: normal; display: grid; gap: .5rem; }
.footer__grid a { text-decoration: none; }
.footer__grid a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__social { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; align-content: start; }
.footer__word { position: relative; z-index: 1; margin: 0; font-family: var(--serif); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; text-align: center; font-size: clamp(.8rem, 4.1vw, 5.2rem); line-height: 1; color: var(--ghost); }
.footer__word span { font-size: 1.5em; vertical-align: -.08em; }
.footer__legal { margin: 0; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* reveal (JS adds .reveal-ready to <html>; without JS everything is visible) */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(1.6rem); }

/* ---------- compact menu: the six links need about 1180px on one line ---------- */
@media (max-width: 1179px) {
  .nav__toggle { display: block; position: relative; z-index: 12; }
  .nav__links { position: fixed; inset: 0; z-index: 11; flex-direction: column; justify-content: center; gap: 1.4rem; padding: var(--gutter); background: var(--bg); transform: translateY(-100%); transition: transform .5s var(--ease), background-color .9s var(--ease); visibility: hidden; }
  .nav__links a { font-family: var(--serif); font-size: clamp(1.3rem, 5.4vw, 1.9rem); line-height: 1.15; letter-spacing: .04em; font-weight: 700; white-space: normal; }
  .nav.is-open .nav__links { transform: none; visibility: visible; }
  .nav.is-open { z-index: 12; }
  .footer__grid { flex-direction: column; gap: 1.6rem; }
}

/* ---------- small screens: heading, a clear window for the bottle, then an opaque copy panel that slides over it ---------- */
@media (max-width: 899px) {
  #stage { z-index: 2; }
  .altimeter { right: auto; top: 1.35rem; left: 50%; bottom: auto; transform: translateX(-50%); z-index: 10; flex-direction: row; align-items: baseline; gap: .4rem; }
  .altimeter__label { display: none; }
  .altimeter__value, .altimeter__label { writing-mode: horizontal-tb; }
  .altimeter__track { display: none; }
  .altimeter__value b { font-size: .95rem; }
  .scene { padding: 0; min-height: 0; }
  .head { padding: 5.5rem var(--gutter) 1.4rem; margin-bottom: 0; background: var(--bg); transition: background-color .9s var(--ease); max-width: none; }
  .annate__head.head { padding: 0; background: none; }
  .stage-gap { display: block; height: 62svh; }
  .copy, .scene--right .copy { max-width: none; width: auto; margin: 0; padding: 2.4rem var(--gutter) 4rem; background: var(--bg); transition: background-color .9s var(--ease); }
  .scene--right .head { margin-left: 0; width: auto; }
  .logo:not(.footer__logo) { height: 2.7rem; }
  .scene--hero { min-height: 100svh; padding: 5.5rem var(--gutter) 4.2rem; }
  .hero__type { justify-content: flex-start; padding-top: 16svh; }
  .hero__foot { grid-template-columns: 1fr; gap: 1rem; }
  .hero__claim, .hero__scroll { grid-column: 1; grid-row: auto; justify-self: start; }
  .hero__claim { font-size: .92rem; max-width: 19rem; }
  .hero__scroll { display: none; }
  .marquee { bottom: auto; top: 46svh; }
  #decima { padding-bottom: 0; }
  .scene--wide { padding: 5.5rem var(--gutter) 4rem; background: var(--bg); position: relative; z-index: 3; transition: background-color .9s var(--ease); }
  .annata { grid-template-columns: 1fr; }
  .scene--footer { padding: 5.5rem var(--gutter) 3.6rem; min-height: 100svh; }
  .footer__word { margin-top: 30svh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track, .hero__scroll::after { animation: none; }
  body, .copy, .nav__links { transition: none; }
}
