/* =========================================================
   Supernova Academy — "Il dossier che ti rassicura"
   Light, institutional, typography-driven. ink + teal + amber.
   Mobile-first.
   ========================================================= */

:root {
  /* Surfaces */
  --paper:        oklch(0.973 0.008 95);
  --paper-2:      oklch(0.945 0.013 92);
  --tint:         oklch(0.955 0.022 195);   /* cool benessere tint */

  /* Ink / text */
  --ink:          oklch(0.255 0.030 255);
  --ink-soft:     oklch(0.430 0.022 255);
  --ink-faint:    oklch(0.500 0.020 255);

  /* Brand */
  --teal:         oklch(0.520 0.085 195);
  --teal-deep:    oklch(0.400 0.072 200);   /* AA-safe text on paper */
  --teal-tint:    oklch(0.915 0.034 195);
  --amber:        oklch(0.720 0.155 55);
  --amber-deep:   oklch(0.560 0.135 50);

  /* Lines */
  --line:         oklch(0.880 0.012 95);
  --line-strong:  oklch(0.805 0.016 95);
  --ink-line:     oklch(0.400 0.030 250);   /* hairlines inside dark (ink) surfaces */

  /* On-ink (dark section) */
  --on-ink:       oklch(0.955 0.010 95);
  --on-ink-soft:  oklch(0.790 0.018 220);

  --maxw: 1140px;
  --pad: clamp(1.15rem, 5vw, 2.5rem);
  --radius: 14px;
  --radius-sm: 10px;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.002em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--on-ink);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.btn-primary {
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: 0 1px 0 rgba(20,32,46,.06);
}
.btn-primary:hover { background: oklch(0.32 0.04 250); transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(20,32,46,.55); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-deep); transform: translateY(-2px); }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklch, var(--paper) 96%, transparent);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s var(--ease), background-color .25s var(--ease);
}
.site-header.scrolled {
  background: var(--paper);
  box-shadow: 0 8px 28px -22px rgba(20,32,46,.5);
}
.header-inner {
  display: flex; align-items: center; gap: 1rem;
  height: 66px;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.18rem;
  margin-right: auto;
}
.brand-mark { display: inline-flex; color: var(--amber); flex: none; }
.brand-mark svg { fill: currentColor; }
.brand-name-soft { color: var(--ink-faint); font-weight: 600; }

.nav-desktop { display: none; }
.header-cta { display: none; }

.hamburger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
  padding: 0 11px;
}
.hamburger-bar { height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Mobile menu (full overlay) ---------------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--paper);
  padding: calc(66px + 2rem) var(--pad) 2rem;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
  overflow-y: auto;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu-inner { display: flex; flex-direction: column; gap: .25rem; border-top: 1px solid var(--line); }
.mobile-menu-inner a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  padding: 1rem .25rem;
  border-bottom: 1px solid var(--line);
}
.mobile-menu-inner a:active { color: var(--teal-deep); }
.mobile-cta { margin-top: 1.5rem; border-bottom: none !important; color: var(--on-ink) !important; min-height: 52px; }

/* ---------------- Hero ---------------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-glow {
  position: absolute; z-index: -1; inset: 0;
  background:
    radial-gradient(60% 50% at 78% 8%, oklch(0.82 0.13 60 / .38), transparent 70%),
    radial-gradient(55% 55% at 12% 0%, oklch(0.80 0.08 200 / .30), transparent 70%);
  pointer-events: none;
}
.hero-inner { padding-top: clamp(3.2rem, 9vw, 6rem); padding-bottom: clamp(3rem, 8vw, 5.5rem); }

.eyebrow {
  display: inline-block;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 1.1rem;
}
.hero-title {
  font-size: clamp(2.5rem, 9vw, 4.7rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 13ch;
}
.hero-sub {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 2.6vw, 1.28rem);
  color: var(--ink-soft);
  max-width: 56ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-actions .btn { min-height: 52px; }

.trust-chips {
  list-style: none; margin: 2.6rem 0 0; padding: 1.6rem 0 0;
  border-top: 1px solid var(--line-strong);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.trust-chips li { display: flex; flex-direction: column; gap: .15rem; }
.chip-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 5vw, 1.9rem); letter-spacing: -0.02em; color: var(--ink); }
.chip-label { font-size: .82rem; color: var(--ink-faint); line-height: 1.3; }

/* ---------------- Sections ---------------- */
.section { padding-block: clamp(3.5rem, 9vw, 6rem); border-top: 1px solid var(--line); }
.section-tint { background: var(--tint); }
.section-ink { background: var(--ink); color: var(--on-ink); border-top-color: transparent; }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-label {
  font-weight: 700; font-size: .8rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--teal-deep);
  display: inline-flex; align-items: center; gap: .55rem;
  margin-bottom: .9rem;
}
.section-label::before { content: ""; width: 26px; height: 2px; background: var(--amber); display: inline-block; }
.section-label-light { color: var(--on-ink-soft); }
.section-title { font-size: clamp(1.7rem, 4.7vw, 2.6rem); letter-spacing: -0.025em; max-width: 18ch; }
.section-ink .section-title { color: var(--on-ink); }
.section-intro { margin-top: 1.1rem; font-size: clamp(1rem, 2.3vw, 1.14rem); color: var(--ink-soft); }
.section-intro-light { color: var(--on-ink-soft); }

