/* Chez Jean-Philippe — a fictional bistro, concept by chapter growth.
   Layout: a scroll-scrubbed film on warm black, then paper-white menu, a burgundy founder page,
   one review, and a booking form over the facade. The palette is Jean-Philippe's outfit. */

@font-face { font-family: "Antonio"; src: url("/assets/fonts/antonio-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Antonio"; src: url("/assets/fonts/antonio-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("/assets/fonts/bodoni-moda-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("/assets/fonts/bodoni-moda-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("/assets/fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* Jean-Philippe's outfit */
  --bordeaux: #5B1E2D;   /* tie */
  --tweed: #8B6F56;      /* blazer */
  --salvie: #6B7F62;     /* trousers */
  --creme: #E6D8C6;      /* polo */
  --nappe: #F5F5F0;      /* shirt */
  --film: #0B0908;
  --ink: #1C1512;
  --ink-soft: #6A5341;   /* tweed, darkened for small text on paper */
  --line: #D9CDBE;

  --shout: "Antonio", "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  --serif: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --text: "EB Garamond", Garamond, Georgia, serif;
  --cg: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--nappe); color: var(--ink);
  font: 400 19px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
a { color: inherit; }
.nw { white-space: nowrap; } /* keeps "Jean-Philippe" from breaking at the hyphen */
:focus-visible { outline: 2px solid var(--creme); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--nappe); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: var(--gutter-l); }

.inner { max-width: 1240px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.label { font: 500 13px/1.3 var(--shout); letter-spacing: 0.16em; text-transform: uppercase; }
.display { font-family: var(--serif); font-style: italic; font-size: clamp(44px, 6.4vw, 88px); line-height: 0.98; letter-spacing: -0.015em; }

/* ---------- Header ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter-r) 14px var(--gutter-l);
  color: var(--nappe);
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.top.solid { background: var(--nappe); color: var(--ink); border-bottom-color: var(--line); }
.brand { font: italic 400 24px/1 var(--serif); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font: 500 14px/1 var(--shout); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.nav .nav-cta { border: 1px solid currentColor; padding: 10px 14px; }
.nav .nav-cta:hover { background: currentColor; text-decoration: none; }
.nav .nav-cta:hover { color: var(--film); background: var(--nappe); }
.top.solid .nav .nav-cta:hover { color: var(--nappe); background: var(--bordeaux); border-color: var(--bordeaux); }

/* ---------- Film ---------- */
.film {
  position: relative; background: var(--film); color: var(--nappe);
  /* 0.5 hero + 6 clips + 0.6 end, one screen of scroll each, plus the sticky screen itself */
  height: calc(7.1 * 100vh + 100vh);
  height: calc(7.1 * 100svh + 100svh);
}
.film-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: var(--film) url("/assets/img/k1.webp") center / cover no-repeat;
}
@media (orientation: portrait) { .film-stage { background-image: url("/assets/img/k1-m.webp"); } }
/* Hidden until it has drawn a frame: an opaque canvas starts black, and the preloaded k1 background should show first. */
.film-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; visibility: hidden; }
.film-canvas.ready { visibility: visible; }
.film-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 9, 8, .72) 0%, rgba(11, 9, 8, .5) 22%, rgba(11, 9, 8, 0) 42%, rgba(11, 9, 8, 0) 58%, rgba(11, 9, 8, .5) 78%, rgba(11, 9, 8, .72) 100%),
    linear-gradient(180deg, rgba(11, 9, 8, .55) 0%, rgba(11, 9, 8, 0) 18%, rgba(11, 9, 8, 0) 70%, rgba(11, 9, 8, .6) 100%);
}

