/* ============================================================
   Alba · Landing di download (getalba.app)
   ============================================================
   Token allineati al design system dell'app (apps/web/src/index.css).
   Differenze volute rispetto all'handoff di design:
   - --ink-3 / --ink-4 usano la scala accessibile dell'app
     (#736d65 / #948d84) invece di #8b847d / #b5ada4: i valori
     originali non passano 4.5:1 sul fondo crema.
   - dimensioni tipografiche in rem, così il testo scala con la
     preferenza font-size del browser/OS.
   - aspect-ratio del telefono 620/1251: gli screenshot sono
     ritagliati sotto la status bar iOS e sopra gli angoli scuri
     del device (vedi scripts/gen-site-assets.mjs), cosi non si
     sommano due telai.
   ============================================================ */

:root {
  --ink: #1a1614;
  --ink-2: #4a4540;
  --ink-3: #736d65;
  --ink-4: #948d84;
  --line: #e8e3dc;
  --line-2: #f0ece5;
  --paper: #fff;
  --primary: #c44a3a;
  --primary-hover: #a83a2c;
  --amber: #d6a24e;
  --cream: #fbf7f0;
  --shell: #0f0c0a;
  --font-display: 'Newsreader', ui-serif, Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: italic; color: var(--primary); }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 99px;
  font-size: .8125rem;
  font-weight: 600;
  transition: top .2s;
}
.skip:focus { top: 12px; color: #fff; }

/* La nav e' fixed e alta ~62px: senza questo margine il salto su #scarica
   porta i badge store esattamente sotto la barra, invisibili. */
#scarica, #contenuto { scroll-margin-top: 96px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 22px; }

.eyebrow {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--primary);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.02em; line-height: 1.05; }
h2 { font-size: clamp(1.875rem, 6.4vw, 3.125rem); line-height: 1.06; }
h3 { font-size: 1.25rem; font-weight: 500; line-height: 1.22; letter-spacing: -.01em; }
p { line-height: 1.58; color: var(--ink-2); }

/* ── nav ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.stuck {
  background: rgba(251, 247, 240, .86);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(20, 15, 10, .07);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3125rem;
  letter-spacing: -.01em;
  color: var(--ink);
}
.nav .mini {
  height: 38px;
  padding: 0 17px;
  border-radius: 99px;
  background: var(--primary);
  color: #fff;
  font-size: .8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.nav .mini:hover { color: #fff; }
.nav.stuck .mini { opacity: 1; transform: none; pointer-events: auto; }

/* ── hero ────────────────────────────────────────────────── */
.hero { position: relative; padding: 96px 0 0; overflow: hidden; }
.hero:before {
  content: "";
  position: absolute;
  top: -320px; left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 150vw);
  height: 760px;
  background: radial-gradient(ellipse at center, rgba(196, 74, 58, .16) 0%, rgba(214, 162, 78, .10) 42%, transparent 70%);
  pointer-events: none;
}
.hero-in { position: relative; display: grid; gap: 34px; }
.hero h1 { font-size: clamp(2.5rem, 10.5vw, 4.625rem); letter-spacing: -.03em; margin: 14px 0 18px; }
.hero .lede {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 4.6vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 30ch;
}

/* ── badge store ─────────────────────────────────────────── */
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.store {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 20px 0 17px;
  border-radius: 14px;
  background: var(--shell);
  color: #fff;
  border: 1px solid transparent;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 6px 18px -8px rgba(20, 15, 10, .5);
}
a.store:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(20, 15, 10, .55); color: #fff; }
.store > span { display: flex; flex-direction: column; }
.store .l1 { font-size: .625rem; letter-spacing: .09em; text-transform: uppercase; opacity: .72; line-height: 1.2; }
.store .l2 { font-size: .9375rem; font-weight: 600; line-height: 1.15; }

.assure {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 16px;
  font-size: .78125rem;
  color: var(--ink-3);
}
.assure span { display: flex; align-items: center; gap: 6px; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); opacity: .6; flex: none; }


/* ── telefono ────────────────────────────────────────────── */
.phone {
  position: relative;
  width: min(300px, 78vw);
  margin: 0 auto;
  aspect-ratio: 620 / 1251; /* interno = 620/1286 dopo il bezel del 2.6% */
  background: var(--shell);
  border-radius: 14.5% / 6.6%;
  padding: 2.6%;
  box-shadow: 0 40px 70px -30px rgba(60, 30, 20, .5), 0 6px 16px rgba(20, 15, 10, .14);
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 12.4% / 5.6%;
  overflow: hidden;
  background: var(--cream);
}
.phone-screen img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity .7s var(--ease-soft);
}
.phone-screen img.on { opacity: 1; }

