/* Home spesasmart.online. Palette a ruoli (DESIGN.md): verde bosco = la lista, inchiostro = il
   blocco schermo al supermercato, ambra = le offerte, crema = casa. Solo font locali, niente
   risorse esterne (informativa §11). */
.home {
  --forest: oklch(30% 0.14 152);
  --forest-deep: oklch(24% 0.11 152);
  --sage: oklch(44% 0.165 152);
  --leaf: oklch(86% 0.12 140);
  --cream: oklch(97% 0.016 82);
  --paper: oklch(99.5% 0.006 82);
  --ink: oklch(17% 0.02 152);
  --ink-2: oklch(24% 0.02 152);
  --amber: oklch(76% 0.15 62);
  --amber-deep: oklch(45% 0.15 42);
  --promo: oklch(69% 0.17 47);
  --muted: oklch(46% 0.014 152);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  background: var(--cream);
  font-size: 18px;
}
.home .wrap { width: min(1180px, 100%); padding-inline: 16px; }
@media (min-width: 720px) { .home .wrap { padding-inline: 32px; } }

/* ── Bottoni ───────────────────────────────────────────── */
.h-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 26px;
  border-radius: 999px; font-weight: 800; font-size: 17px; text-decoration: none; letter-spacing: -0.01em;
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.h-btn:active { transform: scale(0.97); }
.h-btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.h-btn-light { background: var(--cream); color: var(--forest-deep); }
.h-btn-light:hover { background: var(--paper); }
.h-btn-ghost-light { color: var(--cream); box-shadow: inset 0 0 0 2px oklch(97% 0.016 82 / 0.45); }
.h-btn-ghost-light:hover { box-shadow: inset 0 0 0 2px var(--cream); }
.home :focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

/* ── Hero ──────────────────────────────────────────────── */
.h-hero { background: var(--forest); color: var(--cream); overflow: hidden; position: relative; }
.h-hero::after { /* pavimento del supermercato: righe di piastrelle in prospettiva, solo decoro */
  content: ""; position: absolute; inset: auto 0 0 0; height: 38%; pointer-events: none;
  background: repeating-linear-gradient(90deg, oklch(97% 0.016 82 / 0.05) 0 1px, transparent 1px 96px);
  mask-image: linear-gradient(to top, black, transparent);
}
.h-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; position: relative; z-index: 1; }
.h-logo { font-weight: 800; font-size: 21px; letter-spacing: -0.03em; color: var(--cream); text-decoration: none; }
.h-logo span { color: var(--leaf); }
.h-hero-grid { display: grid; gap: 48px; padding-block: 24px 0; position: relative; z-index: 1; }
@media (min-width: 960px) { .h-hero-grid { grid-template-columns: 1.15fr 0.85fr; align-items: end; padding-top: 48px; } }
.h-hero h1 {
  /* Tre righe fisse: ogni frase resta intera ("Al supermercato" non si spezza mai) */
  font-size: clamp(38px, 10.4vw, 76px); line-height: 0.98; letter-spacing: -0.05em; font-weight: 800; margin: 0 0 24px;
}
@media (min-width: 960px) { .h-hero h1 { font-size: clamp(54px, 5.3vw, 76px); } }
.h-line { display: block; white-space: nowrap; }
.h-hero h1 .h-accent { color: var(--leaf); }
.h-lead { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.5; max-width: 38ch; margin: 0 0 32px; color: oklch(93% 0.03 120); font-weight: 500; }
.h-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.h-fine { font-size: 15px; color: oklch(85% 0.04 130); margin: 18px 0 0; }
.h-hero-copy { padding-bottom: 8px; }
@media (min-width: 960px) { .h-hero-copy { padding-bottom: 96px; } }

