/* ============================================================
   Restaurant l'Alambic — stylesheet
   Palette: copper · charcoal · cream. Type: Cormorant + Inter.
   ============================================================ */
:root {
  --charcoal: #1c1a17;
  --charcoal-soft: #2a2621;
  --cream: #f6f1e7;
  --cream-2: #efe7d7;
  --copper: #b0703c;
  --copper-light: #c98f5b;
  --ink: #26221d;
  --muted: #7a7166;
  --line: rgba(28, 26, 23, 0.14);
  --maxw: 1160px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: 0.01em; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); color: var(--charcoal); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.section { padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 5vw, 4rem); }

.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--copper);
  margin-bottom: 1rem;
}
.kicker--light { color: var(--copper-light); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.95em 1.9em;
  border: 1px solid var(--copper);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.35s ease;
  font-weight: 500;
}
.btn--solid { background: var(--copper); color: var(--cream); }
.btn--solid:hover { background: var(--charcoal); border-color: var(--charcoal); }
.btn--ghost { background: transparent; color: currentColor; border-color: currentColor; }
.btn--ghost:hover { background: var(--copper); border-color: var(--copper); color: var(--cream); }
.btn--sm { padding: 0.7em 1.3em; font-size: 0.72rem; }
.btn--lg { padding: 1.05em 2.4em; font-size: 0.9rem; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: padding 0.4s ease;
  padding: 1.4rem 0;
}
/* Scrolled background lives on a pseudo-element, NOT on .nav itself: a
   backdrop-filter on .nav would make it the containing block for the fixed
   mobile menu panel and clip it to the header height. */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(23, 21, 18, 0.94);
  box-shadow: 0 8px 30px -18px #000;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.4s ease;
}
.nav.scrolled::before { opacity: 1; }
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 4rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav__brand { display: flex; flex-direction: column; line-height: 1; color: var(--cream); }
.nav__brand-name { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; }
.nav__brand-sub {
  font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase;
  margin-top: 0.35rem; opacity: 0.8;
}
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a {
  color: var(--cream); font-size: 0.82rem; letter-spacing: 0.12em;
  text-transform: uppercase; position: relative; transition: color 0.3s;
}
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--copper-light); transition: width 0.3s ease;
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  border: 1px solid var(--copper-light); padding: 0.6em 1.3em; border-radius: 2px;
  transition: background 0.3s, color 0.3s;
}
.nav__cta:hover { background: var(--copper); border-color: var(--copper); }

/* scrolled state (toggled by JS) */
.nav.scrolled { padding: 0.85rem 0; }

.langswitch { display: flex; align-items: center; gap: 0.4rem; color: var(--cream); }
.langswitch__btn {
  background: none; border: none; color: var(--cream); cursor: pointer;
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.1em; opacity: 0.6;
  transition: opacity 0.3s; padding: 0.2rem;
}
.langswitch__btn.active { opacity: 1; color: var(--copper-light); font-weight: 600; }
.langswitch__sep { opacity: 0.4; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 26px; height: 2px; background: var(--cream); transition: 0.3s; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; min-height: 620px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--cream); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.05); animation: heroZoom 18s ease-out forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,17,14,0.55) 0%, rgba(20,17,14,0.35) 40%, rgba(20,17,14,0.8) 100%); }
.hero__content { position: relative; z-index: 2; max-width: 760px; padding: 0 1.5rem; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.72rem; color: var(--copper-light); margin-bottom: 1.4rem; }
.hero__title { font-size: clamp(3rem, 8vw, 6rem); font-weight: 600; text-shadow: 0 2px 30px rgba(0,0,0,0.4); }
.hero__tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 3vw, 1.9rem); color: var(--copper-light); margin: 0.6rem 0 1.4rem; }
.hero__lead { font-size: 1.05rem; font-weight: 300; max-width: 540px; margin: 0 auto 2.4rem; opacity: 0.92; }
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero__scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2; color: var(--cream); font-size: 1.5rem; opacity: 0.7; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }

