/* Le Parchemin — styles. Tokens and rules documented in DESIGN-SYSTEM.md */

@font-face {
  font-family: "Cormorant";
  src: url("../fonts/cormorant-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("../fonts/cormorant-latin-wght-italic.woff2") format("woff2");
  font-weight: 300 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --ink: #0C0A09;          /* page background, darkest */
  --stone: #1C1917;        /* raised dark surface */
  --stone-2: #292524;      /* fields and borders on dark */
  --line: rgba(250, 250, 249, .16);
  --paper: #FAFAF9;        /* light surface and text on dark */
  --muted: #B8B2AC;        /* secondary text on dark */
  --muted-ink: #57534E;    /* secondary text on light */
  --gold: #D4A853;         /* accent on dark */
  --gold-deep: #8A5A0B;    /* accent on light */
  --ember: #E0582B;        /* braise accent, dark surfaces only */

  --font-display: "Cormorant", "Iowan Old Style", Georgia, serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 4.5vw, 56px);
  --section: clamp(80px, 11vw, 144px);
  --radius: 3px;
  --bar-h: 62px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.75; font-weight: 400;
  padding-bottom: var(--bar-h);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; text-wrap: balance; letter-spacing: -.005em; }
h1 { font-size: clamp(3rem, 10.5vw, 6.75rem); line-height: .94; }
h2 { font-size: clamp(2.4rem, 6vw, 4.25rem); line-height: 1; }
h3 { font-size: clamp(1.7rem, 3vw, 2.1rem); line-height: 1.1; }
p { margin: 0 0 1.1em; max-width: 62ch; }
a { color: var(--gold); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a[href^="tel:"] { white-space: nowrap; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.on-light :focus-visible { outline-color: var(--gold-deep); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.7; color: var(--paper); }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.rule { width: 56px; height: 1px; background: var(--gold); border: 0; margin: 0 0 28px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--paper); color: var(--ink); padding: 12px 16px; }
.skip-link:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 28px;
  font: 600 .9rem/1.2 var(--font-body); letter-spacing: .04em;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: #E5BE70; }
.btn-ghost { border-color: rgba(250, 250, 249, .55); color: var(--paper); background: transparent; }
.btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.on-light .btn-primary { background: var(--ink); color: var(--paper); }
.on-light .btn-primary:hover { background: #33302D; }
.on-light .btn-ghost { border-color: var(--ink); color: var(--ink); }
.on-light .btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: linear-gradient(180deg, rgba(12, 10, 9, .82), rgba(12, 10, 9, 0));
  transition: background-color .4s var(--ease);
}
.site-header.is-solid { background: rgba(12, 10, 9, .94); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; line-height: 1; color: var(--paper); text-decoration: none; white-space: nowrap; letter-spacing: .01em; }
.brand img { height: 56px; width: auto; }
.footer-logo { width: 132px; height: auto; margin-bottom: 18px; }
.site-nav ul { display: none; gap: 34px; }
.site-nav a { color: var(--paper); text-decoration: none; font-size: .875rem; font-weight: 500; letter-spacing: .03em; padding: 8px 0; border-bottom: 1px solid transparent; transition: border-color .3s var(--ease); }
.site-nav a:hover { border-bottom-color: var(--gold); }
.header-cta { display: none; }
.progress { position: fixed; left: 0; top: 0; z-index: 60; height: 2px; width: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(var(--page, 0)); }

/* Hero: the photo recedes as the page scrolls */
.hero { --p: 0; position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: end; overflow: hidden; perspective: 1200px; }
.hero-media { position: absolute; inset: 0; transform: scale(calc(1.06 + var(--p) * .28)) translate3d(0, calc(var(--p) * 5%), 0); transform-origin: 50% 60%; will-change: transform; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 10, 9, .5) 0%, rgba(12, 10, 9, .12) 30%, rgba(12, 10, 9, .8) 76%, var(--ink) 100%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(12, 10, 9, .78) 0%, rgba(12, 10, 9, .35) 46%, rgba(12, 10, 9, 0) 70%); }
.hero-inner { position: relative; z-index: 1; padding-block: 120px clamp(56px, 9vw, 110px);
  transform: translate3d(0, calc(var(--p) * -16vh), calc(var(--p) * 140px)); opacity: calc(1 - var(--p) * 1.7); will-change: transform, opacity; }
.hero h1 { max-width: 16ch; margin-bottom: 28px; }
.hero .lead { max-width: 46ch; margin-bottom: 34px; }
.hero-meta { margin: 26px 0 0; font-size: .875rem; color: var(--muted); }

