@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: #2B2E25;
  --ink-2: #6E6D60;
  --line: rgba(43, 46, 37, .14);
  --sage: #8C8B73;
  --olive: #5C6139;
  --forest: #262C21;
  --walnut: #7B5234;
  --oil: #B9971A;
  --card: rgba(236, 231, 221, .8);
  --serif: "Cormorant Garamond", "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: #A9A894;
  --line: rgba(236, 231, 221, .16);
  --card: rgba(38, 44, 33, .76);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/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(--sage); 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: 20px 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) 74%, 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 32px/1 var(--serif);
  letter-spacing: .01em; text-transform: none;
  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 15px; 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(--olive); transform-origin: left; transform: scaleX(0); }
body[data-tone="dark"] .progress { background: #D6C27A; }
.menu-btn { display: none; }

/* Skip link and focus */
.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(--olive); outline-offset: 3px; border-radius: 4px; }
body[data-tone="dark"] :focus-visible { outline-color: #D6C27A; }

/* 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 { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font: 400 38px/1.1 var(--serif); text-decoration: none; color: var(--ink); }
.sheet a span { font: 400 12px var(--sans); letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--ink-2); width: 22px; }
.sheet a[aria-current] { color: var(--olive); }
.sheet p { font-size: 14px; color: var(--ink-2); }
.menu-open { overflow: hidden; }

.chapter {
  position: fixed; z-index: 10; right: var(--gutter); bottom: 30px;
  display: flex; align-items: baseline; gap: 12px;
  font-size: 13px; color: var(--ink-2);
  transition: color .5s var(--ease);
}
.chapter b { font: 400 15px var(--serif); letter-spacing: 0; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.chapter i { font-style: normal; margin-left: -6px; opacity: .6; }
.chapter span { display: inline-block; transition: opacity .25s var(--ease), transform .25s var(--ease-out); }
.chapter.swap span { opacity: 0; transform: translateY(6px); }
.chapter { transition: color .5s var(--ease), opacity .3s var(--ease); }
.chapter.gone { opacity: 0; }

/* ---------- Sections ---------- */
main { position: relative; z-index: 1; }
.sec {
  position: relative;
  min-height: 115vh;
  display: flex; align-items: center;
  padding: 18vh var(--gutter);
}
.sec.right { justify-content: flex-end; }
.copy { max-width: 30rem; }
.wide-copy { max-width: 35rem; }

.eyebrow {
  font: 500 12px/1.4 var(--sans);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--olive); margin: 0 0 18px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
em { font-style: italic; font-weight: 300; }
h2 {
  font-size: clamp(36px, 3.4vw, 52px);
  line-height: 1.06; letter-spacing: -.015em;
  margin-bottom: 22px;
  text-wrap: balance;
}
h2 em { color: var(--olive); }
body[data-tone="dark"] h2 em { color: #D6C27A; }
.copy > p { margin: 0 0 16px; color: var(--ink-2); text-wrap: pretty; }
body[data-tone="dark"] .eyebrow { color: #D6C27A; }

/* Hero: the poster */
.hero { min-height: 100vh; padding-top: 11vh; padding-bottom: 9vh; }
.hero .copy { max-width: 33rem; }
.logo {
  font: 300 clamp(110px, 12vw, 176px)/.8 var(--serif);
  letter-spacing: -.01em;
  margin: 0 0 28px -.04em;
}
.caps {
  font: 500 13px/1.5 var(--sans);
  letter-spacing: .12em; text-transform: uppercase;
  margin: 0 0 22px;
}
.dash { display: block; width: 28px; height: 1px; background: var(--ink); margin: 26px 0; opacity: .7; }
.triad { display: flex; gap: 22px; margin: 0 0 26px; font: 500 12px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.hero .lede { font-size: 18px; max-width: 29rem; color: var(--ink); margin: 0; }

.cue {
  position: absolute; left: var(--gutter); bottom: 32px;
  display: flex; align-items: center; gap: 14px;
  font-size: 13px;
  color: var(--ink-2); text-decoration: none;
}
.cue i { width: 1px; height: 44px; background: var(--line); position: relative; overflow: hidden; }
.cue i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%;
  background: var(--ink); animation: cue 2.2s cubic-bezier(0.645, 0.045, 0.355, 1) infinite;
}
@keyframes cue { to { top: 100%; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 34px 0 0; border-top: 1px solid var(--line); }
.stats div { padding: 18px 0 16px; border-bottom: 1px solid var(--line); }
.stats svg.ic { width: 22px; height: 22px; margin-bottom: 10px; }
.stats dt { font-size: 13px; color: var(--ink-2); }
.stats dd { margin: 6px 0 0; font: 400 42px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.stats small { font: 400 14px var(--sans); color: var(--ink-2); }

/* Icons */
svg.ic { width: 24px; height: 24px; fill: none; stroke: var(--olive); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; flex: none; }
body[data-tone="dark"] svg.ic { stroke: #D6C27A; }

/* Hero features + CTA */
.feats { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.feats li { display: flex; gap: 12px; align-items: flex-start; padding: 16px 12px 14px 0; border-bottom: 1px solid var(--line); }
.feats b { display: block; font-weight: 500; font-size: 14px; line-height: 1.3; }
.feats span { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.feats svg.ic { margin-top: 1px; }
.cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px 13px 22px; border-radius: 99px;
  background: var(--forest); color: #ECE7DD; text-decoration: none;
  font-size: 15px; font-weight: 500;
  transition: background-color .2s var(--ease), transform .16s var(--ease-out);
}
.btn svg.ic { width: 18px; height: 18px; stroke: currentColor; transition: transform .25s var(--ease-out); }
.btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--olive); }
  .btn:hover svg.ic { transform: translateX(3px); }
}
.note { font-size: 13px; color: var(--ink-2); }

/* 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: .1em; margin-bottom: -.1em; }
.w > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease-out); transition-delay: calc(var(--wi) * 55ms + 80ms); }
.split.in .w > span, .cap.on .w > span { transform: none; }
.cap .w > span { transition-duration: .7s; transition-delay: calc(var(--wi) * 45ms); }
.cap:not(.on) .w > span { transition-duration: .3s; transition-delay: 0s; }

.feats.grid { margin-top: 30px; }
.feats.grid li { padding: 18px 14px 16px 0; }

/* Map */
.map { margin: 30px 0 6px; }
.map svg { width: 100%; height: auto; display: block; overflow: visible; }
.map .contours path { fill: none; stroke: var(--ink); stroke-width: .8; opacity: .55; }
.map .contours path:nth-child(4n+1) { stroke-width: 1.2; opacity: .75; }
.map .sea line { stroke: var(--sage); stroke-width: .8; opacity: .45; }
.map .coast { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.map .pin circle { fill: var(--olive); }
.map .pin .halo { fill: none; stroke: var(--olive); stroke-width: 1; opacity: .5; transform-box: fill-box; transform-origin: center; animation: halo 2.6s var(--ease-out) infinite; }
@keyframes halo { from { transform: scale(.4); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.map .lbl { font: 400 11px var(--sans); letter-spacing: .02em; fill: var(--ink-2); }
.map .lbl.strong { fill: var(--ink); font-weight: 500; }
.stats.three { grid-template-columns: repeat(3, 1fr); }

/* Process tiles */
.tiles { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.tiles li { background: var(--paper); padding: 26px 24px 24px; display: grid; gap: 4px; }
.tiles svg.ic { width: 30px; height: 30px; margin-bottom: 16px; }
.tiles b { font: 400 38px/1 var(--serif); font-variant-numeric: lining-nums; }
.tiles span { font-size: 14px; color: var(--ink-2); line-height: 1.45; }

/* Pour (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: 14vh; width: min(30rem, 42vw); display: grid; }
.captions .eyebrow { margin-bottom: 18px; }
.cap {
  grid-area: 2 / 1; margin: 0;
  font-size: clamp(36px, 3.6vw, 56px);
  opacity: 0;
  transition: opacity .4s var(--ease-out);
}
.cap.on { opacity: 1; }
.meter {
  position: absolute; left: var(--gutter); top: 16vh;
  display: grid; gap: 6px; width: 180px;
  font-size: 11px; color: var(--ink-2);
  opacity: 0; transition: opacity .5s var(--ease-out);
}
.meter.on { opacity: 1; }
.meter .lbl { font-size: 13px; }
.meter .val { font: 400 15px var(--sans); }
.meter .val b { font: 400 56px/1 var(--serif); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.meter .bar { height: 1px; background: var(--line); position: relative; overflow: hidden; margin-top: 8px; }
.meter .bar i { position: absolute; inset: 0; background: #D6C27A; transform-origin: left; transform: scaleX(0); }

.hint {
  position: absolute; left: 50%; bottom: 5vh; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; margin: 0;
  font-size: 13px; color: var(--ink-2);
  opacity: 0; transition: opacity .4s var(--ease-out);
}
.hint.on { opacity: 1; }
.hint i { width: 1px; height: 28px; background: var(--line); position: relative; overflow: hidden; }
.hint i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink); animation: cue 2.2s cubic-bezier(0.645, 0.045, 0.355, 1) infinite; }

/* Varieties */
.varieties { list-style: none; padding: 0; margin: 30px 0 22px; border-top: 1px solid var(--line); }
.variety {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 18px; align-items: start;
  padding: 20px 10px 18px; margin: 0 -10px;
  border-bottom: 1px solid var(--line); border-radius: 6px;
  cursor: default; outline: none;
  transition: background-color .2s var(--ease);
}
.variety { cursor: pointer; }
.variety.on { background: rgba(255, 255, 255, .45); }
.variety[aria-pressed="true"] { background: rgba(255, 255, 255, .7); box-shadow: inset 2px 0 0 var(--olive); }
.variety .sw { transition: transform .25s var(--ease-out); }
.variety.on .sw { transform: translateY(-3px); }
.variety .sw { width: 18px; height: 30px; margin-top: 6px; border-radius: 6px 6px 4px 4px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.variety h3 { font-size: 28px; line-height: 1.1; margin-bottom: 4px; }
.variety p { margin: 0; font-size: 15px; color: var(--ink-2); }
.variety .meta { display: grid; justify-items: end; gap: 10px; padding-top: 8px; }
.variety b { font: 400 24px var(--serif); font-variant-numeric: lining-nums; }
.dots { position: relative; width: 58px; height: 6px; background: radial-gradient(circle 2.5px at 3px 3px, var(--line) 98%, transparent) 0 0 / 12px 6px repeat-x; }
.dots::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--n) * 12px); background: radial-gradient(circle 2.5px at 3px 3px, var(--olive) 98%, transparent) 0 0 / 12px 6px repeat-x; }
.fnote { font-size: 13px !important; letter-spacing: .04em; }

/* Final */
.final { min-height: 100vh; justify-content: center; align-items: flex-end; padding-top: 0; padding-bottom: 7vh; }
.closing-wrap { text-align: center; }
.triad.big { justify-content: center; font-size: 12px; gap: 28px; margin-bottom: 18px; }
.closing { font-size: clamp(96px, 12vw, 190px); font-weight: 300; line-height: .85; margin: 0; }
.closing-sub { margin: 18px 0 0; font: italic 400 24px 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: 22px; 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; display: inline-flex; align-items: center; gap: 8px; }
.totop svg.ic { width: 16px; height: 16px; transform: rotate(-90deg); stroke: currentColor; }
@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(16px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.r.in { opacity: 1; transform: none; }
.dash.r.in { opacity: .7; }

/* Mobile */
@media (max-width: 820px) {
  body { font-size: 16px; }
  .nav { padding: 14px 16px; gap: 12px; }
  .nav nav, .chapter { display: none; }
  .pill { margin-left: auto; padding: 7px 12px; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 8px; position: relative;
    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); }
  .map .lbl { font-size: 15px; }
  .flinks { flex-wrap: wrap; justify-self: start; gap: 14px 18px; }
  .totop { justify-self: start; }
  .sec { min-height: 125vh; align-items: flex-end; padding: 52vh 16px 8vh; }
  .sec.right { justify-content: flex-start; }
  .copy {
    max-width: none; width: 100%;
    background: var(--card);
    -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
    border: 1px solid var(--line); border-radius: 20px;
    padding: 26px 22px 22px;
  }
  .hero { padding-top: 47vh; min-height: 100vh; padding-bottom: 92px; }
  .hero .copy { background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; }
  .hero-more {
    margin: 0 -14px; padding: 20px 14px 18px;
    background: var(--card);
    -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
    border: 1px solid var(--line); border-radius: 20px;
  }
  .hero .lede { font-size: 16px; }
  .logo { font-size: 104px; margin-bottom: 18px; }
  .feats { grid-template-columns: 1fr 1fr; }
  .feats li { gap: 10px; padding-right: 8px; }
  .cta { gap: 14px; }
  .dash { margin: 16px 0; }
  .triad { margin-bottom: 20px; }
  .cue { left: 16px; bottom: 22px; }
  h2 { font-size: 34px; }
  .stats dd { font-size: 34px; }
  .tiles li { padding: 20px 16px 18px; }
  .tiles b { font-size: 32px; }
  .tiles svg { margin-bottom: 12px; }
  .captions { left: 16px; right: 16px; width: auto; bottom: calc(12vh + 20px); }
  .captions .eyebrow { margin-bottom: 10px; }
  .cap { font-size: 30px; }
  .captions { transition: opacity .4s var(--ease-out); }
  .past .captions { opacity: 0; }
  .meter { left: 16px; right: 16px; top: auto; bottom: 5vh; width: auto; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 14px; }
  .meter .lbl, .meter .val { grid-row: 1; }
  .meter .val { justify-self: end; }
  .meter .val b { font-size: 36px; }
  .meter .bar { grid-column: 1 / -1; margin-top: 2px; }
  .final { padding: 0 16px 6vh; align-items: flex-end; }
  #varietats, #ampolla { padding-top: 62vh; }
  .hint { white-space: nowrap; }
  .closing { font-size: 110px; }
  .foot { grid-template-columns: 1fr; padding: 32px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .r { opacity: 1; transform: none; transition: none; }
  .cap { transition: none; transform: none; }
  .meter, .variety, .chapter span, .btn, .btn svg.ic { transition: none; }
  .w > span { transform: none; transition: none; }
  .map .pin .halo { animation: none; }
  .cue i::after { animation: none; }
  body, .nav, .nav::before, #gl, .sheet, .pill, .hint { transition: none; }
  .hint i::after { animation: none; }
  html { scroll-behavior: auto; }
}