/* ---------- Story ---------- */
.story { background: var(--cream); }
.story__grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.story__text h2 { margin-bottom: 1.4rem; }
.story__text p { margin-bottom: 1.1rem; color: #4a453d; }
.story__facts { list-style: none; display: flex; gap: 2rem; margin-top: 2.2rem; flex-wrap: wrap; }
.story__facts li { display: flex; flex-direction: column; }
.story__facts strong { font-family: var(--serif); font-size: 1.8rem; color: var(--copper); }
.story__facts span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.story__img img { border-radius: 3px; box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; width: 100%; }

/* ---------- Signature (aligot — tall scroll-linked reveal) ---------- */
.signature {
  position: relative;
  max-width: 1000px;            /* capped so the tall portrait isn't over-zoomed on wide screens */
  margin: clamp(2rem, 5vw, 4.5rem) auto;
  height: 78vh;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: var(--shadow);
  color: var(--cream);
}
/* Full-width image, taller than the frame; JS translates it across its whole
   hidden height as the section scrolls past (see main.js). */
.signature__img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: auto;
  display: block;
  will-change: transform;
}
.signature__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(20,17,14,0.92) 0%, rgba(20,17,14,0.55) 32%,
    rgba(20,17,14,0.15) 60%, rgba(20,17,14,0.45) 100%);
}
.signature__content {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 4rem) clamp(3rem, 8vw, 6.5rem);
}
.signature__content h2 { color: var(--cream); margin-bottom: 1.3rem; max-width: 16ch; }
.signature__content p { opacity: 0.9; margin-bottom: 2rem; font-weight: 300; max-width: 46ch; }
.signature__content .btn { align-self: flex-start; }

/* ---------- Parallax utility (slow scroll) ---------- */
[data-parallax] { position: relative; overflow: hidden; }
.js-parallax { transform: translate3d(0, 0, 0); }
@media (prefers-reduced-motion: reduce) {
  .js-parallax { transform: none !important; }
}

/* ---------- Menu ---------- */
.menu { background: var(--cream-2); }
.menu__head { text-align: center; max-width: 640px; margin: 0 auto 1rem; }
.menu__head h2 { margin-bottom: 0.6rem; }
.menu__note { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em; }
.menu__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.6rem; margin: 2rem auto 3.5rem; max-width: 800px; }
.menu__nav a { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); padding-bottom: 3px; border-bottom: 1px solid transparent; transition: color 0.3s, border-color 0.3s; }
.menu__nav a:hover, .menu__nav a.active { color: var(--copper); border-color: var(--copper); }
.menu__body { max-width: 820px; margin: 0 auto; }
.menu__loading { text-align: center; color: var(--muted); }

.menu-section { margin-bottom: 3.6rem; scroll-margin-top: 110px; }
.menu-section__title { text-align: center; font-size: 1.9rem; color: var(--charcoal); margin-bottom: 0.4rem; position: relative; }
.menu-section__rule { display: block; width: 46px; height: 1px; background: var(--copper); margin: 0.9rem auto 2rem; }

.dish { padding: 0.9rem 0; border-bottom: 1px dotted var(--line); }
.dish__head { display: flex; align-items: baseline; gap: 0.6rem; }
.dish__name { font-family: var(--serif); font-size: 1.32rem; color: var(--ink); font-weight: 500; }
.dish__dots { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); min-width: 20px; }
.dish__price { font-family: var(--serif); font-size: 1.25rem; color: var(--copper); font-weight: 600; white-space: nowrap; }
.dish__desc { font-size: 0.9rem; color: var(--muted); margin-top: 0.3rem; max-width: 88%; font-style: italic; }

.menu-note { text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--copper); margin: 1.6rem auto; max-width: 600px; }
.menu__legend { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 2rem; letter-spacing: 0.06em; }
.menu__intro { text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--charcoal-soft); max-width: 620px; margin: 0 auto 3rem; }

