@font-face { font-family: 'IM Fell French Canon'; src: url(vendor/fonts/im-fell-french-canon-latin-400-normal.woff2) format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'IM Fell French Canon'; src: url(vendor/fonts/im-fell-french-canon-latin-400-italic.woff2) format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url(vendor/fonts/eb-garamond-latin-400-normal.woff2) format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url(vendor/fonts/eb-garamond-latin-400-italic.woff2) format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url(vendor/fonts/eb-garamond-latin-500-normal.woff2) format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }

:root {
  --paper: #F2EBDD;
  --ink: #2B2621;
  --wine: #7A2E2A;
  --wine-soft: #C99A8E;
  --gold: #B89B5E;
  --sage: #8A9A7B;
  --display: 'IM Fell French Canon', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --text: 'EB Garamond', 'Iowan Old Style', Georgia, serif;
  --gutter: clamp(16px, 2.6vw, 40px);
  --step-small: 16px;
  --step-text: clamp(18px, 1.35vw, 20px);
  --step-lead: clamp(24px, 2.5vw, 36px);
  --step-title: clamp(42px, 6.4vw, 96px);
  --step-huge: clamp(52px, 13.2vw, 220px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  background: var(--paper) url(assets/paper.jpg);
  background-blend-mode: multiply;
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html.is-locked, html.is-locked body { overflow: hidden; }
h1, h2, h3, p, ul, dl, dd, fieldset, legend { margin: 0; padding: 0; border: 0; }
ul { list-style: none; }
img, svg, canvas { display: block; }
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--wine); color: var(--paper); }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }

.eyebrow {
  font-size: var(--step-small);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.foot { font-style: italic; font-size: 18px; line-height: 1.35; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border: 2px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink);
  font-family: var(--text); font-size: 18px; font-weight: 500; text-decoration: none;
  cursor: pointer;
  transition: background-color .22s var(--ease), color .22s var(--ease), transform .22s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(2px); }
.btn--solid { background: var(--wine); border-color: var(--wine); color: var(--paper); }
.btn--solid:hover { background: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: .42; cursor: not-allowed; background: transparent; color: var(--ink); border-color: var(--ink); }

/* the age check, a title page with the strata printed along its foot */
.gate {
  position: fixed; inset: 0; z-index: 70;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--paper) url(assets/paper.jpg);
  background-blend-mode: multiply;
  overflow: hidden;
}
html:not(.js) .gate { display: none; }
.gate[hidden] { display: none; }
.gate__plate { position: relative; z-index: 1; padding: 0 clamp(36px, 8vw, 150px) 24svh; }
.gate__name { font-family: var(--display); font-size: var(--step-lead); margin-bottom: clamp(10px, 2vh, 22px); }
.gate__q { font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(40px, 6.6vw, 104px); line-height: 1; letter-spacing: -.015em; max-width: 15.5em; }
.gate__act { display: flex; gap: 12px; margin-top: clamp(22px, 4.4vh, 44px); }
.gate__act .btn { min-width: 150px; min-height: 60px; font-size: 24px; }
.gate__closed { margin-top: 20px; font-style: italic; font-size: var(--step-lead); color: var(--wine); }
.gate__strata { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 30svh; }

/* progress: a plumb line let down the left edge */
.plumb { position: fixed; z-index: 30; left: 11px; top: 0; bottom: 0; width: 8px; pointer-events: none; opacity: 0; color: var(--ink); transition: color .4s ease; }
.plumb__line { position: absolute; left: 3.5px; top: 0; width: 1px; height: 100%; background: currentColor; transform-origin: top; transform: scaleY(0); }
.plumb__bob { position: absolute; left: 0; top: 0; width: 8px; height: 13px; background: currentColor; clip-path: polygon(50% 0, 100% 45%, 50% 100%, 0 45%); }