.beat {
  position: absolute; z-index: 2; max-width: min(520px, 40vw);
  display: grid; gap: 14px;
  opacity: 0; will-change: opacity, transform;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.beat-hero { opacity: 1; left: var(--gutter-l); bottom: 14vh; max-width: min(760px, 70vw); padding-left: clamp(0px, 3vw, 40px); }
.beat-left { left: var(--gutter-l); top: 50%; translate: 0 -50%; padding-left: clamp(0px, 3vw, 40px); }
.beat-right { right: var(--gutter-r); top: 50%; translate: 0 -50%; padding-right: clamp(0px, 3vw, 40px); text-align: right; justify-items: end; }
.shout {
  font: 700 clamp(46px, 6.6vw, 112px)/0.9 var(--shout);
  text-transform: uppercase; letter-spacing: -0.005em;
}
.beat-hero .shout { font-size: clamp(56px, 9vw, 148px); }
.whisper { font: italic 400 clamp(19px, 1.6vw, 24px)/1.35 var(--text); color: var(--creme); max-width: 34ch; }
.eyebrow { font: 500 14px/1 var(--shout); letter-spacing: 0.2em; text-transform: uppercase; color: var(--creme); }

.scroll-cue {
  position: absolute; z-index: 2; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); translate: -50% 0;
  display: grid; justify-items: center; gap: 10px;
  font: 500 12px/1 var(--shout); letter-spacing: 0.24em; text-transform: uppercase; color: var(--creme);
  transition: opacity .4s ease;
}
.scroll-cue::after { content: ""; width: 1px; height: 38px; background: linear-gradient(var(--creme), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
.scroll-cue.gone { opacity: 0; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- La carte ---------- */
.carte { padding-block: clamp(88px, 12vw, 160px); }
.carte-head { display: grid; gap: 14px; margin-bottom: clamp(44px, 6vw, 72px); }
.carte-head .label { color: var(--bordeaux); }
.carte-note { font-style: italic; font-size: 22px; color: var(--ink-soft); }
.dishes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 36px); }
.dish { display: grid; gap: 14px; align-content: start; min-width: 0; }
/* The photos are wide flat-lays with a lot of linen: crop in so the plate carries the frame.
   height: 100% also beats the img's height attribute, which would otherwise override the aspect ratio. */
.dish-photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--creme); }
.dish-photo img { width: 100%; height: 100%; object-fit: cover; scale: 1.3; }
.dish-line { display: flex; align-items: baseline; gap: 8px; padding-top: 6px; border-top: 1px solid var(--ink); }
.dish h3 { font: italic 400 24px/1.15 var(--serif); }
.leader { flex: 1; min-width: 16px; border-bottom: 1px dotted var(--ink-soft); translate: 0 -5px; }
.price { font: 500 17px/1 var(--shout); letter-spacing: 0.06em; white-space: nowrap; color: var(--bordeaux); }
.dish p { font-size: 17px; line-height: 1.5; color: var(--ink-soft); }
.carte-foot { margin-top: clamp(40px, 5vw, 64px); font: 500 13px/1 var(--shout); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Le fondateur ---------- */
.fondateur { background: var(--bordeaux); color: var(--nappe); padding-block: clamp(88px, 11vw, 150px); }
.fondateur-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #4A1825; }
.fondateur-text { display: grid; gap: 20px; max-width: 560px; }
.fondateur-text .label { color: var(--creme); }
.fondateur .lead { font: italic 400 26px/1.3 var(--text); color: var(--creme); }
.fiche { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid rgba(230, 216, 198, .35); margin-top: 12px; }
.fiche div { padding: 16px 0; border-bottom: 1px solid rgba(230, 216, 198, .35); display: grid; gap: 6px; }
.fiche div:nth-child(odd) { padding-right: 16px; }
.fiche dt { font: 500 12px/1 var(--shout); letter-spacing: 0.18em; text-transform: uppercase; color: var(--creme); }
.fiche dd { font: italic 400 30px/1 var(--serif); }

/* ---------- L'avis ---------- */
.avis { padding-block: clamp(88px, 11vw, 150px); background: var(--creme); }
.avis-inner { display: grid; gap: 28px; }
.avis .label { color: var(--bordeaux); }
.review { display: grid; gap: 22px; max-width: 980px; }
.stars { font-size: 26px; letter-spacing: 0.18em; color: var(--bordeaux); }
.review blockquote { margin: 0; }
.review blockquote p { font: italic 400 clamp(34px, 4.6vw, 64px)/1.08 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
.review figcaption { font: 500 15px/1 var(--shout); letter-spacing: 0.16em; text-transform: uppercase; }
.avis-foot { font-style: italic; color: var(--ink-soft); }

/* ---------- Réserver ---------- */
.reserver { position: relative; color: var(--nappe); background: var(--film); padding-block: clamp(96px, 12vw, 170px); overflow: hidden; }
.reserver-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reserver::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 9, 8, .78) 0%, rgba(11, 9, 8, .35) 55%, rgba(11, 9, 8, .55) 100%); }
.reserver-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(32px, 6vw, 96px); align-items: end; }
.reserver-copy { display: grid; gap: 18px; max-width: 520px; }
.reserver-copy .label { color: var(--creme); }
.reserver-copy p:last-child { font-size: 21px; color: var(--creme); }