/* Telefono (mockup HTML fedele all'app) */
.h-device {
  margin: 0; justify-self: center; width: min(340px, 86vw); border-radius: 48px 48px 0 0; padding: 12px 12px 0;
  background: var(--ink); box-shadow: 0 -2px 0 1px oklch(40% 0.03 152), 0 40px 80px oklch(10% 0.05 152 / 0.5);
}
.h-screen { background: var(--cream); color: var(--ink); border-radius: 38px 38px 0 0; padding: 14px 18px 28px; min-height: 520px; }
.h-status { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; padding: 0 6px 10px; }
.h-island { width: 92px; height: 26px; border-radius: 999px; background: var(--ink); }
.h-app-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 8px 0 0; }
.h-app-title { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; margin: 0 0 14px; }
.h-dictate {
  display: flex; gap: 10px; align-items: flex-start; background: var(--paper); border-radius: 18px; padding: 12px 14px;
  font-size: 14px; font-weight: 600; line-height: 1.4; box-shadow: 0 1px 0 oklch(91% 0.012 152), 0 8px 24px oklch(30% 0.05 152 / 0.08);
}
.h-mic { flex: none; width: 28px; height: 28px; border-radius: 50%; background: oklch(57% 0.22 25); position: relative; }
.h-mic::after { content: ""; position: absolute; inset: 9px 11px; border-radius: 4px; background: var(--paper); }
.h-sorted { margin-top: 16px; }
.h-dept { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px; }
.h-item {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; padding: 9px 0 9px 36px; position: relative;
  font-weight: 700; font-size: 16px; border-bottom: 1px solid oklch(91% 0.012 152);
}
.h-item::before { content: ""; position: absolute; left: 2px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid oklch(80% 0.02 152); }
.h-item em { font-style: normal; font-weight: 600; color: var(--muted); font-size: 14px; }
.h-item .h-note { color: oklch(52% 0.14 72); }
.h-promo { font-size: 11px; font-weight: 800; color: var(--paper); background: var(--promo); border-radius: 5px; padding: 2px 6px; }

/* Ingresso: la frase si scrive, poi i prodotti compaiono per reparto */
@media (prefers-reduced-motion: no-preference) {
  .h-mic { animation: h-listen 1s ease-in-out .2s 2; }
  .h-typed { opacity: 0; animation: h-in .9s var(--ease) .4s forwards; }
  .h-sorted > * { opacity: 0; transform: translateY(8px); animation: h-in .5s var(--ease) forwards; }
  .h-sorted > :nth-child(1), .h-sorted > :nth-child(2) { animation-delay: 2.0s; }
  .h-sorted > :nth-child(3), .h-sorted > :nth-child(4) { animation-delay: 2.15s; }
  .h-sorted > :nth-child(5), .h-sorted > :nth-child(6) { animation-delay: 2.3s; }
  .h-sorted > :nth-child(7), .h-sorted > :nth-child(8) { animation-delay: 2.45s; }
  .h-hero-copy > * { opacity: 0; transform: translateY(14px); animation: h-in .7s var(--ease) forwards; }
  .h-hero-copy > :nth-child(2) { animation-delay: .1s; }
  .h-hero-copy > :nth-child(3) { animation-delay: .2s; }
  .h-hero-copy > :nth-child(4) { animation-delay: .3s; }
}
@keyframes h-listen { 50% { box-shadow: 0 0 0 8px oklch(57% 0.22 25 / 0.18); } }
@keyframes h-in { to { opacity: 1; transform: none; } }

/* ── Sezioni ───────────────────────────────────────────── */
.h-band { padding-block: clamp(72px, 11vw, 140px); }
.h-band h2 { font-size: clamp(36px, 6.4vw, 72px); line-height: 1; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 24px; text-wrap: balance; }
.h-step { font-size: 15px; font-weight: 800; margin: 0 0 14px; color: var(--sage); }
.h-body { font-size: clamp(18px, 1.9vw, 21px); line-height: 1.55; max-width: 44ch; margin: 0; color: var(--muted); }
.h-split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .h-split { grid-template-columns: 1fr 1fr; gap: 72px; }
  .h-split-rev > :first-child { order: 2; }
}

/* A casa: la frase diventa righe */
.h-home { background: var(--cream); }
.h-parse { position: relative; }
.h-quote {
  font-size: clamp(22px, 2.8vw, 30px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; margin: 0 0 28px;
  color: var(--ink); max-width: 26ch;
}
.h-parsed { list-style: none; margin: 0; padding: 0; background: var(--paper); border-radius: 26px; box-shadow: 0 1px 0 oklch(91% 0.012 152), 0 24px 60px oklch(30% 0.05 152 / 0.1); overflow: hidden; }
.h-parsed li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 22px; font-size: 19px; }
.h-parsed li + li { border-top: 1px solid oklch(93% 0.01 152); }
.h-parsed span { font-weight: 700; color: var(--sage); font-size: 16px; }
.h-parsed .h-tag { color: oklch(48% 0.14 72); background: oklch(96% 0.04 72); border-radius: 999px; padding: 4px 12px; font-size: 14px; }

