/* Trattoria Da Mario — photography, one serif, thin rules, practical information first. */

@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("../fonts/familjen.woff2") format("woff2-variations"), url("../fonts/familjen.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --paper: #f2ece2;
  --paper-2: #e9e1d4;
  --ink: #1c1915;
  --muted: #6b6359;
  --line: rgba(28, 25, 21, .16);
  --accent: #a8321e;
  --cream: #f6efe3;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Familjen Grotesk", system-ui, sans-serif;
  --pad: clamp(16px, 4vw, 56px);
  --top: 108px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--sans); }
h1, h2, h3, p, ul, ol, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(1320px, 100% - 2 * var(--pad)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h2 { font: 400 clamp(2.4rem, 5vw, 4.6rem)/1 var(--serif); letter-spacing: -.01em; }
.label { font: 500 .78rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link:hover { color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font: 600 .95rem/1 var(--sans); letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .88rem; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.util { display: flex; justify-content: space-between; align-items: center; gap: 20px; height: 36px; padding: 0 var(--pad); border-bottom: 1px solid var(--line); font-size: .82rem; }
.util-right { display: flex; align-items: center; gap: 22px; color: var(--muted); }
.util-right a { text-decoration: none; color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.status.is-open .dot { background: #3f8a4f; }
.bar { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); height: 72px; padding: 0 var(--pad); }
.logo { font: 400 2rem/1 var(--serif); text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 34px); margin-left: auto; font-size: .95rem; }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav-lang { display: none; }
.lang-switch { display: flex; gap: 8px; font-size: .8rem; font-weight: 600; letter-spacing: .06em; }
.lang-switch a { text-decoration: none; color: var(--muted); }
.lang-switch a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.nav-toggle { display: none; margin-left: auto; min-height: 40px; padding: 0 16px; border: 1px solid var(--ink); background: transparent; font: 600 .88rem var(--sans); color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; height: calc(100svh - var(--top) - 132px); min-height: 440px; max-height: 900px; overflow: hidden; background: #2a221b; }
.hero picture, .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-img { object-fit: cover; object-position: 50% 45%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 15, 10, .05) 40%, rgba(20, 15, 10, .55)); }
.hero-in { position: absolute; z-index: 1; left: var(--pad); right: var(--pad); bottom: 0; color: var(--cream); }
.kicker { font: 500 .8rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 6px; }
.mark { font: 400 clamp(5rem, 19vw, 22rem)/.78 var(--serif); letter-spacing: -.03em; white-space: nowrap; margin-bottom: -.06em; }

/* quick info under the photo */
.info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; border-bottom: 1px solid var(--line); }
.info-cell { display: grid; align-content: start; gap: 4px; padding: 22px var(--pad); border-right: 1px solid var(--line); }
.info-cell:last-child { border-right: 0; }
.info-k { font: 500 .76rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.info-v { font: 400 1.5rem/1.2 var(--serif); }
.info-v span { display: block; }
.info-v a { text-decoration: none; }
.info-cta { display: flex; align-items: center; gap: 10px; }
.status-m { display: none; font-size: .85rem; margin-top: 6px; }

/* ---------- intro ---------- */
.intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px 24px; padding: clamp(80px, 11vw, 160px) 0 clamp(60px, 7vw, 100px); }
.intro > .label { grid-column: 1 / 4; padding-top: 14px; }
.intro-text { grid-column: 4 / 12; }
.lede { font: 400 clamp(1.7rem, 3.2vw, 3rem)/1.18 var(--serif); letter-spacing: -.005em; }
.sign { margin-top: 24px; font-style: italic; font-family: var(--serif); font-size: 1.25rem; color: var(--muted); }
.intro-a { grid-column: 1 / 8; margin-top: 30px; }
.intro-b { grid-column: 9 / 13; margin-top: 120px; align-self: end; }
.intro img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.intro-b img { aspect-ratio: 4 / 5; }

/* ---------- menu ---------- */
.menu { padding: clamp(70px, 9vw, 130px) 0; border-top: 1px solid var(--line); }
.menu-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 24px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid var(--ink); }
.menu-head .label { grid-column: 1 / -1; }
.menu-head h2 { grid-column: 1 / 8; }
.menu-head h2::first-letter { text-transform: uppercase; }
.menu-jump { grid-column: 8 / 13; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 22px; font-size: .92rem; }
.menu-jump a { text-decoration: none; border-bottom: 1px solid transparent; }
.menu-jump a:hover { border-color: var(--ink); }
.print { padding: 0; border: 0; background: none; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.menu-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); margin-top: 40px; }
.menu-fig { position: sticky; top: calc(var(--top) + 24px); align-self: start; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.menu-fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s; }
.menu-fig img.on { opacity: 1; }
.menu-fig figcaption { position: absolute; left: 0; bottom: 0; padding: 10px 14px; background: var(--paper); font: italic 400 1.1rem/1.2 var(--serif); }
.course + .course { margin-top: 56px; }
.course-img { display: none; }
.course h3 { font: 400 clamp(2rem, 3.4vw, 3rem)/1 var(--serif); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.dish { position: relative; padding: 18px 0; border-bottom: 1px solid var(--line); }
.dish-row { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.dish-name { font: 400 1.55rem/1.15 var(--serif); }
.price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.desc { margin-top: 4px; color: var(--muted); font-size: .95rem; max-width: 52ch; }
.dish[data-img] { cursor: default; }
.dish[data-img]:hover .dish-name { color: var(--accent); }
.gone .dish-name, .gone .price { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--muted); }
.gone-tag { margin-top: 6px; font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.menu-foot { display: grid; gap: 6px; margin-top: 40px; color: var(--muted); font-size: .95rem; }
.wine { margin-top: 24px; padding: 24px 0 0; border-top: 1px solid var(--ink); color: var(--ink); }
.wine h3 { font: 400 1.8rem/1.1 var(--serif); margin-bottom: 6px; }

/* ---------- pantry ---------- */
.pantry { padding: clamp(60px, 8vw, 110px) 0; background: var(--paper-2); }
.pantry-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.pantry-list img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.pantry-list p { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.pantry-list strong { display: block; font: 400 1.45rem/1.1 var(--serif); color: var(--ink); }

/* ---------- booking ---------- */
.book { background: var(--ink); color: var(--cream); padding: clamp(80px, 10vw, 140px) 0; }
.book .label { color: rgba(246, 239, 227, .6); }
.book-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(30px, 6vw, 90px); }
.book-copy { display: grid; gap: 18px; align-content: start; }
.book-copy > p:not(.label) { color: rgba(246, 239, 227, .75); max-width: 42ch; }
.book-call { font: 400 1.6rem/1.2 var(--serif); color: var(--cream) !important; }
.book-call a { text-decoration: none; border-bottom: 1px solid rgba(246, 239, 227, .4); }
.book form { display: grid; gap: 22px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.row-3 { grid-template-columns: 1.4fr .8fr 1.2fr; }
.field { display: grid; gap: 8px; align-content: start; }
.field label { font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.opt { font-weight: 400; color: rgba(246, 239, 227, .55); }
.field input, .field select { width: 100%; min-height: 50px; padding: 10px 0; border: 0; border-bottom: 1px solid rgba(246, 239, 227, .45); border-radius: 0; background: transparent; color: var(--cream);
  font: 400 1.25rem/1.3 var(--serif); color-scheme: dark; }
.field select option, .field select optgroup { color: var(--ink); background: var(--paper); font: 400 16px var(--sans); }
.field input::placeholder { color: rgba(246, 239, 227, .35); }
.field input:focus, .field select:focus { outline: none; border-bottom-color: var(--cream); box-shadow: 0 1px 0 var(--cream); }
.field [aria-invalid] { border-bottom-color: #f0a08f; }
.field-error { color: #f4b4a5; font-size: .88rem; }
.day-hint { min-height: 1.3em; margin-top: -10px; font-size: .9rem; color: rgba(246, 239, 227, .7); }
.day-hint.warn { color: #f4b4a5; }
.checks { display: grid; gap: 10px; font-size: .95rem; color: rgba(246, 239, 227, .85); }
.checks label { display: flex; gap: 12px; align-items: flex-start; }
.checks input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--cream); }
.book form .btn { justify-self: start; }
.form-alert { margin-bottom: 20px; padding: 12px 16px; border: 1px solid #f4b4a5; color: #f4b4a5; }
.sent { display: grid; gap: 14px; justify-items: start; padding: 32px; border: 1px solid rgba(246, 239, 227, .35); }
.sent h3 { font: 400 2.4rem/1.05 var(--serif); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- visit ---------- */
.visit { padding: clamp(80px, 10vw, 140px) 0; }
.visit-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr); gap: 40px clamp(24px, 4vw, 56px); align-items: start; }
.visit-copy { display: grid; gap: 16px; justify-items: start; }
.visit h3 { font: 500 .76rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }
address { font: 400 1.6rem/1.25 var(--serif); font-style: normal; }
.how { color: var(--muted); max-width: 40ch; }
.visit-copy a:not(.btn) { text-decoration: none; }
.hours h3 { margin: 0 0 10px; }
.hours table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours thead th { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 0; }
.hours tbody th { text-transform: capitalize; }
.hours td { white-space: nowrap; }
.is-today th, .is-today td { font-weight: 700; }
.today-tag { margin-left: 6px; padding: 1px 6px; background: var(--ink); color: var(--paper); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; vertical-align: 2px; }
.visit-fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--ink); padding: 40px 0 28px; overflow: hidden; font-size: .88rem; color: var(--muted); }

.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 20px 30px; }
.foot a { color: var(--ink); text-decoration: none; }
.shinpo-credit { margin-top: 22px; }
.shinpo-credit a { text-decoration: underline; text-underline-offset: 3px; }
.mbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .info { grid-template-columns: 1fr 1fr; }
  .info-cell:nth-child(2) { border-right: 0; }
  .info-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .info-cta { justify-content: flex-start; }
  .visit-in { grid-template-columns: 1fr 1fr; }
  .visit-fig { display: none; }
  .pantry-list { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .pantry-list li { scroll-snap-align: start; }
}
@media (max-width: 760px) {
  :root { --top: 60px; }
  .util { display: none; }
  .bar { height: 60px; gap: 12px; }
  .logo { font-size: 1.7rem; }
  .bar .btn-sm { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: 6px var(--pad) 18px; background: var(--paper); border-bottom: 1px solid var(--line); font: 400 1.9rem/1.2 var(--serif); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-lang { display: block; padding-top: 14px; }

  .hero { height: 62svh; min-height: 380px; }
  .mark { font-size: 25vw; }
  .info { grid-template-columns: 1fr; }
  .info-cell { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px var(--pad); }
  .info-cell:nth-child(3) { display: none; }
  .info-cta { border-bottom: 0; }
  .info-cta .btn { flex: 1; padding: 0 12px; }
  .status-m { display: inline-flex; }

  .intro { grid-template-columns: 1fr; gap: 20px; width: calc(100% - 2 * var(--pad)); }
  .intro > .label, .intro-text, .intro-a, .intro-b { grid-column: 1; }
  .intro-a { margin-top: 20px; }
  .intro-b { margin-top: 0; width: 70%; justify-self: end; }

  .menu-head { grid-template-columns: 1fr; }
  .menu-head h2, .menu-jump { grid-column: 1; }
  .menu-jump { justify-content: flex-start; }
  .menu-body { grid-template-columns: 1fr; margin-top: 10px; }
  .menu-fig { display: none; }
  .course { margin-top: 40px; }
  .course-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 18px; }
  .dish-name { font-size: 1.35rem; }

  .book-in, .row, .row-3 { grid-template-columns: 1fr; }
  .visit-in { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr; }
  .foot { padding-bottom: 90px; }

  .mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1.4fr; border-top: 1px solid var(--ink); background: var(--paper); }
  .mbar a { display: flex; align-items: center; justify-content: center; min-height: 56px; font-weight: 600; text-decoration: none; }
  .mbar-main { background: var(--ink); color: var(--paper); }
}

/* ---------- print: just the menu ---------- */
@media print {
  .top, .hero, .info, .intro, .pantry, .book, .visit, .foot, .mbar, .menu-fig, .menu-jump, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .menu { padding: 0; border: 0; }
  .menu-body { display: block; margin-top: 12pt; }
  .course { break-inside: avoid; margin-top: 18pt !important; }
  .course-img { display: none !important; }
  .menu-head h2 { font-size: 26pt; }
  .dish { padding: 6pt 0; }
}
