/* ══════════════════════════════════════════════════
   WOLFX ACADEMY LTD, stylesheet
   Light institutional theme
   ══════════════════════════════════════════════════ */

:root {
  --paper:       #fbfaf7;
  --paper-alt:   #f4f2ec;
  --surface:     #ffffff;

  --ink:         #14171c;
  --ink-muted:   #4e535c;
  --ink-dim:     #868b94;

  --rule:        #d8d3c8;
  --rule-soft:   #e7e3da;

  --navy:        #14304f;
  --navy-deep:   #0d2340;
  --gold:        #9a7b3f;

  --wrap:        1120px;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", Times, serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

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

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.18;
  color: var(--navy-deep);
}

p { margin: 0; }

::selection {
  background: var(--navy);
  color: #ffffff;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--navy);
  color: #ffffff;
  padding: 12px 20px;
  font-family: var(--sans);
  font-size: 14px;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

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

/* ─────────── Barra superiore ─────────── */

.topbar {
  height: 4px;
  background: var(--navy-deep);
  border-bottom: 1px solid var(--gold);
}

/* ─────────── Tipografia condivisa ─────────── */

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
}

h1 em {
  font-style: italic;
  color: var(--navy);
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
}

h3 {
  font-size: 1.32rem;
  letter-spacing: -0.005em;
}

/* ─────────── Stemma ─────────── */

.crest {
  width: 34px;
  height: 38px;
  flex-shrink: 0;
}

.crest-shield {
  fill: none;
  stroke: var(--navy-deep);
  stroke-width: 2.2;
  stroke-linejoin: miter;
}

.crest-shield-inner {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  stroke-linejoin: miter;
}

.crest-mark {
  fill: none;
  stroke: var(--navy);
  stroke-width: 3;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.crest-lg {
  width: 74px;
  height: 84px;
  margin: 0 auto 30px;
}

/* ─────────── Header ─────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-soft);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--rule);
  box-shadow: 0 1px 14px rgba(20, 23, 28, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-name {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--navy-deep);
}

.logo-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.nav a {
  text-decoration: none;
  color: var(--ink-muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav a:hover {
  color: var(--navy-deep);
  border-bottom-color: var(--gold);
}

.nav .nav-cta {
  color: var(--navy-deep);
  font-weight: 600;
  border: 1px solid var(--navy-deep);
  border-bottom-color: var(--navy-deep);
  padding: 9px 20px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav .nav-cta:hover {
  background: var(--navy-deep);
  color: #ffffff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--navy-deep);
  transition: transform 0.3s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.75px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 4px 28px 26px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--sans);
}

.mobile-nav a {
  padding: 16px 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule-soft);
}

.mobile-nav a:last-child { border-bottom: 0; }

/* ─────────── Hero ─────────── */

.hero {
  padding: clamp(72px, 11vw, 132px) 0 0;
  background:
    linear-gradient(180deg, rgba(244, 242, 236, 0.75) 0%, rgba(251, 250, 247, 0) 62%);
}

.hero-inner {
  text-align: center;
  max-width: 900px;
}

.motto {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(12px, 2.1vw, 15px);
  letter-spacing: 0.2em;
  line-height: 1.9;
  text-transform: uppercase;
  color: var(--gold);
  max-width: 34ch;
  margin: 0 auto 30px;
}

.hero h1 {
  max-width: 20ch;
  margin-inline: auto;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 34px auto;
  max-width: 220px;
}

.ornament-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.ornament-lozenge {
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}

.hero-lead {
  max-width: 62ch;
  margin-inline: auto;
  font-size: clamp(1.02rem, 1.6vw, 1.12rem);
  color: var(--ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 42px;
}

/* ─────────── Fatti istituzionali ─────────── */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: clamp(64px, 9vw, 96px) 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.fact {
  padding: 26px 22px;
  text-align: center;
  border-left: 1px solid var(--rule-soft);
}

.fact:first-child { border-left: 0; }

.fact dt {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
}

.fact dd {
  margin: 0;
  font-size: 1.08rem;
  color: var(--navy-deep);
  letter-spacing: 0.02em;
}

/* ─────────── Epigrafe ─────────── */

.epigraph-band {
  padding: clamp(64px, 9vw, 104px) 0;
}

.epigraph {
  margin: 0 auto;
  max-width: 780px;
  text-align: center;
  border-left: 0;
}

.epigraph p {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--navy-deep);
}

.epigraph cite {
  display: block;
  margin-top: 26px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ─────────── Sezioni ─────────── */

.section {
  padding: clamp(72px, 10vw, 118px) 0;
  border-top: 1px solid var(--rule-soft);
}

.section-alt {
  background: var(--paper-alt);
  border-top-color: var(--rule);
}

.section-head {
  max-width: 66ch;
  margin-bottom: clamp(44px, 6vw, 68px);
}

.section-lead {
  margin-top: 22px;
  color: var(--ink-muted);
  font-size: 1.04rem;
}

/* ─────────── Facoltà ─────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.card {
  padding: 36px 32px 34px;
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-top: 2px solid var(--navy-deep);
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.card:hover {
  border-color: var(--rule);
  box-shadow: 0 6px 26px rgba(20, 23, 28, 0.06);
}

.card-num {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.card h3 { margin-bottom: 6px; }

.card-sub {
  font-style: italic;
  font-size: 0.94rem;
  color: var(--ink-dim);
  margin-bottom: 18px;
}

.card > p:not(.card-sub):not(.card-num) {
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.card-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--sans);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

.card-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}

.card-list li:last-child { margin-bottom: 0; }

.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 9px;
  height: 1px;
  background: var(--gold);
}

/* ─────────── Istruzione ─────────── */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 84px);
  align-items: start;
}

