/* ============================================================================
   Keepn — Stili personalizzati (a corredo di Tailwind via CDN)
   Identità allineata all'app: teal-smeraldo vibrante + gradiente teal→buio,
   superfici scure, lettering geometrico. Icona = vortice (tornado) bianco.
   ========================================================================== */

:root {
  /* --- Fondali scuri (base app) --- */
  --bg:           #0E1417;  /* near-black freddo (teal-black) */
  --bg-2:         #111A1C;  /* fondo alternato */
  --surface:      #15201F;  /* card / superficie rialzata */
  --surface-2:    #1A2725;  /* superficie più chiara */
  --line:         #243430;  /* bordi su scuro (teal-tinted) */
  --line-soft:    #1C2825;  /* bordi tenui */

  /* --- Brand teal-smeraldo --- */
  --brand:        #06C2A8;  /* accento principale: testo, link, icone */
  --brand-bright: #1ED9BE;  /* variante brillante */
  --mint:         #5BE0CB;  /* riempimento CTA (testo scuro sopra) */
  --brand-deep:   #0B8E80;  /* teal profondo */
  --brand-glow:   rgba(6,194,168,.30);

  /* --- Gradiente icona app --- */
  --icon-top:     #4FBBA8;
  --icon-bottom:  #1C5A72;

  --gold:         #F3C23B;  /* stella preferiti */

  /* --- Testo --- */
  --text:         #ECF1F0;  /* testo principale su scuro */
  --text-soft:    #AAB8B4;  /* secondario */
  --text-faint:   #76837F;  /* terziario */
  --on-mint:      #06312B;  /* testo scuro su bottoni mint */
}

/* ---------- Base & Tipografia ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
  letter-spacing: -0.015em;
}

.eyebrow {
  font-family: "Inter", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ---------- Utility colore / superfici ---------- */
.text-brand      { color: var(--brand); }
.text-soft       { color: var(--text-soft); }
.text-faint      { color: var(--text-faint); }
.text-gold       { color: var(--gold); }
.bg-base         { background: var(--bg); }
.bg-base-2       { background: var(--bg-2); }
.bg-surface      { background: var(--surface); }
.border-line     { border-color: var(--line); }
.border-line-soft{ border-color: var(--line-soft); }

/* Gradiente "firma" teal → buio (come le schermate dell'app) */
.brand-gradient {
  background:
    radial-gradient(120% 90% at 50% -18%, var(--brand) 0%, var(--brand-deep) 20%, rgba(14,20,23,0) 58%),
    var(--bg);
}
.brand-gradient-soft {
  background:
    radial-gradient(120% 120% at 50% -30%, rgba(6,194,168,.20) 0%, rgba(14,20,23,0) 55%),
    var(--bg);
}

/* ---------- Logo / icona vortice ---------- */
.brand-icon { display: inline-block; border-radius: 26%; }
.brand-wordmark {
  font-family: "Poppins", "Inter", sans-serif;
  font-weight: 600; letter-spacing: -0.02em;
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  border-radius: 9999px; font-weight: 600; font-size: .95rem;
  padding: .82rem 1.6rem; cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
  text-decoration: none; border: none;
}
.btn-primary {
  background: var(--mint); color: var(--on-mint);
  box-shadow: 0 10px 30px -10px var(--brand-glow);
}
.btn-primary:hover { background: var(--brand-bright); transform: translateY(-1px); }
.btn-ghost { color: var(--text); border: 1px solid var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-bright); }

/* ---------- Badge store (placeholder stile ufficiale) ---------- */
.store-badge {
  display: inline-flex; align-items: center; gap: .7rem;
  background: #000; color: #fff; border-radius: 12px;
  padding: .62rem 1.1rem; min-width: 178px;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
  text-decoration: none; border: 1px solid rgba(255,255,255,.16);
}
.store-badge:hover { transform: translateY(-2px); opacity: .96; box-shadow: 0 12px 30px -14px rgba(0,0,0,.6); }
.store-badge .sb-top  { font-size: .62rem; letter-spacing: .02em; opacity: .85; display:block; line-height:1; }
.store-badge .sb-main { font-size: 1.18rem; font-weight: 600; line-height: 1.15; display:block; margin-top:2px; }
.store-badge svg { flex: 0 0 auto; }

