/* Sito neuroiride.com. Stessa identità della piattaforma: tema scuro, Inter e Proza Libre servite in locale. */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Proza Libre"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/proza-libre-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Proza Libre"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/proza-libre-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #050533;
  --bg-2: #0b0b3f;
  --line: #22266a;
  --text: #fffbf6;
  --muted: #b3badf;
  --pervinca: #a7b1ff;
  --blue: #1e32ff;
  --lilla: #d49bf5;
  --sabbia: #f2c29b;
  --rosa: #f59ab5;
  --corallo: #ff6a4d;
  --iride: linear-gradient(90deg, #1e32ff, #a7b1ff 42%, #d49bf5 72%, #ff6a4d);
  --display: "Proza Libre", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 3.2vw, 2.5rem);
  --step-4: clamp(2.3rem, 5.2vw, 3.9rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: var(--step-0); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--pervinca); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--pervinca); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); letter-spacing: -.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--bg-2); padding: .5rem .8rem; }

/* Barra in alto con la linea iride, come nella piattaforma */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: rgba(5, 5, 51, .92); backdrop-filter: blur(8px); }
.topbar::after { content: ""; display: block; height: 2px; background: var(--iride); opacity: .8; }
.bar { display: flex; align-items: center; gap: 1.6rem; padding-block: .85rem; }
.brand img { display: block; height: 34px; width: auto; }
.nav { display: flex; gap: 1.3rem; flex-wrap: nowrap; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { box-shadow: 0 2px 0 var(--pervinca); }
.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; color: var(--text); border: 1px solid var(--line); padding: .4rem .8rem; border-radius: 8px; font-size: .95rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 0; top: calc(100% + .5rem); background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: .6rem; display: grid; min-width: 15rem; }
.menu nav a { color: var(--text); text-decoration: none; padding: .55rem .7rem; border-radius: 8px; }
.menu nav a:hover, .menu nav a[aria-current="page"] { background: #16175a; }
.menu .menu-app { color: var(--pervinca); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--blue); color: #fff; text-decoration: none; font-weight: 600;
  padding: .8rem 1.35rem; border-radius: 10px; border: 1px solid var(--blue); line-height: 1.2;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: #3346ff; color: #fff; }
.btn-ghost { background: transparent; color: var(--pervinca); border-color: #3a3f8f; }
.btn-ghost:hover { background: #10114d; color: var(--text); border-color: var(--pervinca); }
.btn-small { padding: .5rem .95rem; font-size: .95rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }

.eyebrow { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--pervinca); font-weight: 600; }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 40rem; line-height: 1.55; }
.fineprint, .note { font-size: .9rem; color: var(--muted); }
.more { font-weight: 600; text-decoration: none; }
.more::after { content: " →"; }

main { display: grid; gap: clamp(3.5rem, 8vw, 6.5rem); padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem); }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-text { display: grid; gap: 1.4rem; }
.hero-figure { margin: 0; display: grid; gap: .6rem; }
.hero-figure figcaption { font-size: .85rem; color: var(--muted); max-width: 30rem; }
.radar { width: 100%; height: auto; font-family: var(--body); }
.radar .r-line { stroke-dasharray: 400; stroke-dashoffset: 0; animation: disegna 1.4s ease-out both; }
@keyframes disegna { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }

.band { border-block: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 4rem); position: relative; }
.band::before { content: ""; position: absolute; left: 0; top: -1px; width: min(220px, 40%); height: 2px; background: var(--iride); }
.why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1.2rem 3rem; align-items: start; }
.why h2 { grid-row: span 3; }
.why p { max-width: 42rem; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid3 article { display: grid; gap: .7rem; align-content: start; }
.kicker { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sabbia); font-weight: 600; }
.grid3 article:nth-child(2) .kicker { color: var(--lilla); }
.grid3 article:nth-child(3) .kicker { color: var(--rosa); }
.grid3 p:not(.kicker) { color: var(--muted); }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.split > div { display: grid; gap: 1rem; align-content: start; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.5rem, 3vw, 2.2rem); }
.split p { color: var(--muted); }
.split h2 { font-size: var(--step-2); }

