/* ============================================================
   Bitsitter — landing statica.
   Token e componenti derivati dal bundle "Bitsitter - Site"
   (Claude Design). Nessun hex vive fuori da :root.
   ============================================================ */

:root {
  --bs-green: #5E9412;         /* CTA, accenti, link */
  --bs-green-light: #74B01A;   /* hover, badge store */
  --bs-green-mid: #6FA31A;     /* parole evidenziate nei titoli */
  --bs-green-soft: #F1F9E2;    /* fondi tenui */
  --bs-lilac: #F4F2FD;         /* background pagina */
  --bs-border: #E4E0F5;
  --bs-white: #FFFFFF;
  --bs-ink: #44444F;
  --bs-muted: #5A5A66;
  --bs-muted-2: #7A7A88;
  --bs-muted-3: #8A8A96;

  --radius-sm: 9px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-2xl: 28px;

  --wrap: 1140px;
  --gutter: 22px;

  /* Poppins/IBM Plex Mono arrivano da Google Fonts solo dopo il consenso
     cookie (main.js). Il fallback di sistema deve reggere sempre. */
  --font-sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bs-lilac);
  color: var(--bs-ink);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--bs-green); text-decoration: none; }
a:hover { color: var(--bs-green-light); }

:focus-visible { outline: 3px solid var(--bs-green); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--bs-green); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--radius-md) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- header ---------- */

.header { position: sticky; top: 0; z-index: 20; background: rgba(244, 242, 253, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bs-border); }
.header__inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.header__logo { display: flex; align-items: center; gap: 10px; }
.header__logo img { height: 32px; width: auto; display: block; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; font-size: 15px; font-weight: 600; }
.nav a { color: var(--bs-ink); }
.nav a:hover { color: var(--bs-green); }

/* header verde pieno delle pagine legali */
.header--solid { background: var(--bs-green); border-bottom: 0; position: static; backdrop-filter: none; }
.header--solid .nav a,
.header--solid .lang__toggle { color: var(--bs-white); }
.header--solid .nav a:hover { color: var(--bs-green-soft); }
.header--solid .lang__caret { border-color: var(--bs-white); }

/* selettore lingua: <details> nativo, nessun JS */
.lang { position: relative; }
.lang__toggle { display: flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 600; color: var(--bs-ink); padding: 8px 4px; }
.lang__toggle::-webkit-details-marker { display: none; }
.lang__caret { width: 7px; height: 7px; border-right: 2px solid var(--bs-ink); border-bottom: 2px solid var(--bs-ink); transform: rotate(45deg); margin-top: -4px; }
.lang__menu { position: absolute; top: 100%; right: 0; margin-top: 8px; background: var(--bs-white); border: 1px solid var(--bs-border); border-radius: var(--radius-md); padding: 8px; min-width: 150px; box-shadow: 0 14px 30px rgba(68, 68, 79, 0.14); display: flex; flex-direction: column; z-index: 30; }
.lang__menu a { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 500; color: var(--bs-muted); }
.lang__menu a[aria-current="true"] { font-weight: 600; color: var(--bs-ink); background: var(--bs-green-soft); }

/* ---------- bottoni ---------- */

.btn { background: var(--bs-green); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 15px; display: inline-block; }
.btn:hover { background: var(--bs-green-light); color: #fff; }
.btn--lg { padding: 14px 26px; font-size: 16px; min-height: 50px; }
.btn--ghost { background: transparent; border: 1px solid var(--bs-border); color: var(--bs-green); padding: 13px 24px; }
.btn--ghost:hover { background: var(--bs-white); color: var(--bs-green); }

.store-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.store-btn { display: flex; align-items: center; gap: 10px; background: var(--bs-green-light); color: #fff; padding: 14px 22px; border-radius: var(--radius-md); font-weight: 700; font-size: 15px; min-height: 52px; }
.store-btn:hover { background: var(--bs-green); color: #fff; }
.store-btn img { height: 20px; width: auto; display: block; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.15; }
.store-btn small { font-size: 11px; font-weight: 500; opacity: 0.8; }

/* ---------- hero ---------- */

.hero { background: var(--bs-lilac); }
.hero__inner { padding-top: 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 48px; align-items: center; }
.hero__col { min-width: 0; padding-bottom: 40px; }
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; text-wrap: pretty; }
.hero__lead { margin: 22px 0 0; font-size: 19px; line-height: 1.55; max-width: 34ch; color: var(--bs-muted); text-wrap: pretty; }
.hero__shots { min-width: 0; display: flex; justify-content: center; align-items: flex-end; gap: 16px; padding-top: 24px; }
.hero__shots img:first-child { width: min(46%, 210px); height: auto; display: block; filter: drop-shadow(0 22px 40px rgba(94, 148, 18, 0.18)); }
.hero__shots img:last-child { width: min(54%, 250px); height: auto; display: block; margin-bottom: -10px; filter: drop-shadow(0 26px 50px rgba(94, 148, 18, 0.22)); }

.accent { color: var(--bs-green-mid); }
.eyebrow { margin: 0 0 14px; font: 500 13px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--bs-green); }

/* ---------- sezioni ---------- */

.section { padding-top: 88px; }
.section h2 { margin: 0; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 800; max-width: 24ch; text-wrap: pretty; }
.section__lead { margin: 18px 0 0; font-size: 18px; line-height: 1.6; color: var(--bs-muted-2); max-width: 56ch; text-wrap: pretty; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; margin-top: 44px; }
.card { background: var(--bs-white); border: 1px solid var(--bs-border); border-radius: var(--radius-xl); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.card:hover { border-color: var(--bs-green); }
.card__head { display: flex; align-items: center; gap: 12px; }
.card__num { width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--bs-green-soft); color: var(--bs-green); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.card h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.card img { width: 100%; height: 170px; object-fit: contain; border-radius: var(--radius-md); display: block; }
.card p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--bs-muted); text-wrap: pretty; }
.card p strong { color: var(--bs-ink); }

