/* Stile del sito di Closest Kin (pagina principale, La scienza, Supporto, Kit per la stampa). Le pagine le compone tools/gen-site.mjs.
   Stessa identità dell'app: verde-inchiostro, oro, bolle azzurre. Caratteri dell'app, inclusi qui con la licenza OFL accanto:
   Figtree per il testo, Fraunces morbido solo per la scritta «Closest Kin» (il file ha solo quelle lettere), Source Serif 4 solo per la «†» degli estinti. */
@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree_italic.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Dagger"; src: url("fonts/source_serif_4_dagger.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+2020; }
@font-face { font-family: "Fraunces Logo"; src: url("../challenge/fonts/fraunces_logo.woff2") format("woff2"); font-weight: 800; font-display: block; unicode-range: U+0020, U+0043, U+004B, U+0065, U+0069, U+006C, U+006E-006F, U+0073-0074; }

:root {
  color-scheme: dark;
  --bg: #0B1411; --bg2: #10201A; --bg3: #16291F;
  --text: #F4EFE3; --text2: rgba(244,239,227,.76); --text3: rgba(244,239,227,.56);
  --gold: #F2B84B; --gold2: #FFD98A; --gold3: #C98A1E; --green: #5BD69A; --coral: #FF8A78;
  --surface: rgba(255,248,230,.06); --surface2: rgba(255,248,230,.10); --line: rgba(255,248,230,.12); --line2: rgba(255,248,230,.22);
  --sans: "Dagger", "Figtree", -apple-system, system-ui, sans-serif;
  --logo: "Fraunces Logo", "Figtree", serif;
  --wrap: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--sans); font-variant-ligatures: no-common-ligatures; overflow-x: clip;
  background-image: radial-gradient(900px 620px at 78% -80px, rgba(46,110,82,.55), transparent 70%), radial-gradient(700px 520px at -10% 30%, rgba(31,74,56,.45), transparent 70%); background-repeat: no-repeat; }
img { max-width: 100%; height: auto; }
a { color: var(--gold2); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold2); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 14px; background: var(--gold); color: #1a1408; font-weight: 700; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }
.fine { color: var(--text3); font-size: 14.5px; }
/* Privacy aperta dall'app (indirizzo con «#app»): solo il testo, senza intestazione né piede. Niente script: basta :target. */
#app:target ~ .top, #app:target ~ .foot, #app:target ~ .skip { display: none; }
#app:target ~ main .doc { padding-top: calc(env(safe-area-inset-top) + 28px); }

/* intestazione */
.top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; max-width: var(--wrap); margin: 0 auto; padding: calc(env(safe-area-inset-top) + 16px) 20px 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 800 22px/1 var(--logo); letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand em, .logo em { font-style: normal; background: linear-gradient(180deg, #FFE6A8, #F2B84B 60%, #C98A1E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-left: -10px; }
.top nav a { padding: 10px; color: var(--text2); text-decoration: none; font-weight: 600; font-size: 15.5px; border-radius: 10px; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); }
.top nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 7px; }
.top nav .lang { margin-left: 6px; padding: 7px 12px; border: 1px solid var(--line2); border-radius: 999px; font-size: 14.5px; }

