/* Domaine des Ardoises. Chalk paper, slate ink, one wine accent, one texture (the slate). */
/* Bodoni Moda at its largest optical size gets hairline-thin; pin display sizes to a sturdier cut */
h1, h2, h3, .big, .cuvee, .w-price, .mark, .q-name, .foot-mark { font-variation-settings: 'opsz' 28; }
:root {
  --chalk: #f4efe6;
  --chalk-deep: #ebe4d8;
  --slate: #1b1b1f;
  --wine: #8c2f39;
  --muted: #55524d;
  --hairline: #cfc6b8;
  --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', serif;
  --text: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --pad: clamp(20px, 5vw, 64px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--chalk);
  color: var(--slate);
  font-family: var(--text);
  font-size: 20px;
  line-height: 1.5;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, ol, figure { margin: 0; }
p, dd { text-wrap-style: pretty; }
ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 12px; top: -100px; z-index: 20;
  background: var(--slate); color: var(--chalk); padding: 10px 16px;
}
.skip:focus { top: 12px; }

/* small caps only on data labels */
.facts dt, .depth, .w-kind, .visit-facts dt, .readout-k, .readout-n {
  font-variant-caps: all-small-caps;
  letter-spacing: .07em;
  font-variant-numeric: lining-nums;
  font-size: 17px;
}

/* ---------- header ---------- */
.site {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 22px var(--pad);
}
.mark { font-family: var(--display); font-style: italic; font-size: 24px; line-height: 1.1; text-decoration: none; }
.nav { display: flex; gap: clamp(18px, 2.4vw, 34px); }
.nav a, .nav-order { font-size: 19px; text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav-order { display: none; }

/* ---------- the descent ---------- */
.descent { position: relative; }
.stage, .column { position: relative; }
/* The readout rides a zero-height sticky rail at the end of the descent: pinned to the bottom of
   the screen while you are underground; app.js hides it once the soil cut has scrolled past. */
.readout-rail { position: sticky; bottom: 0; height: 0; z-index: 3; }

.sky { position: relative; height: 100vh; height: 100svh; min-height: 620px; background: var(--chalk); overflow: hidden; }
.sky-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 0%; }
.sky-copy {
  position: absolute; z-index: 1; left: var(--pad); right: var(--pad);
  top: clamp(96px, 13vh, 136px);
}
h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: min(7.6vw, 9rem);
  font-weight: 450;
  line-height: .98;
  letter-spacing: 0;
  margin: 0 0 0 -.04em;
  white-space: nowrap;
}
.sky-copy .lede, .facts, .sky-actions { max-width: 36rem; width: 46%; }
.lede { font-size: 24px; line-height: 1.35; margin-top: clamp(20px, 4vh, 40px); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; margin-top: 22px; }
.facts dt { color: var(--muted); }
.facts dd { font-size: 19px; line-height: 1.3; }
.sky-actions { margin-top: 26px; }

.btn-wine {
  display: inline-block; border: 0; border-radius: 0; cursor: pointer;
  background: var(--wine); color: var(--chalk);
  font-family: var(--text); font-size: 20px; line-height: 1;
  padding: 15px 26px 17px; text-decoration: none;
  transition: background-color .2s ease;
}
.btn-wine:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }

.earth {
  --ruler: 72px; --gutter: 28px;
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) min(calc(100vw - 600px), 56vw, 980px);
  background: var(--chalk);
  border-top: 1px solid var(--slate);
}
.earth-notes { position: relative; }
/* every note hangs against the metre scale beside the cut, like the labels on a geological log */
.earth-intro, .layer, .fosse, .bottom-note {
  position: absolute; right: calc(var(--ruler) + var(--gutter));
  width: min(32rem, calc(100% - var(--pad) - var(--ruler) - var(--gutter)));
}
.earth-intro { top: 18px; }
.earth h2 { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 3.4vw, 52px); line-height: 1.05; margin: 6px 0 10px; }
.earth-intro p:last-child { color: var(--muted); font-size: 19px; }
/* the cut keeps a fixed column and a minimum height, so wide screens do not stretch the gaps;
   it fades into the chalk at the bottom instead of stopping on a hard edge */
