/* ==========================================================================
   Solenith — foglio di stile condiviso (homepage + landing prodotti)
   Palette e tipografia coerenti con l'app Selene:
   notte cosmica, crema, oro; Cormorant Garamond / Outfit / Syne.
   ========================================================================== */

:root {
  --bg1: #0b0818;
  --bg2: #14112a;
  --bg3: #1a1438;
  --fg: #f2ecdc;
  --dim: #9b93a8;
  --accent: #d4b16a;          /* oro Solenith */
  --accent-soft: #e8d5a4;
  --violet: #8b6cff;          /* bagliore secondario */
  --card-bg: rgba(24, 19, 46, 0.55);
  --card-border: rgba(242, 236, 220, 0.09);

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-ui: "Outfit", system-ui, sans-serif;
  --font-brand: "Syne", "Outfit", sans-serif;

  --maxw: 1120px;
  --radius: 18px;

  /* Le landing di prodotto possono ridefinire questi due token
     per ri-tingere CTA e dettagli senza toccare il resto. */
  --app-accent: var(--accent);
  --app-glow: rgba(212, 177, 106, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg1);
  color: var(--fg);
  font-family: var(--font-ui);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(212, 177, 106, 0.35); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }

a { color: var(--accent-soft); text-decoration: none; }
img, svg { max-width: 100%; }

/* --------------------------------------------------------------------------
   Fondale: cielo + stelle (canvas) + aloni
   -------------------------------------------------------------------------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 75% -10%, rgba(139, 108, 255, 0.14), transparent 60%),
    radial-gradient(1000px 600px at 15% 110%, rgba(212, 177, 106, 0.10), transparent 55%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 55%, var(--bg1) 100%);
}
#stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
}

/* --------------------------------------------------------------------------
   Struttura
   -------------------------------------------------------------------------- */
.wrap {
  width: min(var(--maxw), calc(100% - 48px));
  margin-inline: auto;
}
section { padding: 96px 0; position: relative; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; }
h1 { font-size: clamp(44px, 7vw, 84px); line-height: 1.04; letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.12; }
h3 { font-size: 24px; }
.lead { color: var(--dim); font-size: clamp(16px, 2vw, 19px); max-width: 60ch; }
.gold { color: var(--accent); }
em.brand-i { font-style: italic; color: var(--accent-soft); }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 8, 24, 0.62);
  border-bottom: 1px solid rgba(242, 236, 220, 0.06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
}
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .word {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand .word b { color: var(--accent); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--dim);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--fg); }
/* La regola .nav-links a è più specifica di .btn-gold: ripristina i colori del bottone. */
.nav-links a.btn-gold { color: #171029; font-weight: 500; }
.nav-links a.btn-gold:hover { color: #171029; }
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

/* --------------------------------------------------------------------------
   Bottoni
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn-gold {
  background: linear-gradient(135deg, var(--app-accent), color-mix(in oklab, var(--app-accent) 72%, #fff 28%) 120%);
  color: #171029;
  box-shadow: 0 6px 28px var(--app-glow);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 36px var(--app-glow); }
.btn-ghost {
  border-color: rgba(242, 236, 220, 0.22);
  color: var(--fg);
  background: rgba(242, 236, 220, 0.04);
}
.btn-ghost:hover { border-color: rgba(242, 236, 220, 0.45); transform: translateY(-2px); }
.btn small { opacity: 0.7; font-weight: 400; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { padding: 140px 0 110px; text-align: center; }
.hero .sigil { width: 84px; height: 84px; margin: 0 auto 34px; display: block; filter: drop-shadow(0 0 26px var(--app-glow)); }
.hero h1 .thin { font-weight: 300; font-style: italic; }
.hero .lead { margin: 26px auto 0; }
.hero .cta-row { margin-top: 44px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero .hint { margin-top: 22px; font-size: 13px; color: var(--dim); letter-spacing: 0.05em; }

/* Riga orbitale decorativa sotto l'hero */
.orbit-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 177, 106, 0.45), transparent);
  position: relative;
  max-width: 520px;
  margin: 70px auto 0;
}
.orbit-line::after {
  content: "";
  position: absolute;
  top: -3.5px; left: 50%;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: orbit-dot 7s ease-in-out infinite alternate;
}
@keyframes orbit-dot { from { left: 12%; } to { left: 88%; } }

/* --------------------------------------------------------------------------
   Card generiche
   -------------------------------------------------------------------------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 30px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* --------------------------------------------------------------------------
   Sezione prodotti (homepage)
   -------------------------------------------------------------------------- */
.products-grid {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.product {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 360px;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
}
.product:hover {
  border-color: rgba(212, 177, 106, 0.35);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 177, 106, 0.08) inset;
}
.product .halo {
  position: absolute;
  top: -70px; right: -70px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--halo, rgba(212,177,106,0.22)), transparent 65%);
  pointer-events: none;
  transition: opacity 0.4s;
}
.product .p-icon { width: 52px; height: 52px; }
.product h3 { font-size: 30px; }
.product .p-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.product p.desc { color: var(--dim); font-size: 15px; margin: 0; flex: 1; }
.product .p-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.product .p-actions .btn { padding: 10px 20px; font-size: 14px; }

