:root {
  --ink: #1d1611;
  --ink-2: #4a3d31;
  --cinema: #0e0b09;
  --walnut: #231911;
  --linen: #efe7d6;
  --linen-deep: #e3d8c1;
  --paper: #f3efe6;
  --cream: #f1e6cf;
  --cream-dim: #cbbfa6;
  --pomodoro: #a3301d;
  --pomodoro-deep: #7f2415;
  --grease: #c1261b;
  --olive: #56602f;
  --brass: #a4803a;
  --film-base: #16100c;
  --perf: #d9cdb3;

  --display: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
  --type: "Courier Prime", "Courier New", monospace;

  --strip-w: 0px;
  --gutter: 20px;
  --nav-h: 60px;
}

@media (min-width: 720px) {
  :root { --gutter: 40px; }
}
@media (min-width: 1240px) {
  :root { --strip-w: 124px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cinema);
  color: var(--ink);
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: 19px;
  line-height: 1.55;
  padding-inline: var(--strip-w);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ------------------------------------------------------------ grain */
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 900;
  opacity: 0.42;
  mix-blend-mode: multiply;
}
.grain--fallback {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%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");
  opacity: 0.18;
}

/* ------------------------------------------------------------ film strips (desktop edges) */
.strip {
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  width: var(--strip-w);
  overflow: hidden;
  background: var(--film-base);
  z-index: 20;
}
.strip--left { left: 0; }
.strip--right { right: 0; }

@media (min-width: 1240px) {
  .strip { display: block; }
}

.strip__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  will-change: transform;
  /* Perforations ride on the track so they move with the frames. */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='17'%3E%3Crect x='6' y='4' width='10' height='9' rx='1.6' fill='%23d9cdb3'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='17'%3E%3Crect x='6' y='4' width='10' height='9' rx='1.6' fill='%23d9cdb3'/%3E%3C/svg%3E");
  background-repeat: repeat-y, repeat-y;
  background-position: left top, right top;
  background-size: 22px 17px, 22px 17px;
}

.strip__frame {
  width: calc(100% - 44px);
  margin: 0 auto 8px;
  aspect-ratio: 4 / 3;
  background: #2a211a center / cover no-repeat;
  filter: sepia(0.35) saturate(0.8) contrast(1.06) brightness(0.88);
}

/* ------------------------------------------------------------ nav */
.nav {
  position: fixed;
  top: 0;
  left: var(--strip-w);
  right: var(--strip-w);
  height: var(--nav-h);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  color: var(--cream);
  background: var(--cinema);
}

.nav__mark {
  font-family: var(--display);
  font-style: italic;
  font-size: 26px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.005em;
}

.nav__links {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  align-items: center;
  font-family: var(--type);
  font-size: 15px;
}
.nav__links a { text-decoration: none; }
.nav__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav__links .nav__cta {
  background: var(--pomodoro);
  padding: 7px 14px;
}
.nav__links .nav__cta:hover { background: var(--pomodoro-deep); text-decoration: none; }

@media (max-width: 520px) {
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ------------------------------------------------------------ buttons */
.button {
  display: inline-block;
  border: 0;
  border-radius: 0;
  background: var(--pomodoro);
  color: var(--cream);
  font-family: var(--type);
  font-size: 16px;
  padding: 14px 24px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s;
}
.button:hover { background: var(--pomodoro-deep); }
.button:disabled { opacity: 0.6; cursor: progress; }

/* ------------------------------------------------------------ sala (hero) */
.sala {
  background: var(--cinema);
  color: var(--cream);
  min-height: 100svh;
  padding: calc(var(--nav-h) + 12px) var(--gutter) 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
}

.screen {
  position: relative;
  width: min(100%, calc(72svh * 1.66), 1240px);
  aspect-ratio: 1.66;
  margin: 0 auto;
  border-radius: 6px;
  overflow: hidden;
  background: #120e0b;
}
@media (max-width: 600px) {
  .screen { aspect-ratio: 4 / 5; width: 100%; }
}

.screen canvas,
.screen .fallback-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.fallback-img {
  object-fit: cover;
  filter: sepia(0.4) saturate(0.75) contrast(1.05) brightness(0.62);
}

.titles {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--cream);
  will-change: transform;
  pointer-events: none;
}
.titles__pre {
  margin: 0;
  font-style: italic;
  font-size: clamp(17px, 2vw, 24px);
}
.titles__name {
  margin: 0.02em 0 0.08em;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(76px, 13vw, 190px);
  line-height: 0.95;
  font-variation-settings: "opsz" 96;
}
.titles__sub {
  margin: 0;
  font-family: var(--type);
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--cream);
}

.sala__foot {
  width: min(100%, calc(72svh * 1.66), 1240px);
  margin: 0 auto;
  display: flex;
  gap: 28px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}
.sala__lede {
  margin: 0;
  max-width: 54ch;
  font-size: 19px;
  color: var(--cream);
}

