/* ==========================================================================
   Siti dimostrativi — foglio di stile condiviso con temi per singolo locale.
   Ogni locale ha palette, tipografia, raggi e varianti di layout diversi,
   così i sei siti di esempio non si somigliano tra loro.
   ========================================================================== */

.demo {
  --d-brand: #c8102e;
  --d-brand-2: #8c0c20;
  --d-bg: #fffdf9;
  --d-surface: #fff;
  --d-soft: #f6f0e6;
  --d-ink: #241a14;
  --d-muted: #6d5f55;
  --d-line: #e6dcce;
  --d-radius: 14px;
  --d-radius-lg: 24px;
  --d-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --d-display: Georgia, "Times New Roman", serif;
  --d-display-weight: 700;
  --d-display-spacing: -0.02em;
  --d-display-transform: none;
  --d-hero-min: 62vh;

  margin: 0;
  font-family: var(--d-font);
  color: var(--d-ink);
  background: var(--d-bg);
  line-height: 1.65;
}

/* ------------------------------- Temi ------------------------------------ */

/* Pizzeria Da Ciro — napoletana, calda, materica */
.demo--ciro {
  --d-brand: #c8102e;
  --d-brand-2: #7d0a1c;
  --d-bg: #fdf6ec;
  --d-surface: #fffaf3;
  --d-soft: #f5e6d3;
  --d-ink: #2b1a12;
  --d-muted: #6f5748;
  --d-line: #e5d3bd;
  --d-radius: 6px;
  --d-radius-lg: 10px;
  --d-display: Georgia, "Times New Roman", serif;
  --d-display-transform: uppercase;
  --d-display-spacing: 0.02em;
}

/* Trattoria Il Focolare — toscana, rustica, verde oliva */
.demo--focolare {
  --d-brand: #5c6b3c;
  --d-brand-2: #3f4a28;
  --d-bg: #f7f3e9;
  --d-surface: #fffdf7;
  --d-soft: #ece5d3;
  --d-ink: #2f2a22;
  --d-muted: #6b6355;
  --d-line: #ddd3bd;
  --d-radius: 3px;
  --d-radius-lg: 4px;
  --d-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --d-display-weight: 600;
}

/* Sakura Fusion — giapponese, scuro, oro */
.demo--sakura {
  --d-brand: #e0b355;
  --d-brand-2: #c1943a;
  --d-bg: #0e0f13;
  --d-surface: #16181f;
  --d-soft: #1c1f28;
  --d-ink: #f2ede3;
  --d-muted: #a49d90;
  --d-line: #2a2e39;
  --d-radius: 2px;
  --d-radius-lg: 2px;
  --d-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --d-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --d-display-weight: 300;
  --d-display-spacing: 0.22em;
  --d-display-transform: uppercase;
  --d-hero-min: 78vh;
}

/* Ristorante Aurora — gourmet, avorio e oro, editoriale */
.demo--aurora {
  --d-brand: #b08d4f;
  --d-brand-2: #8c6f3c;
  --d-bg: #faf7f2;
  --d-surface: #fff;
  --d-soft: #f1ece2;
  --d-ink: #171614;
  --d-muted: #6d675e;
  --d-line: #e2dbcd;
  --d-radius: 0;
  --d-radius-lg: 0;
  --d-display: "Baskerville", "Times New Roman", Georgia, serif;
  --d-display-weight: 400;
  --d-display-spacing: 0.01em;
  --d-hero-min: 70vh;
}

/* Lievito 48 — pizzeria contemporanea, arancio, geometrica */
.demo--lievito {
  --d-brand: #e2680f;
  --d-brand-2: #b6520a;
  --d-bg: #fbfaf6;
  --d-surface: #fff;
  --d-soft: #f2efe6;
  --d-ink: #1b1b1b;
  --d-muted: #63615c;
  --d-line: #e2ded2;
  --d-radius: 20px;
  --d-radius-lg: 34px;
  --d-font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --d-display: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --d-display-weight: 800;
  --d-display-spacing: -0.035em;
}