.card--accent { background: var(--bs-green); color: var(--bs-white); border-color: transparent; align-self: start; }
.card--accent:hover { border-color: transparent; }
.card--accent .card__num { background: rgba(255, 255, 255, 0.14); color: var(--bs-white); }
.card--accent p, .card--accent p strong { color: var(--bs-white); }
.card--accent img { height: 160px; border-radius: 0; }
.card--accent blockquote { margin: 0; background: rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 18px; font-size: 15px; line-height: 1.55; color: var(--bs-white); font-style: italic; }

/* ---------- FAQ ---------- */

.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.faq { background: var(--bs-white); border: 1px solid var(--bs-border); border-radius: var(--radius-lg); padding: 22px 24px; }
.faq > summary { display: flex; gap: 16px; align-items: flex-start; cursor: pointer; font-size: 17px; font-weight: 700; color: var(--bs-ink); list-style: none; outline: none; }
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary > span:first-child { flex: 1; }
.faq p { margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: var(--bs-muted); text-wrap: pretty; }
.faq p.note { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--bs-muted-3); }
.plus { flex: none; width: 20px; height: 20px; position: relative; transition: transform .2s; margin-top: 3px; }
.plus::before { content: ""; position: absolute; inset: 9px 0 auto; height: 2px; background: var(--bs-green); }
.plus::after { content: ""; position: absolute; inset: 0 9px auto; width: 2px; height: 20px; background: var(--bs-green); }
.faq[open] > summary .plus { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .plus { transition: none; } }
.faq-note { margin: 24px 0 0; font-size: 15px; color: var(--bs-muted-2); }

/* ---------- contatti ---------- */