/* Al supermercato: sezione inchiostro, come lo schermo di notte sotto il neon */
.h-store { background: var(--ink); color: var(--cream); }
.h-store .h-step { color: var(--leaf); }
.h-store-grid { display: grid; gap: 48px; margin-top: 16px; }
@media (min-width: 900px) { .h-store-grid { grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: 80px; } }
.h-lock {
  justify-self: center; width: min(360px, 100%); border-radius: 40px; padding: 28px 16px 22px;
  background: radial-gradient(120% 80% at 50% 0%, oklch(36% 0.09 152), var(--ink-2) 70%);
  box-shadow: 0 0 0 10px oklch(12% 0.015 152), 0 40px 90px oklch(5% 0.02 152 / 0.6);
}
.h-lock-time { text-align: center; font-size: 76px; font-weight: 700; letter-spacing: -0.04em; margin: 0 0 22px; color: oklch(96% 0.02 120); }
.h-notif, .h-live { background: oklch(97% 0.016 82 / 0.14); border-radius: 22px; padding: 14px 16px; }
.h-notif { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.h-notif-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--sage); font-size: 18px; }
.h-notif strong { display: block; font-size: 16px; }
.h-notif span { font-size: 14px; color: oklch(88% 0.02 120); }
.h-live-head { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 10px; }
.h-live-head span { color: var(--leaf); font-weight: 800; }
.h-live-bar { height: 6px; border-radius: 999px; background: oklch(97% 0.016 82 / 0.2); margin-bottom: 8px; }
.h-live-bar i { display: block; width: 60%; height: 100%; border-radius: inherit; background: var(--leaf); }
.h-live-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 15px; font-weight: 600; }
.h-live-row b { background: var(--leaf); color: var(--forest-deep); border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.h-store-copy { display: grid; gap: 40px; }
.h-store-copy h3 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.03em; margin: 0 0 10px; }
.h-store-copy p { margin: 0; font-size: 18px; line-height: 1.6; color: oklch(84% 0.02 120); max-width: 46ch; }

/* In famiglia */
.h-family { background: var(--paper); }
.h-feed { display: grid; gap: 12px; }
.h-feed-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin: 0; padding: 16px 18px;
  background: var(--cream); border-radius: 20px; font-size: 17px;
}
.h-feed-row:nth-child(2) { margin-left: 24px; }
.h-feed-row:nth-child(3) { margin-left: 48px; }
.h-feed-row b { font-weight: 800; }
.h-feed-row time { font-size: 13px; color: var(--muted); font-weight: 700; }
.h-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--paper); background: oklch(52% 0.13 var(--h)); }

/* Offerte: sezione ambra (unica a palette calda) */
.h-offers { background: var(--amber); color: var(--ink); }
.h-offers .h-step { color: var(--amber-deep); }
.h-offers .h-body { color: oklch(28% 0.06 50); }
.h-deals { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.h-deals li {
  display: grid; grid-template-columns: 1fr auto; row-gap: 2px; column-gap: 16px; align-items: center;
  background: var(--paper); border-radius: 22px; padding: 18px 22px;
}
.h-deals span { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.h-deals b { grid-row: span 2; font-size: 30px; font-weight: 800; color: var(--amber-deep); letter-spacing: -0.04em; }
.h-deals small { font-size: 14px; color: var(--muted); font-weight: 600; }

/* Il resto, in breve: elenco a due colonne, non card */
.h-more { background: var(--cream); }
.h-more-list { display: grid; gap: 0; margin: 16px 0 0; }
@media (min-width: 760px) { .h-more-list { grid-template-columns: 1fr 1fr; column-gap: 64px; } }
.h-more-list > div { padding: 22px 0; border-top: 1px solid oklch(87% 0.016 152); display: grid; gap: 6px; align-content: start; }
.h-more-list > div:first-child { border-top: 0; }
@media (min-width: 760px) { .h-more-list > div:nth-child(2) { border-top: 0; } }
.h-more-list dt { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.h-more-list dd { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }

/* Prova */
.h-cta { background: var(--forest); color: var(--cream); }
.h-cta-grid { display: grid; gap: 14px; margin-top: 8px; }
@media (min-width: 900px) { .h-cta-grid { grid-template-columns: 1.2fr 1.2fr 1fr; } }
.h-cta-card {
  display: grid; gap: 10px; align-content: start; padding: 26px; border-radius: 26px; text-decoration: none;
  background: var(--cream); color: var(--ink); transition: transform .25s var(--ease);
}
.h-cta-card:hover { transform: translateY(-3px); }
.h-cta-card strong { font-size: 26px; letter-spacing: -0.03em; }
.h-cta-card span { color: var(--muted); font-size: 16px; line-height: 1.5; }
.h-cta-card em { font-style: normal; font-weight: 800; color: var(--sage); margin-top: 6px; }
.h-cta-quiet { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 2px oklch(97% 0.016 82 / 0.35); }
.h-cta-quiet span { color: oklch(86% 0.03 120); }
.h-cta-quiet em { color: var(--leaf); }

.home footer { background: var(--forest-deep); border-top: 0; color: oklch(80% 0.03 120); }
.home .foot nav { white-space: nowrap; }
.home footer a { color: oklch(88% 0.03 120); }