/* ---------------- Chi siamo ---------------- */
.prose-grid { display: grid; gap: 2rem; }
.prose-main p { font-size: 1.08rem; color: var(--ink-soft); }
.prose-main p + p { margin-top: 1.1rem; }
.prose-side {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  align-self: start;
}
.facts { margin: 0; display: grid; gap: 0; }
.facts > div { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: none; }
.facts dt { color: var(--ink-faint); font-size: .92rem; margin: 0; }
.facts dd { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; text-align: right; }

/* ---------------- Cards ---------------- */
.cards-3 { display: grid; gap: 1.1rem; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -28px rgba(20,32,46,.5); border-color: var(--line-strong); }
.card-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--teal-tint); color: var(--teal-deep);
  margin-bottom: 1.1rem;
}
.card h3 { font-size: 1.22rem; margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: 1rem; }
.cards-foot { margin-top: 1.6rem; color: var(--ink-faint); font-size: .98rem; }

/* ---------------- Metodo ---------------- */
.method-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.method-list li { display: flex; gap: 1.1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.method-list li:first-child { border-top: 1px solid var(--line); }
.method-mark { flex: none; width: 13px; height: 13px; margin-top: .5rem; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px var(--teal-tint); }
.method-list h3 { font-size: 1.18rem; margin-bottom: .25rem; }
.method-list p { color: var(--ink-soft); }

/* ---------------- Valori (ink) ---------------- */
.values-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--ink-line); border-radius: var(--radius);
  overflow: hidden;
}
.values-grid li {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em;
  color: var(--on-ink);
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--ink-line);
  border-right: 1px solid var(--ink-line);
  display: flex; align-items: center; gap: .6rem;
}
.values-grid li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); flex: none; }
.values-grid li:nth-child(2n) { border-right: none; }
.values-grid li:nth-last-child(-n+2) { border-bottom: none; }

/* ---------------- Team / Percorso ---------------- */
.path { list-style: none; margin: 0 0 2.4rem; padding: 0; display: grid; gap: 1.1rem; counter-reset: step; }
.path-step {
  position: relative;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem;
}
.path-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  margin-bottom: .9rem;
  counter-increment: step;
}
.path-dot::after { content: counter(step); font-family: var(--font-display); font-weight: 700; font-size: .9rem; }
.path-step h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.path-step p { color: var(--ink-soft); }

.team-cta {
  display: flex; flex-direction: column; gap: 1.1rem; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 1.7rem;
}
.team-cta-text { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.015em; max-width: 40ch; }
.team-cta .btn { min-height: 52px; }

/* ---------------- Contatti ---------------- */
.contact-grid { display: grid; gap: 1.1rem; }
.contact-item {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.contact-label { font-size: .8rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--teal-deep); font-weight: 700; margin-bottom: .45rem; }
.contact-value { font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.015em; color: var(--ink); overflow-wrap: break-word; -webkit-user-select: all; user-select: all; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding-block: 2.6rem; }
.footer-brand { display: flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.footer-meta { margin-top: .8rem; color: var(--ink-soft); max-width: 48ch; }
.footer-bottom { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; align-items: center; }
.footer-copy { color: var(--ink-faint); font-size: .9rem; }
.footer-credit { color: var(--ink-faint); font-size: .82rem; }
.footer-credit a { color: var(--teal-deep); font-weight: 600; text-decoration: none; border-bottom: 1px solid color-mix(in oklch, var(--teal-deep) 35%, transparent); }
.footer-credit a:hover { border-bottom-color: var(--teal-deep); }

/* ---------------- Reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(16px); animation: reveal .7s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes reveal { to { opacity: 1; transform: none; } }

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

/* ---------------- Breakpoints ---------------- */
@media (min-width: 600px) {
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .path { grid-template-columns: repeat(3, 1fr); }
  .team-cta { flex-direction: row; align-items: center; justify-content: space-between; }
  .team-cta-text { margin-right: auto; }
}

@media (min-width: 860px) {
  body { font-size: 18px; }
  .prose-grid { grid-template-columns: 1.7fr 1fr; gap: 3.2rem; }
  .values-grid { grid-template-columns: repeat(4, 1fr); }
  .values-grid li:nth-child(2n) { border-right: 1px solid var(--ink-line); }
  .values-grid li:nth-child(4n) { border-right: none; }
  .values-grid li:nth-last-child(-n+4) { border-bottom: none; }
  .method-list { grid-template-columns: 1fr 1fr; gap: 0 3rem; }
  .method-list li:nth-child(2) { border-top: 1px solid var(--line); }
}

@media (min-width: 940px) {
  .nav-desktop { display: flex; align-items: center; gap: 1.5rem; margin-right: 1.4rem; }
  .nav-desktop a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .98rem; transition: color .15s var(--ease); position: relative; }
  .nav-desktop a:hover { color: var(--ink); }
  .nav-desktop a::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--amber); transition: width .2s var(--ease); }
  .nav-desktop a:hover::after { width: 100%; }
  .header-cta { display: inline-flex; }
  .hamburger { display: none; }
}

@media (min-width: 1040px) {
  .hero-title { font-size: clamp(3.4rem, 6vw, 5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  * { transition-duration: .01ms !important; }
}