/* Osteria Mare Blu — pesce, blu adriatico, arioso */
.demo--mare {
  --d-brand: #0e6ba8;
  --d-brand-2: #0a4f7d;
  --d-bg: #f4f9fc;
  --d-surface: #fff;
  --d-soft: #e4f0f7;
  --d-ink: #0b2233;
  --d-muted: #4d6a7d;
  --d-line: #cfe2ee;
  --d-radius: 18px;
  --d-radius-lg: 28px;
  --d-font: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --d-display: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --d-display-weight: 700;
  --d-display-spacing: -0.015em;
}

/* ------------------------------ Base comune ------------------------------ */

.demo *, .demo *::before, .demo *::after { box-sizing: border-box; }

.demo h1, .demo h2, .demo h3, .demo .d-logo {
  font-family: var(--d-display);
  font-weight: var(--d-display-weight);
  letter-spacing: var(--d-display-spacing);
  text-transform: var(--d-display-transform);
  line-height: 1.15;
  margin: 0 0 .6em;
  color: var(--d-ink);
}
.demo h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4rem); }
.demo h2 { font-size: clamp(1.5rem, 1.15rem + 1.7vw, 2.3rem); }
.demo h3 { font-size: 1.15rem; }
.demo p { margin: 0 0 1.1em; }
.demo a { color: var(--d-brand); }
.demo img { max-width: 100%; display: block; }

.d-container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.d-container--narrow { max-width: 780px; }
.d-section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.d-section--soft { background: var(--d-soft); }
.d-section--surface { background: var(--d-surface); }
.d-eyebrow {
  display: block;
  font-size: .76rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--d-brand);
  margin-bottom: 1rem;
  font-weight: 700;
}
.d-lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.22rem); color: var(--d-muted); max-width: 60ch; }
.d-muted { color: var(--d-muted); }
.d-center { text-align: center; }

