@font-face { font-family: "Switzer"; src: url(fonts/Switzer-300.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Switzer"; src: url(fonts/Switzer-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Switzer"; src: url(fonts/Switzer-500.woff2) format("woff2"); font-weight: 500 600; font-display: swap; }

:root {
  --paper: #ECE7DD;
  --bgc: #ECE7DD;
  --ink: #23261F;
  --ink-2: #6B6A5E;
  --line: rgba(35, 38, 31, .14);
  --olive: #5C6139;
  --accent: #5C6139;
  --forest: #262C21;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Switzer", -apple-system, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --gutter: clamp(20px, 6vw, 104px);
  color-scheme: light;
}
body[data-tone="dark"] {
  --bgc: #262C21;
  --ink: #ECE7DD;
  --ink-2: #A6A592;
  --line: rgba(236, 231, 221, .16);
  --accent: #D6C27A;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16.5px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: color .5s var(--ease);
}
a { color: inherit; }
b, strong { font-weight: 500; }
::selection { background: var(--olive); color: #fff; }

#gl {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh; height: 100lvh;
  display: block; z-index: 0;
  opacity: 0; transition: opacity 1s var(--ease-out);
}
.gl-ready #gl { opacity: 1; }
.fallback { display: none; }
.no-gl #gl { display: none; }
.no-gl .fallback {
  display: block; position: fixed; z-index: 0;
  right: 8vw; top: 50%; height: 70vh; transform: translateY(-50%);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; z-index: 10; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 32px;
  padding: 18px var(--gutter);
  font-size: 14px;
  transition: color .5s var(--ease);
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bgc) 80%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  opacity: 0; transition: opacity .3s var(--ease);
}
.nav.solid::before { opacity: 1; }
.wordmark { font: 400 34px/1 var(--serif); letter-spacing: -.01em; text-decoration: none; }
.nav nav { display: flex; gap: 28px; margin-left: auto; }
.nav nav a { text-decoration: none; color: var(--ink-2); position: relative; padding: 6px 0; transition: color .2s var(--ease); }
.nav nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav nav a:hover { color: var(--ink); }
  .nav nav a:hover::after { transform: scaleX(1); }
}
.nav nav a[aria-current] { color: var(--ink); }
.nav nav a[aria-current]::after { transform: scaleX(1); }
.pill {
  border: 1px solid var(--ink); border-radius: 99px; padding: 7px 16px; text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .16s var(--ease-out);
}
.pill:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .pill:hover { background: var(--ink); color: var(--bgc); } }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.menu-btn { display: none; }

.skip { position: fixed; z-index: 30; left: 16px; top: -60px; padding: 10px 14px; border-radius: 10px; background: var(--forest); color: #ECE7DD; font-size: 13px; text-decoration: none; transition: top .2s var(--ease-out); }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Mobile sheet */
.sheet {
  position: fixed; inset: 0; z-index: 9;
  background: var(--paper);
  padding: 96px 24px 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.sheet[hidden] { display: none; }
.sheet.open { opacity: 1; transform: none; }
.sheet nav { display: grid; }
.sheet a { padding: 12px 0; border-bottom: 1px solid var(--line); font: 400 44px/1.05 var(--serif); text-decoration: none; color: var(--ink); }
.sheet a[aria-current] { color: var(--olive); }
.sheet p { font-size: 13px; color: var(--ink-2); }
.menu-open { overflow: hidden; }

/* ---------- Type ---------- */
main { position: relative; z-index: 1; }
.sec {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 16vh var(--gutter);
}
.copy { width: min(32rem, 42vw); }

.label {
  font: 500 11.5px/1.4 var(--sans);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 24px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
h2 {
  font-size: clamp(44px, 4.4vw, 70px);
  line-height: 1; letter-spacing: -.015em;
  margin-bottom: 26px;
  text-wrap: balance;
}
.copy > p { margin: 0 0 16px; color: var(--ink-2); max-width: 30em; text-wrap: pretty; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; padding-top: 14vh; padding-bottom: 10vh; }
.logo {
  font: 400 clamp(140px, 15vw, 236px)/.78 var(--serif);
  letter-spacing: -.03em;
  margin: 0 0 40px -.05em;
}
.hero .label { margin-bottom: 30px; }
.hero .lede { font: 400 clamp(24px, 2vw, 30px)/1.2 var(--serif); letter-spacing: -.005em; color: var(--ink); max-width: 19em; margin: 0; text-wrap: pretty; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 36px 0 0; border-top: 1px solid var(--line); }
.facts div { padding: 14px 16px 0 0; }
.facts dt { font-size: 12.5px; color: var(--ink-2); }
.facts dd { margin: 2px 0 0; font-size: 14.5px; }

.cta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center;
  padding: 14px 24px; border-radius: 99px;
  background: var(--forest); color: #ECE7DD; text-decoration: none;
  font-size: 14.5px; font-weight: 500;
  transition: background-color .2s var(--ease), transform .16s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.link { font-size: 14.5px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; transition: text-decoration-color .2s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--olive); }
  .link:hover { text-decoration-color: currentColor; }
}

/* Split headings: words rise out of a mask */
.split.r { opacity: 1; transform: none; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.w > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease-out); transition-delay: calc(var(--wi) * 50ms + 80ms); }
.split.in .w > span, .cap.on .w > span { transform: none; }
.cap .w > span { transition-duration: .7s; transition-delay: calc(var(--wi) * 40ms + 60ms); }
.cap:not(.on) .w > span { transition-duration: .3s; transition-delay: 0s; }