.bar {
  position: fixed; z-index: 40; left: 0; right: 0; top: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  padding: 16px var(--gutter);
  color: var(--ink);
  opacity: 0;
  transition: color .4s ease;
}
.bar.is-dark { color: var(--paper); }
.bar.is-solid { background: var(--paper) url(assets/paper.jpg); background-blend-mode: multiply; padding-top: 8px; padding-bottom: 8px; }
.bar__mark { font-family: var(--display); font-size: 22px; text-decoration: none; justify-self: start; opacity: 0; transition: opacity .35s ease; }
.bar.in-soils .bar__mark { padding: 0 10px; margin-left: -10px; background: var(--paper); color: var(--ink); }
.bar.is-past .bar__mark { opacity: 1; }
.bar__chapter { font-style: italic; font-size: 18px; }
.bar__links { display: flex; justify-content: flex-end; gap: clamp(14px, 2vw, 30px); }
.bar__links a { font-size: 18px; text-decoration: none; background: linear-gradient(currentColor, currentColor) left 100% / 0 1px no-repeat; transition: background-size .3s var(--ease); }
.bar__links a:hover { background-size: 100% 1px; }

/* the estate: the etching holds still while the first words turn over */
.hero { position: relative; height: 320svh; }
.hero__stick { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--paper) url(assets/paper.jpg); background-blend-mode: multiply; }
.hero__art {
  position: absolute; left: 50%; bottom: -3vw;
  width: max(100vw, 150svh); aspect-ratio: 3 / 2;
  transform-origin: 38% -10%;
  translate: -50% 0;
  mix-blend-mode: multiply;
}
.hero__art img, .hero__art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__art img { visibility: hidden; }
html.no-ink .hero__art img { visibility: visible; }
html.no-ink .hero__art canvas { display: none; }
html:not(.js) .hero__art img { visibility: visible; }
html:not(.js) .hero__art canvas { display: none; }