/* ============================================================================
   Phone mockup — replica fedele della UI Keepn (home "Appena salvati")
   ========================================================================== */
.phone {
  position: relative; width: 274px; height: 564px;
  border-radius: 46px; background: #05090B;
  padding: 11px; z-index: 1;
  box-shadow: 0 50px 90px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.05) inset,
              0 0 60px -20px var(--brand-glow);
}
.phone__notch {
  position: absolute; top: 13px; left: 50%; transform: translateX(-50%);
  width: 104px; height: 24px; background: #05090B; border-radius: 0 0 16px 16px; z-index: 3;
}
.phone__screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 36px; overflow: hidden;
  /* gradiente app: teal in alto → buio in basso */
  background: linear-gradient(177deg, #06C2A8 0%, #0C8E89 16%, #15302E 42%, #11181B 74%, #0E1417 100%);
  display: flex; flex-direction: column;
}
.phone__bar {
  padding: 36px 18px 8px; color: #fff;
  display: flex; align-items: center; gap: 10px;
}
.phone__bar .pb-ava {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, #8FB98E, #4E6B5E); border: 1.5px solid rgba(255,255,255,.5);
}
.phone__bar .pb-hi { font-weight: 700; font-size: .9rem; line-height: 1.15; }
.phone__bar .pb-sub { font-size: .68rem; opacity: .92; line-height: 1.2; }
.phone__bar .pb-sub b { color: #062a26; background: rgba(255,255,255,.0); font-weight: 700; }

.phone__body { padding: 4px 14px 0; display: flex; flex-direction: column; gap: 11px; overflow: hidden; }
.mock-section { font-size: .82rem; font-weight: 700; color: #fff; display:flex; justify-content:space-between; align-items:center; }
.mock-section span { font-size: .68rem; font-weight: 600; color: var(--brand-bright); }

.mock-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px; padding: 10px; color: #fff;
  display: flex; gap: 10px; align-items: center;
}
.mock-thumb {
  width: 52px; height: 52px; border-radius: 12px; flex: 0 0 auto; position: relative; overflow:hidden;
  background: linear-gradient(135deg, #4F7C5B 0%, #2C3F38 100%);
}
.mock-thumb::after {
  content:""; position:absolute; top:0; left:0; right:0; bottom:0;
  background: radial-gradient(circle at 60% 35%, rgba(255,255,255,.18), transparent 60%);
}
.mock-meta { min-width: 0; flex: 1; }
.mock-title { font-size: .76rem; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-row { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.mock-pill {
  font-size: .6rem; font-weight: 700; letter-spacing: .02em;
  background: var(--brand); color: #04221E; padding: 2px 8px; border-radius: 999px;
}
.mock-state { font-size: .62rem; color: rgba(255,255,255,.7); display:flex; align-items:center; gap:4px; }
.mock-state--ok { color: var(--brand-bright); }
.mock-handle { font-size: .6rem; color: rgba(255,255,255,.55); margin-top: 3px; }

.phone__nav {
  margin-top: auto; display: flex; justify-content: space-around; align-items: center;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom)); background: #0B1113;
  border-top: 1px solid rgba(255,255,255,.06);
}
.phone__nav i {
  width: 20px; height: 20px; border-radius: 6px; display:block;
  background: rgba(255,255,255,.32);
}
.phone__nav i.is-on { background: var(--brand-bright); }

/* Anelli concentrici dietro al telefono (vortice → onde) */
.hero-rings { position: absolute; top:0; left:0; right:0; bottom:0; display: grid; place-items: center; z-index: 0; pointer-events: none; }
.hero-rings span { position: absolute; border: 1px solid rgba(6,194,168,.22); border-radius: 50%; }
.hero-rings span:nth-child(1){ width: 330px; height: 330px; opacity:.9 }
.hero-rings span:nth-child(2){ width: 480px; height: 480px; opacity:.6 }
.hero-rings span:nth-child(3){ width: 640px; height: 640px; opacity:.32 }

/* ---------- Card funzionalità ---------- */
.feature-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 1.6rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 26px 50px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(6,194,168,.25);
}
.feature-num {
  font-family: "Poppins", monospace; font-weight: 600; font-size: .78rem;
  color: var(--brand); letter-spacing: .12em;
}
.feature-ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(6,194,168,.14); color: var(--brand-bright); margin-bottom: 1.1rem;
  border: 1px solid rgba(6,194,168,.22);
}

