/* ============================================================
   Casale dei Girasoli - design system
   Stile: Organic Biophilic · Tema: girasoli
   Font: Playfair Display (display) + Karla (testo)
   ============================================================ */

:root {
  /* Palette girasoli, tono caldo ed editoriale */
  --petal:      #E7A41A;   /* marigold, accento primario */
  --petal-soft: #F6E0A8;   /* giallo tenue per evidenze */
  --gold:       #C0820C;   /* oro profondo, CTA/hover */
  --amber:      #A85D1C;   /* ambra terracotta */
  --center:     #2E2013;   /* espresso, titoli ed elementi scuri */
  --leaf:       #6E7A45;   /* verde oliva, secondario */
  --leaf-deep:  #495331;
  --cream:      #FBF6EC;   /* sfondo caldo */
  --cream-2:    #F4EAD7;   /* sezione alternata */
  --card:       #FFFDF8;   /* superfici / card */
  --ink:        #3F3122;   /* testo, bruno caldo */
  --muted:      #6F5E46;   /* testo secondario */
  --white:      #FFFDF8;   /* "bianco" caldo coerente col tema */
  --line:       #E8DBC1;   /* bordi */
  --line-soft:  #F0E6D2;

  --shadow-sm: 0 1px 2px rgba(54,38,22,.05), 0 3px 8px rgba(54,38,22,.05);
  --shadow:    0 4px 14px rgba(54,38,22,.07), 0 14px 32px rgba(54,38,22,.09);
  --shadow-lg: 0 10px 28px rgba(54,38,22,.10), 0 28px 56px rgba(54,38,22,.14);

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --maxw: 1160px;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(60% 40% at 100% 0%, rgba(231,164,26,.05), transparent 70%),
    radial-gradient(50% 35% at 0% 12%, rgba(110,122,69,.04), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--amber); text-decoration: none; transition: color .2s ease; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--center);
  line-height: 1.12;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.2vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.95rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.4rem; letter-spacing: -.01em; }

p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 100px 0; }
.section--alt { background: var(--cream-2); }
.section--center { text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-weight: 700;
  font-size: .76rem;
  color: var(--gold);
  margin: 0 0 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--petal); border-radius: 2px; }
.lead { font-size: 1.2rem; line-height: 1.65; color: var(--muted); max-width: 62ch; }
.section--center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-body); font-weight: 700; font-size: .98rem; letter-spacing: .01em;
  padding: .85rem 1.6rem; border-radius: var(--r-pill);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .25s ease, transform .2s ease;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--primary { background: var(--petal); color: var(--center); box-shadow: 0 6px 18px rgba(231,164,26,.32); }