.product.soon {
  border-style: dashed;
  border-color: rgba(242, 236, 220, 0.13);
  background: rgba(24, 19, 46, 0.3);
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--dim);
}
.product.soon .glyph {
  font-family: var(--font-display);
  font-size: 44px;
  color: rgba(242, 236, 220, 0.35);
}
.product.soon .p-tag { color: var(--dim); }

/* --------------------------------------------------------------------------
   Sezione valori / metodo
   -------------------------------------------------------------------------- */
.values-grid {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.value h3 { font-size: 22px; margin-bottom: 10px; }
.value p { color: var(--dim); font-size: 15px; margin: 0; }
.value .v-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   Fascia CTA finale
   -------------------------------------------------------------------------- */
.cta-band {
  text-align: center;
  padding: 110px 0;
}
.cta-band .card {
  padding: 70px 40px;
  background:
    radial-gradient(600px 260px at 50% -30%, var(--app-glow), transparent 70%),
    var(--card-bg);
}
.cta-band h2 { margin-bottom: 16px; }
.cta-band .lead { margin: 0 auto 36px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer.site {
  border-top: 1px solid rgba(242, 236, 220, 0.07);
  padding: 44px 0 60px;
  color: var(--dim);
  font-size: 13.5px;
}
footer .foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
footer .foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
footer a { color: var(--dim); transition: color 0.25s; }
footer a:hover { color: var(--fg); }

/* --------------------------------------------------------------------------
   Landing prodotto — sezioni aggiuntive
   -------------------------------------------------------------------------- */
.feature-grid {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature { padding: 26px; }
.feature .f-glyph { font-size: 26px; line-height: 1; margin-bottom: 14px; display: block; }
.feature h3 { font-size: 20px; margin-bottom: 8px; }
.feature p { color: var(--dim); font-size: 14.5px; margin: 0; }

.chips { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chip {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(242, 236, 220, 0.14);
  background: rgba(24, 19, 46, 0.45);
  font-size: 13.5px;
  color: var(--fg);
  letter-spacing: 0.03em;
  transition: border-color 0.25s, transform 0.25s;
}
.chip:hover { border-color: rgba(212, 177, 106, 0.5); transform: translateY(-2px); }

.plans-grid {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: stretch;
}
.plan { display: flex; flex-direction: column; gap: 14px; }
.plan .p-name { font-family: var(--font-brand); font-size: 13px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--dim); }
.plan.featured { border-color: rgba(212, 177, 106, 0.4); box-shadow: 0 0 46px rgba(212, 177, 106, 0.09); }
.plan.featured .p-name { color: var(--accent); }
.plan ul { list-style: none; margin: 0; padding: 0; color: var(--dim); font-size: 14.5px; display: grid; gap: 9px; flex: 1; }
.plan ul li::before { content: "✦"; color: var(--accent); margin-right: 10px; font-size: 11px; }
.plan .price { font-family: var(--font-display); font-size: 34px; }
.plan .price small { font-size: 15px; color: var(--dim); font-family: var(--font-ui); }
.plan .plan-note { margin: 0; color: var(--dim); font-size: 14px; }

/* FAQ: <details> nativi, leggibili anche senza JS. */
.faq { margin-top: 40px; display: grid; gap: 12px; max-width: 780px; }
.faq-item { padding: 18px 22px; }
.faq-item summary { cursor: pointer; font-size: 17px; font-weight: 500; list-style-position: outside; }
.faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.faq-item p { margin: 12px 0 0; color: var(--dim); font-size: 15px; line-height: 1.6; }
.faq-item a, .legal a { color: var(--accent); }
.legal { max-width: 720px; }
.legal h2 { font-size: clamp(22px, 3vw, 28px); margin-top: 36px; }
.legal p, .legal li { color: var(--dim); line-height: 1.65; }

/* --------------------------------------------------------------------------
   Pagina download
   -------------------------------------------------------------------------- */
.dl-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}
.dl-card { display: flex; flex-direction: column; gap: 14px; }
.dl-card .dl-icon { width: 46px; height: 46px; }
.dl-card h3 { font-size: 26px; }
.dl-card p { color: var(--dim); font-size: 14.5px; margin: 0; flex: 1; }
.dl-card .p-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.dl-card.center { align-items: center; text-align: center; }

.btn-disabled {
  opacity: 0.45;
  pointer-events: none;
  border-style: dashed;
}

.qr-slot {
  width: 164px;
  height: 164px;
  margin-inline: auto;
  border: 1.5px dashed rgba(242, 236, 220, 0.25);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--dim);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.7;
  background:
    radial-gradient(120px 120px at 50% 50%, rgba(212, 177, 106, 0.06), transparent 70%);
}
.qr-img { width: 164px; height: 164px; border-radius: 14px; background: #fff; padding: 8px; }

/* --------------------------------------------------------------------------
   Animazioni ingresso (con .reveal via JS)
   -------------------------------------------------------------------------- */
/* Il contenuto parte nascosto SOLO se il JS è attivo (html.js aggiunto da uno
   script inline nell'head): senza JS la pagina resta sempre leggibile. */
.reveal { transition: opacity 0.8s ease, transform 0.8s ease; }
html.js .reveal:not(.in) { opacity: 0; transform: translateY(26px); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, html.js .reveal:not(.in) { opacity: 1; transform: none; transition: none; }
  .orbit-line::after { animation: none; }
  .btn, .product, .chip { transition: none; }
}