.window { position: absolute; left: 25.7%; top: 44.8%; width: 3.4%; height: 6%; padding: 0; border: 0; background: none; cursor: pointer; }
.window span { position: absolute; left: 35%; top: 25%; width: 30%; height: 50%; background: #F0B14A; mix-blend-mode: lighten; opacity: 0; transition: opacity .5s ease; }
.window:hover span, .window:focus-visible span, .window.is-lit span { opacity: 1; }

.wordmark {
  position: absolute; left: var(--gutter); right: var(--gutter); top: clamp(62px, 9svh, 96px);
  font-family: var(--display); font-weight: 400; font-style: italic;
  font-size: var(--step-huge); line-height: .92; letter-spacing: -.025em;
  white-space: nowrap; text-align: center;
}
.wordmark .word { display: inline-block; white-space: nowrap; }
.wordmark .ch { display: inline-block; }

.cartouche {
  position: absolute; left: var(--gutter); bottom: var(--gutter);
  width: min(430px, calc(100vw - 2 * var(--gutter)));
  padding: 24px 26px 26px;
  background: var(--paper) url(assets/paper.jpg);
  background-blend-mode: multiply;
  border: 2px solid var(--ink);
  outline: 1px solid var(--ink); outline-offset: -8px;
}
.cartouche__hook { font-family: var(--display); font-style: italic; font-size: clamp(32px, 3vw, 44px); line-height: 1.04; }
.cartouche__text { margin: 10px 0 18px; }

.estate {
  position: absolute; left: var(--gutter); right: var(--gutter); top: clamp(92px, 14svh, 150px);
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px 20px;
  visibility: hidden;
}
html:not(.js) .estate { visibility: visible; }
.estate .eyebrow { grid-column: 1 / 7; }
.statement { grid-column: 1 / 9; font-family: var(--display); font-size: var(--step-lead); line-height: 1.16; }
.estate__foot { grid-column: 1 / 8; font-style: italic; font-size: 18px; margin-top: 8px; }

/* the soils: one sticky scene, the ground pans, the core goes down */
.soils { position: relative; z-index: 1; height: 620svh; margin-top: -80svh; color: var(--ink); }
.soils__stick { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--paper); isolation: isolate; transition: background-color .5s ease; }
.soils__stick[data-layer="1"] { background: var(--gold); }
.soils__stick[data-layer="2"] { background: var(--sage); }
.soils__stick[data-layer="3"] { background: var(--wine); }
#wash { position: absolute; inset: 0; width: 100%; height: 100%; }
.soils__pan { position: absolute; left: 0; top: 0; width: 45vw; will-change: transform; mix-blend-mode: multiply; -webkit-mask-image: linear-gradient(to right, #000 84%, transparent); mask-image: linear-gradient(to right, #000 84%, transparent); }
.soils__pan--light { mix-blend-mode: screen; opacity: 0; }
.soils__pan img { width: 100%; height: auto; }

.core { position: absolute; left: 21vw; top: 0; z-index: 3; width: clamp(62px, 6vw, 96px); height: 40svh; margin-left: calc(clamp(62px, 6vw, 96px) / -2); cursor: grab; touch-action: none; will-change: transform; outline-offset: 6px; }
.core:active { cursor: grabbing; }
.core svg { width: 100%; height: 100%; overflow: visible; }
.core__depth { position: absolute; left: calc(100% + 10px); top: 2px; white-space: nowrap; font-size: 20px; font-variant-numeric: tabular-nums lining-nums; background: var(--paper); padding: 0 8px; border: 2px solid var(--ink); }
.core__depth b { font-weight: 500; }

.panels { position: absolute; inset: 0; pointer-events: none; }
.panel { position: absolute; inset: 0; visibility: hidden; }
.panel[data-panel="0"] { visibility: visible; }
html:not(.js) .panel { visibility: visible; }
.panel:not(.panel--intro) .panel__text { visibility: hidden; }
html:not(.js) .panel .panel__text, html.is-static .panel .panel__text { visibility: visible; }
.panel__text { position: absolute; left: 47vw; top: 15svh; width: 31vw; }
.panel--intro .panel__text { width: 46vw; }
.panel--dark { color: var(--paper); }
.kern-w { margin-right: -.13em; }
.panel__title { font-family: var(--display); font-style: italic; font-weight: 400; font-size: var(--step-title); line-height: .98; letter-spacing: -.02em; margin: 10px 0 20px; }
.panel__name { font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(44px, 5.6vw, 88px); line-height: 1; letter-spacing: -.02em; margin: 8px 0 6px; white-space: nowrap; }
.panel__grape { font-size: var(--step-lead); line-height: 1.2; }
.panel__words { display: flex; flex-wrap: wrap; gap: 0 .9em; margin: 16px 0 14px; font-family: var(--display); font-size: var(--step-lead); line-height: 1.2; }
.panel__lead { max-width: 25em; }
.panel__hint { margin-top: 14px; font-style: italic; color: var(--wine); font-size: var(--step-lead); line-height: 1.2; }
.panel .foot { margin-top: 12px; }

.specimen { position: absolute; left: 47vw; bottom: 3svh; width: min(25vw, 38svh); height: auto; mix-blend-mode: multiply; }
.panel--dark .specimen { filter: invert(1); mix-blend-mode: screen; }

.bottle {
  position: absolute; right: var(--gutter); top: 11svh; bottom: 6svh; width: 19vw;
  overflow: hidden;
  background: var(--paper) url(assets/paper.jpg);
  background-blend-mode: multiply;
  border: 2px solid var(--ink);
}
.bottle img, .pick__bottle img {
  position: absolute; top: 3%; left: 50%; height: 94%; width: auto; max-width: none;
  transform: translateX(calc(var(--c) * -1));
  mix-blend-mode: multiply;
}

/* importers: the page comes back to paper */
.importers { position: relative; z-index: 2; padding: clamp(30px, 5vw, 70px) var(--gutter) clamp(90px, 12vw, 180px); background: var(--paper) url(assets/paper.jpg); background-blend-mode: multiply; }
.rule { width: 100%; height: 14px; margin-bottom: clamp(50px, 7vw, 110px); }
.importers__head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px 20px; margin-bottom: clamp(34px, 5vw, 70px); }
.importers__head .eyebrow { grid-column: 1 / -1; }
.importers__title { grid-column: 1 / 9; font-family: var(--display); font-style: italic; font-weight: 400; font-size: var(--step-title); line-height: 1; letter-spacing: -.02em; }
.importers__lead { grid-column: 9 / -1; align-self: end; }

.request { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: end; }
.request legend { font-size: var(--step-small); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 14px; }
.request__wines { grid-column: 1 / 10; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 20px; }
.request__wines legend { grid-column: 1 / -1; }
.request__side { grid-column: 10 / -1; display: grid; gap: 22px; }
.request__market { display: grid; grid-template-columns: 1fr; gap: 8px; }
.request__side .btn { width: 100%; padding: 0 12px; }

.pick { position: relative; display: block; cursor: pointer; }
.pick input, .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick__bottle { position: relative; display: block; height: clamp(300px, 58svh, 560px); overflow: hidden; border: 2px solid var(--ink); background: var(--paper); transition: background-color .35s var(--ease); }
.pick__bottle img { transition: translate .4s var(--ease); }
.pick:hover .pick__bottle img { translate: 0 -8px; }
.pick input:checked ~ .pick__bottle { background: var(--wash); }
.pick input:focus-visible ~ .pick__bottle { outline: 2px solid var(--wine); outline-offset: 3px; }
.pick__name { display: block; margin-top: 12px; font-family: var(--display); font-style: italic; font-size: var(--step-lead); line-height: 1.1; }
.pick__meta { display: block; }

.chip { position: relative; display: block; cursor: pointer; }
.chip span { display: flex; align-items: center; min-height: 48px; padding: 0 16px; border: 2px solid var(--ink); transition: background-color .22s var(--ease), color .22s var(--ease); }
.chip:hover span { background: rgba(43, 38, 33, .1); }
.chip input:checked + span { background: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 2px solid var(--wine); outline-offset: 3px; }

.confirm { max-width: 760px; margin: 0 auto; padding: clamp(26px, 4vw, 48px); border: 2px solid var(--ink); outline: 1px solid var(--ink); outline-offset: -8px; }
.confirm:focus { outline: 1px solid var(--ink); }
.confirm__title { font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(40px, 5vw, 72px); line-height: 1; margin: 10px 0 22px; }
.confirm__list { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; margin-bottom: 24px; }
.confirm__list dt { font-style: italic; }
.confirm__list dd { font-size: var(--step-lead); line-height: 1.2; }
.confirm__note { margin-top: 22px; font-size: 15px; }

/* the close: the same plate, printed in reverse */
.close { position: relative; z-index: 2; overflow: hidden; background: var(--ink); color: var(--paper); padding: clamp(120px, 18vw, 280px) var(--gutter) 22px; }
.close__art { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; filter: invert(1); mix-blend-mode: screen; opacity: .34; }
.close__name { position: relative; font-family: var(--display); font-style: italic; font-size: var(--step-huge); line-height: .92; letter-spacing: -.025em; white-space: nowrap; text-align: center; }
.close__row { position: relative; display: flex; gap: 40px; margin-top: 26px; }

/* facts view */
.facts-switch {
  position: fixed; z-index: 50; right: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 12px 0 14px;
  border: 2px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  font-size: 16px; cursor: pointer;
}
.facts-switch__knob { position: relative; width: 34px; height: 18px; border: 2px solid var(--ink); }
.facts-switch__knob::after { content: ''; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; background: var(--ink); transition: transform .25s var(--ease), background-color .25s; }
.facts-switch[aria-checked="true"] .facts-switch__knob::after { transform: translateX(14px); background: var(--wine); }
.facts {
  position: fixed; z-index: 45; inset: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(72px, 12vh, 120px) var(--gutter) 100px;
  background: var(--paper) url(assets/paper.jpg);
  background-blend-mode: multiply;
  opacity: 0; transition: opacity .5s ease;
}
.facts.is-on { opacity: 1; }
.facts__inner { max-width: 720px; margin: 0 auto; }
.facts h2 { font-family: var(--display); font-weight: 400; font-style: italic; font-size: clamp(38px, 4.6vw, 64px); line-height: 1.02; margin-bottom: 24px; }
.facts h3 { font-family: var(--display); font-weight: 400; font-size: var(--step-lead); margin: 36px 0 10px; }
.facts p { margin-bottom: 10px; }
.facts dt { margin-top: 20px; font-style: italic; font-size: 22px; }

/* custom cursor, desktop only */
.cursor { position: fixed; z-index: 80; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--wine); pointer-events: none; opacity: 0; }
.cursor__label { position: fixed; z-index: 80; left: 0; top: 0; padding: 0 10px; background: var(--ink); color: var(--paper); font-size: 16px; font-style: italic; pointer-events: none; opacity: 0; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor label, html.has-cursor .core { cursor: none; }
}