/* ---------- Gallery ---------- */
.gallery { background: var(--cream); }
.gallery__grid { max-width: var(--maxw); margin: 2.5rem auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery__grid figure { overflow: hidden; border-radius: 3px; }
.gallery__grid img { aspect-ratio: 4/5; object-fit: cover; width: 100%; transition: transform 0.7s ease; }
.gallery__grid figure:hover img { transform: scale(1.06); }

/* ---------- Info ---------- */
.info { background: var(--charcoal); color: var(--cream); }
.info__grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.info__card { border: 1px solid rgba(255,255,255,0.12); padding: 2.4rem 2rem; border-radius: 3px; background: rgba(255,255,255,0.02); }
.info__card h3 { color: var(--copper-light); font-size: 1.5rem; margin-bottom: 1.2rem; }
.info__card p { margin-bottom: 0.6rem; opacity: 0.9; font-weight: 300; }
.info__muted { opacity: 0.55 !important; font-size: 0.9rem; }
.info__wink { font-family: var(--serif); font-style: italic; color: var(--copper-light); opacity: 0.85 !important; margin-top: 1rem; }
.info__link { color: var(--copper-light); font-size: 1.3rem; font-family: var(--serif); }
.info__card .btn { margin-top: 1rem; color: var(--cream); }

/* ---------- Reserve ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.reserve { background: var(--cream-2); text-align: center; }
.reserve__inner { max-width: 640px; margin: 0 auto; }
.reserve__inner h2 { margin-bottom: 1rem; }
.reserve__lead { color: #4a453d; margin-bottom: 2rem; }
.reserve__form { margin-top: 3rem; text-align: left; background: var(--cream); padding: 2.4rem; border-radius: 4px; box-shadow: 0 20px 50px -35px rgba(0,0,0,0.4); }
.reserve__or { text-align: center; text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem; color: var(--muted); margin-bottom: 1.6rem; }
.reserve__row { display: flex; gap: 1rem; margin-bottom: 1rem; }
.reserve__field { width: 100%; min-width: 0; }
.reserve__form input, .reserve__form textarea {
  width: 100%; max-width: 100%; min-width: 0; font-family: var(--sans); font-size: 0.95rem; padding: 0.85rem 1rem;
  border: 1px solid var(--line); border-radius: 2px; background: var(--cream); color: var(--ink);
  font-weight: 300; transition: border-color 0.3s;
}
.reserve__form input[type="date"],
.reserve__form input[type="time"] {
  -webkit-min-logical-width: 0; /* Safari flex/intrinsic-width overflow fix */
  /* iOS renders these as a native system control with its own intrinsic width that
     ignores `width: 100%`; resetting appearance makes it behave like a normal box. */
  -webkit-appearance: none; appearance: none;
  padding-right: 2.75rem; background-repeat: no-repeat; background-position: right 0.9rem center; background-size: 18px;
}
/* Custom icon: Safari doesn't render a native calendar/clock glyph, so we draw our own
   for every browser and hide Chrome/Edge's built-in indicator on top of it. */
.reserve__form input[type="date"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a7166' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}
.reserve__form input[type="time"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a7166' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15.5 14'/%3E%3C/svg%3E");
}
.reserve__form input[type="date"]::-webkit-calendar-picker-indicator,
.reserve__form input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0; cursor: pointer;
}
.reserve__form input:focus, .reserve__form textarea:focus { outline: none; border-color: var(--copper); }
.reserve__form textarea { margin-bottom: 1.4rem; resize: vertical; }
.reserve__form .btn { width: 100%; }
.reserve__hint { font-size: 0.78rem; color: var(--muted); text-align: center; margin-top: 1rem; }

/* ---------- Footer ---------- */
.footer { background: var(--charcoal); color: var(--cream); padding: 4rem clamp(1.25rem, 5vw, 4rem) 2rem; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer__brand { font-family: var(--serif); font-size: 1.8rem; font-weight: 600; }
.footer__tag { font-family: var(--serif); font-style: italic; color: var(--copper-light); }
.footer__col p { opacity: 0.85; font-weight: 300; margin-bottom: 0.3rem; }
.footer__col a:hover { color: var(--copper-light); }
.footer__legal { text-align: center; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.78rem; opacity: 0.55; }
.footer__link { background: none; border: none; padding: 0; margin-top: 0.4rem; color: var(--cream); opacity: 0.85; font: inherit; font-weight: 300; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--copper); }
.footer__link:hover { color: var(--copper-light); }