.earth-cut img {
  width: 100%; height: auto; min-height: 1800px; object-fit: cover; object-position: 38% 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 84%, rgba(0, 0, 0, .75) 90%, rgba(0, 0, 0, .3) 96%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 84%, rgba(0, 0, 0, .75) 90%, rgba(0, 0, 0, .3) 96%, transparent 100%);
}

.ruler { position: absolute; top: 0; bottom: 7%; right: 0; width: var(--ruler); border-right: 1px solid var(--slate); }
/* --at is a fraction of the whole cut; the ruler stops at 93% of it (4,50 m), so scale back to the cut */
.tick { position: absolute; right: 0; top: calc(var(--at) / .93 * 100%); width: 8px; height: 1px; }
.tick::before { content: ''; position: absolute; inset: 0; background: var(--slate); }
.tick.major { width: 18px; }
.tick:first-child span { top: 6px; }
.tick span { position: absolute; right: 26px; top: -.72em; font-size: 16px; line-height: 1.4; color: var(--muted); white-space: nowrap; font-variant-numeric: lining-nums; }

.layer { top: calc(var(--at) * 100%); padding-top: 12px; }
.layer::after {
  content: ''; position: absolute; top: 0; left: 0; right: calc(-1 * (var(--ruler) + var(--gutter)) - 7vw); height: 1px;
  background: linear-gradient(to right, var(--slate) 0 calc(100% - 7vw), var(--chalk) calc(100% - 7vw));
  transform-origin: 0 50%;
}
.sink .layer::after { transform: scaleX(0); transition: transform .4s cubic-bezier(0.2, 0, 0, 1); }
.sink .layer.reached::after { transform: scaleX(1); }
.layer:first-child::after { display: none; } /* the roots layer starts at the surface line above it */
@media (prefers-reduced-motion: reduce) { .sink .layer::after { transition: none; } }
.depth { color: var(--muted); }
.cuvee { font-family: var(--display); font-style: italic; font-size: clamp(34px, 3.2vw, 50px); line-height: 1.1; margin: 2px 0 6px; }
.why { font-size: 19px; line-height: 1.4; margin-bottom: 6px; }
.what { font-size: 19px; line-height: 1.35; color: var(--muted); }
.price { color: var(--wine); white-space: nowrap; margin-left: .3em; }
.fosse { top: 70%; }
.fosse h3 { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.1; margin-bottom: 8px; }
.fosse p { font-size: 19px; line-height: 1.45; }
.bottom-note { top: 89%; font-style: italic; font-size: 28px; line-height: 1.2; font-variant-numeric: lining-nums; }
@media (min-width: 1600px) {
  .earth { --ruler: 88px; --gutter: 36px; }
  .earth-intro, .layer, .fosse, .bottom-note { width: min(36rem, calc(100% - var(--pad) - var(--ruler) - var(--gutter))); }
  .why, .what, .fosse p, .earth-intro p:last-child { font-size: 21px; }
}

.readout {
  display: none;
  position: absolute; right: clamp(12px, 2.5vw, 32px); bottom: clamp(12px, 3vh, 32px);
  background: var(--chalk); color: var(--slate); border: 1px solid var(--slate);
  padding: 8px 14px 10px; line-height: 1.15; min-width: 12rem;
}
.sink .readout { display: grid; grid-template-columns: auto auto; column-gap: 14px; align-items: baseline; }
.sink .readout.gone { visibility: hidden; }
.readout-k, .readout-n { color: var(--muted); }
.readout-m { font-size: 30px; font-variant-numeric: lining-nums tabular-nums; text-align: right; }
.readout-n { grid-column: 1 / -1; }