.contact { background: var(--bs-green-soft); border-radius: var(--radius-2xl); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 40px; align-items: center; }
.contact h2 { margin: 0; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 800; }
.contact p { margin: 16px 0 0; font-size: 18px; line-height: 1.6; color: var(--bs-muted); max-width: 44ch; text-wrap: pretty; }
.contact .btn { margin-top: 26px; }
.contact__list { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.contact__item { display: flex; align-items: center; gap: 14px; background: var(--bs-white); border-radius: 16px; padding: 18px 20px; color: var(--bs-ink); }
.contact__item:hover { color: var(--bs-green); }
.contact__icon { width: 38px; height: 38px; border-radius: 11px; background: var(--bs-green-soft); display: grid; place-items: center; color: var(--bs-green); font-size: 17px; font-weight: 800; flex: none; }
.contact__text { display: flex; flex-direction: column; }
.contact__text small { font-size: 13px; color: var(--bs-muted-2); }
.contact__text strong { font-weight: 700; }

/* ---------- footer ---------- */

.footer { margin-top: 88px; background: var(--bs-green); color: var(--bs-white); }
.footer a { color: var(--bs-white); }
.footer a:hover { color: var(--bs-green-soft); }
.footer__grid { padding-top: 64px; padding-bottom: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 40px; }
.footer__col { min-width: 0; }
.footer__col img { height: 34px; width: auto; display: block; }
.footer__col p { margin: 18px 0 0; font-size: 15px; line-height: 1.6; }
.footer__col h3 { margin: 0 0 16px; font-size: 15px; font-weight: 700; letter-spacing: 0.01em; }
.footer__links { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer__links--tight { gap: 6px; margin-top: 18px; }
.footer__store { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 14px; min-height: 46px; }
.footer__store img { height: 16px; width: auto; display: block; }
.footer__bottom { padding-top: 22px; padding-bottom: 22px; border-top: 1px solid rgba(255, 255, 255, 0.12); display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; }
.footer--slim { margin-top: 72px; }
.footer--slim .footer__bottom { border-top: 0; padding-top: 36px; padding-bottom: 36px; align-items: center; }
.footer__meta-links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- pagine legali ---------- */

/* il contenuto delle pagine interne vive in una card bianca staccata dal fondo lilla */
.legal {
  width: min(100% - (var(--gutter) * 2), 880px);
  margin: 40px auto 0;
  padding: clamp(28px, 5vw, 56px);
  background: var(--bs-white);
  border-radius: var(--radius-2xl);
  box-shadow: 0 18px 44px rgba(68, 68, 79, 0.10);
}
.legal h1 { margin: 0; font-size: clamp(32px, 4.6vw, 46px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
.legal h2 { margin: 48px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.legal h3 { margin: 34px 0 0; font-size: 19px; font-weight: 700; }
.legal p { margin: 16px 0 0; font-size: 17px; line-height: 1.7; color: var(--bs-muted); text-wrap: pretty; }
.legal .legal__intro { margin-top: 24px; }
.legal ul, .legal ol { margin: 16px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 14px; font-size: 17px; line-height: 1.7; color: var(--bs-muted); }
.legal li strong { color: var(--bs-ink); }
.legal a { text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.legal .muted-sm { font-size: 15px; color: var(--bs-muted-2); }

.callout { margin-top: 26px; background: var(--bs-green-soft); border-radius: 20px; padding: 24px 26px; font-size: 16px; line-height: 1.7; color: var(--bs-ink); }
.callout h2 { margin: 0 0 10px; font-size: 17px; font-weight: 800; }
.callout p { margin: 0; font-size: 16px; color: var(--bs-ink); }
.callout p + p { margin-top: 12px; }

.legal__actions { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 12px; }
.legal__actions a { text-decoration: none; }

/* hub del centro privacy */
.hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-top: 32px; }
.hub__card { background: var(--bs-lilac); border: 1px solid var(--bs-border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.hub__card:hover { border-color: var(--bs-green); }
/* la card e' tutta un link: l'underline di .legal a la attraverserebbe */
.legal a.hub__card { text-decoration: none; }
.hub__card h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--bs-ink); letter-spacing: 0; }
.hub__card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--bs-muted); }
.hub__card span { font-size: 14px; font-weight: 700; color: var(--bs-green); }

/* tabella cookie */
.table-wrap { margin-top: 20px; border: 1px solid var(--bs-border); border-radius: var(--radius-lg); background: var(--bs-lilac); overflow-x: auto; }
.cookie-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.5; color: var(--bs-muted); }
.cookie-table th { background: var(--bs-green-soft); text-align: left; padding: 14px 16px; font-size: 13px; font-weight: 700; color: var(--bs-ink); }
.cookie-table td { padding: 16px; border-top: 1px solid var(--bs-border); vertical-align: top; }
.cookie-table td:first-child { font-family: var(--font-mono); font-size: 13px; color: var(--bs-ink); }

/* ---------- cookie banner (markup iniettato da main.js) ---------- */

.cookie-banner {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  background: var(--bs-white);
  border-top: 1px solid var(--bs-border);
  box-shadow: 0 -14px 40px rgba(68, 68, 79, 0.16);
  padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom));
}
.cookie-banner__inner { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px 32px; align-items: center; }
.cookie-banner h2 { margin: 0 0 8px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.cookie-banner p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--bs-muted); }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.cookie-banner button { font-family: inherit; font-size: 15px; font-weight: 700; padding: 13px 24px; border-radius: 999px; cursor: pointer; min-height: 48px; border: 1px solid transparent; }
.cookie-banner .is-primary { background: var(--bs-green); color: #fff; }
.cookie-banner .is-primary:hover { background: var(--bs-green-light); }
.cookie-banner .is-secondary { background: var(--bs-white); color: var(--bs-green); border-color: var(--bs-border); }
.cookie-banner .is-secondary:hover { background: var(--bs-green-soft); }

@media (max-width: 560px) {
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-banner button { flex: 1 1 100%; }
  .nav { gap: 16px; font-size: 14px; }
  .section { padding-top: 64px; }
}