/* ------------------------------------------------------------ reel (mobile/tablet horizontal strip) */
.reel {
  background: var(--film-base);
  overflow: hidden;
  padding: 20px 0;
  position: relative;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='20'%3E%3Crect x='4' y='5' width='9' height='10' rx='1.6' fill='%23d9cdb3'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='20'%3E%3Crect x='4' y='5' width='9' height='10' rx='1.6' fill='%23d9cdb3'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: var(--perf-x, 0) top, var(--perf-x, 0) bottom;
  background-size: 17px 20px;
}
@media (min-width: 1240px) {
  .reel { display: none; }
}
.reel__track {
  display: flex;
  gap: 8px;
  width: max-content;
  will-change: transform;
}
.reel__frame {
  width: 128px;
  aspect-ratio: 4 / 3;
  background: #2a211a center / cover no-repeat;
  filter: sepia(0.35) saturate(0.8) contrast(1.06) brightness(0.88);
}

/* ------------------------------------------------------------ menu */
.menu {
  background-color: var(--linen);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  padding: 110px var(--gutter) 120px;
}

.menu__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.projector {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
  margin: 0;
}
.projector__gate {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--cinema);
  padding: 10px;
  border-radius: 3px;
}
.projector__gate canvas,
.projector__gate .fallback-img {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  display: block;
}
.projector figcaption {
  margin-top: 14px;
  font-family: var(--type);
  font-size: 14px;
  color: var(--ink-2);
  min-height: 1.5em;
}

.menu__card { text-align: center; }
.menu__season {
  margin: 0;
  font-family: var(--type);
  font-size: 15px;
  color: var(--ink-2);
}
.menu__card h2 {
  margin: 6px 0 8px;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(46px, 6vw, 80px);
  line-height: 1;
  color: var(--ink);
}

.menu__sub {
  margin: 0 0 60px;
  font-style: italic;
  font-size: 24px;
  color: var(--ink-2);
}
.course { margin: 0 0 64px; scroll-margin-top: 120px; }
.course__num {
  display: block;
  font-family: var(--type);
  font-style: normal;
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.course h3 + .dish { margin-top: 20px; }
.course__note {
  margin: 4px auto 0;
  max-width: 32em;
  font-style: italic;
  font-size: 17px;
  color: var(--ink-2);
}
.course h3 {
  margin: 0;
  font-style: italic;
  font-weight: 500;
  font-size: 34px;
  line-height: 1.1;
  color: var(--pomodoro);
}
.course__gloss {
  margin: 4px 0 22px;
  font-family: var(--type);
  font-size: 14px;
  color: var(--ink-2);
}
.dish { margin: 0 auto 22px; max-width: 34em; }
.dish__name {
  margin: 0;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.25;
}
.dish__desc {
  margin: 4px 0 0;
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-2);
}
.menu__foot {
  margin: 12px auto 0;
  max-width: 34em;
  font-family: var(--type);
  font-size: 14px;
  color: var(--ink-2);
}

@media (max-width: 860px) {
  .menu { padding-top: 0; }
  .menu__inner { grid-template-columns: 1fr; gap: 36px; }
  .projector {
    top: var(--nav-h);
    z-index: 5;
    margin-inline: calc(var(--gutter) * -1);
    background: var(--cinema);
    padding: 0;
  }
  .projector__gate { aspect-ratio: auto; height: 34svh; padding: 0; border-radius: 0; }
  .projector__gate canvas, .projector__gate .fallback-img { border-radius: 0; }
  .projector figcaption { display: none; }
  .menu__card { padding-top: 12px; }
}

/* ------------------------------------------------------------ la tavola */
.tavola {
  background: var(--walnut);
  color: var(--cream);
  padding: 110px var(--gutter) 120px;
}
.tavola__inner { max-width: 1180px; margin: 0 auto; }
.tavola__head {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
  margin-bottom: 56px;
}
.tavola h2 {
  margin: 0;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(46px, 6vw, 80px);
  line-height: 1;
}
.tavola__text p { margin: 0 0 1em; max-width: 58ch; }
.tavola__quote {
  margin: 28px 0 0;
  font-style: italic;
  font-size: 22px;
  line-height: 1.4;
  max-width: 40ch;
}
.tavola__quote footer {
  margin-top: 8px;
  font-family: var(--type);
  font-style: normal;
  font-size: 14px;
  color: var(--cream-dim);
}
.tavola figure { margin: 0; }
.tavola svg { width: 100%; height: auto; display: block; max-width: 1040px; margin: 0 auto; }
.tavola figcaption {
  margin-top: 14px;
  font-family: var(--type);
  font-size: 15px;
  color: var(--cream-dim);
  text-align: center;
}
@media (max-width: 760px) {
  .tavola__head { grid-template-columns: 1fr; }
  .tavola svg { max-width: 420px; margin: 0 auto; }
}