/* Chapters: a photo plate turns to face the reader while the section is pinned */
.chapter { --p: .6; position: relative; }
.chapter-stage { display: grid; gap: 40px; padding-block: var(--section); align-items: center; perspective: 1500px; }
.chapter-visual { position: relative; transform-style: preserve-3d; }
.plate { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--stone); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9); will-change: transform; }
.plate img { width: 100%; height: 100%; object-fit: cover; }
.plate-main { aspect-ratio: 4 / 5; --t: min(1, var(--p) * 2.1);
  transform: translate3d(0, 0, calc((1 - var(--t)) * -260px)) rotateY(calc((1 - var(--t)) * var(--turn, 22deg))) rotateX(calc((1 - var(--t)) * 7deg)); }
.plate-float { position: absolute; width: 46%; aspect-ratio: 1; right: -4%; bottom: -8%; --t: min(1, var(--p) * 2.1);
  border: 6px solid var(--ink);
  transform: translate3d(0, calc((.55 - var(--p)) * 90px), 90px) rotateY(calc((1 - var(--t)) * var(--turn-float, -16deg))); }
.chapter-braise .plate-main { --turn: -22deg; }
.chapter-braise .plate-float { --turn-float: 16deg; right: auto; left: -4%; }
.chapter-text { --t: min(1, var(--p) * 2.1); opacity: calc(var(--p) * 5 - .35); transform: translate3d(0, calc((1 - var(--t)) * 48px), 0); }
.chapter-text h2 { margin-bottom: 24px; }
.chapter-braise .rule { background: var(--ember); }
.facts { margin: 26px 0 34px; border-top: 1px solid var(--line); }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--paper); }

/* Interlude: a mountain panorama opens like a window */
.interlude { --p: .6; position: relative; height: 92vh; height: 92svh; display: grid; place-items: center; overflow: hidden;
  clip-path: inset(calc((1 - min(1, var(--p) * 2.4)) * 12%) calc((1 - min(1, var(--p) * 2.4)) * 7%)); }
.interlude img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.3 - var(--p) * .26)); will-change: transform; }
.interlude::after { content: ""; position: absolute; inset: 0; background: rgba(12, 10, 9, .38); }
.interlude p { position: relative; z-index: 1; margin: 0; max-width: 18ch; text-align: center; padding-inline: var(--gutter);
  font-family: var(--font-display); font-weight: 500; font-size: clamp(2.2rem, 6.4vw, 4.6rem); line-height: 1.02; text-wrap: balance;
  transform: translate3d(0, calc((.5 - var(--p)) * 90px), 0); }

/* Placeholders that must not ship */
.todo { display: inline-block; padding: 1px 9px; border: 1px dashed currentColor; border-radius: 2px; font-family: var(--font-body); font-size: .8em; font-weight: 500; letter-spacing: 0; }