.booking { background: var(--nappe); color: var(--ink); padding: clamp(24px, 3vw, 36px); }
.booking-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field label { font: 500 12px/1 var(--shout); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select {
  width: 100%; font: 400 19px/1.2 var(--text); color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  padding: 8px 0 10px; appearance: none; -webkit-appearance: none;
}
.field select { background: linear-gradient(45deg, transparent 50%, var(--ink) 50%) right 6px center / 6px 6px no-repeat, linear-gradient(-45deg, transparent 50%, var(--ink) 50%) right 0 center / 6px 6px no-repeat; padding-right: 20px; }
.field input:focus, .field select:focus { outline: none; border-bottom: 2px solid var(--bordeaux); padding-bottom: 9px; }
.field input.invalid { border-bottom-color: var(--bordeaux); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 15px/1 var(--shout); letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none;
  background: var(--bordeaux); color: var(--nappe); border: 1px solid var(--bordeaux); padding: 17px 22px; cursor: pointer;
}
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn:focus-visible, .link-btn:focus-visible, .field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 3px; }
.form-note { font-size: 15px; font-style: italic; color: var(--ink-soft); }
.booking-done { display: grid; gap: 16px; }
.booking-done .label { color: var(--bordeaux); }
.booking-done .display { font-size: clamp(34px, 3.6vw, 46px); }
.booking-done p:not(.label) { color: var(--ink-soft); }
.btn-cg { font-family: var(--cg); letter-spacing: 0; text-transform: none; font-size: 16px; background: #0A0A0A; border-color: #0A0A0A; }
.btn-cg:hover { background: #12A162; border-color: #12A162; color: #0A0A0A; }
.link-btn { justify-self: start; background: none; border: 0; padding: 4px 0; font: italic 400 17px/1.3 var(--text); color: var(--ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* ---------- Footer ---------- */
.foot { background: var(--film); color: var(--nappe); padding-block: 72px calc(110px + env(safe-area-inset-bottom, 0px)); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.foot .label { color: var(--creme); margin-bottom: 10px; }
.foot p { font-size: 17px; }
.foot .muted { color: var(--creme); font-style: italic; }
.foot a { text-underline-offset: 4px; }
.brand-foot { font-size: 34px; }

/* ---------- chapter growth band ---------- */
.cg-band {
  position: fixed; z-index: 30;
  left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 9px;
  background: #0A0A0A; color: #F2F2F2; border: 1px solid rgba(242, 242, 242, .18);
  font: 500 13px/1 var(--cg); padding: 10px 12px; text-decoration: none;
}
.cg-band b { font-weight: 500; }
.cg-band:hover { border-color: #12A162; }
.cg-band:focus-visible { outline: 2px solid #12A162; outline-offset: 2px; }
.cg-dot { width: 7px; height: 7px; background: #12A162; }
@media (max-width: 520px) { .cg-band { font-size: 12px; padding: 8px 10px; gap: 7px; } }

/* ---------- Narrow screens ---------- */
@media (max-width: 1024px) {
  .dishes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 18px; }
  .nav { gap: 16px; }
  .nav a:not(.nav-cta) { display: none; }
  .brand { font-size: 21px; }
  .film-shade {
    background: linear-gradient(180deg, rgba(11, 9, 8, .5) 0%, rgba(11, 9, 8, 0) 20%, rgba(11, 9, 8, 0) 45%, rgba(11, 9, 8, .82) 100%);
  }
  .beat, .beat-left, .beat-right, .beat-hero {
    left: var(--gutter-l); right: var(--gutter-r); top: auto; translate: none;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    max-width: none; padding: 0; text-align: left; justify-items: start;
  }
  .shout { font-size: clamp(44px, 13vw, 64px); }
  .beat-hero .shout { font-size: clamp(54px, 16vw, 80px); }
  .scroll-cue { display: none; }
  .fondateur-grid, .reserver-grid, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .reserver-grid { align-items: start; }
  /* On a tall phone crop the awning lettering would sit right behind the heading: start the photo lower,
     fading in, so the copy stands on plain dark and the awning lands behind the form. */
  .reserver-bg { top: 24%; height: 76%; -webkit-mask-image: linear-gradient(transparent, #000 22%); mask-image: linear-gradient(transparent, #000 22%); }
  .reserver::after { background: linear-gradient(180deg, rgba(11, 9, 8, .5) 0%, rgba(11, 9, 8, .45) 60%, rgba(11, 9, 8, .7) 100%); }
  .fiche dd { font-size: 26px; }
}
/* Phones: the carte reads like a printed bistro menu, one row per dish with a square photo of the plate. */
@media (max-width: 520px) {
  .dishes { grid-template-columns: minmax(0, 1fr); gap: 0; border-bottom: 1px solid var(--ink); }
  .dish { grid-template-columns: 108px minmax(0, 1fr); column-gap: 16px; row-gap: 8px; padding-block: 18px; border-top: 1px solid var(--ink); }
  .dish-photo { grid-row: span 2; aspect-ratio: 1; }
  .dish-photo img { scale: 1.75; }
  .dish-line { border-top: 0; padding-top: 0; }
  .dish h3 { font-size: 21px; }
  .dish p { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue::after { animation: none; }
  .top { transition: none; }
}