.demo .d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .8rem 1.6rem;
  border-radius: var(--d-radius);
  background: var(--d-brand);
  color: #fff;
  border: 1px solid var(--d-brand);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: .01em;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.demo--sakura .d-btn, .demo--aurora .d-btn { color: #10100e; }
.demo .d-btn:hover { background: var(--d-brand-2); border-color: var(--d-brand-2); transform: translateY(-2px); }
.demo .d-btn--ghost { background: transparent; color: var(--d-brand); }
.demo .d-btn--ghost:hover { background: var(--d-brand); color: #fff; }
.demo--sakura .d-btn--ghost:hover, .demo--aurora .d-btn--ghost:hover { color: #10100e; }
.d-btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Banner "sito dimostrativo" */
.demo-banner {
  background: #111827;
  color: #f3f4f6;
  font-size: .82rem;
  padding: .6rem 1rem;
  text-align: center;
  line-height: 1.4;
}
.demo-banner a { color: #93c5fd; font-weight: 600; }

/* Header */
.d-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--d-bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--d-line);
}
.d-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 66px; }
.d-logo { font-size: 1.15rem; text-decoration: none; margin: 0; }
.d-logo small { display: block; font-size: .62rem; letter-spacing: .24em; color: var(--d-muted); text-transform: uppercase; font-family: var(--d-font); font-weight: 600; }
.d-nav ul { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.d-nav a {
  display: inline-block;
  padding: .5rem .75rem;
  text-decoration: none;
  color: var(--d-ink);
  font-size: .92rem;
  font-weight: 600;
  border-radius: var(--d-radius);
}
.d-nav a:hover, .d-nav a[aria-current="page"] { color: var(--d-brand); }
.d-nav .d-btn { color: #fff; }
.demo--sakura .d-nav .d-btn, .demo--aurora .d-nav .d-btn { color: #10100e; }
@media (max-width: 720px) {
  .d-nav ul { gap: 0; }
  .d-nav a { padding: .5rem .45rem; font-size: .85rem; }
  .d-nav .d-btn { padding: .5rem .8rem; min-height: 40px; }
  .d-logo { font-size: .98rem; }
}
@media (max-width: 620px) {
  .d-header__inner { flex-wrap: wrap; padding-block: .55rem; gap: .5rem; min-height: 0; }
  .d-logo { font-size: 1rem; }
  .d-logo small { letter-spacing: .16em; }
  .d-nav { width: 100%; }
  .d-nav ul { width: 100%; justify-content: space-between; }
  .d-nav a { padding: .45rem .3rem; }
}

/* ------------------------------- Hero varianti --------------------------- */

.d-hero { position: relative; overflow: hidden; }
.d-hero__art {
  position: absolute;
  inset: 0;
  background: var(--hero-art, linear-gradient(135deg, var(--d-brand), var(--d-brand-2)));
  opacity: .95;
}
.d-hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 28%, rgba(255,255,255,.22), transparent 42%),
    radial-gradient(circle at 78% 72%, rgba(0,0,0,.28), transparent 52%);
}

/* variante split: testo a sinistra, blocco colorato a destra */
.d-hero--split .d-hero__inner { display: grid; gap: 2rem; align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
@media (min-width: 900px) { .d-hero--split .d-hero__inner { grid-template-columns: 1.05fr .95fr; gap: 3rem; } }
.d-hero--split .d-hero__panel {
  aspect-ratio: 4/3;
  border-radius: var(--d-radius-lg);
  position: relative;
  overflow: hidden;
  background: var(--hero-art, linear-gradient(135deg, var(--d-brand), var(--d-brand-2)));
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  padding: 2rem;
}
.d-hero--split .d-hero__panel span { font-family: var(--d-display); font-size: 1.4rem; letter-spacing: .1em; text-transform: uppercase; opacity: .95; }

/* variante rustico: fascia con bordo doppio */
.d-hero--rustico .d-hero__inner { padding-block: clamp(3rem, 8vw, 6rem); text-align: center; }
.d-hero--rustico .d-hero__frame {
  border: 1px solid var(--d-line);
  outline: 1px solid var(--d-line);
  outline-offset: 8px;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.2rem, 5vw, 3rem);
  background: var(--d-surface);
  max-width: 900px;
  margin-inline: auto;
}

/* variante dark: schermo intero, testo centrato */
.d-hero--dark { color: #fff; min-height: var(--d-hero-min); display: grid; align-items: center; }
.d-hero--dark .d-hero__inner { position: relative; text-align: center; padding-block: clamp(4rem, 10vw, 7rem); }
.d-hero--dark h1 { color: #fff; }
.d-hero--dark .d-lead { color: rgba(255,255,255,.82); margin-inline: auto; }

/* variante editoriale: due colonne asimmetriche con filetto */
.d-hero--editoriale .d-hero__inner { padding-block: clamp(3rem, 8vw, 6rem); display: grid; gap: 2rem; }
@media (min-width: 900px) {
  .d-hero--editoriale .d-hero__inner { grid-template-columns: 1fr 1fr; align-items: end; }
  .d-hero--editoriale .d-hero__meta { border-left: 1px solid var(--d-line); padding-left: 2.5rem; }
}
.d-hero--editoriale h1 { font-size: clamp(2.4rem, 1.4rem + 4.4vw, 4.6rem); }

/* variante moderna: blocco arrotondato pieno colore */
.d-hero--moderno .d-hero__inner { padding-block: clamp(2rem, 5vw, 3rem); }
.d-hero--moderno .d-hero__box {
  border-radius: var(--d-radius-lg);
  background: var(--hero-art, linear-gradient(135deg, var(--d-brand), var(--d-brand-2)));
  color: #fff;
  padding: clamp(2rem, 6vw, 4.5rem);
  position: relative;
  overflow: hidden;
}
.d-hero--moderno h1 { color: #fff; }
.d-hero--moderno .d-lead { color: rgba(255,255,255,.9); }

/* variante mare: onda in basso */
.d-hero--mare { background: linear-gradient(180deg, var(--d-soft), var(--d-bg)); }
.d-hero--mare .d-hero__inner { padding-block: clamp(3rem, 8vw, 5.5rem); display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .d-hero--mare .d-hero__inner { grid-template-columns: 1.1fr .9fr; } }
.d-hero--mare .d-hero__circle {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--hero-art, linear-gradient(135deg, var(--d-brand), var(--d-brand-2)));
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  padding: 2rem;
  max-width: 420px;
  margin-inline: auto;
}
.d-hero--mare .d-hero__circle span { font-family: var(--d-display); font-size: 1.25rem; letter-spacing: .06em; }

/* --------------------------------- Blocchi -------------------------------- */

.d-grid { display: grid; gap: 1.4rem; }
@media (min-width: 700px) { .d-grid--3 { grid-template-columns: repeat(3, 1fr); } .d-grid--2 { grid-template-columns: repeat(2, 1fr); } }

.d-card {
  background: var(--d-surface);
  border: 1px solid var(--d-line);
  border-radius: var(--d-radius);
  padding: 1.6rem;
}
.d-card h3 { margin-bottom: .5rem; }
.d-card p { margin: 0; color: var(--d-muted); font-size: .96rem; }

.d-split { display: grid; gap: 2.4rem; align-items: center; }
@media (min-width: 900px) { .d-split { grid-template-columns: 1fr 1fr; } }
.d-figure {
  aspect-ratio: 5/4;
  border-radius: var(--d-radius-lg);
  background: var(--fig, linear-gradient(135deg, var(--d-brand), var(--d-brand-2)));
  position: relative;
  overflow: hidden;
}
.d-figure::after {
  content: attr(data-label);
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.4rem;
  color: #fff;
  font-family: var(--d-display);
  font-size: 1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: linear-gradient(transparent, rgba(0,0,0,.5));
}

/* Menu */
.d-menu-cat { margin-bottom: 3rem; }
.d-menu-cat__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 2px solid var(--d-brand); padding-bottom: .6rem; margin-bottom: 1.4rem; }
.d-menu-cat__head h2 { margin: 0; }
.d-menu-cat__note { font-size: .88rem; color: var(--d-muted); font-style: italic; }
.d-dish { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; padding: .9rem 0; border-bottom: 1px dashed var(--d-line); }
.d-dish:last-child { border-bottom: 0; }
.d-dish__name { font-weight: 700; color: var(--d-ink); }
.d-dish__price { font-weight: 700; color: var(--d-brand); white-space: nowrap; font-variant-numeric: tabular-nums; }
.d-dish__desc { grid-column: 1 / -1; font-size: .92rem; color: var(--d-muted); margin: 0; }

/* Info / orari */
.d-info { display: grid; gap: 1.2rem; }
@media (min-width: 800px) { .d-info { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
.d-hours { width: 100%; border-collapse: collapse; }
.d-hours th, .d-hours td { text-align: left; padding: .6rem 0; border-bottom: 1px solid var(--d-line); font-size: .95rem; }
.d-hours th { font-weight: 600; color: var(--d-muted); }
.d-hours td { text-align: right; font-variant-numeric: tabular-nums; }

.d-contact-list { list-style: none; padding: 0; margin: 0; }
.d-contact-list li { padding: .5rem 0; border-bottom: 1px solid var(--d-line); }
.d-contact-list li:last-child { border-bottom: 0; }
.d-contact-list a { text-decoration: none; font-weight: 600; }

/* Form dimostrativo */
.d-form { display: grid; gap: 1rem; }
.d-form__row { display: grid; gap: 1rem; }
@media (min-width: 700px) { .d-form__row { grid-template-columns: 1fr 1fr; } }
.d-field { display: flex; flex-direction: column; gap: .3rem; }
.d-field label { font-size: .88rem; font-weight: 650; }
.d-field input, .d-field select, .d-field textarea {
  font: inherit;
  padding: .75rem .9rem;
  min-height: 46px;
  border: 1px solid var(--d-line);
  border-radius: var(--d-radius);
  background: var(--d-surface);
  color: var(--d-ink);
  width: 100%;
}
.d-field textarea { min-height: 120px; resize: vertical; }
.d-note { font-size: .85rem; color: var(--d-muted); }

/* CTA striscia */
.d-cta { background: var(--d-brand); color: #fff; text-align: center; }
.demo--sakura .d-cta, .demo--aurora .d-cta { color: #10100e; }
.d-cta h2 { color: inherit; }
.d-cta p { color: inherit; opacity: .9; max-width: 55ch; margin-inline: auto; }
.d-cta .d-btn { background: #fff; color: var(--d-brand); border-color: #fff; }
.d-cta .d-btn:hover { background: rgba(255,255,255,.86); color: var(--d-brand-2); }

/* Footer */
.d-footer { background: var(--d-soft); border-top: 1px solid var(--d-line); padding-block: 3rem 1.5rem; font-size: .93rem; }
.d-footer__grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .d-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.d-footer h3 { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--d-muted); font-family: var(--d-font); font-weight: 700; }
.d-footer ul { list-style: none; padding: 0; margin: 0; }
.d-footer li { margin-bottom: .4rem; color: var(--d-muted); }
.d-footer a { color: var(--d-muted); text-decoration: none; }
.d-footer a:hover { color: var(--d-brand); }
.d-footer__bottom { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--d-line); color: var(--d-muted); font-size: .82rem; }

.d-skip {
  position: absolute;
  left: -9999px;
}
.d-skip:focus { left: 0; top: 0; background: #000; color: #fff; padding: .7rem 1rem; z-index: 999; }

/* I temi con display maiuscolo hanno bisogno di titoli più contenuti */
.demo--ciro h2, .demo--sakura h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem); }
.demo--ciro h1, .demo--sakura h1 { font-size: clamp(1.9rem, 1.2rem + 2.9vw, 3.2rem); }

/* ------------------------------- Immagini --------------------------------- */

.d-img { width: 100%; height: auto; border-radius: var(--d-radius); }
.d-img--cover { width: 100%; height: 100%; object-fit: cover; display: block; }

.demo figure { margin: 0; }
.demo figcaption {
  font-size: .82rem;
  color: var(--d-muted);
  margin-top: .6rem;
  line-height: 1.4;
}

/* hero split: foto al posto del pannello colorato */
.d-hero--split .d-hero__panel {
  padding: 0;
  background: var(--d-soft);
  aspect-ratio: 4/3;
  border-radius: var(--d-radius-lg);
  overflow: hidden;
}
.d-hero--split .d-hero__panel .d-img { border-radius: 0; }

/* hero rustico ed editoriale: banda fotografica a tutta larghezza */
.d-hero__banda {
  margin-top: clamp(2rem, 5vw, 3rem);
  aspect-ratio: 21/9;
  overflow: hidden;
  border-radius: var(--d-radius-lg);
}
.d-hero__banda--larga {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  border-radius: 0;
  aspect-ratio: 24/9;
}
.d-hero__banda .d-img { border-radius: 0; }

/* hero scuro: foto di sfondo con velo per tenere leggibile il testo */
.d-hero--dark { position: relative; }
.d-hero__sfondo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
  border-radius: 0;
}
.d-hero__velo {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,11,14,.72), rgba(10,11,14,.86));
}
.d-hero--dark .d-hero__inner { position: relative; z-index: 1; }

/* hero moderno: testo e foto affiancati dentro il box colorato */
.d-hero__box--foto { display: grid; gap: clamp(1.5rem, 4vw, 2.6rem); align-items: center; }
@media (min-width: 900px) { .d-hero__box--foto { grid-template-columns: 1.05fr .95fr; } }
.d-hero__foto { aspect-ratio: 4/3; overflow: hidden; border-radius: calc(var(--d-radius-lg) * .7); }
.d-hero__foto .d-img { border-radius: 0; }

/* hero mare: foto ritagliata nel cerchio */
.d-hero--mare .d-hero__circle { padding: 0; overflow: hidden; }
.d-hero--mare .d-hero__circle .d-img { border-radius: 50%; }

/* figura della sezione storia */
.d-figure { aspect-ratio: 5/4; overflow: hidden; background: var(--d-soft); }
.d-figure::after { content: none; }
.d-figure .d-img { border-radius: var(--d-radius-lg); }
.d-figure--larga { aspect-ratio: 21/9; border-radius: var(--d-radius-lg); }

/* galleria della home */
.d-gallery { display: grid; gap: 1.2rem; }
@media (min-width: 760px) { .d-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .d-gallery { grid-template-columns: repeat(4, 1fr); } }
.d-gallery__item { display: flex; flex-direction: column; }
.d-gallery__item .d-img { aspect-ratio: 1; object-fit: cover; }
.d-gallery__item--largo { grid-column: span 1; }
@media (min-width: 1000px) {
  .d-gallery__item--largo { grid-column: span 2; }
  .d-gallery__item--largo .d-img { aspect-ratio: 16/9; height: 100%; }
}

/* foto nelle categorie del menu */
.d-menu-cat__foto {
  aspect-ratio: 16/7;
  overflow: hidden;
  border-radius: var(--d-radius);
  margin-bottom: 1.4rem;
}
.d-menu-cat__foto .d-img { border-radius: 0; }
