/* Caratteri ospitati sul sito: nessuna chiamata a servizi esterni */
@font-face { font-family: "Sora"; font-style: normal; font-weight: 100 800; font-display: swap; src: url(fonts/sora.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter.woff2) format("woff2"); }

/* Palette: per cambiare combinazione basta modificare queste righe */
:root {
  --navy: #0B1D4D;
  --navy-soft: #18306B;
  --gold: #E9B44C;
  --gold-hover: #F2C366;
  --gold-deep: #D9A136;
  --white: #FFFFFF;
  --mist: #EDF0F8;
  --body: #3E4A66;
  --line: #D8DDE9;
  --on-navy: #C8D0EA;
  --on-gold: #24335E;
  --display: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --text: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--body); font-family: var(--text); font-size: 17px; line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); color: var(--navy); margin: 0; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.025em; font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); line-height: 1.12; letter-spacing: -0.02em; font-weight: 600; }
h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.band { padding-block: clamp(64px, 9vw, 120px); }
.band-mist { background: var(--mist); }
.band-navy { background: var(--navy); color: var(--on-navy); }
.band-navy h2, .band-navy h3 { color: var(--white); }
.lead { font-size: 1.15rem; max-width: 34em; }
.section-head { max-width: 40em; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p { margin-top: 16px; }

/* Segnaposto da completare prima di pubblicare */
.todo { background: #FFF6D6; color: #5B4700; outline: 2px dashed #C99A12; outline-offset: 2px; padding: 0 6px; border-radius: 4px; font-weight: 600; }
p.todo { padding: 12px 16px; margin-bottom: 28px; }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; transition: transform .15s ease, background-color .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-hover); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-soft); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: .95rem; }
.text-link { color: var(--white); font-weight: 600; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--gold); }

/* Testata e hero */
.top { background: var(--navy); color: var(--on-navy); position: relative; overflow: hidden; }
.site-header { position: relative; z-index: 3; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--white); }
.brand-mark { width: 56px; height: 56px; flex: none; border-radius: 50%; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.1rem; line-height: 1.15; }
.brand-role { display: block; margin-top: 2px; font-family: var(--text); font-weight: 400; font-size: .8rem; color: var(--on-navy); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav a:not(.btn) { color: var(--white); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav a:not(.btn):hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.menu-toggle { display: none; }

.hero { position: relative; z-index: 2; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; padding-block: clamp(40px, 7vw, 96px) clamp(64px, 9vw, 128px); }
.hero h1 { color: var(--white); max-width: 11em; }
.hero .lead { margin-top: 24px; color: var(--on-navy); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 36px; }
.hero-note { margin-top: 24px; font-size: .92rem; color: var(--on-navy); max-width: 32em; }
.hero-arc { position: absolute; z-index: 1; bottom: -170px; right: -170px; width: 700px; height: 700px; color: var(--gold); transform-origin: 100% 100%; animation: arc-in .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes arc-in { from { transform: rotate(18deg) scale(.86); opacity: 0; } to { transform: none; opacity: 1; } }

/* Calcolatore */
.calc { position: relative; z-index: 2; background: var(--white); color: var(--body); border-radius: 28px; padding: clamp(24px, 3vw, 36px); box-shadow: 0 30px 60px -30px rgba(3, 10, 30, .7); }
.calc h2 { font-size: 1.3rem; letter-spacing: -0.01em; }
.calc-field { margin-top: 22px; }
.calc-field label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .95rem; }
.calc-field output { font-family: var(--display); font-weight: 600; color: var(--navy); font-size: 1.05rem; }
input[type="range"] { width: 100%; margin: 10px 0 0; accent-color: var(--navy); height: 28px; }
.calc-result { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.calc-result p { font-size: .95rem; }
.calc-figure { display: block; font-family: var(--display); font-weight: 700; color: var(--navy); font-size: clamp(2.1rem, 4.4vw, 2.9rem); line-height: 1.1; letter-spacing: -0.02em; margin-top: 4px; }
.bars { margin-top: 20px; display: grid; gap: 14px; }
.bar-row { font-size: .9rem; }
.bar-row div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bar-row strong { color: var(--navy); font-weight: 600; white-space: nowrap; }
.bar { display: block; height: 14px; margin-top: 6px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; transition: width .35s ease; }
.bar .fill-high { background: #9AA6C4; }
.bar .fill-low { background: var(--gold); }
.calc small { display: block; margin-top: 18px; font-size: .78rem; line-height: 1.5; color: #5A6682; }

/* Tre principi */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.principle svg { width: 44px; height: 44px; color: var(--gold); margin-bottom: 20px; }
.principle p { margin-top: 10px; }

/* Chi sono */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.portrait { position: relative; aspect-ratio: 4 / 5; border-radius: 240px 240px 28px 28px; background: var(--navy); overflow: hidden; display: grid; place-items: center; text-align: center; padding: 24px; }
.portrait::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; border: 44px solid var(--gold); }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait .todo { position: relative; z-index: 1; }
.about-text p + p { margin-top: 18px; }
.about-text h2 { margin-bottom: 24px; }
.network { margin-top: 32px; padding: 22px 24px; border-left: 4px solid var(--gold); background: var(--white); border-radius: 0 16px 16px 0; font-size: .95rem; }
.network a { font-weight: 600; color: var(--navy); text-underline-offset: 4px; }

/* Metodo */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 40px); counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--navy); padding-top: 20px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--navy); font-family: var(--display); font-weight: 700; margin-bottom: 18px; }
.steps p { margin-top: 10px; font-size: .98rem; }

