/* =====================================================================
   HF Copisteria — base.css
   Font, token, reset, tipografia, layout, componenti condivisi.
   Contratto per gli altri agenti: docs/COMPONENTS.md
   ===================================================================== */

/* ---------- Font: Inter v4 variabile (opsz 14–32, wght 100–900) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* fallback con metriche allineate a Inter: niente salto di layout allo swap */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 107.12%;
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
}

/* ---------- Token (BRIEF §2) ---------- */
:root {
  --ink: #1d1d1f; --ink-2: #6e6e73; --ink-3: #86868b; --on-dark: #f5f5f7; --on-dark-2: #86868b;
  --bg: #fff; --bg-alt: #f5f5f7; --bg-soft: #fafafc; --bg-dark: #000; --bg-dark-2: #1d1d1f;
  --line: rgba(0,0,0,.12); --line-dark: rgba(255,255,255,.16);
  --action: #0071e3; --action-hover: #0077ed; --link: #0066cc; --link-on-dark: #2997ff;
  --open: #1d8a3a;      /* aperto ora / giorno di oggi negli orari */
  --closed: #bf4800;    /* chiuso al momento */
  --eco: #2f7d32;       /* solo carta ecologica */
  --tag: #b64400;       /* etichette "Novità", "Più scelto" */
  --spectrum: conic-gradient(from 0deg,#e8262d,#f58220,#fcd116,#39b54a,#00a4e4,#1b4fa3,#92278f,#e8262d);
  --spectrum-line: linear-gradient(90deg,#00a4e4,#1b4fa3,#92278f,#e8262d,#f58220,#fcd116,#39b54a);
  --r-card: 28px; --r-md: 18px; --r-sm: 12px; --r-pill: 980px;
  --gap-tile: 12px; --gap-card: 20px; --container: 1260px; --gutter: clamp(16px,4vw,40px);
  --section-y: clamp(80px,10vw,144px);
  --ease-ui: cubic-bezier(.4,0,.6,1); --ease-card: cubic-bezier(0,0,.5,1);
  --ease-slide: cubic-bezier(.645,.045,.355,1); --ease-out: cubic-bezier(.16,1,.3,1);

  /* token aggiunti dal design system (non cambiano la palette del BRIEF) */
  --open-ink: #13732f;   /* verde per TESTO piccolo: --open su #f5f5f7 non passa AA (4.1:1) */
  --ctrl: #e8e8ed;       /* fondo controlli (segmented, bottoni tondi) */
  --ctrl-dark: rgba(42,42,45,.72);
  --ink-soft: rgba(0,0,0,.8);   /* voci del menu */
  --nav-h: 48px;
  --font: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --z-cta: 90; --z-header: 100; --z-progress: 110; --z-toast: 200; --z-veil: 300; --z-intro: 400; --z-skip: 500;

  /* scala tipografica: clamp lineare 390 -> 1440 px */
  --fs-mega: clamp(48px, 30.17px + 4.571vw, 96px);
  --fs-hero: clamp(40px, 25.14px + 3.81vw, 80px);
  --fs-h2:   clamp(32px, 23.09px + 2.286vw, 56px);
  --fs-h3:   clamp(28px, 23.54px + 1.143vw, 40px);
  --fs-h4:   clamp(24px, 22.51px + .381vw, 28px);
  --fs-sub:  clamp(19px, 15.66px + .857vw, 28px);
  --fs-lead: 21px;
  --fs-body: 17px;
  --fs-small: 14px;
  --fs-micro: 12px;
}
@media (min-width: 834px) { :root { --nav-h: 44px; } }

/* ---------- Reset moderno ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.47;
  letter-spacing: -.011em;
  font-weight: 400;
  font-optical-sizing: auto;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}
/* footer sempre in fondo anche su pagine corte */
body > main { flex: 1 0 auto; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
ul[role="list"], ol[role="list"], .list-reset { list-style: none; padding: 0; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
strong, b { font-weight: 600; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
:target, [id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
::selection { background: rgba(0,113,227,.18); }

/* ---------- Focus ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 3px;
  border-radius: 4px;
}
.section--dark :focus-visible, .tile--dark :focus-visible, .on-dark :focus-visible { outline-color: var(--link-on-dark); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: 8px; z-index: var(--z-skip);
  padding: 10px 16px; border-radius: var(--r-pill); background: var(--ink); color: #fff;
  font-size: var(--fs-small); transform: translateY(-160%);
}
.skip-link:focus-visible { transform: none; text-decoration: none; }

/* ---------- Tipografia ---------- */
.t-mega, .t-hero, .t-h2, .t-h3, .t-h4 { font-weight: 600; text-wrap: balance; }
.t-mega { font-size: var(--fs-mega); line-height: 1.04; letter-spacing: -.03em; }
.t-hero { font-size: var(--fs-hero); line-height: 1.05; letter-spacing: -.025em; }
.t-h2   { font-size: var(--fs-h2);   line-height: 1.07; letter-spacing: -.02em; }
.t-h3   { font-size: var(--fs-h3);   line-height: 1.1;  letter-spacing: -.01em; }
.t-h4   { font-size: var(--fs-h4);   line-height: 1.14; letter-spacing: -.006em; }
.t-sub  { font-size: var(--fs-sub);  line-height: 1.14; letter-spacing: -.004em; font-weight: 400; }
.t-lead { font-size: var(--fs-lead); line-height: 1.38; letter-spacing: -.003em; font-weight: 400; }
.t-body { font-size: var(--fs-body); line-height: 1.47; letter-spacing: -.011em; }
.t-small { font-size: var(--fs-small); line-height: 1.29; letter-spacing: -.006em; }
.t-micro { font-size: var(--fs-micro); line-height: 1.33; letter-spacing: 0; }
.eyebrow {
  display: block;
  font-size: clamp(14px, 12.14px + .476vw, 17px);
  line-height: 1.24;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink-2);
}
.eyebrow--tag { font-size: var(--fs-micro); color: var(--tag); letter-spacing: 0; }
.tag { font-size: var(--fs-micro); line-height: 1.33; font-weight: 600; color: var(--tag); }
.t-muted { color: var(--ink-2); }
.t-center { text-align: center; }
.t-eco { color: var(--eco); }
.t-price { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.t-num { font-variant-numeric: tabular-nums; }
/* parola chiave in gradiente spettro (una per pagina, con parsimonia) */
.t-spectrum {
  background: var(--spectrum-line);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
/* paragrafo narrativo Apple: grigio con frasi chiave in bianco/nero */
.t-narrative { font-size: var(--fs-lead); line-height: 1.38; font-weight: 600; color: var(--ink-3); }
.t-narrative strong { color: var(--ink); }
.section--dark .t-narrative strong, .on-dark .t-narrative strong { color: #fff; }

/* ---------- Layout ---------- */
.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.container--narrow { width: min(980px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-alt); }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--bg-dark); color: var(--on-dark); }
.section--dark-2 { background: var(--bg-dark-2); color: var(--on-dark); }
.section--dark .t-muted, .section--dark-2 .t-muted, .on-dark .t-muted { color: var(--on-dark-2); }
.section--dark a:not(.btn), .section--dark-2 a:not(.btn), .on-dark a:not(.btn) { color: var(--link-on-dark); }
.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 24px; margin-bottom: clamp(32px, 4vw, 56px);
}
.stack > * + * { margin-top: var(--stack, 16px); }

/* Tile home (Apple): raggio 0, 12px di bianco tra i tile, testo centrato in alto */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-tile);
  padding-inline: var(--gap-tile);
}
.tile-grid--flush { padding-inline: 0; }
@media (min-width: 834px) { .tile-grid { grid-template-columns: 1fr 1fr; } .tile--full { grid-column: 1 / -1; } }
.tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  min-height: 500px;
  padding: 44px 20px 48px;
  overflow: hidden;
  text-align: center;
  background: var(--bg-alt);
  color: var(--ink);
  border-radius: 0;
  isolation: isolate;
}
@media (min-width: 834px) { .tile { min-height: 580px; padding: 53px 32px 60px; } .tile--full { min-height: 692px; padding-top: 56px; } }
.tile--dark { background: var(--bg-dark); color: var(--on-dark); }
.tile--white { background: #fff; }
.tile--bottom { justify-content: flex-end; }
.tile-media { position: absolute; inset: 0; z-index: -1; }
.tile-media img, .tile-media picture, .tile-media video { width: 100%; height: 100%; object-fit: cover; }
/* foto nella parte bassa del tile, testo sopra su fondo pieno */
.tile-media--bottom { top: auto; height: 58%; }
.tile-content { position: relative; max-width: 560px; }
.tile-title { font-size: var(--fs-h3); line-height: 1.1; letter-spacing: -.01em; font-weight: 600; }
.tile-sub { font-size: clamp(19px, 17.14px + .476vw, 21px); line-height: 1.24; margin-top: 4px; }
.tile-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 14px; margin-top: 16px; }
.tile--dark .tile-sub { color: var(--on-dark); }
/* tutto il tile cliccabile (link sotto ai contenuti) */
.tile-link { position: absolute; inset: 0; z-index: 0; }

/* ---------- Pulsanti ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px;
  padding: 11px 21px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 17px; line-height: 1.18; font-weight: 400; letter-spacing: -.011em;
  text-align: center; white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .1s var(--ease-ui), color .1s var(--ease-ui), border-color .1s var(--ease-ui), transform .12s var(--ease-ui);
  -webkit-user-select: none; user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn--sm { min-height: 36px; padding: 8px 15px; font-size: 14px; line-height: 1.29; letter-spacing: -.006em; }
.btn--xs { min-height: 28px; padding: 5px 11px; font-size: 12px; line-height: 1.33; letter-spacing: 0; }
/* area di tocco >= 44px anche per le pillole piccole */
.btn--sm::before, .btn--xs::before { content: ""; position: absolute; inset: -4px -2px; }
.btn--xs::before { inset: -8px -4px; }
.btn--fill { background: var(--action); color: #fff; }
.btn--fill:hover { background: var(--action-hover); color: #fff; }
.btn--outline { border-color: var(--link); color: var(--link); background: transparent; }
.btn--outline:hover { background: var(--action-hover); border-color: var(--action-hover); color: #fff; }
.btn--on-dark.btn--outline, .section--dark .btn--outline, .tile--dark .btn--outline { border-color: var(--link-on-dark); color: var(--link-on-dark); }
.btn--on-dark.btn--outline:hover, .section--dark .btn--outline:hover, .tile--dark .btn--outline:hover { background: var(--action-hover); border-color: var(--action-hover); color: #fff; }
.btn--light { background: var(--bg-alt); color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .42; pointer-events: none; }
.btn .icon { width: 1em; height: 1em; flex: none; }

/* bottone tondo Apple (›, +) */
.btn-round {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: #fff;
  transition: background-color .1s var(--ease-ui);
  position: relative;
}
.btn-round::before { content: ""; position: absolute; inset: -4px; }
.btn-round:hover { background: #000; text-decoration: none; }
.btn-round--light { background: var(--ctrl); color: var(--ink); }
.btn-round--light:hover { background: #dcdce1; }
.btn-round svg { width: 14px; height: 14px; }

/* link CTA "Scopri di più ›" */
.link-cta {
  display: inline-flex; align-items: baseline;
  color: var(--link);
  font-size: inherit;
}
.link-cta::after {
  content: "\203A";
  display: inline-block;
  margin-left: .22em;
  font-size: 1.18em; line-height: 1;
  transform: translateY(.02em);
  transition: transform .2s var(--ease-out);
}
.link-cta:hover::after { transform: translate(.12em, .02em); }
.link-cta--ext::after { content: "\2197"; font-size: .9em; }
.section--dark .link-cta, .tile--dark .link-cta, .on-dark .link-cta { color: var(--link-on-dark); }

/* ---------- Card (pagine interne, configuratore, recensioni, orari) ---------- */
.card {
  position: relative;
  background: var(--bg-alt);
  color: var(--ink);
  border-radius: var(--r-card);
  padding: clamp(24px, 2.6vw, 36px);
  overflow: hidden;
}
.section--alt .card, .card--white { background: #fff; }
.card.card--dark, .section--alt .card.card--dark { background: var(--bg-dark-2); color: var(--on-dark); }
.card--dark .card-eyebrow, .card--dark .t-muted { color: var(--on-dark-2); }
.section--dark .card:not(.card--white) { background: var(--bg-dark-2); color: var(--on-dark); }
.card--hover { transition: transform .3s var(--ease-card); will-change: transform; }
@media (hover: hover) { .card--hover:hover { transform: scale(1.016); } }
.card-eyebrow { font-size: 17px; line-height: 1.24; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.card-title { font-size: var(--fs-h4); line-height: 1.14; font-weight: 600; letter-spacing: -.006em; }
.card-text { margin-top: 10px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }

/* ---------- Segmented control (scelte brevi) ---------- */
.seg {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--ctrl);
  position: relative;
  max-width: 100%;
}
.seg--block { display: grid; width: 100%; }
@media (pointer: coarse) { .seg-opt span { min-height: 42px; } }
.seg-opt { position: relative; display: block; min-width: 0; }
.seg-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.seg-opt span {
  display: flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 8px 16px; /* + 3px di bordo della capsula = 46px di area (48 su touch) */
  border-radius: var(--r-pill);
  font-size: 14px; line-height: 1.2; font-weight: 400;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background-color .2s var(--ease-ui), box-shadow .2s var(--ease-ui), color .2s var(--ease-ui);
}
.seg-opt input:checked + span { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 0 0 .5px rgba(0,0,0,.04); font-weight: 600; }
.seg-opt input:hover:not(:checked):not(:disabled) + span { color: #000; background: rgba(255,255,255,.5); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 1px; }
.seg-opt input:disabled { cursor: not-allowed; }
.seg-opt input:disabled + span { color: var(--ink-3); opacity: .6; }
.section--alt .seg, .card .seg { background: var(--ctrl); }
.seg--dark { background: rgba(255,255,255,.12); }
.seg--dark .seg-opt span { color: var(--on-dark); }
.seg--dark .seg-opt input:checked + span { background: rgba(255,255,255,.28); box-shadow: none; }

/* ---------- Radio card (.opt) ---------- */
.opt-group { display: grid; gap: 12px; border: 0; padding: 0; min-width: 0; }
.opt-group--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.opt {
  position: relative;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px;
  min-height: 56px;
  border-radius: var(--r-sm);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ink-3);
  cursor: pointer;
  transition: box-shadow .15s var(--ease-ui), background-color .15s var(--ease-ui);
}
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.opt:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--action); }
.opt.is-checked { box-shadow: inset 0 0 0 2px var(--action); }
.opt:has(input:focus-visible) { outline: 2px solid var(--action); outline-offset: 3px; }
.opt-body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.opt-title { font-size: 17px; line-height: 1.24; font-weight: 600; }
.opt-desc { font-size: 14px; line-height: 1.29; color: var(--ink-2); }
.opt-price { font-size: 14px; line-height: 1.29; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 2px; }
.opt-why { display: none; font-size: 12px; line-height: 1.33; color: var(--closed); margin-top: 4px; }
.opt-media { width: 48px; height: 48px; flex: none; border-radius: 8px; overflow: hidden; background: var(--bg-alt); }
.opt:has(input:disabled), .opt.is-disabled { cursor: not-allowed; background: var(--bg-alt); box-shadow: inset 0 0 0 1px var(--line); }
.opt:has(input:disabled) .opt-title, .opt:has(input:disabled) .opt-price, .opt.is-disabled .opt-title, .opt.is-disabled .opt-price { color: var(--ink-3); }
.opt:has(input:disabled) .opt-why, .opt.is-disabled .opt-why { display: block; }

/* ---------- Stepper quantità ---------- */
.stepper {
  display: inline-flex; align-items: center;
  height: 44px;
  border-radius: var(--r-pill);
  background: var(--ctrl);
  padding: 2px;
}
.stepper-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 22px; line-height: 1; font-weight: 400; color: var(--ink);
  transition: background-color .1s var(--ease-ui);
}
.stepper-btn:hover:not(:disabled) { background: rgba(255,255,255,.7); }
.stepper-btn:active:not(:disabled) { background: #fff; }
.stepper-btn:disabled { color: var(--ink-3); cursor: not-allowed; }
.stepper input {
  width: 4.2ch; min-width: 48px; height: 40px;
  border: 0; background: transparent; text-align: center;
  font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus-visible { outline: 2px solid var(--action); outline-offset: 0; border-radius: 8px; }

/* ---------- Pillola stato (aperto/chiuso) ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 28px; padding: 4px 12px 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(0,0,0,.045);
  font-size: 12px; line-height: 1.33; letter-spacing: 0;
  color: var(--ink-2);
  white-space: nowrap;
  text-decoration: none;
}
a.status-pill:hover { text-decoration: none; background: rgba(0,0,0,.07); }
.status-dot {
  width: 7px; height: 7px; flex: none; border-radius: 50%;
  background: var(--ink-3);
  position: relative;
}
.status-state { font-weight: 600; color: var(--ink); }
.status-detail { color: var(--ink-2); }
.status-pill.is-open .status-dot, .is-open > .status-dot { background: var(--open); }
.status-pill.is-open .status-state, .is-open .status-state { color: var(--open-ink); }
.status-pill.is-closed .status-dot, .is-closed > .status-dot { background: var(--closed); }
.status-pill.is-closed .status-state, .is-closed .status-state { color: var(--closed); }
/* respiro del pallino quando è aperto */
.is-open .status-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--open); opacity: .5;
  animation: hf-pulse 2.4s var(--ease-out) infinite;
}
@keyframes hf-pulse { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
.status-pill--lg { font-size: 14px; min-height: 34px; padding: 6px 14px 6px 12px; gap: 8px; }
.status-pill--plain { background: none; padding: 0; min-height: 0; }
.on-dark .status-pill, .section--dark .status-pill { background: rgba(255,255,255,.1); color: var(--on-dark-2); }
.on-dark .status-state, .section--dark .status-state { color: var(--on-dark); }

/* ---------- Lista orari ([data-hf-hours]) ---------- */
.hours-list { list-style: none; padding: 0; display: grid; }
.hours-row {
  display: grid;
  /* il giorno non si comprime mai ("Mercoledì" finiva sotto gli orari a 834px): se manca spazio
     sono gli orari ad andare a capo dopo la virgola, sempre allineati a destra */
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 16px;
  align-items: baseline;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 17px; line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.hours-row:first-child { border-top: 0; }
.hours-day { position: relative; }
.hours-time { text-align: right; color: var(--ink); }
.hours-note { grid-column: 1 / -1; font-size: 12px; line-height: 1.33; color: var(--ink-2); margin-top: 2px; }
.hours-row.is-today .hours-day, .hours-row.is-today .hours-time { color: var(--open-ink); font-weight: 600; }
.hours-row.is-today .hours-day { padding-left: 15px; }
.hours-row.is-today .hours-day::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--open);
}
.hours-row.is-closed-day .hours-time { color: var(--ink-2); }
.hours-row.is-today.is-closed-day .hours-day, .hours-row.is-today.is-closed-day .hours-time { color: var(--closed); }
.hours-row.is-today.is-closed-day .hours-day::before { background: var(--closed); }
.hours-list--compact .hours-row { padding: 0; border: 0; font-size: inherit; line-height: inherit; grid-template-columns: auto 1fr; column-gap: 8px; }
.hours-list--compact .hours-time { text-align: left; }
.hours-list--compact .hours-row.is-today .hours-day { padding-left: 11px; }
.hours-list--compact .hours-row.is-today .hours-day::before { width: 6px; height: 6px; top: .45em; }
.hours-list--compact .hours-note { margin-top: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: var(--z-toast);
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100% - 32px);
  padding: 12px 20px 12px 16px;
  border-radius: var(--r-pill);
  background: rgba(29,29,31,.92);
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  color: #fff;
  font-size: 14px; line-height: 1.29; font-weight: 400;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 16px) scale(.98);
  transition: opacity .25s var(--ease-ui), transform .45s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast-icon { width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--spectrum); -webkit-mask: radial-gradient(circle, transparent 3.5px, #000 4px); mask: radial-gradient(circle, transparent 3.5px, #000 4px); }
body.has-cta-bar .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
@media (min-width: 834px) { body.has-cta-bar .toast { bottom: calc(24px + env(safe-area-inset-bottom)); } }

/* ---------- Link "in arrivo" (data-soon) ---------- */
[data-soon] { cursor: pointer; }
[data-soon][data-tip] { position: relative; }
@media (hover: hover) {
  [data-soon][data-tip]::after {
    content: attr(data-tip);
    position: absolute; left: 50%; bottom: calc(100% + 6px);
    padding: 4px 8px; border-radius: 6px;
    background: var(--ink); color: #fff;
    font-size: 12px; line-height: 1.3; font-weight: 400; white-space: nowrap;
    opacity: 0; transform: translate(-50%, 4px);
    transition: opacity .15s var(--ease-ui), transform .2s var(--ease-out);
    pointer-events: none;
  }
  [data-soon][data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); transition-delay: .35s; }
}

/* ---------- Reveal (stato iniziale solo con JS attivo, vedi site.js) ---------- */
html.hf-prep [data-reveal]:not([data-reveal="manual"]),
html.hf-prep [data-split] { opacity: 0; }
[data-split] .hf-char { display: inline-block; will-change: transform, opacity, filter; }

/* ---------- Utilità ---------- */
.nowrap { white-space: nowrap; }
.hide-mobile { display: none; }
@media (min-width: 834px) { .hide-mobile { display: revert; } .hide-desktop { display: none !important; } }
.visually-balanced { text-wrap: balance; }

/* ---------- Riduzione movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .card--hover:hover { transform: none; }
}
html.reduced-motion *, html.reduced-motion *::before, html.reduced-motion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
