/*
  SITO: TiraTardi
  FILE: styles.css
  PALLETTE: Verde / Rosso / Bianco / Nero
*/

/* ========= Variabili ========= */
:root{
  --red:#d53030;
  --green:#0d3b2e;
  --white:#f7f7f5;
  --black:#0c0c0c;

  --radius:18px;
  --shadow:0 6px 18px rgba(0,0,0,.25);

  --page-w:960px;
  --topbar-h:56px;
}

/* ========= Reset minimo ========= */
*{ box-sizing:border-box }
html,body{ height:100% }
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  font-size:clamp(16px,1.7vw,18px);
  line-height:1.35;
  color:var(--white);
  background:var(--black);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
.page{ max-width:var(--page-w); margin-inline:auto; padding-inline:16px }
img{ max-width:100%; height:auto; display:block }
button{ font:inherit }

/* ========= Struttura viste ========= */
.app{ min-height:100%; padding-bottom:env(safe-area-inset-bottom) }
.view{ display:none }
.view--active{ display:block }

/* ========= HOME ========= */
.hero{
  min-height:66vh;
  display:grid; place-items:center;
  padding:24px 0 0;
  background:
    radial-gradient(1200px 500px at 50% -20%, rgba(13,59,46,.5), transparent 70%),
    linear-gradient(180deg, #0e1a16 0%, var(--black) 65%);
}
.hero__logo{
  width:min(520px,86vw);
  filter:drop-shadow(0 10px 28px rgba(0,0,0,.35));
  border-radius:20px;
}

.cards{ display:grid; gap:16px; padding:20px 0; margin:8px 0 28px }
.card{
  position:relative;
  border-radius:var(--radius);
  overflow:hidden;
  background:linear-gradient(180deg,#123f32,#0a251d);
  border:1px solid rgba(255,255,255,.06);
  box-shadow:var(--shadow);
  color:var(--white);
  min-height:120px;
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 18px 18px 20px;
  text-decoration:none;
}
.card__content{ z-index:2 }
.card__eyebrow{ font-size:.85rem; text-transform:uppercase; letter-spacing:.06em; color:rgba(255,255,255,.7) }
.card__title{ margin:.15rem 0 .2rem; font-size:clamp(1.3rem,3.8vw,2rem); line-height:1; color:var(--white) }
.card__desc{ margin:0; color:rgba(255,255,255,.8) }
.card__chevron{ font-size:2.2rem; line-height:1; margin-left:12px; padding:0 10px; border-radius:12px; background:var(--red) }

.card--cta{
  border:2px solid var(--red);
  background:
    radial-gradient(400px 120px at 10% 0%, rgba(213,48,48,.22), transparent 60%),
    linear-gradient(180deg, #152e26, #0e221c);
  cursor:pointer;
}
.card--map{ padding:0; display:block; background:#081511 }
.map__frame{ position:relative; aspect-ratio:16/9; overflow:hidden }
.card--map iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; filter:saturate(1.05) contrast(1.03) }
.card__content--overlay{
  position:absolute; inset:auto 0 0 0;
  background:linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.7) 70%);
  padding:14px 16px 16px;
}

/* Focus accessibile */
.card:focus-visible,
.card--cta:focus-visible,
.back:focus-visible,
.cat-card:focus-visible,
.segmented__btn:focus-visible{
  outline:3px solid var(--red);
  outline-offset:2px;
  border-radius:calc(var(--radius) + 2px);
}

/* ========= MENÙ ========= */
/* Barra fissa */
.topbar{
  position:sticky; top:0; z-index:40;
  background:var(--green); border-bottom:2px solid var(--red);
}
.topbar__inner{ display:flex; align-items:center; gap:10px; min-height:var(--topbar-h); padding-block:12px }
.topbar__title{ margin:0; font-size:1.05rem }
.back{ appearance:none; border:0; border-radius:12px; padding:8px 10px; background:var(--red); color:var(--white); cursor:pointer; box-shadow:var(--shadow) }

/* Allergeni sempre visibili */
.allergens{ position:sticky; top:var(--topbar-h); z-index:30; background:var(--black); border-bottom:1px solid rgba(255,255,255,.08) }
.allergens .page{ padding-block:8px }
.allergens img{ width:100%; height:auto; border-radius:12px; box-shadow:0 8px 20px rgba(0,0,0,.35) }

/* Avvertenze */
.notices{ display:grid; gap:10px; margin:12px 0 6px }
.notice{
  border-radius:14px; padding:14px 16px; line-height:1.35;
  color:var(--white); background:linear-gradient(180deg,#113328,#0b1f19);
  border:1px solid rgba(255,255,255,.10); box-shadow:var(--shadow);
}
.notice--main{ font-size:clamp(0.98rem,2.5vw,1.05rem); border-left:4px solid var(--red) }
.notice--small{ font-size:clamp(0.88rem,2.2vw,0.95rem); opacity:.95; padding:10px 14px; border-left:4px solid #8e8e8e }
/* Box “Coperto” */
.notice--cover{
  font-size:clamp(0.92rem,2.3vw,1rem);
  border-left:4px solid var(--green);
  background:linear-gradient(180deg,#0e2b22,#0a1d18);
}

/* Contenitore del menù */
.menu__wrap{ padding:16px 0 90px }

/* Categorie */
.menu-cards{ display:flex; flex-direction:column; gap:12px }
.cat-card{
  min-height:clamp(72px,9vw,96px);
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:16px;
  border-radius:18px; border:2px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg,#113328,#0b1f19); box-shadow:var(--shadow);
  color:var(--white); text-align:left;
}
.cat-card__name{ font-size:clamp(1.05rem,2.8vw,1.35rem); margin:0; line-height:1.1 }
.cat-card__meta{ font-size:.9rem; opacity:.85; margin-top:4px }
.cat-card__chev{ font-size:1.8rem; background:var(--red); padding:0 10px; border-radius:12px }

/* Testata categoria */
.cat-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:6px 2px 14px }
.cat-title{ font-size:clamp(1.2rem,3.2vw,1.6rem); margin:0 }
.cat-back{ appearance:none; border:0; padding:10px 12px; border-radius:12px; background:var(--green); color:var(--white) }
.note{ margin:10px 2px 0; color:rgba(255,255,255,.85) }

/* Tabs (Il Bere / Pizze) */
.segmented{ display:flex; gap:8px; margin:8px 0 16px }
.segmented__btn{
  flex:1; padding:10px 12px; border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:#0f231d; color:var(--white);
}
.segmented__btn--active{ background:var(--red) }

/* Lista piatti */
.item{ padding:14px 10px; border-bottom:1px solid rgba(255,255,255,.08) }
.item:last-child{ border-bottom:0 }
.item__row{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px }
.item__name{ font-size:1.05rem; margin:0; word-break:break-word; hyphens:auto }
.item__name .star{ color:#ffde59; font-weight:700; margin-left:.2rem }
.item__price{ white-space:nowrap; font-weight:600 }
.item__desc{ margin:.25rem 0 0; color:rgba(255,255,255,.86); font-size:.95rem }

/* Icone allergeni piccole */
.item__icons{ display:flex; gap:6px; margin-top:6px; flex-wrap:wrap }
.item__icons img{
  width:18px; height:18px; border-radius:50%; object-fit:cover;
  display:block; background:transparent; box-shadow:none;
}

/* Desktop */
@media (min-width:720px){
  .cards{ grid-template-columns:1fr 1fr }
  .card{ min-height:160px }
  .card__title{ font-size:2rem }
  .item__icons img{ width:20px; height:20px }
}
