/* ============================================================
   Osteria San Marco — wood fire, nothing else
   ============================================================ */

:root {
  --ink: #0a0807;          /* near-black, warm */
  --ink-2: #100d0b;
  --cream: #ece1cd;        /* warm cream */
  --cream-dim: #b8ab92;
  --ember: #e0561f;        /* ember orange */
  --ember-bright: #ff8a4a;
  --line: rgba(236, 225, 205, 0.16);
  --serif: "Cormorant Garamond", "Georgia", serif;
  --sans: "Jost", "Segoe UI", sans-serif;
}

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

html {
  /* headings clear the fixed nav when an anchor link jumps to a section */
  scroll-padding-top: 4.5rem;
}

/* Full-page locking:
   - Desktop (mouse wheel) is driven by JS in main.js — one wheel gesture
     eases to the next section. A mouse wheel is discrete, so CSS snap only
     fights it; JS gives true one-gesture-per-page motion instead.
   - Touch devices use the native CSS proximity snap, which rides swipe
     momentum. Only the full-screen video sections lock; the taller menu
     and reserve sections scroll freely and hand off at their edges. */
@media (hover: none) and (pointer: coarse) {
  html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
  .hero, .scene {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

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

::selection { background: var(--ember); color: var(--ink); }

/* ---------- film grain ---------- */
.grain {
  position: fixed;
  inset: -100px;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-24px, 16px); }
  50%  { transform: translate(18px, -22px); }
  75%  { transform: translate(-14px, -12px); }
  100% { transform: translate(0, 0); }
}

/* ---------- shared type ---------- */
.kicker {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ember-bright);
  margin-bottom: 1.4rem;
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0.015em;
  color: var(--cream);
}

.lede {
  max-width: 34em;
  margin-top: 1.6rem;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 400;
  color: var(--cream-dim);
  font-style: italic;
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.4rem, 4vw, 3.2rem);
  transition: background 0.5s ease, padding 0.5s ease;
}
.nav.solid {
  background: linear-gradient(rgba(10, 8, 7, 0.92), rgba(10, 8, 7, 0.75) 70%, transparent);
}
.nav-mark {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.6rem);
}
.nav-links a {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.74rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--cream); }
.nav-links a.nav-reserve {
  color: var(--ember-bright);
  border: 1px solid rgba(224, 86, 31, 0.5);
  padding: 0.55em 1.3em;
  transition: background 0.3s ease, color 0.3s ease;
}
.nav-links a.nav-reserve:hover {
  background: var(--ember);
  color: var(--ink);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 65%, #1c0f06 0%, var(--ink) 62%);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(10, 8, 7, 0.42), rgba(10, 8, 7, 0.18) 40%, rgba(10, 8, 7, 0.62) 100%);
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.2rem;
  will-change: opacity, transform;
}
.hero-kicker {
  opacity: 0;
  animation: fade-up 1.6s 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 9.5vw, 8.2rem);
  line-height: 1.02;
  color: var(--cream);
  text-transform: none;
  letter-spacing: 0.3em;
  opacity: 0;
  animation: track-in 2.6s 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  text-shadow: 0 2px 60px rgba(0, 0, 0, 0.55);
}
.hero-sub {
  margin-top: 1.8rem;
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(0.82rem, 1.4vw, 1.02rem);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--cream-dim);
  opacity: 0;
  animation: fade-up 1.8s 1.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes track-in {
  from { opacity: 0; letter-spacing: 0.55em; }
  to   { opacity: 1; letter-spacing: 0.08em; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.scroll-cue {
  position: absolute;
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--cream-dim);
  opacity: 0;
  animation: fade-up 1.6s 2.6s ease forwards;
  transition: opacity 0.6s ease;
}
.scroll-cue i {
  display: block;
  width: 1px;
  height: 52px;
  background: linear-gradient(var(--ember), transparent);
  animation: cue-drip 2.2s ease-in-out infinite;
}
@keyframes cue-drip {
  0%   { transform: scaleY(0); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- full-bleed scenes (story / private) ---------- */
.scene {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.scene-media {
  position: absolute;
  inset: -12% 0;
  will-change: transform;
}
.scene-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) saturate(0.92);
}
.scene-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(10, 8, 7, 0.88) 8%, rgba(10, 8, 7, 0.45) 52%, rgba(10, 8, 7, 0.25) 100%),
    linear-gradient(rgba(10, 8, 7, 0.85), transparent 18%, transparent 82%, rgba(10, 8, 7, 0.92));
}
.scene-content {
  position: relative;
  z-index: 2;
  padding: clamp(6rem, 12vh, 9rem) clamp(1.6rem, 8vw, 9rem);
  max-width: 720px;
}
.ghost-link {
  display: inline-block;
  margin-top: 2.2rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.76rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ember-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(224, 86, 31, 0.45);
  padding-bottom: 0.45em;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.ghost-link:hover { color: var(--cream); border-color: var(--cream); }

/* ---------- menu ---------- */
.menu {
  position: relative;
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(224, 86, 31, 0.07), transparent 70%),
    var(--ink);
  padding: clamp(6rem, 14vh, 11rem) clamp(1.6rem, 7vw, 8rem);
}
.menu-head { text-align: center; margin-bottom: clamp(4rem, 8vh, 6rem); }
.menu-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 7vw, 7rem);
  max-width: 1180px;
  margin: 0 auto;
}
.menu-col-title {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--ember-bright);
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.4rem;
}
.dishes { list-style: none; }
.dish { padding: 1.15rem 0; }
.dish + .dish { border-top: 1px solid rgba(236, 225, 205, 0.07); }
.dish-row {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}
.dish-name {
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.leader {
  flex: 1;
  border-bottom: 1px dotted rgba(236, 225, 205, 0.25);
  transform: translateY(-0.28em);
}
.dish-price {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--ember-bright);
}
.dish-price::before { content: "€\00a0"; font-size: 0.78em; opacity: 0.75; }
.dish-note {
  margin-top: 0.3rem;
  font-style: italic;
  font-size: 1.02rem;
  color: var(--cream-dim);
}
.menu-foot {
  margin-top: clamp(3.4rem, 7vh, 5rem);
  text-align: center;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* ---------- reserve ---------- */
.reserve {
  position: relative;
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  padding: clamp(6rem, 13vh, 10rem) clamp(1.6rem, 7vw, 8rem);
}
.reserve-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(3rem, 7vw, 7rem);
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}
.hours { margin-top: 2.6rem; max-width: 26rem; }
.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(236, 225, 205, 0.08);
  font-size: 1.08rem;
}
.hours-row span:last-child { color: var(--cream-dim); font-style: italic; }
.addr {
  margin-top: 2.2rem;
  font-style: normal;
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--cream-dim);
}
.addr a { color: var(--cream); text-decoration: none; border-bottom: 1px solid var(--line); }
.map-frame {
  margin-top: 2.4rem;
  border: 1px solid var(--line);
  height: 260px;
  overflow: hidden;
  position: relative;
}
.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: grayscale(1) invert(0.92) hue-rotate(180deg) brightness(0.9) contrast(0.88);
}