/* ---------- Socials ---------- */
.socials { display: flex; align-items: center; gap: 0.9rem; margin-top: 1.4rem; }
.socials__label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; opacity: 0.6; }
.socials__link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2); color: var(--cream);
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
}
.socials__link:hover { background: var(--copper); border-color: var(--copper); color: var(--cream); transform: translateY(-2px); }

/* ---------- Directions chooser (popup / bottom sheet) ---------- */
.mapsheet { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.mapsheet[hidden] { display: none; }
.mapsheet__backdrop { position: absolute; inset: 0; background: rgba(15,13,11,0.6); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.28s ease; }
.mapsheet.open .mapsheet__backdrop { opacity: 1; }
.mapsheet__panel {
  position: relative; z-index: 1;
  width: min(380px, calc(100% - 2rem));
  background: var(--cream); color: var(--ink);
  border-radius: 8px; padding: 1.8rem 1.6rem 1.4rem;
  box-shadow: 0 30px 70px -25px rgba(0,0,0,0.6);
  transform: translateY(16px) scale(0.98); opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.mapsheet.open .mapsheet__panel { transform: none; opacity: 1; }
.mapsheet__title { font-size: 1.5rem; margin-bottom: 0.3rem; }
.mapsheet__addr { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.3rem; }
.mapsheet__list { display: flex; flex-direction: column; gap: 0.55rem; }
.mapsheet__item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: 4px;
  background: #fff; color: var(--ink); font-size: 0.98rem; font-weight: 400; cursor: pointer;
  text-align: left; width: 100%; transition: border-color 0.25s, background 0.25s, transform 0.15s;
}
.mapsheet__item:hover { border-color: var(--copper); background: var(--cream-2); }
.mapsheet__item:active { transform: scale(0.99); }
.mapsheet__item svg, .mapsheet__item .mapsheet__pin { flex: 0 0 auto; color: var(--copper); }
.mapsheet__item span { flex: 1; }
.mapsheet__item small { color: var(--muted); font-size: 0.78rem; }
.mapsheet__close { margin-top: 1.2rem; width: 100%; background: none; border: none; color: var(--muted); font: inherit; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; padding: 0.4rem; }
.mapsheet__close:hover { color: var(--ink); }

@media (max-width: 600px) {
  .mapsheet { align-items: flex-end; }
  .mapsheet__panel { width: 100%; border-radius: 14px 14px 0 0; padding-bottom: 2rem; transform: translateY(100%); }
  .mapsheet.open .mapsheet__panel { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mapsheet__backdrop, .mapsheet__panel { transition: none; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav__toggle { display: flex; z-index: 101; }
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    background: var(--charcoal); flex-direction: column; justify-content: center;
    gap: 2rem; transform: translateX(100%); transition: transform 0.4s ease; padding: 2rem;
  }
  .nav__links.open { transform: translateX(0); }
  .nav.scrolled .nav__brand, .nav__brand { color: var(--cream); }
  .story__grid { grid-template-columns: 1fr; }
  .signature { height: 70vh; min-height: 420px; }
  .info__grid, .footer__inner { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: 1fr 1fr; }
  .reserve__row { flex-direction: column; }
}
@media (max-width: 520px) {
  .gallery__grid { grid-template-columns: 1fr; }
  .dish__desc { max-width: 100%; }
  .story__facts { gap: 1.2rem; }
}

/* ---------- Print (clean menu printout) ---------- */
@media print {
  .nav, .hero, .signature, .gallery, .reserve, .info, .footer, .hero__scroll, .menu__nav { display: none !important; }
  body { background: #fff; color: #000; }
  .menu { padding: 1rem; background: #fff; }
  .dish__price, .menu-section__title, .kicker { color: #000; }
}