.btn--primary:hover { background: var(--gold); color: #fff; box-shadow: 0 10px 24px rgba(192,130,12,.36); }
.btn--ghost { background: transparent; color: var(--center); border-color: rgba(46,32,19,.28); }
.btn--ghost:hover { background: var(--center); color: var(--cream); border-color: var(--center); }
.btn--leaf { background: var(--leaf); color: #fff; box-shadow: 0 6px 16px rgba(110,122,69,.28); }
.btn--leaf:hover { background: var(--leaf-deep); }
.btn--block { width: 100%; justify-content: center; }
.btn--sm { padding: .55rem 1.05rem; font-size: .9rem; }
.btn--sm:hover { transform: none; }
.btn--wa { background: #25D366; color: #fff; }
.btn--wa:hover { background: #1da851; color: #fff; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 246, 236, 0.82);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 4px 18px rgba(54,38,22,.04);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 22px; max-width: var(--maxw); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--center); }
.brand:hover { text-decoration: none; }
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand__logo { height: 56px; width: auto; display: block; }
.nav__inner { padding-top: 10px; padding-bottom: 10px; }
.nav__links { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav__links a { color: var(--ink); padding: .5rem .85rem; border-radius: var(--r-pill); font-weight: 600; font-size: .95rem; letter-spacing: .005em; transition: background-color .2s ease, color .2s ease; }
.nav__links a:hover { background: rgba(231,164,26,.12); color: var(--center); text-decoration: none; }
.nav__links a.active { color: var(--center); background: var(--petal-soft); box-shadow: inset 0 0 0 1px rgba(192,130,12,.18); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; color: var(--center); }
.nav__toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(70% 60% at 88% -5%, rgba(231,164,26,.22), transparent 60%),
    radial-gradient(60% 55% at -8% 108%, rgba(110,122,69,.14), transparent 55%),
    var(--cream);
}
.hero__inner { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; padding-top: 92px; padding-bottom: 100px; }
.hero__title { margin-bottom: .35em; }
.hero__title em { font-style: italic; color: var(--gold); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero__media { position: relative; }
.hero__photo {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  border: 7px solid var(--card); outline: 1px solid rgba(54,38,22,.08); outline-offset: -7px;
}
.hero__badge {
  position: absolute; left: -22px; bottom: 26px;
  background: rgba(255,253,248,.85); backdrop-filter: blur(6px);
  border: 1px solid var(--line-soft); border-radius: var(--r);
  box-shadow: var(--shadow); padding: .95rem 1.25rem; max-width: 240px;
  display: flex; gap: .8rem; align-items: center;
}
.hero__badge svg { width: 30px; height: 30px; flex: none; color: var(--gold); }
.hero__badge strong { display: block; font-family: var(--font-display); color: var(--center); font-size: 1.05rem; }
.hero__badge span { font-size: .88rem; color: var(--muted); }
.hero__placeholder {
  width: 100%; aspect-ratio: 4/5; border-radius: var(--r-lg);
  border: 6px solid var(--white); box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--petal-soft), var(--gold));
  display: grid; place-items: center;
}
.hero__placeholder { background: linear-gradient(135deg, #FFF3CC, #FFFBF2); }
.hero__placeholder svg { width: 45%; height: 45%; opacity: .85; }
.hero__placeholder img { width: 72%; height: auto; }

/* ---------- Grid cards ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card--link { cursor: pointer; }
.card--link:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--line); }
.card__icon {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--petal-soft), #F0D58A);
  color: var(--center); margin-bottom: 1.2rem;
  box-shadow: inset 0 0 0 1px rgba(192,130,12,.15);
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--muted); margin: 0; }

/* ---------- Orari ---------- */
.hours { list-style: none; margin: 0; padding: 0; }
.hours li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 0; border-bottom: 1px solid var(--line-soft);
}
.hours li:last-child { border-bottom: 0; }
.hours .day { font-weight: 700; color: var(--center); min-width: 120px; }
.hours .slots { text-align: right; color: var(--muted); }
.hours .closed { color: var(--amber); font-weight: 600; }
.hours li.is-today { background: var(--petal-soft); border-radius: var(--r-sm); padding: .85rem .9rem; box-shadow: inset 0 0 0 1px rgba(192,130,12,.18); border-bottom-color: transparent; }
.hours li.is-today .slots { color: var(--center); }

/* ---------- Menu ---------- */
.menu-cat { margin-bottom: 56px; }
.menu-cat__head { position: relative; border-bottom: 2px solid var(--line); padding-bottom: .7rem; margin-bottom: 1.5rem; }
.menu-cat__head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 2px; background: var(--petal); }
.menu-cat__head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.menu-cat__head p { color: var(--muted); margin: .3rem 0 0; font-style: italic; }
.menu-item { display: flex; justify-content: space-between; gap: 1.2rem; padding: 1.05rem 0; border-bottom: 1px solid var(--line-soft); }
.menu-item:last-child { border-bottom: 0; }
.menu-item__name { font-family: var(--font-display); font-weight: 700; color: var(--center); font-size: 1.2rem; letter-spacing: -.01em; }
.menu-item__descr { color: var(--muted); font-size: .97rem; line-height: 1.55; margin: .25rem 0 0; max-width: 52ch; }
.menu-item__price { font-family: var(--font-display); font-weight: 700; color: var(--gold); white-space: nowrap; font-size: 1.15rem; }

/* legenda allergeni in fondo al menu */
.allergens { max-width: 760px; margin: 3.5rem auto 0; padding: 28px 32px; background: var(--card);
  border: 1px solid var(--line-soft); border-left: 4px solid var(--leaf); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.allergens h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; }
.allergens h3 svg { width: 1.1em; height: 1.1em; color: var(--leaf); }
.allergens > p { color: var(--muted); font-size: .95rem; margin: 0 0 1.1rem; }
.allergens__list { columns: 2; column-gap: 36px; margin: 0; padding-left: 1.3rem; }
.allergens__list li { font-size: .9rem; color: var(--ink); margin-bottom: .4rem; break-inside: avoid; padding-left: .2rem; }
.allergens__list li::marker { color: var(--gold); font-weight: 700; }
@media (max-width: 560px) { .allergens { padding: 22px; } .allergens__list { columns: 1; } }
.service-costs { margin-top: 2.2rem; }
.service-costs__list { list-style: none; margin: 0; padding: 0; max-width: 420px; }
.service-costs__list li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dashed var(--line, rgba(0,0,0,.12)); }
.service-costs__list li:last-child { border-bottom: 0; }
.service-costs__label { color: var(--ink); }
.service-costs__price { font-weight: 700; color: var(--gold); white-space: nowrap; }
.service-costs__note { color: var(--muted); font-size: .9rem; margin: 1rem 0 0; }
/* Pulsanti album della galleria */
.album-tabs { display: inline-flex; gap: .55rem; flex-wrap: wrap; justify-content: center; margin: 0 0 2rem; }
.album-tab {
  flex: 0 0 auto; padding: .52rem 1.15rem; border-radius: var(--r-pill);
  background: var(--card); color: var(--muted); font-family: var(--font-body);
  font-weight: 700; font-size: .92rem; border: 1px solid var(--line);
  cursor: pointer; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.album-tab:hover { background: var(--petal-soft); color: var(--center); border-color: var(--petal-soft); }
.album-tab.active { background: var(--petal); color: var(--center); border-color: var(--petal); box-shadow: 0 4px 12px rgba(231,164,26,.3); }
.gallery figure.is-hidden { display: none; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--leaf-deep); background: rgba(91,122,58,.14); padding: .15rem .5rem; border-radius: var(--r-pill); margin: .25rem .3rem 0 0; }
.tag--off { color: var(--amber); background: rgba(181,101,29,.14); }

.menu-switch { display: inline-flex; background: var(--cream-2); border-radius: var(--r-pill); padding: 5px; gap: 4px; margin-bottom: 8px; }
.menu-switch a { padding: .55rem 1.3rem; border-radius: var(--r-pill); font-weight: 700; color: var(--muted); }
.menu-switch a:hover { text-decoration: none; }
.menu-switch a.active { background: var(--petal); color: var(--center); }
/* Mobile: griglia 2x2 centrata (4 schede), senza sbordare ne' tagliare il testo */
@media (max-width: 600px) {
  .menu-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 100%; max-width: 360px; margin-left: auto; margin-right: auto; }
  .menu-switch a { text-align: center; padding: .6rem .4rem; font-size: .85rem; white-space: nowrap; }
}

/* ---------- Schede di categoria (menu / vini) ---------- */
.cat-chips {
  position: sticky; top: 76px; z-index: 30;
  display: flex; gap: .55rem; flex-wrap: wrap; justify-content: center;
  padding: .85rem 0; margin: 0 0 2rem;
  background: var(--cream); border-bottom: 1px solid var(--line);
}
.section--alt .cat-chips { background: var(--cream-2); }
.cat-chip {
  flex: 0 0 auto; padding: .52rem 1.15rem; border-radius: var(--r-pill);
  background: var(--card); color: var(--muted); font-family: var(--font-body);
  font-weight: 700; font-size: .92rem; border: 1px solid var(--line);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.cat-chip:hover { background: var(--petal-soft); color: var(--center); border-color: var(--petal-soft); text-decoration: none; }
.cat-chip.active { background: var(--petal); color: var(--center); border-color: var(--petal); box-shadow: 0 4px 12px rgba(231,164,26,.3); }
.cat-scroll { position: relative; }
@media (max-width: 640px) {
  /* scorrimento orizzontale, con freccine ai bordi che indicano che si puo' scorrere */
  .cat-chips {
    position: static; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: .7rem 2px;
  }
  .cat-chips::-webkit-scrollbar { display: none; }
  /* freccine: pulsantino tondo semitrasparente con chevron */
  .cat-scroll::before, .cat-scroll::after {
    position: absolute; top: 50%; margin-top: -17px;
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,253,248,.92); border: 1px solid var(--line);
    box-shadow: 0 3px 12px rgba(80,60,10,.22);
    color: var(--gold); font-size: 1.4rem; font-weight: 700; line-height: 1;
    z-index: 31; pointer-events: none; opacity: 0; transition: opacity .25s ease;
  }
  .cat-scroll::after  { right: 4px; content: "\203A"; padding-right: 2px; }
  .cat-scroll::before { left: 4px;  content: "\2039"; padding-right: 2px; }
  .cat-scroll.scrollable:not(.at-end)::after { opacity: 1; }
  .cat-scroll.scrollable:not(.at-start)::before { opacity: 1; }
}
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  .cat-scroll.scrollable:not(.at-end)::after  { animation: catNudgeR 1.4s ease-in-out infinite; }
  .cat-scroll.scrollable:not(.at-start)::before { animation: catNudgeL 1.4s ease-in-out infinite; }
}
@keyframes catNudgeR { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@keyframes catNudgeL { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-4px); } }