@media (max-width: 900px) {
  .bar { grid-template-columns: 1fr auto; padding: 12px var(--gutter); }
  .bar__links { display: none; }
  .bar__chapter { justify-self: end; }
  .bar.in-soils .bar__chapter { padding: 0 8px; background: var(--paper); color: var(--ink); }
  .plumb { left: 4px; }

  .gate__plate { padding: 0 34px 26svh; }
  .gate__act .btn { min-width: 0; flex: 1; }

  .hero { height: 280svh; }
  .hero__art { width: max(100vw, 165svh); translate: -30% 0; left: 50%; bottom: -6svh; transform-origin: 38% -20%; }
  .wordmark { font-size: 21vw; line-height: .9; white-space: normal; text-align: left; top: 62px; }
  .cartouche { width: auto; right: var(--gutter); bottom: 72px; padding: 18px 20px 20px; }
  .cartouche .btn { width: 100%; }
  .estate { display: block; top: 76px; }
  .statement { margin-top: 8px; }

  .soils { height: 560svh; margin-top: -70svh; }
  .soils__pan { width: 100vw; left: 0; -webkit-mask-image: none; mask-image: none; }
  .core { left: 22vw; width: 56px; margin-left: -28px; height: 28svh; touch-action: pan-y; pointer-events: none; }
  .core__depth { font-size: 17px; }

  .panel__text, .panel--intro .panel__text { left: var(--gutter); right: var(--gutter); top: auto; bottom: 74px; width: auto; }
  .panel:not(.panel--intro) .panel__text { right: 34vw; }
  .panel__text { padding: 12px 14px; background: var(--paper); border: 2px solid var(--ink); color: var(--ink); }
  .panel--dark .panel__text { color: var(--ink); }
  .panel__title { font-size: 40px; margin: 4px 0 8px; }
  .panel__name { font-size: 38px; white-space: normal; }
  .panel__grape { font-size: 20px; }
  .panel__words { font-size: 19px; margin: 6px 0; }
  .panel__lead, .panel .foot { font-size: 16px; }
  .panel__hint { font-size: 19px; }
  .panel--intro .foot { display: none; }
  .panel:not(.panel--intro) .panel__lead { display: none; }
  .specimen { display: none; }
  .bottle { right: var(--gutter); top: auto; bottom: 74px; width: 30vw; height: 44svh; }

  .importers__title, .importers__lead { grid-column: 1 / -1; }
  .request { display: block; }
  .request__wines { grid-template-columns: repeat(3, 1fr); gap: 0 8px; }
  .pick__bottle { height: 42svh; }
  .pick__name { font-size: 20px; }
  .pick__meta { font-size: 16px; line-height: 1.25; }
  .request__side { margin-top: 26px; }
  .request__market { grid-template-columns: 1fr 1fr; }
  .close__row { padding-right: 0; padding-bottom: 54px; flex-direction: column; gap: 2px; }
  .close__name { font-size: 12.6vw; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .panel__text { top: 12svh; }
  .specimen { width: min(20vw, 30svh); }
}

/* no scrolling scene: the soils read as plain plates, one under the other */
html.is-static .hero { height: auto; }
html.is-static .hero__stick { height: auto; min-height: 100svh; position: relative; overflow: visible; padding-bottom: 48px; }
html.is-static .hero__art { position: relative; left: auto; translate: none; width: 100%; }
html.is-static .wordmark, html.is-static .cartouche, html.is-static .estate { position: relative; inset: auto; visibility: visible; margin: 24px var(--gutter) 0; width: auto; }
html.is-static .soils { height: auto; margin-top: 0; }
html.is-static .soils__stick { position: relative; height: auto; overflow: visible; background: none; }
html.is-static #wash, html.is-static .soils__pan, html.is-static .core { display: none; }
html.is-static .panels { position: relative; }
html.is-static .panel { position: relative; visibility: visible; display: grid; grid-template-columns: 1fr minmax(180px, 26vw); gap: 24px; padding: 60px var(--gutter); min-height: 80svh; }
html.is-static .panel__text { position: relative; inset: auto; width: auto; padding: 0; border: 0; background: none; color: inherit; }
html.is-static .panel[data-soil="tuffeau"] { background: var(--gold); }
html.is-static .panel[data-soil="flint"] { background: var(--sage); }
html.is-static .panel[data-soil="gravel"] { background: var(--wine); }
html.is-static .panel:not(.panel--intro) .panel__lead { display: block; }
html.is-static .specimen { display: none; }
html.is-static .bottle { position: relative; inset: auto; width: 100%; height: 66svh; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