/* ---------- Origen ---------- */
.map { margin: 36px 0 8px; }
.map svg { width: 100%; height: auto; display: block; overflow: visible; }
.map .contours path { fill: none; stroke: var(--ink); stroke-width: .7; opacity: .45; }
.map .contours path:nth-child(4n+1) { stroke-width: 1.1; opacity: .7; }
.map .sea line { stroke: var(--ink); stroke-width: .6; opacity: .22; }
.map .coast { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.map .pin circle { fill: var(--ink); }
.map .lbl { font: 400 11px var(--sans); letter-spacing: .02em; fill: var(--ink-2); }
.map .lbl.strong { fill: var(--ink); font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 28px 0 0; border-top: 1px solid var(--line); }
.stats div { padding: 16px 0 0; }
.stats dt { font-size: 12.5px; color: var(--ink-2); }
.stats dd { margin: 4px 0 0; font: 400 52px/1 var(--serif); letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.stats small { font: 400 14px var(--sans); letter-spacing: 0; color: var(--ink-2); margin-left: 5px; }

/* ---------- Elaboració ---------- */
.steps { list-style: none; padding: 0; margin: 36px 0 0; border-bottom: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 16px; padding: 18px 0 17px; border-top: 1px solid var(--line); align-items: baseline; }
.steps time { font: 400 28px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.steps b { display: block; font-size: 15px; }
.steps span { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.5; }

/* ---------- Tast (pinned) ---------- */
.pour { position: relative; height: 420vh; }
.pour .mk { position: absolute; left: 0; width: 1px; height: 0; top: calc(50vh + var(--at) * 100vh); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 0 var(--gutter); }
.captions {
  position: absolute; left: var(--gutter); bottom: 18vh; width: min(30rem, 40vw);
  display: grid; transition: opacity .4s var(--ease-out);
}
.captions .label { color: var(--accent); }
.cap { grid-area: 2 / 1; opacity: 0; transition: opacity .4s var(--ease-out); }
.cap.on { opacity: 1; }
.cap .k { display: block; font: 400 15px var(--serif); font-style: italic; color: var(--ink-2); margin-bottom: 10px; }
.cap h2 { font-size: clamp(44px, 4.4vw, 68px); margin: 0; }
.past .captions, .past .ticks { opacity: 0; }

.ticks {
  position: absolute; left: var(--gutter); bottom: 8vh; margin: 0; padding: 0; list-style: none;
  display: flex; gap: 0; width: min(30rem, 40vw);
  font-size: 12px; color: var(--ink-2);
  opacity: 0; transition: opacity .4s var(--ease-out);
}
.ticks.on { opacity: 1; }
.ticks li { flex: 1; padding-top: 12px; border-top: 1px solid var(--line); position: relative; transition: color .3s var(--ease); }
.ticks li::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out); }
.ticks li.on { color: var(--ink); }
.ticks li.on::before, .ticks li.done::before { transform: scaleX(1); }

/* ---------- Varietats ---------- */
.varieties { list-style: none; padding: 0; margin: 34px 0 18px; border-top: 1px solid var(--line); }
.variety {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 20px; align-items: center;
  padding: 18px 12px; margin: 0 -12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer; outline: none;
  transition: background-color .2s var(--ease);
}
.variety:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.variety.on { background: rgba(255, 255, 255, .35); }
.variety[aria-pressed="true"] { background: rgba(255, 255, 255, .6); }
.variety .sw { width: 16px; height: 30px; border-radius: 6px 6px 3px 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: transform .25s var(--ease-out); }
.variety.on .sw, .variety[aria-pressed="true"] .sw { transform: translateY(-3px); }
.variety h3 { font-size: 32px; line-height: 1; margin-bottom: 6px; }
.variety p { margin: 0; font-size: 14px; color: var(--ink-2); }
.variety .meta { display: grid; justify-items: end; gap: 8px; }
.variety b { font: 400 28px/1 var(--serif); font-variant-numeric: lining-nums; }
.int { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.int i { width: 40px; height: 2px; background: var(--line); position: relative; }
.int i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--n) * 20%); background: var(--ink); }
.fnote { font-size: 13px !important; }