/* ---------- sections after the descent ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.cuvees, .domaine, .visites, .commander { padding: clamp(72px, 10vw, 136px) 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head h2, .visites h2 { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 5.2vw, 76px); line-height: 1.05; letter-spacing: 0; }
.sec-head p { color: var(--muted); max-width: 36rem; }
.commander .sec-head { align-items: start; }

.winelist { border-bottom: 1px solid var(--slate); }
.winelist li {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: 48px; padding: 30px 0 34px; border-top: 1px solid var(--slate);
}
.w-body { display: grid; grid-template-columns: minmax(0, 1fr) 11rem 6.5rem; column-gap: 28px; row-gap: 6px; align-content: start; }
.winelist h3 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3.3vw, 46px); line-height: 1.05; }
.w-kind { color: var(--muted); }
.w-note { grid-column: 1; font-size: 19px; line-height: 1.45; }
.w-meta { grid-column: 2; grid-row: 1 / span 2; font-size: 18px; line-height: 1.45; color: var(--muted); font-variant-numeric: lining-nums; }
.w-price { grid-column: 3; grid-row: 1 / span 2; font-family: var(--display); font-size: clamp(32px, 3.3vw, 46px); line-height: 1.05; color: var(--wine); font-variant-numeric: lining-nums; text-align: right; }
.bottle { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 48px; margin-top: clamp(48px, 7vw, 96px); }
.bottle picture { grid-column: 1 / -1; }
.bottle img { width: 100%; }
.bottle figcaption { grid-column: 1 / -1; font-style: italic; color: var(--muted); font-size: 18px; }

.big { font-family: var(--display); font-size: clamp(30px, 3.4vw, 48px); line-height: 1.2; letter-spacing: 0; max-width: 46ch; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 56px; max-width: 54rem; margin: clamp(40px, 6vw, 72px) 0 0 auto; }
.note { max-width: 34rem; margin: 40px 0 0 auto; padding: 14px 18px 16px; background: var(--chalk-deep); font-size: 19px; line-height: 1.45; }
.note time { font-style: italic; color: var(--wine); font-variant-numeric: lining-nums; }
.sign { font-style: italic; margin-top: 24px; text-align: right; color: var(--muted); line-height: 1.4; }

.visites h2 em { color: var(--wine); white-space: nowrap; }
.visites-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 48px; margin-top: clamp(32px, 5vw, 56px); }
.saturday-hours { position: sticky; top: 18vh; align-self: start; font-size: clamp(26px, 2.4vw, 32px); line-height: 1.3; font-variant-numeric: lining-nums; }
.visit-facts > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 4px 24px; padding: 16px 0 18px; border-top: 1px solid var(--hairline); }
.visit-facts > div:first-child { border-top-color: var(--slate); }
.visit-facts dt { color: var(--muted); padding-top: 2px; }

/* ---------- order form ---------- */
.order { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 48px; align-items: start; }
.order fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 18px; color: var(--muted); padding: 0; margin-bottom: 8px; }
.qty-error { color: var(--wine); font-size: 18px; margin-bottom: 8px; }
.qty label { display: grid; grid-template-columns: minmax(0, 1fr) auto 5.5rem; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--hairline); }
.qty label:last-child { border-bottom: 1px solid var(--hairline); }
.q-name { font-family: var(--display); font-size: 24px; line-height: 1.2; }
.q-price { color: var(--wine); font-variant-numeric: lining-nums; }
.ship { margin-top: 32px !important; }
.ship label { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; font-size: 19px; line-height: 1.35; cursor: pointer; font-variant-numeric: lining-nums; }
.ship input { accent-color: var(--wine); width: 18px; height: 18px; flex: none; transform: translateY(3px); }
.who { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.who label { display: grid; gap: 6px; font-size: 18px; }
.who .wide { grid-column: 1 / -1; }
.opt { color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], textarea {
  font: inherit; font-size: 20px; color: var(--slate); background: var(--chalk);
  border: 1px solid var(--slate); border-radius: 0; padding: 9px 12px; width: 100%;
  font-variant-numeric: lining-nums;
}
input[aria-invalid="true"] { border-color: var(--wine); border-width: 2px; }
textarea { resize: vertical; line-height: 1.4; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--wine); outline-offset: 1px; }
.sum { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 48px; align-items: center; padding-top: 8px; }
.total { font-size: 20px; font-variant-numeric: lining-nums; }
.sum .btn-wine { justify-self: start; }
.handoff-wrap { grid-column: 2; }
.handoff { color: var(--slate); background: var(--chalk-deep); padding: 14px 18px; font-size: 18px; line-height: 1.45; }