/* pulsanti e invito a scaricare */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 26px; border: 0; border-radius: 16px; background: linear-gradient(180deg, #FFD98A, #F2B84B 55%, #D99A2B); color: #1a1408; font: 700 17px/1.2 var(--sans); text-decoration: none; cursor: pointer; box-shadow: 0 5px 0 #8a5a12, 0 12px 26px rgba(0,0,0,.35); }
.btn:hover { color: #1a1408; filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #8a5a12, 0 8px 18px rgba(0,0,0,.35); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn.ghost { background: none; color: var(--text); border: 1px solid var(--line2); box-shadow: none; }
.btn.ghost:hover { color: var(--text); background: var(--surface); filter: none; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; margin-top: 26px; }
/* Badge ufficiale di Apple, file non modificati: spazio libero attorno di almeno 1/4 dell'altezza, niente effetti. */
.store { display: block; padding: 4px 0; line-height: 0; }
.store img { display: block; width: auto; height: 54px; }
.soon { padding: 12px 20px; border: 1px solid var(--line2); border-radius: 999px; color: var(--text); font-weight: 600; }

/* bolle degli animali: le stesse del gioco (css/screens.css, `.gem-body`, `.gem-hl`, `.gem-bub`, `.gem-in`): stessi colori, riflesso in alto a sinistra,
   tre bollicine, bordo che ondeggia piano e illustrazione al 66% della bolla. Qui senza elementi in più: riflesso e bollicine sono ::after e ::before. */
.bub { --j1: #b4e2ff; --j2: #2b7fe0; --j3: #0c2f78; --jg: #4aa3ff66; --hl: #effaff;
  position: relative; display: grid; place-items: center; flex: none; width: 96px; aspect-ratio: 1; border-radius: 46% 54% 52% 48% / 54% 46% 54% 46%; animation: wob 7s ease-in-out infinite alternate;
  background: radial-gradient(circle at 31% 22%, rgba(239,250,255,.87) 0 5%, transparent 17%), radial-gradient(circle at 72% 82%, var(--j3) 0, transparent 58%), radial-gradient(circle at 50% 46%, var(--j1) 0, var(--j2) 64%, var(--j3) 100%);
  box-shadow: inset 0 0 26px #fff4, inset -8px -14px 28px #0007, 0 16px 34px #000a, 0 0 44px var(--jg); }
.bub img { position: relative; z-index: 1; display: block; width: 66%; height: 66%; object-fit: contain; filter: drop-shadow(0 3px 5px #0008); }
.bub::after { content: ""; position: absolute; z-index: 2; left: 17%; top: 11%; width: 34%; height: 19%; border-radius: 50%; background: linear-gradient(#ffffffcc, #fff0); transform: rotate(-26deg); filter: blur(1px); pointer-events: none; }
.bub::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 70.5% 28.5%, #fffc 0, #fff3 2.7%, transparent 4.5%), radial-gradient(circle at 75.5% 48.5%, #fffc 0, #fff3 1.5%, transparent 2.5%), radial-gradient(circle at 27% 73%, #fffc 0, #fff3 1.8%, transparent 3%); }
@keyframes wob { 50% { border-radius: 54% 46% 48% 52% / 46% 54% 46% 54%; } }

/* apertura */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 24px 40px; max-width: var(--wrap); margin: 0 auto; padding: 36px 20px 40px; }
.hero-tx { grid-column: 1; }
.kicker { color: var(--gold2); font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { margin-top: 14px; font-size: clamp(38px, 5.6vw, 64px); line-height: 1.04; letter-spacing: -.025em; font-weight: 800; text-wrap: balance; }
.lead { margin-top: 18px; max-width: 34em; color: var(--text2); font-size: clamp(18px, 2vw, 21px); line-height: 1.5; }
.hero .fine { margin-top: 16px; }
.hero .phone, .hero-art { grid-column: 2; grid-row: 1; justify-self: center; }
.hero-art { position: relative; z-index: 1; width: min(300px, 74vw); aspect-ratio: 393 / 852; pointer-events: none; }
.float { position: absolute; animation: bob 7s ease-in-out infinite; }
.float .bub { width: clamp(76px, 10vw, 112px); }
.f1 { left: -34%; top: 10%; } .f2 { right: -30%; top: 36%; animation-delay: -2.3s; } .f3 { left: -24%; bottom: 12%; animation-delay: -4.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* telefono con una schermata vera */
.phone { width: min(300px, 74vw); padding: 9px; border-radius: 46px; background: #05090a; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 0 1px #000; }
.phone img { display: block; width: 100%; border-radius: 37px; }

/* sezioni */
.band { max-width: var(--wrap); margin: 0 auto; padding: 64px 20px; scroll-margin-top: 12px; }
.band > h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; letter-spacing: -.02em; text-align: center; text-wrap: balance; }
.band > .sub { margin: 12px auto 0; max-width: 36em; color: var(--text2); text-align: center; font-size: 18px; }

/* turno di prova */
.demo { max-width: 640px; margin: 30px auto 0; padding: 22px 18px 26px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(180deg, rgba(22,41,31,.9), rgba(16,32,26,.9)); box-shadow: 0 24px 60px rgba(0,0,0,.35); text-align: center; }
.demo-count { color: var(--gold2); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 26px; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 12px 4px; border: 0; border-radius: 20px; background: none; color: var(--text); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .18s; }
.pick .bub { width: min(132px, 24vw); margin-bottom: 8px; transition: box-shadow .18s; }
.pick b { font-size: clamp(14px, 3.6vw, 17px); line-height: 1.2; text-wrap: balance; }
.pick .sci { color: var(--text3); font-size: clamp(11.5px, 3vw, 13.5px); line-height: 1.2; }      /* la «†» degli estinti sta qui, in tondo, davanti al nome in corsivo */
.pick:not([disabled]):hover { transform: translateY(-4px); }
.pick[aria-pressed="true"] { transform: translateY(-6px); }
.pick[aria-pressed="true"] .bub { box-shadow: inset 0 0 26px #fff6, inset -8px -14px 28px #0007, 0 0 0 3px #fff9, 0 0 64px #5cb4ff, 0 16px 34px #000a; }      /* come la bolla scelta nel gioco */
.pick[disabled] { cursor: default; }
.verdict { margin-top: 16px; font-size: 26px; line-height: 1.15; letter-spacing: -.01em; }
.verdict.ok { color: var(--green); } .verdict.no { color: var(--coral); }
.demo .clado { margin-top: 22px; }
.expl { margin: 22px auto 0; max-width: 31em; text-align: left; }
.expl p + p, .expl h4 + p { margin-top: 8px; }
.expl h4 { margin: 14px 0 0; color: var(--gold2); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.expl h4:first-child { margin-top: 0; }
.expl .fine { margin-top: 12px; }
.demo .btn { margin-top: 24px; min-width: 190px; }
.demo-end p { margin-top: 16px; color: var(--text2); font-size: 18px; }
.demo-end .score { margin-top: 30px; font-size: 64px; font-weight: 800; line-height: 1; color: var(--gold2); }
.demo-end .cta { justify-content: center; }
.demo-end .btn { margin-top: 0; }

/* diagramma dei tre animali */
.clado { position: relative; max-width: 380px; margin: 0 auto; }
.clado svg { display: block; width: 100%; height: 130px; overflow: visible; }
.clado path { fill: none; stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.c-pair { stroke: var(--gold); } .c-out { stroke: rgba(244,239,227,.42); }
.clado-node, .clado-root { position: absolute; transform: translate(-50%, -50%); padding: 4px 10px; border: 1px solid var(--line2); border-radius: 10px; background: #14251d; font-weight: 700; font-size: 13.5px; line-height: 1.2; text-align: center; white-space: nowrap; }
.clado-node { left: 33.33%; top: 78px; border-color: rgba(242,184,75,.6); }
.clado-root { left: 62%; top: 18px; color: var(--text2); }
.clado small { display: block; font-weight: 500; font-size: 11.5px; color: var(--text3); }
.clado ol { display: grid; grid-template-columns: repeat(3, 1fr); }
.clado li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13.5px; line-height: 1.2; text-align: center; }
.clado .bub { width: 72px; }
.clado .bub { animation: none; border-radius: 50%; }      /* nel diagramma, come nel gioco, cerchi fermi con l'anello */
.clado li.in .bub { box-shadow: inset 0 0 18px #fff4, inset -6px -10px 20px #0007, 0 0 0 3px var(--gold), 0 8px 18px rgba(0,0,0,.4); }
.clado li.out { color: var(--text2); }
.clado li.out .bub { filter: grayscale(.6) brightness(.7); box-shadow: inset 0 0 18px #0006, 0 8px 18px rgba(0,0,0,.4); }

/* schede */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; margin-top: 34px; }
.cards.four { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.card h3 { font-size: 19px; line-height: 1.25; }
.card p { margin-top: 8px; color: var(--text2); font-size: 16px; }
.card .fine { font-size: 14.5px; color: var(--text3); }
.duo { display: flex; margin-bottom: 14px; }
.duo .bub { width: 84px; }
.duo .bub + .bub { margin-left: -16px; }

/* cosa c'è nel gioco */
.feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 28px 56px; margin-top: 56px; }
.feat .phone { justify-self: end; width: min(270px, 70vw); }
.feat:nth-of-type(even) .phone { order: 2; justify-self: start; }
.feat:nth-of-type(even) > div:last-child { justify-self: end; }
.feat h3 { font-size: clamp(23px, 2.6vw, 30px); line-height: 1.15; letter-spacing: -.015em; }
.feat p { margin-top: 12px; max-width: 26em; color: var(--text2); font-size: 18px; }
.final { text-align: center; padding-bottom: 80px; }
.final .icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 12px 34px rgba(0,0,0,.45); }
.final .logo { margin-top: 18px; font: 800 46px/1.05 var(--logo); letter-spacing: -.02em; }
.final .tag { margin-top: 10px; color: var(--text2); font-size: 19px; font-style: italic; }
.final .cta { justify-content: center; }

/* pagine di testo: La scienza, Supporto, Kit per la stampa */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 20px 72px; }
.doc.wide { max-width: 960px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.06; letter-spacing: -.025em; text-wrap: balance; }
.doc h2 { margin-top: 48px; font-size: 26px; line-height: 1.2; letter-spacing: -.015em; scroll-margin-top: 16px; }
.doc h3 { margin-top: 32px; font-size: 20px; }
.doc > p { margin-top: 14px; color: var(--text2); }
.doc > ul { margin-top: 10px; padding-left: 22px; list-style: disc; color: var(--text2); }
.doc > ul li + li { margin-top: 6px; }
.doc h2 + p { margin-top: 10px; }
.doc > .lead { color: var(--text2); max-width: none; }
.fig { margin-top: 26px; padding: 26px 18px 22px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.fig figcaption { margin: 20px auto 0; max-width: 34em; color: var(--text2); font-size: 16px; }
.doc .cards { margin-top: 22px; }
.doc .cards.three { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.doc .duo .bub { width: 64px; } .doc .duo .bub + .bub { margin-left: -12px; }
.faq { margin-top: 18px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 17px 40px 17px 0; font-weight: 700; font-size: 18px; line-height: 1.3; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--gold2); border-bottom: 2px solid var(--gold2); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 20px; max-width: 38em; color: var(--text2); }
form { margin-top: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
label { display: block; margin-bottom: 7px; font-weight: 700; font-size: 15.5px; }
textarea, input { display: block; width: 100%; margin-bottom: 18px; padding: 13px 14px; border: 1px solid var(--line2); border-radius: 13px; background: rgba(0,0,0,.28); color: var(--text); font: inherit; }
textarea { resize: vertical; min-height: 130px; }
textarea:focus, input:focus { outline: 3px solid var(--gold2); outline-offset: 1px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; margin-top: 16px; font-weight: 600; }
.form-status.ok { color: var(--green); } .form-status.err { color: var(--coral); }
form .fine { margin-top: 6px; }
.facts { margin-top: 18px; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--text3); font-weight: 600; }
.facts dd { margin: 0; }
.press-icon { margin-top: 26px; }
.press-icon img { display: block; width: 128px; height: 128px; border-radius: 29px; box-shadow: 0 12px 34px rgba(0,0,0,.45); }
.press-icon figcaption, .shots figcaption { margin-top: 10px; color: var(--text2); font-size: 15px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 26px 18px; margin-top: 18px; }
.shots .phone { width: 100%; padding: 6px; border-radius: 30px; box-shadow: 0 14px 34px rgba(0,0,0,.45); }
.shots .phone img { border-radius: 24px; }
.shots figcaption { text-align: center; }
.refs { margin-top: 16px; }
.refs summary { display: inline-block; padding: 11px 18px; border: 1px solid var(--line2); border-radius: 999px; font-weight: 600; cursor: pointer; list-style: none; }
.refs summary::-webkit-details-marker { display: none; }
.refs[open] summary { display: none; }
.refs ol { margin-top: 8px; padding-left: 26px; list-style: decimal; color: var(--text2); font-size: 15px; line-height: 1.45; }
.refs li { padding: 7px 0 7px 4px; overflow-wrap: anywhere; }
.refs li::marker { color: var(--text3); }

/* piede: chi c'è dietro il sito */
.foot { margin-top: 24px; padding: 34px 20px calc(env(safe-area-inset-bottom) + 40px); border-top: 1px solid var(--line); text-align: center; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.foot nav a { padding: 9px 11px; color: var(--text2); font-weight: 600; font-size: 15.5px; text-decoration: none; }
.foot nav a:hover { color: var(--text); text-decoration: underline; }
.foot-by { margin-top: 16px; color: var(--text2); }
.foot-legal { max-width: 62em; margin: 12px auto 0; color: var(--text3); font-size: 13px; line-height: 1.5; }
.foot-legal a { color: inherit; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 22px; text-align: center; }
  .hero-tx { grid-column: 1; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .cta { justify-content: center; }
  .hero .phone, .hero-art { grid-column: 1; grid-row: 2; margin-top: 14px; }
  .f1 { left: -16%; } .f2 { right: -15%; } .f3 { left: -12%; }
  .feat { grid-template-columns: 1fr; text-align: center; margin-top: 52px; }
  .feat .phone, .feat:nth-of-type(even) .phone { order: 0; justify-self: center; }
  .feat > div:last-child, .feat:nth-of-type(even) > div:last-child { justify-self: center; }
  .feat p { margin-left: auto; margin-right: auto; }
  .band { padding: 52px 18px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .top { justify-content: center; }
  .top nav { margin-left: 0; justify-content: center; }
  .top nav a { padding: 9px 8px; font-size: 15px; }
  .demo { padding: 20px 10px 24px; border-radius: 24px; }
  .picks { gap: 2px; }
  .clado-node, .clado-root { font-size: 12.5px; padding: 3px 7px; }
  .clado .bub { width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float, .bub { animation: none; }
  .pick, .pick .bub, .faq summary::after { transition: none; }
}
