/* ==========================================================================
   THE HAVEN — thehaven.it
   Foglio di stile unico per index.html e trasparenza.html
   Direzione creativa: navy profondo, oro come firma, serif per l'autorevolezza.
   ========================================================================== */

/* --------------------------------------------------------------- 1. Token */

:root {
  --navy:        #0B1622;
  --navy-2:      #10233A;
  --navy-3:      #0E1C2E;
  --gold:        #C9A15F;
  --gold-soft:   #E0C48F;
  --green:       #3E5C46;
  --paper:       #F3F0E8;
  --paper-2:     #E9E4D8;
  --ink:         #0B1622;
  --ink-dim:     #4A5A6A;
  --text-dim:    #9BA8B8;
  --rule-gold:   rgba(201, 161, 95, .28);
  --rule-light:  rgba(255, 255, 255, .10);
  --rule-dark:   rgba(11, 22, 34, .14);

  --maxw:        1200px;
  --gutter:      clamp(1.25rem, 5vw, 4rem);
  --band-y:      clamp(4rem, 9vw, 8.5rem);

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ----------------------------------------------------------- 2. Azzeramento */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: clamp(1rem, .45vw + .9rem, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; font-family: var(--font-display); }
p  { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; }
a  { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------------------------------------------------- 3. Impianto di pagina */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: var(--band-y); position: relative; }

.band--navy   { background: var(--navy);    color: var(--paper); }
.band--navy-2 { background: var(--navy-2);  color: var(--paper); }
.band--paper  { background: var(--paper);   color: var(--ink); }

.band--paper .lede,
.band--paper .card p { color: var(--ink-dim); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--gold);
  color: var(--navy);
  padding: .75rem 1.25rem;
  font-weight: 500;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* ------------------------------------------------------ 4. Elementi comuni */

/* Etichetta di sezione: filetto + testo mono spaziato */
.eyebrow {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1.5rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  flex: none;
  background: var(--gold);
}
.band--paper .eyebrow { color: var(--green); }
.band--paper .eyebrow::before { background: var(--green); }

.section-title {
  font-size: clamp(1.75rem, 3.1vw, 2.6rem);
  max-width: 34ch;
  letter-spacing: -.01em;
}

.lede {
  margin-top: 1.5rem;
  max-width: 56ch;
  color: var(--text-dim);
  font-size: 1.0625rem;
}

.rule {
  height: 1px;
  border: 0;
  margin: clamp(2rem, 4vw, 3.5rem) 0;
  background: var(--rule-gold);
}

/* Griglia di card che si adatta senza media query dedicate */
.card-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.card-grid--4 { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

.card h3 {
  font-size: 1.3rem;
  margin-bottom: .75rem;
}
.card p { margin: 0; color: var(--text-dim); font-size: .975rem; }

.card-label {
  display: block;
  margin-bottom: .9rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.band--paper .card-label { color: var(--green); }

/* Pannello: il blocco navy-2 usato per i gruppi di card */
.panel {
  background: var(--navy-2);
  padding: clamp(1.75rem, 3.5vw, 3rem);
}
.band--paper .panel { color: var(--paper); }
.band--paper .panel p { color: var(--text-dim); }
.band--paper .panel .card-label { color: var(--gold); }

/* Pulsanti */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .95rem 1.75rem;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--gold);
  transition: background-color .18s ease, color .18s ease;
}
.btn--gold  { background: var(--gold); color: var(--navy); }
.btn--gold:hover  { background: var(--gold-soft); }
.btn--ghost { background: transparent; color: var(--paper); }
.btn--ghost:hover { background: rgba(201, 161, 95, .14); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 2.25rem;
}
.btn-row .btn + .btn { border-left: 0; }

@media (max-width: 30rem) {
  .btn-row { flex-direction: column; gap: .75rem; }
  .btn-row .btn + .btn { border-left: 1px solid var(--gold); }
}

/* --------------------------------------------------------- 5. Intestazione */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 22, 34, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  flex: none;
}
.brand svg { width: 1.4rem; height: 2rem; flex: none; }
.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: .06em;
  line-height: 1.1;
}
.brand-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .2em;
  color: var(--gold);
  text-transform: uppercase;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-list a {
  text-decoration: none;
  font-size: .95rem;
  color: var(--paper);
  padding-block: .35rem;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.nav-list a:hover { color: var(--gold); }
.nav-list a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }

.header-cta { flex: none; padding: .7rem 1.4rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }

/* Menu mobile senza JavaScript: checkbox + label */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; }

@media (max-width: 60rem) {
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    padding: .6rem;
    cursor: pointer;
    border: 1px solid var(--rule-gold);
    order: 3;
  }
  .nav-toggle-label span { display: block; height: 1.5px; background: var(--paper); }

  .site-nav {
    order: 4;
    flex-basis: 100%;
    display: none;
    padding-bottom: 1.5rem;
  }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .nav-toggle:focus-visible ~ .nav-toggle-label { outline: 2px solid var(--gold); outline-offset: 3px; }

  .nav-list { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .nav-list a { display: block; padding: .6rem 0; width: 100%; }

  .header-inner { flex-wrap: wrap; padding-block: .75rem; }
  .header-cta { order: 2; }
}

@media (max-width: 34rem) {
  .header-cta { display: none; }
}

/* ---------------------------------------------------------------- 6. Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(3.5rem, 7vw, 6rem);
  background:
    radial-gradient(58rem 40rem at 78% 18%, rgba(62, 92, 70, .30), transparent 70%),
    radial-gradient(44rem 32rem at 12% 88%, rgba(16, 35, 58, .85), transparent 72%),
    var(--navy);
}

.hero-inner {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
}

.hero-eyebrow { margin-bottom: 1.75rem; }

.hero h1 {
  font-size: clamp(2.25rem, 5.4vw, 4rem);
  letter-spacing: -.02em;
  max-width: 26ch;
}
.hero h1 em { font-style: normal; color: var(--gold); }

.hero .lede { font-size: clamp(1.05rem, .5vw + .95rem, 1.2rem); max-width: 46ch; }

@media (max-width: 56rem) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 20rem; margin-inline: auto; }
}

/* Hub neurale: anelli concentrici e nodi pulsanti */
.hub { display: block; width: 100%; height: auto; }
.hub-ring-outer { animation: hub-spin 64s linear infinite; transform-origin: 50% 50%; }
.hub-ring-mid   { animation: hub-spin 42s linear infinite reverse; transform-origin: 50% 50%; }
.hub-node       { animation: hub-pulse 3.4s ease-in-out infinite; transform-origin: center; }
.hub-node:nth-of-type(2) { animation-delay: .45s; }
.hub-node:nth-of-type(3) { animation-delay: .9s; }
.hub-node:nth-of-type(4) { animation-delay: 1.35s; }
.hub-node:nth-of-type(5) { animation-delay: 1.8s; }
.hub-node:nth-of-type(6) { animation-delay: 2.25s; }

@keyframes hub-spin  { to { transform: rotate(360deg); } }
@keyframes hub-pulse {
  0%, 100% { opacity: .45; r: 4; }
  50%      { opacity: 1;   r: 6; }
}

/* ---------------------------------------------------- 7. Fascia statistiche */

.stats {
  background: var(--navy-2);
  border-block: 1px solid var(--rule-light);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
.stat {
  padding: clamp(1.75rem, 3vw, 2.75rem) 1.25rem;
  text-align: center;
  border-left: 1px solid var(--rule-light);
}
.stat:first-child { border-left: 0; }
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.6vw, 2.3rem);
  color: var(--gold-soft);
  line-height: 1.1;
}
.stat-label {
  display: block;
  margin-top: .65rem;
  font-size: .74rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-dim);
}

@media (max-width: 44rem) {
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule-light); }
}

/* ------------------------------------------------------- 8. Pilastri (01–04) */

.pillars-rule {
  height: 1px;
  border: 0;
  background: var(--gold);
  opacity: .5;
  margin: clamp(2rem, 4vw, 3rem) 0 clamp(1.75rem, 3.5vw, 2.75rem);
}

/* --------------------------------------------------------- 9. Mercato TAM/SAM/SOM */

.metric {
  border-left: 2px solid var(--green);
  padding-left: 1.5rem;
}
.metric-key {
  display: block;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .18em;
  color: var(--green);
  text-transform: uppercase;
}
.metric-value {
  display: block;
  margin: .5rem 0 .75rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1;
}
.metric p { color: var(--ink-dim); font-size: .975rem; margin: 0; }