/* ---------- footer: the one texture, again ---------- */
.foot {
  background-color: var(--slate);
  background-image: linear-gradient(rgba(27, 27, 31, .62), rgba(27, 27, 31, .62)), url(img/ardoise.webp);
  background-size: cover; background-position: center;
  color: var(--chalk); padding: 64px 0 40px; font-size: 18px; line-height: 1.5;
}
.foot :focus-visible { outline-color: var(--chalk); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 28px 40px; align-items: start; }
.foot-mark { font-family: var(--display); font-style: italic; font-size: 30px; line-height: 1.1; }
address { font-style: normal; }
.legal { grid-column: 1 / -1; border-top: 1px solid rgba(244, 239, 230, .35); padding-top: 18px; margin-top: 12px; font-size: 16px; }

h1, h2, h3, .big, .cuvee { text-wrap-style: balance; }
@media (min-width: 1600px) {
  .wrap { max-width: 1400px; }
  :root { --edge: calc((100vw - 1400px) / 2 + 64px); }
  .site { padding-left: var(--edge); padding-right: var(--edge); }
  .sky-copy { left: var(--edge); right: var(--edge); }
}
@media (min-width: 1800px) {
  .earth-intro, .layer, .fosse, .bottom-note { width: min(36rem, calc(100% - var(--ruler) - var(--gutter) - var(--edge))); }
}

/* ---------- scroll-driven reveals, CSS only ----------
   fill-mode none: anything not yet reached keeps its normal, visible state, so full-page captures,
   old browsers and reduced motion all get the finished page. The range starts at the very edge of
   the screen, so the switch to the first frame happens out of sight. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sec-head, .winelist li, .big, .two p, .visites h2, .saturday-hours, .visit-facts > div {
      animation: rise linear none; animation-timeline: view(); animation-range: entry 0% entry 75%;
    }
    .bottle img { animation: unveil linear none; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  }
}
/* movement only: nothing is ever transparent or clipped, so content is readable at every frame */
@keyframes rise { from { transform: translateY(24px); } to { transform: none; } }
@keyframes unveil { from { transform: scale(1.04); } to { transform: none; } }

/* ---------- hover only where there is a pointer that hovers ---------- */
@media (hover: hover) {
  a:hover { color: var(--wine); }
  .nav a:hover, .nav-order:hover { border-bottom-color: currentColor; }
  .btn-wine:hover { background: var(--slate); color: var(--chalk); }
  .foot a:hover { color: var(--chalk-deep); text-decoration-thickness: 2px; }
  input[type=text]:hover, input[type=email]:hover, input[type=tel]:hover, input[type=number]:hover, textarea:hover { border-color: var(--wine); }
  .ship label:hover { color: var(--wine); }
  .fosse a:hover { color: inherit; text-decoration-thickness: 2px; }
}

/* short desktop screens: keep the copy in the sky above the people in the photo */
@media (min-width: 761px) and (max-height: 820px) {
  .sky-copy { top: 84px; }
  .lede { font-size: 21px; margin-top: 16px; }
  .facts { margin-top: 14px; row-gap: 6px; }
  .facts dd { font-size: 18px; }
  .sky-actions { margin-top: 16px; }
}

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .nav-order { display: inline; }
  .sky-copy .lede, .facts, .sky-actions { width: 52%; }
  .facts { column-gap: 20px; }
  .winelist li { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .w-body { grid-template-columns: minmax(0, 1fr) 10rem 6rem; }
}