/* ---------- Ampolla ---------- */
.spec { margin: 34px 0 0; border-bottom: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 16px; padding: 15px 0; border-top: 1px solid var(--line); }
.spec dt { font-size: 13px; color: var(--ink-2); }
.spec dd { margin: 0; font-size: 14.5px; }

/* ---------- Final ---------- */
.final { min-height: 88vh; justify-content: center; align-items: flex-end; padding-top: 0; padding-bottom: 9vh; }
#ampolla { padding-bottom: 8vh; }
.closing-wrap { text-align: center; }
.closing-wrap .label { margin-bottom: 10px; }
.closing { font-size: clamp(120px, 14vw, 220px); letter-spacing: -.03em; line-height: .85; margin: 0; }
.closing-sub { margin: 18px 0 0; font: italic 400 26px var(--serif); color: var(--ink-2); }

.foot {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px;
  padding: 40px var(--gutter) 34px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2);
}
.foot p { margin: 8px 0 0; }
.flinks { display: flex; gap: 24px; justify-self: center; align-self: center; }
.flinks a, .totop { font-size: 14px; text-decoration: none; color: var(--ink-2); transition: color .2s var(--ease); }
.totop { justify-self: end; align-self: center; }
@media (hover: hover) and (pointer: fine) { .flinks a:hover, .totop:hover { color: var(--ink); } }
.disclaimer { grid-column: 1 / -1; font-size: 12px; opacity: .8; }

/* Reveal */
.r {
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.r.in { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  body { font-size: 16px; }
  .nav { padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); gap: 12px; }
  .nav nav { display: none; }
  .pill { margin-left: auto; padding: 7px 14px; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: 0; padding: 10px 0 10px 6px; color: var(--ink);
    font: inherit; cursor: pointer;
  }
  .menu-btn i { width: 18px; height: 7px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; transition: transform .25s var(--ease-out); }
  .menu-btn[aria-expanded="true"] i { transform: scaleY(.15); }

  .sec { min-height: 125vh; align-items: flex-end; padding: 52vh 16px 8vh; }
  .copy {
    width: 100%;
    background: var(--bgc);
    border: 1px solid var(--line); border-radius: 22px;
    box-shadow: 0 -18px 40px -24px rgba(38, 44, 33, .35);
    padding: 28px 22px 24px;
    transition: background-color .5s var(--ease);
  }
  h2 { font-size: 42px; margin-bottom: 18px; }
  .label { margin-bottom: 18px; }

  .hero { padding-top: 46vh; min-height: 100vh; padding-bottom: 24px; }
  .hero .copy { background: none; border: 0; box-shadow: none; padding: 0; }
  .hero .label { margin-bottom: 18px; }
  .logo { font-size: 128px; margin-bottom: 22px; }
  .hero-more {
    margin: 0 -2px; padding: 22px 20px 20px;
    background: var(--bgc);
    border: 1px solid var(--line); border-radius: 22px;
    box-shadow: 0 -18px 40px -24px rgba(38, 44, 33, .35);
  }
  .hero .lede { font-size: 24px; }
  .facts { margin-top: 24px; }
  .facts div { padding-right: 8px; }
  .facts dd { font-size: 13.5px; }
  .cta { margin-top: 24px; gap: 20px; }

  .map .lbl { font-size: 15px; }
  .stats dd { font-size: 42px; }
  .steps li { grid-template-columns: 4.8rem 1fr; gap: 12px; }
  .steps time { font-size: 24px; }
  .spec div { grid-template-columns: 5.6rem 1fr; gap: 12px; }

  .captions { left: 16px; right: 16px; width: auto; bottom: calc(8vh + 44px); }
  .cap h2 { font-size: 38px; }
  .ticks { left: 16px; right: 16px; width: auto; bottom: 5vh; }

  .variety { gap: 14px; }
  .variety h3 { font-size: 28px; }
  .final { padding: 0 16px 7vh; }
  .closing { font-size: 136px; }
  .foot { grid-template-columns: 1fr; padding: 32px 16px calc(28px + env(safe-area-inset-bottom)); }
  .flinks { flex-wrap: wrap; justify-self: start; gap: 14px 20px; }
  .totop { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .r { opacity: 1; transform: none; transition: none; }
  .cap, .ticks, .ticks li, .ticks li::before, .variety, .btn { transition: none; }
  .w > span { transform: none; transition: none; }
  body, .nav, .nav::before, #gl, .sheet, .pill, .captions { transition: none; }
  html { scroll-behavior: auto; }
}