/* Aree */
.areas { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.18); }
.areas li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 40px; padding-block: 26px; border-bottom: 1px solid rgba(255,255,255,.18); align-items: baseline; }
.areas h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; font-family: var(--display); font-weight: 600; color: var(--navy); font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 14px; height: 14px; border-right: 2.5px solid var(--navy); border-bottom: 2.5px solid var(--navy); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq details p { padding: 0 40px 24px 0; max-width: 42em; }
.faq details a { color: var(--navy); font-weight: 600; text-underline-offset: 4px; }

/* Chiusura */
.closing { background: var(--gold); color: var(--navy); position: relative; overflow: hidden; }
.closing .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.closing p { margin-top: 16px; max-width: 30em; color: var(--on-gold); }
.closing-steps { position: absolute; right: -40px; bottom: 0; width: 340px; height: 340px; color: var(--gold-deep); }
.contact { display: grid; gap: 14px; justify-items: start; }
.contact a:not(.btn) { font-weight: 600; text-underline-offset: 4px; }

/* Footer con dati e note legali */
.site-footer { background: var(--navy); color: var(--on-navy); font-size: .88rem; line-height: 1.6; padding-block: 56px 40px; }
.site-footer a { color: var(--white); text-underline-offset: 4px; }
.footer-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px clamp(32px, 6vw, 88px); }
.footer-id { display: flex; gap: 20px; align-items: flex-start; }
.footer-id img { width: 96px; height: 96px; flex: none; border-radius: 50%; }
.site-footer h2 { font-size: 1rem; letter-spacing: 0; color: var(--white); margin-bottom: 8px; }
.site-footer address { font-style: normal; }
.footer-note { margin-top: 32px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.18); }
.footer-note p + p { margin-top: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px; }

/* Pagine legali */
.legal-top .site-header .wrap { padding-block: 20px; }
.legal { width: min(100% - 40px, 760px); margin-inline: auto; padding-block: clamp(48px, 7vw, 88px); }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal .updated { margin-top: 12px; font-size: .92rem; color: #5A6682; }
.legal h2 { font-size: 1.3rem; letter-spacing: -0.01em; margin-top: 44px; }
.legal p, .legal ul { margin-top: 14px; }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: 8px; }
.legal a { color: var(--navy); font-weight: 600; text-underline-offset: 4px; }

@media (max-width: 920px) {
  .hero .wrap, .about, .closing .wrap, .footer-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .areas li { grid-template-columns: 1fr; }
  .portrait { max-width: 340px; }
  .hero-arc { width: 520px; height: 520px; bottom: -150px; right: -190px; }
  .closing-steps { opacity: .5; }
  .menu-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.45); border-radius: 999px; font: 600 .95rem var(--display); cursor: pointer; }
  .nav { display: none; position: absolute; left: 20px; right: 20px; top: 92px; flex-direction: column; align-items: stretch; gap: 8px; padding: 20px; background: var(--white); border-radius: 20px; box-shadow: 0 24px 48px -20px rgba(3,10,30,.6); }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a:not(.btn) { display: block; padding: 12px 4px; color: var(--navy); font-size: 1.05rem; }
  .legal-top .nav { display: flex; position: static; flex-direction: row; padding: 0; background: none; box-shadow: none; }
  .legal-top .nav a:not(.btn) { color: var(--white); padding: 0; font-size: .95rem; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .site-header .btn, .contact .btn { width: auto; }
  .brand-role { display: none; }
  .brand-mark { width: 48px; height: 48px; }
  .footer-id { flex-direction: column; }
  .faq details p { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-arc { animation: none; }
  .bar i, .btn { transition: none; }
}