/* Pagine interne */
.page-head { display: grid; gap: 1.1rem; max-width: 50rem; }
.prose { display: grid; gap: 1.1rem; max-width: 42rem; }
.prose h2 { font-size: var(--step-2); margin-top: 1.6rem; }
.prose p { color: #e6e7f5; }
.prose em { font-style: italic; }

/* Saggio */
.essay-page main { justify-items: center; }
.essay-head { text-align: left; width: 100%; max-width: 42rem; }
.essay-head h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.byline { color: var(--muted); font-size: .95rem; }
.essay { font-size: 1.12rem; line-height: 1.75; gap: 1.3rem; }
.essay > p:first-child::first-letter {
  font-family: var(--display); font-weight: 700; float: left; font-size: 3.6em; line-height: .9;
  padding: .06em .12em 0 0; background: var(--iride); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.essay h2 { font-size: 1.45rem; color: var(--pervinca); }

/* Metodo: famiglie */
.families { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.family { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem 1.5rem; display: grid; gap: .9rem; align-content: start; }
.family h3 { display: flex; align-items: center; gap: .6rem; }
.family h3::before { content: ""; width: .8rem; height: .8rem; border-radius: 50%; background: var(--fc); flex-shrink: 0; }
.fam-attenzione { --fc: var(--pervinca); }
.fam-sociale { --fc: var(--lilla); }
.fam-apprendimento { --fc: var(--sabbia); }
.fam-adattamento { --fc: var(--rosa); }
.family ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.family li { display: grid; gap: .1rem; border-top: 1px solid var(--line); padding-top: .55rem; }
.family li strong { color: var(--fc); font-weight: 600; }
.family li span { color: var(--muted); font-size: .92rem; }
.families + .note { max-width: 50rem; margin-top: -2.5rem; }

/* Lifeology e contatti */
.team { display: grid; gap: 1.4rem; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.team-grid article { border-top: 2px solid var(--line); padding-top: 1rem; display: grid; gap: .5rem; align-content: start; }
.team-grid p { color: var(--muted); }
.contact-box { display: grid; gap: 1rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.5rem, 3vw, 2.2rem); max-width: 50rem; }
.contact-box p { color: var(--muted); }

.footer { border-top: 1px solid var(--line); background: #040428; }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem 3rem; padding-block: 2.5rem; font-size: .92rem; color: var(--muted); }
.foot > div:first-child { display: grid; gap: .8rem; max-width: 30rem; }
.foot img { height: 28px; width: auto; }
.foot-links { display: grid; gap: .45rem; justify-items: start; }
.foot-links a { color: var(--muted); }
.legal { grid-column: 1 / -1; font-size: .82rem; opacity: .8; border-top: 1px solid var(--line); padding-top: 1.2rem; }

@media (max-width: 1060px) {
  .nav { display: none; }
  .menu { display: block; }
  .bar { gap: .8rem; }
}
@media (max-width: 860px) {
  .hero, .why, .split, .families, .team-grid, .grid3, .foot { grid-template-columns: minmax(0, 1fr); }
  .why h2 { grid-row: auto; }
  .hero-figure { max-width: 520px; }
  .families + .note { margin-top: -1.5rem; }
}
@media (max-width: 480px) {
  .login { display: none; }
  .brand img { height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .radar .r-line { animation: none; }
  .btn { transition: none; }
}

/* Immagini dello spettro */
.essay-figure, .why-figure { margin: .6rem 0; display: grid; gap: .55rem; }
.essay-figure img, .why-figure img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: #000; }
.essay-figure figcaption, .why-figure figcaption { font-size: .88rem; color: var(--muted); }

/* Chi sono: ritratto */
.person-head { max-width: none; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); }
.portrait { margin: 0; }
.portrait img { width: 100%; height: auto; display: block; }
.person-text { display: grid; gap: 1.1rem; }
.lead a, .eyebrow a { color: inherit; text-decoration-color: var(--pervinca); }

/* Lifeology: logo e fascia */
.lifeology-band { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: center; border-block: 1px solid var(--line); padding-block: clamp(2rem, 5vw, 3rem); }
.lifeology-band p { color: var(--muted); max-width: 40rem; margin-bottom: 1.1rem; }
.lifeology-logo img { width: 100%; max-width: 280px; height: auto; display: block; }
.head-logo img { max-width: 340px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.foot-lifeology { display: grid; gap: .5rem; align-content: start; justify-items: start; text-decoration: none; color: var(--muted); font-size: .82rem; }
.foot-lifeology img { height: 26px; width: auto; }
.foot { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr) minmax(0, .7fr); }
@media (max-width: 860px) {
  .person-head, .lifeology-band, .foot { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 240px; }
}