/* form */
.reserve-form {
  border: 1px solid var(--line);
  background: rgba(236, 225, 205, 0.02);
  padding: clamp(2rem, 4vw, 3.2rem);
}
.form-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  margin-bottom: 2rem;
}
.field { display: block; margin-bottom: 1.6rem; }
.field-label {
  display: block;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.66rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 0.6rem;
}
.field input,
.field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(236, 225, 205, 0.28);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 1.2rem;
  padding: 0.55em 0.1em;
  border-radius: 0;
  outline: none;
  transition: border-color 0.3s ease;
  color-scheme: dark;
}
.field select option { background: var(--ink-2); color: var(--cream); }
.field input:focus,
.field select:focus { border-bottom-color: var(--ember); }

.cta {
  display: block;
  width: 100%;
  margin-top: 2.4rem;
  padding: 1.1em 2em;
  background: var(--ember);
  border: 1px solid var(--ember);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, letter-spacing 0.4s ease;
}
.cta:hover {
  background: transparent;
  color: var(--ember-bright);
  letter-spacing: 0.48em;
}
.form-confirm {
  margin-top: 1.6rem;
  min-height: 1.4em;
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ember-bright);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.form-confirm.show { opacity: 1; }

/* ---------- footer ---------- */
.footer {
  padding: 3.4rem 1.6rem 3rem;
  text-align: center;
  border-top: 1px solid rgba(236, 225, 205, 0.07);
  background: var(--ink-2);
  font-size: 1.02rem;
  color: var(--cream-dim);
}
.footer-fine {
  margin-top: 0.5rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(236, 225, 205, 0.38);
}

/* ---------- mobile pass ---------- */
@media (max-width: 820px) {
  .nav { padding: 1.1rem 1.2rem; }
  .nav-links a:not(.nav-reserve) { display: none; }

  .hero-title { letter-spacing: 0.14em; }

  .scene { min-height: 100vh; }
  .scene-content { padding: 5.5rem 1.6rem; }
  .scene-shade {
    background:
      linear-gradient(rgba(10, 8, 7, 0.82), rgba(10, 8, 7, 0.55) 45%, rgba(10, 8, 7, 0.9));
  }

  /* menu collapses to a single elegant column */
  .menu-columns {
    grid-template-columns: 1fr;
    gap: 3.6rem;
  }
  .dish-name { white-space: normal; }

  .reserve-grid { grid-template-columns: 1fr; gap: 4rem; }
  .map-frame { height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .hero-kicker, .hero-title, .hero-sub, .scroll-cue { animation-duration: 0.01s; animation-delay: 0s; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