/* ---------- Accordion FAQ ---------- */
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-trigger {
  width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.3rem 0; font-weight: 600; font-size: 1.06rem; color: var(--text);
  background: none; border: none; cursor: pointer;
}
.accordion-trigger .chev { transition: transform .25s ease; color: var(--brand); flex: 0 0 auto; }
.accordion-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.accordion-panel {
  max-height: 0; overflow: hidden; transition: max-height .3s ease;
  color: var(--text-soft); line-height: 1.65;
}
.accordion-panel .pad { padding: 0 0 1.3rem; }
@media (prefers-reduced-motion: reduce) { .accordion-panel { transition: none; } }

/* ---------- Selettore lingua ---------- */
.lang-menu { min-width: 158px; background: var(--surface-2); border: 1px solid var(--line); }
.lang-option { color: var(--text-soft); }
.lang-option:hover { background: rgba(255,255,255,.05); color: var(--text); }
.lang-option.is-active { color: var(--brand-bright); font-weight: 600; }

/* ---------- Rivelazione allo scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Pagine legali ---------- */
.legal-prose h2 { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 1.2rem; margin: 2rem 0 .6rem; color: var(--text); letter-spacing: -.01em; }
.legal-prose p  { color: var(--text-soft); line-height: 1.78; margin-bottom: .9rem; }
.legal-prose ul { margin: .4rem 0 1rem 0; padding-left: 1.1rem; }
.legal-prose li { color: var(--text-soft); line-height: 1.7; margin-bottom: .5rem; list-style: disc; }
.legal-prose li::marker { color: var(--brand); }
.legal-prose a  { color: var(--brand-bright); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Form ---------- */
.field-label { font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: .35rem; display: block; }
.field {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: .85rem 1rem; font-size: .98rem; background: var(--surface); color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field::placeholder { color: var(--text-faint); }
.field:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(6,194,168,.22); }
.form-status { margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px; font-size: .92rem; }
.form-status--ok    { background: rgba(6,194,168,.14);  color: var(--brand-bright); border: 1px solid rgba(6,194,168,.34); }
.form-status--error { background: rgba(224,107,90,.12); color: #f0a594; border: 1px solid rgba(224,107,90,.34); }

/* ---------- Focus visibile (accessibilità) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px;
}

::selection { background: var(--brand); color: #04221E; }

/* ============================================================================
   Logo (immagine PNG fornita) + Slideshow screenshot nel telefono
   ========================================================================== */
.brand-logo { height: 30px; width: auto; display: block; }
.brand-logo--sm { height: 26px; }

/* Slideshow: le 4 schermate reali dentro lo schermo del telefono */
.shots { position: absolute; top:0; left:0; width:100%; height:100%; }
.shots .shot {
  position: absolute; top:0; left:0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  opacity: 0; transition: opacity .7s ease; will-change: opacity;
}
.shots .shot.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .shots .shot { transition: none; }
}
/* Indicatori (pallini) sotto il telefono */
.shots-dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.shots-dots .dot {
  width: 8px; height: 8px; border-radius: 999px; border: none; cursor: pointer;
  background: rgba(255,255,255,.22); padding: 0; transition: background .25s ease, width .25s ease;
}
.shots-dots .dot.is-active { background: var(--brand-bright); width: 22px; }

/* ============================================================================
   Pagina "Invita un amico"
   ========================================================================== */
.invite-link-row {
  display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap;
}
.invite-link-row .field { flex: 1; min-width: 220px; font-size: .95rem; }
.invite-link-row .btn { white-space: nowrap; }
.share-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 12px; padding: .7rem 1.1rem; font-weight: 600; font-size: .92rem;
  cursor: pointer; transition: border-color .18s ease, transform .18s ease, color .18s ease;
  text-decoration: none;
}
.share-btn:hover { border-color: var(--brand); color: var(--brand-bright); transform: translateY(-1px); }
.share-btn svg { flex: 0 0 auto; }
[data-copy-link].is-copied { background: var(--brand); color: #04221E; }

.steps { display: grid; gap: 14px; margin-top: .5rem; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  background: rgba(6,194,168,.14); color: var(--brand-bright); border: 1px solid rgba(6,194,168,.3);
}
.step p { color: var(--text-soft); line-height: 1.6; margin: 0; padding-top: 3px; }