/* ------------------------------------------------------------ 10. Roadmap */

.timeline {
  list-style: none;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-left: 1.75rem;
  border-left: 1px solid var(--rule-gold);
}
.timeline li { position: relative; padding-bottom: clamp(2rem, 3.5vw, 2.75rem); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1.75rem - 5px);
  top: .55rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(201, 161, 95, .55);
  animation: marker-pulse 2.8s ease-out infinite;
}
.timeline li:nth-child(2)::before { animation-delay: .4s; }
.timeline li:nth-child(3)::before { animation-delay: .8s; }
.timeline li:nth-child(4)::before { animation-delay: 1.2s; }
.timeline li:nth-child(5)::before { animation-delay: 1.6s; }

.timeline-year {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold-soft);
  margin-bottom: .4rem;
}
.timeline p { margin: 0; color: var(--text-dim); max-width: 52ch; }

@keyframes marker-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(201, 161, 95, .55); }
  70%  { box-shadow: 0 0 0 12px rgba(201, 161, 95, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 161, 95, 0); }
}

/* ------------------------------------------------------- 11. CTA investitori */

.cta {
  background: linear-gradient(100deg, var(--navy-2), var(--navy-3));
  border-block: 1px solid var(--rule-gold);
}
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.cta h2 { font-size: clamp(1.6rem, 2.9vw, 2.3rem); max-width: 24ch; }
.cta p  { margin: 1rem 0 0; color: var(--text-dim); max-width: 46ch; }

/* --------------------------------------------------------------- 12. Footer */

.site-footer {
  background: var(--navy);
  border-top: 1px solid var(--rule-light);
  padding-block: clamp(3rem, 5vw, 4.5rem) 2rem;
  font-size: .925rem;
}
.footer-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.footer-grid h2 {
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: .55rem; }
.footer-grid a { text-decoration: none; color: var(--text-dim); }
.footer-grid a:hover { color: var(--gold); text-decoration: underline; }
.footer-grid p { color: var(--text-dim); }

.footer-legal {
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule-light);
  font-size: .8rem;
  line-height: 1.75;
  color: var(--text-dim);
}
.footer-legal strong { color: var(--paper); font-weight: 500; }
.footer-legal a { color: var(--gold); }
.footer-legal .footer-transparency {
  display: inline-block;
  margin-top: .5rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-gold);
  padding-bottom: 2px;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  font-size: .78rem;
  color: var(--text-dim);
}

/* ============================================================ TRASPARENZA */

.doc { background: var(--paper); }
.doc-index, .doc-body { color: var(--ink); }

.doc-hero {
  background: var(--navy);
  color: var(--paper);
  padding-block: clamp(3rem, 6vw, 5rem);
}
.doc-hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 30ch; }
.doc-hero .lede { max-width: 62ch; }

/* Indice di pagina */
.doc-index {
  background: var(--paper-2);
  border-block: 1px solid var(--rule-dark);
  padding-block: 1.5rem;
}
.doc-index h2 {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: .9rem;
}
.doc-index ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  counter-reset: idx;
}
.doc-index li { counter-increment: idx; }
.doc-index a { text-decoration: none; border-bottom: 1px solid var(--rule-dark); }
.doc-index a::before { content: "§" counter(idx) " · "; font-family: var(--font-mono); color: var(--green); }
.doc-index a:hover { border-bottom-color: var(--green); }

.doc-body { padding-block: clamp(3rem, 6vw, 5rem); }

.doc-section { margin-bottom: clamp(3rem, 6vw, 5rem); }
.doc-section > h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  padding-bottom: .85rem;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 2rem;
}
.doc-section h3 {
  font-size: 1.2rem;
  margin: 2.25rem 0 .9rem;
  color: var(--green);
}
.doc-section h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  margin: 1.5rem 0 .5rem;
}
.doc-section p, .doc-section li { color: var(--ink-dim); }
.doc-section > p:first-of-type { color: var(--ink); }