/* Menu: light paper section */
.menu { background: var(--paper); color: var(--ink); }
.menu a { color: var(--gold-deep); }
.menu .lead { color: var(--muted-ink); }
.menu .rule { background: var(--gold-deep); }
.menu-head { margin-bottom: clamp(40px, 6vw, 72px); }
.menu-head h2 { margin-bottom: 18px; }
.menu-grid { display: grid; gap: 56px; }
.menu-col h3 { padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.menu-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; padding: 22px 0; border-bottom: 1px solid #D6D3D1; }
.menu-item strong { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.menu-item .price { font-weight: 600; text-align: right; white-space: nowrap; }
.menu-item p { grid-column: 1 / -1; margin: 0; font-size: .9rem; color: var(--muted-ink); }
.menu-note { margin-top: 36px; font-size: .85rem; color: var(--muted-ink); max-width: none; }

/* Groups */
.groups { position: relative; overflow: hidden; }
.groups-bg { position: absolute; inset: 0; }
.groups-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .34; }
.groups-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--ink) 0%, rgba(12, 10, 9, .55) 40%, var(--ink) 100%); }
.groups-grid { position: relative; display: grid; gap: 48px; }
.groups h2 { margin-bottom: 24px; }
.occasions { margin: 28px 0 0; border-top: 1px solid var(--line); }
.occasions li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.form { display: grid; gap: 18px; background: rgba(28, 25, 23, .92); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); }
.form-row { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 500; font-size: .85rem; letter-spacing: .02em; }
.field .hint { color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; color: var(--paper); background: var(--ink);
  border: 1px solid #57534E; border-radius: var(--radius); color-scheme: dark;
  transition: border-color .3s var(--ease);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field textarea { min-height: 120px; resize: vertical; }
.field input[aria-invalid="true"] { border-color: #F08A6B; }
.field .error { color: #F6A58C; font-size: .85rem; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; padding: 16px 18px; border: 1px solid var(--gold); border-radius: var(--radius); font-size: .95rem; }
.form-status[hidden] { display: none; }
.form-status pre { white-space: pre-wrap; font: 400 .9rem/1.6 var(--font-body); margin: 12px 0; color: var(--muted); }

/* Practical info */
.info { background: var(--stone); }
.info h2 { margin-bottom: clamp(36px, 5vw, 60px); }
.info-grid { display: grid; gap: 48px; }
.info-block { padding: 22px 0; border-top: 1px solid var(--line); }
.info-block h3 { font-size: 1.5rem; margin-bottom: 8px; }
.info-block p { margin-bottom: .3em; color: var(--muted); }
.info-block p a { color: var(--gold); }
.big-tel { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1.1; color: var(--paper); text-decoration: none; }
.big-tel:hover { color: var(--gold); }
.map-box { min-height: 360px; height: 100%; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; text-align: center; padding: 28px; background: var(--ink); }
.map-box p { margin-inline: auto; }
.map-box.is-loaded { padding: 0; }
.map-box iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }

/* Booking */
.reserve { position: relative; overflow: hidden; text-align: center; }
.reserve-bg { position: absolute; inset: 0; }
.reserve-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.reserve-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(12, 10, 9, .5), var(--ink) 78%); }
.reserve .wrap { position: relative; display: grid; justify-items: center; gap: 30px; }
.reserve h2 { font-size: clamp(2.8rem, 8vw, 5.5rem); }
.reserve p { margin: 0; }
.reserve .btn-row { justify-content: center; }
.booking { width: min(100%, 560px); min-height: 640px; background: var(--paper); border-radius: var(--radius); overflow: hidden; text-align: left; }
.booking iframe { margin-inline: auto; }
.booking.is-empty { min-height: 0; background: var(--stone); border: 1px solid var(--line); padding: 24px; }
.booking-fallback { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 36px; font-size: .9rem; color: var(--muted); }
.site-footer a { color: var(--paper); }
.footer-grid { display: grid; gap: 36px; margin-bottom: 40px; }
.site-footer .brand { display: inline-block; margin-bottom: 14px; }
.footer-links { display: grid; gap: 10px; align-content: start; }
.footer-links button { background: none; border: 0; padding: 0; font: inherit; color: var(--paper); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.evin { border-top: 1px solid var(--line); padding-top: 22px; margin: 0; max-width: none; font-size: .8rem; }
[data-optional][hidden] { display: none; }

/* Mobile action bar */
.mobile-bar { position: fixed; inset: auto 0 0 0; z-index: 60; height: var(--bar-h); display: grid; grid-template-columns: 1.3fr 1fr 1fr; background: var(--ink); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.mobile-bar a { display: grid; place-items: center; color: var(--paper); font-weight: 600; font-size: .85rem; letter-spacing: .03em; text-decoration: none; border-left: 1px solid var(--line); }
.mobile-bar a:first-child { background: var(--gold); color: var(--ink); border-left: 0; }

/* Cookie banner */
.cookie { position: fixed; left: 12px; right: 12px; bottom: calc(var(--bar-h) + 12px); z-index: 70; background: var(--stone); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 520px; }
.cookie[hidden] { display: none; }
.cookie p { font-size: .9rem; }
.cookie .btn { min-height: 44px; padding: 8px 18px; }

/* Legal pages */
.legal { padding-block: 140px var(--section); }
.legal h1 { font-size: clamp(2.6rem, 7vw, 4.2rem); margin-bottom: 36px; }
.legal h2 { font-size: 1.9rem; margin: 44px 0 12px; }
.legal p { color: var(--muted); }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }
  .cookie { bottom: 16px; left: 16px; right: auto; }
  .site-nav ul { display: flex; }
  .header-cta { display: inline-flex; min-height: 44px; padding: 8px 22px; }
  .hero::before { background: linear-gradient(90deg, rgba(12, 10, 9, .86) 0%, rgba(12, 10, 9, .5) 38%, rgba(12, 10, 9, 0) 62%); }
  .chapter { height: 230vh; }
  .chapter-stage { position: sticky; top: 0; height: 100vh; padding-block: 96px 48px; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(56px, 8vw, 128px); }
  .chapter-braise .chapter-visual { order: 2; }
  .plate-main { aspect-ratio: auto; height: min(68vh, 640px); }
  .menu-grid { grid-template-columns: 1fr 1fr; gap: 88px; }
  .groups-grid { grid-template-columns: .9fr 1.1fr; gap: 88px; align-items: start; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr 1fr; gap: 88px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 899px) {
  .plate-main { --turn: 12deg; }
  .chapter-braise .plate-main { --turn: -12deg; }
  .plate-float { width: 40%; right: 0; bottom: -6%; }
  .chapter-braise .plate-float { left: 0; }
  .chapter-visual { margin-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .site-header, .site-nav a, .field input { transition: none; }
  .hero-media, .hero-inner, .plate-main, .plate-float, .chapter-text, .interlude, .interlude img, .interlude p { transform: none; opacity: 1; clip-path: none; }
  .progress { display: none; }
}

a[href^="tel:"] { white-space: nowrap; }