/* ---------- up to 1200px: labels on dark plates over the cut, which runs full width ---------- */
@media (max-width: 75em) {
  .earth { display: block; border-top: 0; }
  .earth-cut img { min-height: 2100px; }
  .earth-notes { position: absolute; inset: 0; z-index: 1; padding: 0; }
  .ruler { display: none; }
  .earth-intro, .layer, .fosse, .bottom-note { background: rgba(27, 27, 31, .84); color: var(--chalk); width: auto; max-width: 34rem; }
  .earth-intro { left: 14px; right: 14px; top: 14px; padding: 12px 16px 14px; }
  .fosse { left: 14px; right: 46px; top: 70%; border-top: 0; padding: 12px 16px 14px; }
  .fosse h3 { font-size: 26px; }
  .fosse p, .why { font-size: 18px; }
  .what { color: var(--chalk); }
  .earth-intro p:last-child { color: var(--chalk); font-size: 18px; line-height: 1.4; }
  .earth h2 { font-size: 34px; margin: 2px 0 6px; }
  .depth { color: var(--chalk-deep); }
  .layer { left: 14px; right: 46px; padding: 10px 16px 12px; }
  /* layer 1 sits in the roots; keep it clear of the intro plate above it */
  .layer:first-child { top: max(calc(var(--at) * 100%), 206px); }
  .layer::after { left: 0; right: -32px; background: var(--chalk); }
  .cuvee { font-size: 30px; }
  .what { font-size: 18px; }
  .price { display: block; margin: 2px 0 0; color: var(--chalk); }
  .bottom-note { left: 14px; right: 14px; top: auto; bottom: 64px; padding: 12px 16px; font-size: 22px; }
  .fosse a { color: var(--chalk); }
  .sink .readout {
    left: 0; right: 0; bottom: 0; min-width: 0; border: 0; border-top: 1px solid rgba(244, 239, 230, .3);
    background: var(--slate); color: var(--chalk);
    padding: 6px 20px 8px; display: flex; align-items: baseline; gap: 12px;
  }
  .readout-k, .readout-n { color: var(--chalk-deep); }
  .readout-n { order: 1; }
  .readout-k { order: 2; margin-left: auto; }
  .readout-m { font-size: 24px; order: 3; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  body { font-size: 19px; }
  .site { padding: 16px 20px; }
  .mark { font-size: 21px; }
  .sky { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .sky-copy { position: static; padding: 72px 20px 24px; }
  h1 { font-size: clamp(46px, 14vw, 64px); white-space: normal; line-height: 1; }
  .sky-copy .lede, .facts, .sky-actions { width: auto; max-width: none; margin-left: 0; }
  .lede { font-size: 19px; line-height: 1.4; margin-top: 14px; }
  .facts { grid-template-columns: 1fr; gap: 0; margin-top: 18px; }
  .facts > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 4px 0; }
  .facts dd { text-align: right; }
  .sky-actions { margin-top: 20px; }
  .sky-pic { display: block; }
  .earth-cut img { min-height: 1900px; }
  .what { display: none; }
  .sky-img { position: static; height: auto; aspect-ratio: 800 / 761; }

  .sec-head, .bottle, .visites-grid, .order, .sum { grid-template-columns: 1fr; }
  .winelist li { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; padding: 22px 0 24px; }
  .winelist h3 { grid-row: auto; grid-column: 1; }
  .w-price { grid-column: 2; grid-row: 1; }
  .w-body { display: contents; }
  .w-kind, .w-note, .w-meta { grid-column: 1 / -1; grid-row: auto; }
  .bottle figcaption { grid-column: 1; }
  .two { grid-template-columns: 1fr; gap: 20px; }
  .visit-facts > div { grid-template-columns: 1fr; }
  .who { grid-column: 1; grid-row: auto; grid-template-columns: 1fr; }
  .qty label { grid-template-columns: minmax(0, 1fr) auto 4.6rem; gap: 12px; }
  .q-name { font-size: 21px; }
  .handoff-wrap { grid-column: 1; }
  .foot-grid { grid-template-columns: 1fr; gap: 18px; }
}