/* Liste di dettaglio dell'oggetto sociale */
.doc-list { padding-left: 2.25rem; margin-bottom: 1rem; }
.doc-list li { margin-bottom: .5rem; }
.doc-list--plain { list-style: none; padding-left: 0; }

/* Coppie chiave/valore dei dati anagrafici */
.data-list {
  display: grid;
  grid-template-columns: minmax(11rem, 16rem) 1fr;
  gap: 0;
  margin: 0 0 1.5rem;
  border-top: 1px solid var(--rule-dark);
}
.data-list dt,
.data-list dd {
  margin: 0;
  padding: .8rem 0;
  border-bottom: 1px solid var(--rule-dark);
}
.data-list dt {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green);
  padding-right: 1.5rem;
}
.data-list dd { color: var(--ink); }

@media (max-width: 40rem) {
  .data-list { grid-template-columns: 1fr; }
  .data-list dt { border-bottom: 0; padding-bottom: .2rem; }
  .data-list dd { padding-top: 0; }
}

/* Tabella soci */
.table-scroll { overflow-x: auto; margin-bottom: 1rem; }
.data-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: .95rem;
}
.data-table caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  padding-bottom: .75rem;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: .8rem 1.5rem .8rem 0;
  border-bottom: 1px solid var(--rule-dark);
  vertical-align: top;
}
.data-table thead th {
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.data-table tfoot td {
  border-bottom: 0;
  border-top: 1px solid var(--ink);
  font-weight: 500;
  color: var(--ink);
}
.data-table .num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.data-table th:last-child,
.data-table td:last-child { padding-right: 0; }
.data-table .cf { display: block; font-family: var(--font-mono); font-size: .8rem; color: var(--ink-dim); }

/* Riquadro nota / fonte */
.note {
  background: var(--paper-2);
  border-left: 2px solid var(--green);
  padding: 1.1rem 1.35rem;
  margin: 1.5rem 0;
  font-size: .925rem;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--ink); }

/* Esito negativo dichiarato (partecipate, privative) */
.declared-none {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  border: 1px solid var(--rule-dark);
  border-left: 2px solid var(--gold);
  padding: 1.1rem 1.35rem;
  margin-bottom: 1.25rem;
}

/* Schede CV */
.cv { border-top: 1px solid var(--rule-dark); padding-top: 1.5rem; margin-bottom: 2rem; }
.cv h4 { font-family: var(--font-display); font-size: 1.15rem; margin-top: 0; }
.cv-role {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: .75rem;
}

/* Segnaposto: deve essere impossibile pubblicarlo per errore */
.todo {
  background: #FFE9A8;
  border: 1px dashed #A9761B;
  color: #5C3D00;
  padding: .1rem .4rem;
  font-family: var(--font-mono);
  font-size: .85em;
}

.doc-source {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-dark);
  font-size: .85rem;
  color: var(--ink-dim);
}

/* --------------------------------------------- 13. Movimento ridotto & stampa */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  :root { --gutter: 0; }
  html { font-size: 10.5pt; }
  body, body.doc { background: #fff; color: #000; }

  .site-header, .site-footer, .doc-index, .skip-link, .btn { display: none !important; }

  .doc-hero { background: #fff !important; color: #000 !important; padding-block: 0 1.5rem; }
  .doc-hero .lede, .doc-section p, .doc-section li, .data-list dd { color: #000 !important; }
  .doc-hero .eyebrow, .doc-index h2, .doc-section h3, .data-list dt,
  .data-table caption, .metric-key { color: #000 !important; }
  .doc-hero .eyebrow::before { background: #000 !important; }

  .doc-body { padding-block: 0; }
  .doc-section { margin-bottom: 1.5rem; }
  .cv, .note, .declared-none, .data-list, tr { page-break-inside: avoid; }
  .doc-section > h2 { border-bottom: 1.5pt solid #000; page-break-after: avoid; }
  .doc-section h3, .doc-section h4, .cv h4 { page-break-after: avoid; }

  .note, .declared-none { background: #fff; border: 1pt solid #000; }
  .data-table { min-width: 0; font-size: 9.5pt; }
  .table-scroll { overflow: visible; }
  .todo { background: #fff; border: 1.5pt solid #000; }

  a { text-decoration: none; color: #000; }
  .doc-body a[href^="http"]::after,
  .doc-body a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