/* ---------- Gallery ---------- */
.gallery { columns: 3; column-gap: 18px; }
.gallery figure { margin: 0 0 18px; break-inside: avoid; position: relative; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.gallery img { width: 100%; transition: transform .4s ease; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem .9rem .7rem;
  color: #fff; font-size: .92rem; background: linear-gradient(transparent, rgba(46,33,20,.75)); }
.gallery img { cursor: zoom-in; }

/* ---------- Lightbox galleria ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(28, 20, 10, 0); backdrop-filter: blur(0px); visibility: hidden;
  transition: background-color .35s ease, backdrop-filter .35s ease, visibility .35s; }
.lightbox.open { visibility: visible; background: rgba(28, 20, 10, .92); backdrop-filter: blur(4px); }
.lightbox__stage { position: relative; display: flex; flex-direction: column; align-items: center; }
.lightbox__img { display: block; max-width: 92vw; max-height: 86vh; width: auto; height: auto;
  border-radius: var(--r-sm); box-shadow: 0 30px 80px rgba(0,0,0,.6); transform-origin: top left; will-change: transform; }
.lightbox__cap { color: rgba(255,251,242,.92); text-align: center; margin-top: .9rem; font-size: 1rem;
  opacity: 0; transition: opacity .3s ease .15s; }
.lightbox.open .lightbox__cap { opacity: 1; }
.lightbox__btn { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,251,242,.12); border: 0; color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background-color .2s ease; }
.lightbox__btn:hover { background: var(--petal); color: var(--center); }
.lightbox__btn svg { width: 26px; height: 26px; }
.lightbox__prev { left: 18px; } .lightbox__next { right: 18px; }
.lightbox__close { position: absolute; top: 18px; right: 18px; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,251,242,.12); border: 0; color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background-color .2s ease, transform .2s ease; z-index: 2; }
.lightbox__close:hover { background: var(--amber); transform: rotate(90deg); }
.lightbox__close svg { width: 26px; height: 26px; }
.lightbox__counter { position: absolute; top: 24px; left: 24px; color: rgba(255,251,242,.7); font-size: .9rem; font-weight: 600; }
body.lb-open { overflow: hidden; }
@media (max-width: 560px) {
  .lightbox__btn { width: 42px; height: 42px; } .lightbox__prev { left: 6px; } .lightbox__next { right: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox__img, .lightbox__cap { transition: none !important; }
}

/* ---------- Eventi ---------- */
.event-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.event-card__img { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: var(--cream-2); }
.event-card__body { padding: 22px 24px 26px; }
.event-date { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; }
.event-date svg { width: 1.05em; height: 1.05em; flex: none; }
.eyebrow svg { width: 1em; height: 1em; }
.event-card h3 { margin: .4rem 0 .4rem; }
.event-card p { color: var(--muted); margin: 0 0 1rem; }

/* ---------- Mappa / contatti ---------- */
.map-wrap { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); border: 7px solid var(--card); outline: 1px solid rgba(54,38,22,.08); outline-offset: -7px; }
.map-wrap iframe { width: 100%; height: 420px; border: 0; display: block; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
#contatti { scroll-margin-top: 96px; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: .9rem; padding: .8rem 0; border-bottom: 1px dashed var(--line); }
.info-list li:last-child { border: 0; }
.info-list svg { width: 24px; height: 24px; color: var(--gold); flex: none; margin-top: 3px; }
.info-list strong { color: var(--center); }

/* ---------- Social ---------- */
.socials { display: flex; gap: .7rem; flex-wrap: wrap; }
.social-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); border: 1px solid var(--line); color: var(--center); transition: background-color .2s, color .2s, transform .2s; }
.social-btn:hover { background: var(--petal); color: var(--center); transform: translateY(-2px); text-decoration: none; }
.social-btn svg { width: 22px; height: 22px; }