.pdots { display: flex; justify-content: center; gap: 7px; margin-top: 20px; }
.pdots button {
  position: relative;
  width: 6px; height: 6px;
  padding: 0;
  border-radius: 50%;
  background: var(--ink-4);
  opacity: .5;
  transition: width .3s, background .3s, opacity .3s;
}
/* Area di tocco 24×24 attorno al pallino (WCAG 2.5.8) */
.pdots button:before { content: ""; position: absolute; inset: -9px -9px; }
.pdots button[aria-current="true"] { background: var(--primary); opacity: 1; width: 20px; border-radius: 99px; }

/* ── sezioni ─────────────────────────────────────────────── */
section { position: relative; }
.band { background: var(--paper); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.pad { padding: 74px 0; }

.hook { display: grid; gap: 0; margin-top: 26px; border-top: 1px solid var(--line); }
.hook li {
  list-style: none;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.125rem, 4.8vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
  padding: 18px 0 18px 42px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.hook li:before {
  content: "\201C";
  position: absolute;
  left: 6px; top: 14px;
  font-size: 2.125rem;
  color: var(--primary);
  opacity: .5;
  line-height: 1;
}
.hook-out { font-size: .9375rem; margin-top: 22px; max-width: 46ch; }

/* ── passi ───────────────────────────────────────────────── */
.steps { display: grid; gap: 52px; margin-top: 44px; }
.step { display: grid; gap: 22px; align-items: center; }
.step .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: .9375rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.step .num:after { content: ""; height: 1px; flex: 1; background: var(--line); max-width: 120px; }
.step h3 { font-size: clamp(1.375rem, 5.4vw, 1.875rem); font-weight: 400; letter-spacing: -.018em; margin-bottom: 10px; }
.step p { font-size: .9375rem; max-width: 44ch; }
.shot {
  width: min(258px, 66vw);
  margin: 0 auto;
  background: var(--shell);
  border-radius: 14.5% / 6.6%;
  padding: 2.6%;
  aspect-ratio: 620 / 1251; /* interno = 620/1286 dopo il bezel del 2.6% */
  box-shadow: 0 26px 50px -26px rgba(60, 30, 20, .42);
}
.shot .frame { width: 100%; height: 100%; border-radius: 12.4% / 5.6%; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* ── citazione ───────────────────────────────────────────── */
.quote { text-align: center; padding: 80px 0; }
.quote svg { margin: 0 auto; }
.quote .q {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5.6vw, 2.5rem);
  line-height: 1.28;
  letter-spacing: -.02em;
  max-width: 22ch;
  margin: 20px auto 0;
}
.quote .by {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 22px;
}

/* ── FAQ ─────────────────────────────────────────────────── */
.faq { margin-top: 32px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 19px 34px 19px 0;
  position: relative;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:after {
  content: "+";
  position: absolute;
  right: 4px; top: 16px;
  font-size: 1.3125rem;
  color: var(--primary);
  font-weight: 400;
  transition: transform .25s;
}
.faq details[open] summary:after { transform: rotate(45deg); }
.faq p { font-size: .90625rem; padding: 0 8px 20px 0; max-width: 60ch; }

/* ── CTA finale ──────────────────────────────────────────── */
.final {
  background: #161211;
  color: #fff;
  border-radius: 28px;
  padding: 52px 26px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0 0 26px;
}
.final:before {
  content: "";
  position: absolute;
  left: 50%; top: -190px;
  transform: translateX(-50%);
  width: 600px; height: 420px;
  background: radial-gradient(ellipse at center, rgba(196, 74, 58, .5), transparent 66%);
}
.final h2 { color: #fff; position: relative; }
.final p { color: rgba(255, 255, 255, .66); position: relative; margin: 16px auto 0; max-width: 34ch; font-size: .9375rem; }
.final .stores { justify-content: center; position: relative; }
.final .store { background: #fff; color: #161211; box-shadow: none; }
.final a.store:hover { color: #161211; }
.final .assure { justify-content: center; color: rgba(255, 255, 255, .55); position: relative; }

/* ── footer ──────────────────────────────────────────────── */
footer { padding: 34px 0 48px; font-size: .8125rem; color: var(--ink-3); }
.fnav { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 16px; }
.fnav a { color: var(--ink-3); }
.fnav a:hover { color: var(--primary); }
.copy { font-family: var(--font-display); font-style: italic; color: var(--ink-4); }


/* ── reveal allo scroll ──────────────────────────────────── */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .phone-screen img { transition: none; }
  * { animation-duration: .01ms !important; }
}

@media (min-width: 860px) {
  .wrap { padding: 0 40px; }
  .hero { padding: 130px 0 0; }
  .hero-in { grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
  .phone { width: 330px; margin: 0; }
  .pad { padding: 110px 0; }
  .steps { gap: 78px; }
  .step { grid-template-columns: 1fr 1fr; gap: 60px; }
  .step:nth-child(even) .txt { order: 2; }
  .shot { margin: 0 auto; }
  .final { padding: 86px 60px; }
  .hook li { padding-left: 50px; }
  footer { padding: 44px 0 60px; }
}