.split-text h2 { margin-bottom: 26px; }

.split-text p {
  color: var(--ink-muted);
  margin-bottom: 20px;
  max-width: 48ch;
}

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.principles li {
  display: grid;
  gap: 7px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.principle-k {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-deep);
}

.principle-v {
  color: var(--ink-muted);
  font-size: 1rem;
}

/* ─────────── Enrolment ─────────── */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
}

.service {
  background: var(--paper);
  padding: 34px 30px 36px;
  transition: background 0.3s var(--ease);
}

.service:hover { background: var(--surface); }

.service-num {
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.service h3 {
  font-size: 1.16rem;
  margin-bottom: 12px;
}

.service p {
  color: var(--ink-muted);
  font-size: 0.96rem;
}

/* ─────────── Bottoni ─────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease);
}

.btn-primary {
  background: var(--navy-deep);
  color: #ffffff;
  border-color: var(--navy-deep);
}

.btn-primary:hover {
  background: var(--navy);
  border-color: var(--navy);
}

.btn-ghost {
  border-color: var(--rule);
  color: var(--navy-deep);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--navy-deep);
  background: rgba(20, 48, 79, 0.04);
}

.btn-lg {
  padding: 17px 40px;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* ─────────── Enquiries ─────────── */

.cta { text-align: center; }

.cta-inner { max-width: 66ch; }

.cta .ornament { margin: 26px auto 30px; }

.cta-lead {
  color: var(--ink-muted);
  margin-bottom: 40px;
}

/* ─────────── Footer ─────────── */

.site-footer {
  padding: clamp(56px, 8vw, 78px) 0 46px;
  border-top: 2px solid var(--navy-deep);
  background: var(--paper);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 38px;
  padding-bottom: 42px;
  border-bottom: 1px solid var(--rule-soft);
}

.footer-address {
  font-style: normal;
  font-size: 0.94rem;
  line-height: 1.9;
  color: var(--ink-muted);
}

.footer-address a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.footer-address a:hover { border-bottom-color: var(--navy); }

.footer-legal {
  margin-top: 34px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--ink-muted);
  max-width: 92ch;
}

.disclaimer {
  margin-top: 22px;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.78;
  color: var(--ink-dim);
  max-width: 92ch;
}

.disclaimer strong { color: var(--ink-muted); }

.copyright {
  margin-top: 34px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}

/* ─────────── Reveal ─────────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ─────────── Responsive ─────────── */

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(-n+2) { border-bottom: 1px solid var(--rule-soft); }
}

@media (max-width: 760px) {
  body { font-size: 17px; }

  .nav { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav { display: flex; }

  .logo-sub { display: none; }

  .hero h1 { max-width: none; }
  .hero-actions .btn { flex: 1 1 auto; }

  .footer-top { flex-direction: column; }
}

@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr; }
  .fact { border-left: 0; border-bottom: 1px solid var(--rule-soft); }
  .fact:last-child { border-bottom: 0; }
}
