/* =========================================================
   TRATTORIA v2 – template per ristoranti
   ✏️ Colori e font: modifica le variabili qui sotto.
   Due temi pronti: data-theme="dark" (predefinito) o "light" sul tag <html>.
   ========================================================= */
/* ---------- Font locali (nessuna richiesta a Google Fonts) ---------- */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/instrument-serif-regular.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/instrument-serif-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-variable.woff2") format("woff2"); }

:root,
[data-theme="dark"] {
  --bg: #0e0c0a;
  --bg-2: #171310;
  --card: #1d1814;
  --text: #f3ece1;
  --muted: #a89a89;
  --line: rgba(243, 236, 225, .12);
  --accent: #d4a373;        /* oro caldo: bottoni e dettagli */
  --accent-ink: #1a120b;    /* testo sopra l'accento */
}
[data-theme="light"] {
  --bg: #f6f0e6;
  --bg-2: #ede4d5;
  --card: #fffaf2;
  --text: #221a13;
  --muted: #6f6152;
  --line: rgba(34, 26, 19, .14);
  --accent: #9c3d22;
  --accent-ink: #fff8f0;
}
:root {
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", system-ui, sans-serif;
  --wrap: 1240px;
  --r: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Lingua attiva */
html[data-lang="it"] [lang="en"],
html[data-lang="en"] [lang="it"] { display: none !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 300 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; background: var(--bg-2); }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(2.6rem, 5.4vw, 4.8rem); margin-bottom: .35em; }
h3 { font-size: 1.6rem; line-height: 1.1; }
em { font-style: italic; color: var(--accent); }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.eyebrow { font: 500 .74rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 200; background: var(--text); color: var(--bg); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Bottoni ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; background: var(--accent); color: var(--accent-ink); text-decoration: none; border: 0; border-radius: 999px; padding: 1.05em 1.8em; font: 500 .95rem var(--sans); letter-spacing: .02em; cursor: pointer; transition: transform .3s var(--ease), background .3s, color .3s; }
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: .7em 1.3em; font-size: .85rem; }
.btn--line { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.btn--line:hover { background: #fff; color: #111; }
.btn--wa { width: 100%; padding: 1.1em; }
.pill { background: transparent; color: inherit; border: 1px solid currentColor; opacity: .8; border-radius: 999px; padding: .5em .9em; font: 500 .75rem var(--sans); letter-spacing: .08em; cursor: pointer; }
.link { color: var(--accent); text-decoration: none; font-weight: 500; white-space: nowrap; border-bottom: 1px solid transparent; transition: border-color .3s; }
.link:hover { border-color: currentColor; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 100; color: #fff; transition: background .4s, color .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.is-solid { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--text); border-color: var(--line); }
.nav__inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font: 400 1.9rem/1 var(--serif); text-decoration: none; }
.brand em { color: inherit; }
.nav__links { display: flex; gap: 34px; }
.nav__links a { text-decoration: none; font-size: .9rem; font-weight: 400; opacity: .85; }
.nav__links a:hover { opacity: 1; }
.nav__actions { display: flex; gap: 10px; align-items: center; }
@media (max-width: 860px) { .nav__links { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kenburns 22s var(--ease) both; }
.hero__bg { object-position: 85% 40%; }
.hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,8,6,.88) 0%, rgba(10,8,6,.55) 40%, rgba(10,8,6,0) 70%), linear-gradient(180deg, rgba(10,8,6,.5) 0%, rgba(10,8,6,0) 30%, rgba(10,8,6,.85) 100%); }
@media (max-width: 860px) { .hero__shade { background: linear-gradient(180deg, rgba(10,8,6,.45) 0%, rgba(10,8,6,.35) 40%, rgba(10,8,6,.92) 100%); } }
.hero__content { padding-top: 140px; padding-bottom: 48px; width: 100%; }
.hero__content .eyebrow { color: #e8c39e; }
.hero__title { font-size: clamp(3.4rem, 10vw, 9rem); line-height: .92; letter-spacing: -.025em; margin-bottom: 28px; }
.hero__title em { color: #e8c39e; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 34em; color: rgba(255,255,255,.82); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__bar { display: flex; flex-wrap: wrap; gap: 12px 40px; border-top: 1px solid rgba(255,255,255,.2); padding-top: 22px; padding-bottom: 28px; font-size: .88rem; color: rgba(255,255,255,.8); width: 100%; }
.hero__bar p { margin: 0; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }

.status { display: inline-flex; align-items: center; gap: .6em; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, #999); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot, #999) 25%, transparent); }
.status.is-open { --dot: #5cc46a; }
.status.is-closed { --dot: #e2574c; }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; background: var(--bg); }
.marquee__track { display: flex; gap: 36px; width: max-content; animation: marquee 40s linear infinite; font: italic 400 clamp(1.6rem, 3vw, 2.4rem)/1 var(--serif); white-space: nowrap; }
.marquee__track i { font-style: normal; color: var(--accent); font-size: .6em; align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sezioni ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section--tight { padding-top: 0; }
.section--alt { background: var(--bg-2); }
.head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 52px; flex-wrap: wrap; }
.head--center { flex-direction: column; align-items: center; text-align: center; }
.head--center .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; }

/* ---------- Storia ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.story__text > p { font-size: 1.12rem; color: var(--muted); max-width: 30em; }
.stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 44px; margin: 44px 0 0; }
.stats dt { font: 400 3.4rem/1 var(--serif); }
.stats dd { margin: 8px 0 0; font-size: .85rem; color: var(--muted); }
.story__media { position: relative; aspect-ratio: 5/6; }
.story__img { position: absolute; object-fit: cover; border-radius: var(--r); }
.story__img--a { inset: 0 18% 12% 0; width: 82%; height: 88%; }
.story__img--b { right: 0; bottom: 0; width: 46%; height: 52%; border: 8px solid var(--bg); }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } .stats { gap: 28px; } .stats dt { font-size: 2.6rem; } }

/* ---------- Piatti firma ---------- */
.dishes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card__img { overflow: hidden; border-radius: var(--r); aspect-ratio: 4/5; margin-bottom: 18px; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover .card__img img { transform: scale(1.06); }
.card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card p { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.price { font: 400 1.5rem/1 var(--serif); color: var(--accent); white-space: nowrap; }
.price::before { content: "€"; font-size: .7em; margin-right: 2px; }
@media (max-width: 1000px) { .dishes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .dishes { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 24px; gap: 16px; margin: 0 -24px; padding: 0 24px 8px; scrollbar-width: none; }
  .dishes .card { flex: 0 0 78%; scroll-snap-align: start; }
}

/* ---------- Menù ---------- */
.tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 56px; }
.tabs button { background: none; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .65em 1.4em; font: 400 .92rem var(--sans); cursor: pointer; transition: all .3s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.menu { list-style: none; margin: 0 auto; padding: 0; max-width: 1000px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 72px; animation: fade .5s var(--ease); }
.dish { padding: 22px 0; border-bottom: 1px solid var(--line); }
.dish__row { display: flex; align-items: baseline; gap: 12px; }
.dish__row h3 { font-size: 1.45rem; }
.dish__row i { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-5px); min-width: 20px; }
.dish p { color: var(--muted); font-size: .92rem; margin: 6px 0 0; }
.tag { display: inline-block; margin-top: 10px; font: 500 .66rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .5em .9em; }
.tag--accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.note { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 44px; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 760px) { .menu { grid-template-columns: 1fr; } }

/* ---------- Galleria ---------- */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 280px 280px; gap: 16px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }
.g1 { grid-row: span 2; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 160px 160px; }
  .g1 { grid-column: span 2; grid-row: auto; }
}

/* ---------- Recensioni ---------- */
.quote { margin: 0 auto; max-width: 900px; text-align: center; }
.quote__stars { color: var(--accent); letter-spacing: .3em; font-size: .95rem; }
.quote blockquote { margin: 0 0 28px; font: 400 clamp(1.9rem, 3.8vw, 3.2rem)/1.15 var(--serif); transition: opacity .4s; }
.quote figcaption { color: var(--muted); font-size: .9rem; letter-spacing: .04em; }
.quote__dots { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.quote__dots button { width: 28px; height: 3px; border: 0; padding: 0; border-radius: 3px; background: var(--line); cursor: pointer; }
.quote__dots button[aria-selected="true"] { background: var(--accent); }

/* ---------- Prenota ---------- */
.book-section { position: relative; isolation: isolate; color: #fff; padding: clamp(90px, 12vw, 160px) 0; overflow: hidden; }
.book-section__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.book-section::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,8,6,.92) 0%, rgba(10,8,6,.7) 55%, rgba(10,8,6,.55) 100%); }
.book-section em { color: #e8c39e; }
.book-section .eyebrow { color: #e8c39e; }
.book-section p { color: rgba(255,255,255,.78); max-width: 28em; }
.book-section .muted a { color: #fff; }
.book-grid { display: grid; grid-template-columns: 1fr 440px; gap: 64px; align-items: center; }
.book { background: rgba(20,16,12,.55); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.14); border-radius: 24px; padding: 30px; display: grid; gap: 16px; }
.book label { display: grid; gap: 7px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.book input, .book select, .book textarea { width: 100%; font: 400 1rem var(--sans); color: #fff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: .8em .9em; color-scheme: dark; transition: border-color .3s; }
.book input:focus, .book select:focus, .book textarea:focus { outline: 0; border-color: #e8c39e; }
.book textarea { resize: vertical; }
.book ::placeholder { color: rgba(255,255,255,.4); }
.book__row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.stepper { display: grid; grid-template-columns: 48px 1fr 48px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; overflow: hidden; }
.stepper button { background: rgba(255,255,255,.07); color: #fff; border: 0; font-size: 1.2rem; cursor: pointer; }
.stepper input { border: 0; border-radius: 0; text-align: center; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.book .btn { background: #e8c39e; color: #1a120b; margin-top: 6px; }
.book__error { color: #ffb4a6 !important; font-size: .9rem; margin: 0; }
@media (max-width: 900px) { .book-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Info ---------- */
.info { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 100px); }
.hours { width: 100%; border-collapse: collapse; margin-top: 12px; }
.hours td { padding: 16px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; color: var(--muted); }
.hours tr.is-today td { color: var(--accent); }
.map { border-radius: var(--r); overflow: hidden; aspect-ratio: 16/11; margin: 12px 0 18px; background: var(--bg-2); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); }
.map { position: relative; }
.map__consent { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; font-size: .88rem; color: var(--muted); }
.map__consent p { max-width: 30em; margin: 0; }
.map__consent a { color: var(--muted); font-size: .8rem; }
.map__remember { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; cursor: pointer; }
.map__remember input { accent-color: var(--accent); }
[data-theme="dark"] .map iframe { filter: grayscale(1) invert(.92) contrast(.9); }
@media (max-width: 860px) { .info { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 60px 0 110px; overflow: hidden; }
.footer__mark { font: 400 clamp(5rem, 22vw, 20rem)/.8 var(--serif); letter-spacing: -.04em; margin: 0 0 40px; }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .85rem; }
.footer__row p { margin: 0; }
@media (min-width: 861px) { .footer { padding-bottom: 50px; } }

/* ---------- Pagina privacy ---------- */
.legal { padding: 150px 0 100px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(3rem, 7vw, 5.2rem); margin-bottom: 18px; }
.legal h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin: 56px 0 14px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); font-weight: 500; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .5em; }
.legal table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .9rem; margin: 8px 0 16px; }
.legal th, .legal td { text-align: left; padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--text); font-weight: 500; }
.legal td { color: var(--muted); }
.legal .table-wrap { overflow-x: auto; }
.fill { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); padding: 0 .3em; border-radius: 4px; }
.legal-note { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; font-size: .9rem; }

/* ---------- Bottone fisso mobile ---------- */
.fab { display: none; }
@media (max-width: 860px) {
  .fab { display: block; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; text-align: center; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 500; padding: 1.05em; border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.35); transform: translateY(140%); transition: transform .4s var(--ease); }
  .fab.is-visible { transform: none; }
}

/* ---------- Animazioni all'apparire ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__bg, .marquee__track, .menu { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