/* ---------- Form ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; color: var(--center); margin-bottom: .35rem; font-size: .95rem; }
.field input, .field textarea, .field select {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--petal-soft); border-color: var(--gold); }
.field textarea { min-height: 130px; resize: vertical; }

/* ---------- Banner CTA ---------- */
.cta-banner {
  position: relative; overflow: hidden;
  background:
    radial-gradient(80% 120% at 85% -10%, rgba(231,164,26,.22), transparent 60%),
    linear-gradient(125deg, #34250F, var(--leaf-deep));
  color: var(--cream); border-radius: var(--r-lg); padding: 64px 56px; text-align: center; box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: var(--petal-soft); }
.cta-banner p { color: rgba(255,251,242,.85); max-width: 52ch; margin-left: auto; margin-right: auto; font-size: 1.08rem; }

/* ---------- Footer ---------- */
.footer { background: var(--center); color: var(--cream); padding: 80px 0 32px; border-top: 3px solid var(--petal); }
.footer a { color: var(--petal-soft); transition: color .2s ease; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.1fr; gap: 48px; }
.footer h4 { color: var(--petal-soft); font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { padding: .25rem 0; }
.footer ul a { color: rgba(255,251,242,.85); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding-top: 20px; font-size: .88rem; color: rgba(255,251,242,.7); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

.alert { padding: .9rem 1.1rem; border-radius: var(--r-sm); margin-bottom: 1.2rem; font-weight: 600; }
.alert--ok { background: rgba(91,122,58,.15); color: var(--leaf-deep); }
.alert--err { background: rgba(181,101,29,.15); color: var(--amber); }

.muted { color: var(--muted); }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* ---------- Logo footer ---------- */
.footer__logo { height: 64px; width: auto; display: block; }

/* ---------- Storia (Dove siamo) ---------- */
.story-box { max-width: 980px; margin: 0 auto 2.6rem; background: var(--white); border: 1px solid var(--line);
  border-left: 5px solid var(--petal); border-radius: var(--r); padding: 28px 32px; box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; }
.story-box h2 { margin-top: 0; }
.story-content .story-text { color: var(--muted); font-size: 1.05rem; }
.story-text br { content: ""; display: block; margin-bottom: .6rem; }
.story-photo { margin: 0; }
.story-photo img { width: 100%; border-radius: var(--r-sm); border: 5px solid var(--white); box-shadow: var(--shadow); filter: sepia(.15) saturate(1.05); }
.story-photo figcaption { text-align: center; font-size: .9rem; color: var(--muted); font-style: italic; margin-top: .5rem; }
@media (max-width: 760px) {
  .story-box { grid-template-columns: 1fr; gap: 18px; }
  .story-photo { max-width: 340px; margin: 0 auto; }
}

/* ---------- Vini ---------- */
.wine-year { font-family: var(--font-body); font-weight: 600; font-size: .85rem; color: var(--leaf-deep); background: rgba(91,122,58,.14); padding: .1rem .5rem; border-radius: var(--r-pill); vertical-align: middle; }

/* ---------- Stelle / recensioni ---------- */
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars .star { width: 1.15em; height: 1.15em; display: inline-flex; color: #e5d6b0; }
.stars .star.on { color: var(--gold); }
.stars .star svg { width: 100%; height: 100%; }
.stars--lg { font-size: 1.5rem; }
.rating-summary { display: inline-flex; align-items: center; gap: .7rem; flex-wrap: wrap; justify-content: center; color: var(--muted); }
.rating-summary strong { color: var(--center); font-size: 1.15rem; }

.review-card { display: flex; flex-direction: column; position: relative; }
.review-card__body { font-size: 1.06rem; line-height: 1.6; color: var(--ink); margin: .9rem 0 1.1rem; font-style: italic; }
.review-card__author { font-family: var(--font-display); font-weight: 700; color: var(--center); margin: auto 0 0; }
.list-reviews { display: flex; flex-direction: column; gap: 18px; }

/* rating interattivo (form recensione): input invertiti + row-reverse */
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-input label { cursor: pointer; color: #e5d6b0; width: 34px; height: 34px; display: inline-flex; transition: color .15s ease; }
.star-input label svg { width: 100%; height: 100%; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 3px solid var(--petal-soft); border-radius: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; }
  .hero__media { order: -1; max-width: 420px; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 12px 16px; gap: .2rem;
    box-shadow: var(--shadow); display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: .8rem 1rem; }
}
@media (max-width: 560px) {
  .section { padding: 56px 0; }
  .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
  .gallery { columns: 1; }
  .footer__grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 36px 24px; }
  .menu-item { flex-direction: column; gap: .2rem; }
  .menu-item__price { align-self: flex-start; }
}

/* ---------- Comparsa allo scroll (discreta ed elegante) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal-on :is(.hero__title, .hero .lead, .hero__cta, .hero__media, div.section--center, .card, .gallery figure, .menu-cat, .story-box, .cta-banner, .map-wrap, .allergens) {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
  }
  .reveal-on :is(.hero__title, .hero .lead, .hero__cta, .hero__media, div.section--center, .card, .gallery figure, .menu-cat, .story-box, .cta-banner, .map-wrap, .allergens).is-visible,
  .reveal-on.reveal-done :is(.hero__title, .hero .lead, .hero__cta, .hero__media, div.section--center, .card, .gallery figure, .menu-cat, .story-box, .cta-banner, .map-wrap, .allergens) {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Banner cookie ---------- */
.cookiebar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: min(960px, calc(100% - 32px)); z-index: 1200;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  animation: cookieUp .45s cubic-bezier(.2,.8,.25,1) both;
}
.cookiebar.is-hiding { animation: cookieDown .3s ease forwards; }
.cookiebar__inner {
  display: flex; align-items: center; gap: 18px 22px;
  padding: 18px 22px; flex-wrap: wrap;
}
.cookiebar__icon { flex: none; width: 40px; height: 40px; color: var(--gold); }
.cookiebar__icon svg { width: 100%; height: 100%; }
.cookiebar__text { flex: 1 1 320px; min-width: 0; }
.cookiebar__text strong { display: block; font-family: var(--font-display); font-size: 1.12rem; color: var(--center); margin-bottom: .15rem; }
.cookiebar__text p { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--muted); }
.cookiebar__text a { color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cookiebar__actions { flex: none; display: flex; gap: 10px; margin-left: auto; }
@keyframes cookieUp   { from { opacity: 0; transform: translate(-50%, 24px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes cookieDown { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, 24px); } }
@media (max-width: 640px) {
  .cookiebar { bottom: 12px; }
  .cookiebar__inner { padding: 16px; gap: 12px 16px; }
  .cookiebar__icon { width: 32px; height: 32px; }
  .cookiebar__actions { width: 100%; }
  .cookiebar__actions .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cookiebar, .cookiebar.is-hiding { animation: none; }
}

/* ---------- Pagina legale (cookie/privacy) ---------- */
.legal { max-width: 760px; margin: 0 auto; }
.legal h2 { font-family: var(--font-display); font-size: 1.4rem; color: var(--center); margin: 2.2rem 0 .6rem; }
.legal p, .legal li { color: var(--ink); line-height: 1.7; }
.legal a { color: var(--gold); font-weight: 600; }
.legal .cookie-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .92rem; }
.legal .cookie-table th, .legal .cookie-table td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal .cookie-table th { background: var(--cream-2); color: var(--center); font-weight: 700; }
.legal .cookie-table td code { background: var(--cream-2); padding: .1rem .4rem; border-radius: 6px; font-size: .9em; }
.legal .legal-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.4rem; margin-top: 1rem; }
@media (max-width: 600px) {
  .legal .cookie-table, .legal .cookie-table tbody, .legal .cookie-table tr, .legal .cookie-table td { display: block; width: 100%; }
  .legal .cookie-table thead { display: none; }
  .legal .cookie-table tr { border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: .8rem; padding: .4rem .2rem; }
  .legal .cookie-table td { border: none; padding: .35rem .85rem; }
  .legal .cookie-table td::before { content: attr(data-label); display: block; font-weight: 700; color: var(--muted); font-size: .8rem; }
}