/* ------------------------------------------------------------ prenota (contact sheet + form) */
.prenota {
  background: var(--paper);
  padding: 110px var(--gutter) 120px;
}
.prenota__inner { max-width: 1180px; margin: 0 auto; }
.prenota h2 {
  margin: 0;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(46px, 6vw, 80px);
  line-height: 1;
}
.prenota__lede { margin: 18px 0 44px; max-width: 58ch; font-size: 20px; }
.prenota__lede strong { font-weight: 600; }

.sheet {
  border: 0;
  margin: 0 0 56px;
  padding: 0;
  min-width: 0;
}
.select-all {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.2;
}
.select-all strong {
  font-size: 46px;
  font-weight: 700;
  color: var(--pomodoro);
  letter-spacing: 0.02em;
  vertical-align: -0.12em;
}
.sheet legend {
  font-family: var(--type);
  font-size: 15px;
  color: var(--ink-2);
  padding: 0;
  margin-bottom: 14px;
}
.sheet__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  row-gap: 26px;
}

/* One 35mm frame, with its rebate and perforations above and below. */
.frame {
  position: relative;
  display: block;
  background: var(--film-base);
  padding: 26px 5px;
  cursor: pointer;
  color: var(--cream);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='26'%3E%3Crect x='5' y='8' width='9' height='10' rx='1.6' fill='%23f3efe6'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='26'%3E%3Crect x='5' y='8' width='9' height='10' rx='1.6' fill='%23f3efe6'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: 3px top, 3px bottom;
  background-size: 19px 26px;
}
.frame__edge {
  position: absolute;
  bottom: 1px;
  left: 10px;
  font-family: var(--type);
  font-size: 10px;
  line-height: 1;
  color: #d8a83c;
  opacity: 0.85;
}
.frame__pic {
  display: block;
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #2a211a center / cover no-repeat;
}
.frame__pic::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  filter: sepia(0.45) saturate(0.7) contrast(1.05) brightness(0.45);
}
.frame__text {
  position: absolute;
  inset: 0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.frame__text > span { display: block; }
.frame__it { font-style: italic; font-size: 16px; line-height: 1.1; }
.frame__day {
  font-size: 58px;
  line-height: 0.9;
  font-weight: 500;
  font-variation-settings: "opsz" 96;
}
.frame__en { font-family: var(--type); font-size: 12.5px; line-height: 1.25; color: var(--cream-dim); }

.frame input { position: absolute; opacity: 0; pointer-events: none; }
.frame:has(input:focus-visible) { outline: 2px solid var(--brass); outline-offset: 2px; }
.frame--struck { cursor: default; }
.frame--struck .frame__text { opacity: 0.55; }
.frame--chosen { cursor: default; }

.pencil {
  position: absolute;
  inset: -14px -10px;
  width: calc(100% + 20px);
  height: calc(100% + 28px);
  pointer-events: none;
  overflow: visible;
  z-index: 2;
}
.pencil path {
  fill: none;
  stroke: var(--grease);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(28px, 5vw, 72px);
}
@media (max-width: 760px) {
  .fields { grid-template-columns: 1fr; }
}
.field { display: block; }
.field__label,
.choice legend {
  display: block;
  font-family: var(--type);
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 6px;
  padding: 0;
}
.field input,
.field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-family: var(--display);
  font-size: 21px;
  padding: 6px 0 8px;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 88px; line-height: 1.45; }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--pomodoro); }
.stack { display: grid; gap: 32px; align-content: start; }

.choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice__row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice__opt { position: relative; }
.choice__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice__opt span {
  display: inline-block;
  min-width: 56px;
  text-align: center;
  padding: 8px 14px;
  font-family: var(--type);
  font-size: 18px;
  border: 1.5px solid var(--ink);
  background: transparent;
}
.choice__opt input:checked + span { background: var(--ink); color: var(--paper); }
.choice__opt input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.choice__note { margin: 10px 0 0; font-size: 17px; font-style: italic; color: var(--ink-2); max-width: 36em; }

.chet {
  margin: 0;
  font-size: 17px;
  font-style: italic;
  color: var(--ink-2);
  max-width: 34em;
}
.chet footer { font-family: var(--type); font-style: normal; font-size: 13px; margin-top: 6px; }

.submit-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.form-error { margin: 0; color: var(--pomodoro); font-family: var(--type); font-size: 15px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.thanks { max-width: 40em; }
.thanks h3 { margin: 0 0 12px; font-weight: 400; font-style: italic; font-size: 46px; line-height: 1.05; }
.thanks p { margin: 0 0 12px; font-size: 20px; }

.closed-note { font-size: 20px; max-width: 40em; }

/* ------------------------------------------------------------ footer */
.foot {
  background: var(--cinema);
  color: var(--cream-dim);
  padding: 44px var(--gutter) 52px;
  font-family: var(--type);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}
.foot a { color: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
[hidden] { display: none !important; }

@media (max-width: 520px) {
  .sheet__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .frame__day { font-size: 44px; }
  .frame__it { font-size: 14px; }
  .frame__en { font-size: 11px; }
  .frame__text { padding: 8px 9px; }
}
