/* ==========================================================================
   Helen Doron English Pistoia
   ========================================================================== */

/* ---------- Base ---------- */
:root {
  --site-width: 1360px;
  --navy: #153D57;
  --brand-blue: #00A1ED; /* blu del logo Helen Doron fornito */
  --sky: #BEE7F8;
  --line: #C7DFE4;
  --blue: #0077B5;
  --teal: #187F82;
  --aqua: #A4E4DB;
  --green: #5BA98B;
  --purple: #B7A4DA;
  --paper: #F7FBFA;
  --ink: #385566;        /* testo su fondo chiaro */
  --ink-light: #D5E7ED;  /* testo su fondo blu scuro */
  --display: Figtree, system-ui, sans-serif;
  --hand: Figtree, system-ui, sans-serif;
  --play: OpenDyslexic, Figtree, system-ui, sans-serif;
}

/* Colore d'accento per card, titoli e step: class="is-blue", "is-teal", ... */
.is-blue   { --accent: var(--blue);   --accent-ink: var(--blue); }
.is-teal    { --accent: var(--teal);    --accent-ink: var(--teal); }
.is-green  { --accent: var(--green);  --accent-ink: #236C58; }
.is-aqua { --accent: var(--aqua); --accent-ink: #187F82; }
.is-purple { --accent: var(--purple); --accent-ink: #70518D; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--navy);
  font-family: Figtree, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { overflow-x: clip; } /* taglia decorazioni e animazioni che escono dai lati */
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--teal); }

@keyframes hd-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-26px) rotate(8deg); } }
@keyframes hd-drift { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(18px, -14px) scale(1.06); } 66% { transform: translate(-14px, 10px) scale(.96); } }
@keyframes hd-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes hd-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@keyframes hd-fade { from { opacity: 0; } }
@keyframes hd-grow { from { transform: scaleX(0); } }
@keyframes hd-write { to { clip-path: inset(-.5em -.3em -.5em 0); } }
@keyframes hd-scribble { from { rotate: 32deg; } to { rotate: 20deg; } }
@keyframes hd-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Componenti comuni ---------- */
.section { max-width: var(--site-width); margin: 0 auto; padding: 84px 24px 20px; }

.title {
  position: relative;
  display: inline-block;
  margin: 0 0 34px;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  font-size: clamp(32px, 4vw, 50px);
  letter-spacing: -.02em;
}
/* sottolineatura "a mano" dei titoli */
.squiggle { position: absolute; left: 0; right: 0; bottom: -8px; width: 100%; height: 14px; overflow: visible; color: var(--accent, currentColor); }

.pill { display: inline-block; margin-bottom: 22px; padding: 9px 16px; border-radius: 999px; background: var(--aqua); color: var(--navy); font-weight: 800; font-size: 14px; }
.pill--teal { margin-bottom: 20px; background: var(--teal); color: #fff; }

.card { background: #fff; border: 2px solid var(--navy); border-radius: 30px; padding: 34px; box-shadow: 8px 8px 0 var(--accent); }
.card h2 { margin: 0 0 22px; font-family: var(--display); font-weight: 800; font-size: 36px; }
.card h3 { margin: 28px 0 14px; font-family: var(--display); font-weight: 700; font-size: 24px; }
.card--dark { background: var(--navy); color: #fff; }
.card--dark h2 { margin-bottom: 8px; }

/* Bottoni con effetto "3D": --depth ombra, --lift hover, --press click */
.btn {
  --depth: 4px; --lift: 2px; --press: 2px; --edge: #005E90;
  display: inline-block;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 800 15px Figtree, sans-serif;
  cursor: pointer;
  box-shadow: 0 var(--depth) 0 var(--edge);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { color: #fff; transform: translateY(calc(var(--lift) * -1)); box-shadow: 0 calc(var(--depth) + var(--lift)) 0 var(--edge); }
.btn:active { transform: translateY(var(--press)); box-shadow: 0 calc(var(--depth) - var(--press)) 0 var(--edge); }
.btn--lg { --depth: 4px; --lift: 2px; --press: 2px; padding: 18px 30px; font-size: 17px; }
.btn--block { display: block; width: 100%; padding: 18px; font-size: 17px; }
.btn--teal { --edge: #176A6D; background: var(--teal); }
.btn--navy { --edge: #08163C; background: var(--navy); }
.btn--aqua, .btn--aqua:hover { --edge: #70B9AF; background: var(--aqua); color: var(--navy); }

.btn-ghost { padding: 18px 26px; border: 2px solid #153D5726; border-radius: 999px; color: var(--navy); font-weight: 800; font-size: 17px; transition: background .2s ease; }
.btn-ghost:hover { background: #153D570D; color: var(--navy); }

/* ---------- Header ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 90; height: 5px; pointer-events: none; }
.progress div { width: 0; height: 100%; background: linear-gradient(90deg, var(--brand-blue), var(--aqua), var(--green)); }

/* ponytail: nel design era "sticky" ma non restava mai fisso; per fissarlo basta position: sticky */
.site-header {
  position: relative;
  top: 5px; /* sotto la barra di avanzamento */
  z-index: 50;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, .94);
  border-bottom: 2px solid #153D5714;
}
.site-header__inner { max-width: var(--site-width); margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { display: block; width: auto; height: 52px; }
.brand span { padding-left: 12px; border-left: 2px solid #153D5726; color: var(--teal); font-family: var(--display); font-weight: 700; font-size: 19px; }
.nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-weight: 600; font-size: 15px; }
.nav a { color: var(--navy); }
.nav a:hover { color: var(--blue); }
.nav a[aria-current] { color: var(--blue); text-decoration: underline wavy var(--aqua); text-decoration-thickness: 2px; text-underline-offset: 7px; }

/* Menu hamburger su mobile: stesso "blob" dei bottoni della lightbox, diventa una X acquamarina quando è aperto */
.nav-toggle { display: none; }
@media (min-width: 981px) {
  .menu { display: contents; }
}
@media (max-width: 980px) {
  .nav-toggle {
    display: grid; place-content: center; gap: 5px;
    width: 52px; height: 52px; margin-left: auto; padding: 0;
    border: 2px solid var(--navy);
    border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%;
    background: var(--blue);
    box-shadow: 0 5px 0 #005E90;
    cursor: pointer;
    rotate: -4deg;
    transition: background .2s ease, box-shadow .2s ease;
  }
  .nav-toggle span { display: block; width: 24px; height: 3.5px; border-radius: 3px; background: #fff; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease; }
  .nav-toggle span:nth-child(2) { width: 17px; }
  .nav-toggle[aria-expanded="true"] { background: var(--teal); box-shadow: 0 5px 0 #176A6D; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
  .menu { display: none; position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; padding: 18px; border: 2px solid var(--navy); border-radius: 26px; background: #fff; box-shadow: 8px 8px 0 var(--aqua); transform-origin: top right; }
  .nav-toggle[aria-expanded="true"] + .menu { display: block; }
  .menu .nav { flex-direction: column; align-items: stretch; gap: 2px; margin: 0 0 14px; font-family: var(--display); font-size: 22px; font-weight: 700; }
  .menu .nav a { padding: 8px 14px; border-radius: 14px; }
  .menu .nav a:hover, .menu .nav a[aria-current] { background: #EFF7FA; }
  .menu .btn { display: block; text-align: center; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 24px 100px; }
.hero__grid { position: relative; max-width: var(--site-width); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 48px; align-items: center; }

.hero h1 { margin: 0 0 22px; font-family: var(--display); font-weight: 600; font-size: clamp(42px, 5.1vw, 72px); line-height: 1.08; letter-spacing: -.03em; }
.hero h1 > span { display: block; }
.hero h1 > span:nth-child(2) { color: var(--blue); }
.hero__eyebrow { margin: 0 0 22px; color: var(--teal); font-size: 13px; line-height: 1.5; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hl { position: relative; display: inline-block; }
.hl > span:first-child { position: relative; z-index: 2; }
.hl__line { position: absolute; left: -10px; right: -10px; bottom: -6px; z-index: 1; height: 22px; transform-origin: left center; }
.hl__line svg { display: block; width: 100%; height: 100%; overflow: visible; }

.hero__lead { max-width: 34em; margin: 0 0 32px; color: var(--ink); font-size: 20px; line-height: 1.55; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
/* bottone principale e nota restano insieme: la freccia punta sempre a "Prenota", anche quando i bottoni vanno a capo */
.hero__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.hero__note { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; color: var(--teal); font-family: var(--hand); font-weight: 500; font-size: 15px; }
.hero__note svg { width: 46px; height: 32px; overflow: visible; }
.hero__cue { display: flex; align-items: center; gap: 12px; margin-top: 38px; color: #516C7C; font-weight: 700; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.hero__cue span { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 2px solid #153D5733; border-radius: 50%; }

.hero__media { position: relative; }
.hero__photo { aspect-ratio: 4 / 5; overflow: hidden; border: 3px solid var(--brand-blue); border-radius: 46% 46% 20% 20% / 25% 25% 14% 14%; box-shadow: 12px 14px 0 var(--aqua); transform-style: preserve-3d; }
.hero__photo img, .photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero__age { position: absolute; bottom: -26px; left: -26px; padding: 14px 20px; border: 2px solid var(--navy); border-radius: 22px; background: #fff; box-shadow: 6px 6px 0 var(--green); }
.hero__age-num { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; }
.hero__age-num span { color: var(--teal); }
.hero__age-label { color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* Foglie, luna e onde richiamano le aule del Learning Centre. */
.nature { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.nature > svg { position: absolute; }
.nature__branch { width: 280px; height: 280px; right: -50px; top: -35px; color: #78B99F; opacity: .28; rotate: -15deg; }
.nature__leaf { width: 180px; height: 180px; left: -60px; top: 10px; color: #9FD8C3; opacity: .3; rotate: 35deg; }
.nature__moon { width: 100px; height: 100px; left: 42%; bottom: 65px; color: var(--purple); opacity: .35; rotate: -12deg; }
.nature__waves { width: 100%; height: 90px; bottom: 0; left: 0; }
.page-hero .nature__waves { height: 34px; opacity: .5; }
.page-hero .nature__moon { left: auto; right: 18%; bottom: 24px; }
.nature-icon { display: block; flex: 0 0 auto; width: 42px; height: 42px; color: var(--teal); }
.room-names { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 24px 0 16px; padding: 0; list-style: none; }
.room-names li { display: flex; align-items: center; gap: 7px; color: var(--teal); font-size: 14px; font-weight: 600; }
.room-names .nature-icon { width: 26px; height: 26px; }
@media (max-width: 700px) {
  .hero { padding-top: 38px; padding-bottom: 90px; }
  .hero h1 { font-size: clamp(34px, 10.5vw, 42px); }
  .hero__lead { font-size: 18px; }
  .hero__age { left: -8px; bottom: -24px; }
  .hero__eyebrow { max-width: 24em; font-size: 12px; }
  .nature__branch { width: 180px; height: 180px; right: -65px; }
  .nature__leaf { width: 120px; height: 120px; }
  .nature__moon { left: 72%; bottom: 46%; }
}

/* ---------- Striscia di parole ---------- */
.marquee { margin-top: 48px; padding: 16px 0; overflow: hidden; border-block: 0; background: var(--brand-blue); }
.marquee__track { display: flex; width: max-content; animation: hd-marquee 42s linear infinite; }
.marquee__strip { display: flex; flex-shrink: 0; gap: 34px; align-items: center; padding: 0 17px; }
.marquee span { color: #073149; font-family: var(--display); font-weight: 500; font-size: 25px; white-space: nowrap; }
.marquee span.alt { color: #073149; }
.marquee i { flex-shrink: 0; width: 14px; height: 18px; border-radius: 85% 0 85% 0; background: var(--green); }
.marquee i.alt { background: var(--teal); }

/* ---------- Numeri ---------- */
.stats { padding: 68px 24px 10px; }
.stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 18px; }
.stat { padding: 26px; border: 2px solid var(--navy); border-radius: 30px 22px 28px 20px / 22px 30px 20px 28px; background: #fff; }
.stat:nth-child(1) { rotate: -.8deg; }
.stat:nth-child(2) { rotate: .7deg; }
.stat:nth-child(3) { rotate: -.5deg; }
.stat:nth-child(4) { rotate: .9deg; }
.stat__num { color: var(--accent-ink); font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1; }
.stat__label { margin-top: 6px; color: var(--ink); font-weight: 600; }
.stat__note { margin-top: 8px; color: #176A6D; font-family: var(--hand); font-size: 15px; line-height: 1.5; }

/* ---------- Corsi ---------- */
.corsi .title { margin-bottom: 12px; font-size: clamp(34px, 4.4vw, 58px); }
.corsi .squiggle { bottom: -10px; }
.corsi__intro { max-width: 46em; margin: 0 0 40px; color: var(--ink); font-size: 19px; }
.courses { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 22px; }
.course, .age__panel {
  display: block;
  padding: 30px 26px 26px;
  border: 2px solid var(--navy);
  border-radius: 36px 26px 32px 24px / 26px 34px 24px 32px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 10px 0 var(--edge);
}
.course { transition: transform .2s cubic-bezier(.2, .7, .3, 1), box-shadow .2s ease; }
.course:nth-child(2) { border-radius: 24px 34px 26px 36px / 34px 24px 36px 26px; }
.course:nth-child(3) { border-radius: 32px 24px 36px 26px / 24px 36px 26px 34px; }
.course:nth-child(4) { border-radius: 26px 36px 24px 34px / 36px 26px 34px 24px; }
.course:hover { color: var(--fg); transform: translateY(-8px) rotate(-1.2deg); box-shadow: 0 18px 0 var(--edge); }
.course:nth-child(even):hover { transform: translateY(-8px) rotate(1.2deg); }
.course--neutral { --bg: #fff; --fg: var(--navy); --edge: #D6EAE8; --text: var(--ink); --o: 1; }
.course--green { --bg: #E5F3EC; --fg: var(--navy); --edge: #B7DACE; }
.course--purple { --bg: #F0ECF7; --fg: var(--navy); --edge: #D2C5E8; }
.course__heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.course__heading .nature-icon { padding: 6px; width: 54px; height: 54px; border-radius: 18px 18px 18px 4px; background: #E5F3EF; }
.course { display: flex; flex-direction: column; border-color: #AACED4; box-shadow: 0 6px 0 var(--edge); }
.course__more { margin-top: auto; color: var(--blue); }
.course h3 { min-height: 2.2em; }
.course:hover, .course:nth-child(even):hover { transform: translateY(-5px); box-shadow: 0 11px 0 var(--edge); }
@media (max-width: 700px) {
  .course h3 { min-height: 0; }
}
.course__age { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; opacity: var(--o); }
.course h3 { margin: 10px 0 12px; font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1.05; }
.course p { margin: 0 0 18px; color: var(--text); font-size: 16px; line-height: 1.5; }
.course__more { font-weight: 800; font-size: 15px; }

/* ---------- Il metodo ---------- */
.metodo { position: relative; overflow: hidden; margin-top: 90px; padding: 104px 24px 120px; background: var(--navy); color: #fff; }
/* bordi curvi sopra e sotto */
.metodo::before, .metodo::after { content: ''; position: absolute; left: -5%; width: 110%; height: 70px; background: var(--paper); }
.metodo::before { top: -2px; border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.metodo::after { bottom: -2px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.metodo__inner { position: relative; max-width: var(--site-width); margin: 0 auto; }
.metodo h2 { max-width: 20em; margin: 0 0 18px; font-family: var(--display); font-weight: 800; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -.02em; }
.metodo__lead { max-width: 42em; margin: 0 0 54px; color: var(--ink-light); font-size: 19px; line-height: 1.6; }
.rail { height: 6px; margin: 0 0 30px; overflow: hidden; border-radius: 999px; background: #3F6A82; }
.rail div { width: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--aqua), var(--teal), var(--green), var(--purple)); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 24px; }
.step { padding-top: 20px; border-top: 4px solid var(--accent); }
.metodo .is-teal { --accent: #91D5E8; }
.step__num { color: var(--accent); font-family: var(--hand); font-weight: 700; font-size: 34px; line-height: 1; }
.step h3 { margin: 6px 0 10px; font-family: var(--display); font-weight: 700; font-size: 25px; }
.step p { margin: 0; color: var(--ink-light); font-size: 16px; line-height: 1.55; }

/* ---------- Il centro ---------- */
.centro { padding-top: 90px; }
.centro__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 52px; align-items: center; }
.photo { aspect-ratio: 1 / 1; overflow: hidden; border: 5px solid var(--navy); border-radius: 30px; box-shadow: -14px 14px 0 var(--green); }
.centro .title { margin-bottom: 20px; font-size: clamp(32px, 4vw, 52px); line-height: 1.05; }
.centro p { margin: 0 0 16px; color: var(--ink); font-size: 18px; line-height: 1.65; }
.centro p.centro__social { margin-bottom: 8px; color: inherit; }
.centro__grid .btn-ghost { display: inline-block; margin-top: 12px; }
.signature { margin-top: 10px; color: var(--navy); font-family: var(--hand); font-weight: 600; font-size: 40px; rotate: -4deg; }

/* ---------- Contatti ---------- */
.contatti__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; align-items: start; }
.info { color: var(--ink); font-size: 17px; line-height: 1.7; }
.info div + div { margin-top: 10px; }
.info strong { color: var(--navy); }
.hours { display: grid; gap: 2px; }
.hours div { display: flex; justify-content: space-between; padding: 11px 14px; border-radius: 10px; background: #EFF7FA; font-weight: 600; }
.hours .closed { background: #F0ECF7; color: #176A6D; }

.form-lead { margin: 0 0 24px; color: var(--ink-light); font-size: 16px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.choices label { position: relative; cursor: pointer; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { display: inline-block; padding: 12px 18px; border: 2px solid #3F6A82; border-radius: 999px; color: var(--ink-light); font-weight: 700; font-size: 15px; transition: transform .16s ease, background .2s ease; }
.choices input:checked + span { border-color: var(--aqua); background: var(--aqua); color: var(--navy); }
.choices input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.fields { display: grid; gap: 12px; }
.fields input { width: 100%; padding: 15px 18px; border: 2px solid #3F6A82; border-radius: 14px; background: #103249; color: #fff; font: 16px Figtree, sans-serif; outline: none; }
.fields input:focus { border-color: var(--aqua); }
.form-privacy { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; color: var(--ink-light); font-size: 14px; line-height: 1.55; }
.form-privacy input { flex: 0 0 20px; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--aqua); cursor: pointer; }
.form-privacy label { cursor: pointer; }
.form-privacy a { color: var(--aqua); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.form-privacy input:focus-visible, .form-privacy a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.contact-form .btn { margin-top: 18px; }
.form-msg { margin: 16px 0 22px; padding: 14px 18px; border-radius: 14px; background: var(--aqua); color: var(--navy); font-weight: 700; }
.form-msg--error { background: #F0ECF7; color: #176A6D; }
.form-msg a { color: inherit; text-decoration: underline; }
.hp { position: absolute; left: -9999px; } /* campo trappola anti-spam */

/* ---------- Mappa ---------- */
.map { padding: 30px 24px 0; }
.map .card { padding: 0; overflow: hidden; }
.map iframe { display: block; width: 100%; height: 360px; border: 0; }
.map__bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 18px 22px; border-top: 3px solid var(--navy); font-weight: 700; font-size: 16px; }
.map__bar a { font-weight: 800; font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { max-width: 900px; }
.faq__list { display: grid; gap: 12px; }
.faq details { padding: 20px 24px; border: 2px solid var(--navy); border-radius: 22px; background: #fff; }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 22px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 14px 0 0; color: var(--ink); font-size: 17px; line-height: 1.6; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 22px; }
.news-card {
  display: block;
  padding: 28px;
  border: 2px solid var(--navy);
  border-radius: 26px;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 0 0 var(--accent);
  transition: transform .2s cubic-bezier(.2, .7, .3, 1), box-shadow .2s ease;
}
.news-card:hover { color: var(--navy); transform: translateY(-6px); box-shadow: 10px 10px 0 var(--accent); }
.news-card__tag { margin-bottom: 12px; color: var(--accent-ink); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.news-card h3 { margin: 0 0 16px; font-family: var(--display); font-weight: 700; font-size: 25px; line-height: 1.15; }
.news-card__more { color: var(--blue); font-weight: 800; font-size: 15px; }
.news-card p { margin: 0 0 16px; color: var(--ink); font-size: 16px; line-height: 1.5; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
/* La selezione della home: sei foto in fila su desktop, righe complete su tablet e mobile. */
#gallery > .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
  #gallery > .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  #gallery > .gallery-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.gallery-grid a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 2px solid var(--navy);
  border-radius: 26px 18px 24px 16px / 18px 26px 16px 24px;
  background: #EAF4F7;
  rotate: -1.2deg;
  transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s ease;
}
.gallery-grid a:hover { transform: translateY(-6px) rotate(-1.5deg); box-shadow: 8px 8px 0 var(--blue); }
.gallery-grid img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Lightbox della gallery ---------- */
html:has(.lightbox[open]) { overflow: hidden; } /* la pagina sotto non scorre */
.lightbox { overflow: visible; max-width: none; max-height: none; padding: 0; border: 0; background: none; }
.lightbox::backdrop { background: #153D57E6 radial-gradient(#FFFFFF1F 1.1px, transparent 1.1px) 0 0 / 22px 22px; }
.lightbox__frame { position: relative; }
.lightbox__frame img { display: block; max-width: min(86vw, 1000px); max-height: 76vh; border: 5px solid var(--navy); border-radius: 30px; background: #fff; box-shadow: 14px 14px 0 var(--aqua); }
.lightbox__caption { margin: 24px 0 0; color: var(--aqua); font-family: var(--hand); font-weight: 700; font-size: 30px; line-height: 1.1; text-align: center; rotate: -2deg; }
/* bottoni: stesso effetto 3D dei .btn, ma a forma di "blob" come le forme dell'hero */
.lightbox .btn { --depth: 6px; position: absolute; display: grid; place-items: center; padding: 0; border: 2px solid var(--navy); }
.lightbox .btn svg { transition: rotate .45s cubic-bezier(.34, 1.56, .64, 1), translate .2s ease; }
.lightbox__close { top: -26px; right: -26px; width: 64px; height: 64px; border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%; rotate: -8deg; }
.lightbox__close svg { width: 30px; height: 30px; }
.lightbox__close:hover svg { rotate: 90deg; }
/* fumetto "bye!" che spunta al passaggio del mouse (fa il paio con "hello!" dell'hero) */
.lightbox__close span {
  position: absolute; right: 70%; bottom: 82%;
  padding: 2px 12px 4px;
  border: 2px solid var(--navy);
  border-radius: 999px 999px 4px 999px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--teal);
  color: var(--teal);
  font: 700 20px var(--display);
  white-space: nowrap;
  opacity: 0;
  scale: .3;
  transform-origin: 100% 100%;
  transition: opacity .15s ease, scale .35s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}
.lightbox__close:hover span, .lightbox__close:focus-visible span { opacity: 1; scale: 1; }
.lightbox__prev, .lightbox__next { top: calc(50% - 27px); width: 54px; height: 54px; border-radius: 54% 46% 58% 42% / 45% 55% 45% 55%; }
.lightbox__prev { left: -24px; rotate: 6deg; }
.lightbox__next { right: -24px; rotate: -6deg; }
.lightbox__prev svg, .lightbox__next svg { width: 26px; height: 26px; }
.lightbox__next svg { scale: -1 1; }
.lightbox__prev:hover svg { translate: -3px 0; }
.lightbox__next:hover svg { translate: 3px 0; }

/* ---------- Call to action finale ---------- */
.cta { padding: 90px 24px; }
.cta__box { max-width: 1000px; margin: 0 auto; padding: 60px 40px; border: 4px solid var(--navy); border-radius: 60px 44px 56px 40px / 44px 60px 40px 56px; background: var(--aqua); box-shadow: 0 10px 0 #70B9AF; color: #164D40; text-align: center; }
.cta .title { margin-bottom: 16px; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; }
.cta p { max-width: 30em; margin: 0 auto 32px; font-size: 20px; }
.cta__note { margin: -18px 0 22px; font-family: var(--hand); font-weight: 500; font-size: 17px; }
.cta .btn { padding: 19px 36px; font-size: 18px; }

/* ---------- Pagine interne: apertura ---------- */
.page-hero { position: relative; padding: 64px 24px 30px; }
.page-hero__inner { position: relative; max-width: var(--site-width); margin: 0 auto; }
.page-hero h1 { max-width: 12em; margin: 0 0 22px; font-family: var(--display); font-weight: 600; font-size: clamp(40px, 5.4vw, 72px); line-height: 1.1; letter-spacing: -.03em; }
.page-hero__lead { max-width: 36em; margin: 0; color: var(--ink); font-size: 20px; line-height: 1.55; }

/* ---------- Pagina Corsi ---------- */
/* Scorciatoie: stessa palette per tutte le età, con simboli e indicazioni testuali. */
.age-nav { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 34px; }
.age-nav a { display: inline-flex; align-items: center; gap: 9px; padding: 11px 20px; border: 2px solid var(--navy); border-radius: 999px; background: var(--bg); color: var(--fg); font-weight: 800; font-size: 16px; box-shadow: 0 6px 0 var(--edge); transition: transform .18s ease, box-shadow .18s ease; }
.age-nav .nature-icon { width: 27px; height: 27px; }
.age-nav a:hover { color: var(--fg); transform: translateY(-3px); box-shadow: 0 9px 0 var(--edge); }

/* una sezione per fascia: pannello colorato (fisso durante lo scroll) + elenco dei corsi */
.age__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 28px; align-items: start; }
.age__panel { position: sticky; top: 24px; }
.age__panel h2 { margin: 10px 0 12px; font-family: var(--display); font-weight: 800; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.05; }
.age__panel p { margin: 0 0 18px; color: var(--text); font-size: 17px; line-height: 1.55; }
.age__facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.age__facts li { color: var(--teal); padding: 6px 12px; border-radius: 999px; background: #E5F3EF; font-weight: 700; font-size: 14px; }
.course-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.course-item { padding: 22px 22px 24px; border: 2px solid var(--navy); border-radius: 24px 18px 22px 16px / 18px 24px 16px 22px; background: #fff; box-shadow: 6px 6px 0 var(--accent); }
.course-item__tag { margin-bottom: 8px; color: var(--accent-ink); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.course-item h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; }
.course-item p { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.5; }
@media (max-width: 860px) {
  .age__grid { grid-template-columns: 1fr; }
  .age__panel { position: static; }
}

/* ---------- News e gallery dinamiche ---------- */
.news-card { overflow: hidden; }
.news-card__img { display: block; width: calc(100% + 56px); height: auto; aspect-ratio: 3 / 2; margin: -28px -28px 22px; border-bottom: 2px solid var(--navy); object-fit: cover; }
.more-link { margin: 38px 0 0; text-align: center; }
.more-link .btn-ghost { display: inline-block; background: #fff; }
.empty-state { margin: 0; padding: 40px 24px; border: 3px dashed #153D5733; border-radius: 26px; color: var(--ink); font-family: var(--hand); font-size: 20px; text-align: center; }
.news-list { padding-top: 30px; }
.pagination { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 44px; font-family: var(--display); font-weight: 700; font-size: 20px; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 12px; border: 2px solid var(--navy); border-radius: 16px; background: #fff; color: var(--navy); }
.pagination a:hover { box-shadow: 4px 4px 0 var(--aqua); color: var(--navy); }
.pagination span { background: var(--navy); color: #fff; }

/* Pagina della singola news */
.article-head .pill { margin-right: 8px; }
.article-head h1 { max-width: 18em; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; }
.article-date { margin: 0; color: #516C7C; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.article { max-width: 860px; margin: 0 auto; padding: 16px 24px 20px; }
.article__img { display: block; width: 100%; height: auto; margin: 0 0 40px; border: 5px solid var(--navy); border-radius: 30px; box-shadow: 14px 14px 0 var(--aqua); }
.prose { margin-bottom: 44px; color: var(--ink); font-size: 19px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 22px; }
.prose h2, .prose h3 { margin: 40px 0 14px; color: var(--navy); font-family: var(--display); font-weight: 800; line-height: 1.15; }
.prose h2 { font-size: 32px; }
.prose h3 { font-size: 25px; }
.prose a { text-decoration: underline; text-decoration-color: var(--aqua); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.prose li { margin-bottom: 6px; }
.prose blockquote { padding: 14px 22px; border-left: 5px solid var(--green); border-radius: 0 16px 16px 0; background: #fff; font-family: var(--hand); font-size: 26px; line-height: 1.3; }

/* ---------- Foto e contenuti del Learning Centre ---------- */
.section-lead { max-width: 44em; margin: 0 0 32px; color: var(--ink); font-size: 20px; line-height: 1.6; }
.school-mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.school-mosaic > div { overflow: hidden; border: 2px solid var(--navy); border-radius: 24px; aspect-ratio: 4 / 3; background: #fff; }
.school-mosaic .school-mosaic__main { grid-column: 1 / -1; aspect-ratio: 3 / 2; box-shadow: -8px 8px 0 var(--green); margin-bottom: 8px; }
.school-mosaic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.school-video { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: 36px; margin-top: 52px; padding: 30px; border: 2px solid var(--navy); border-radius: 30px; background: #fff; }
.school-video h3 { margin: 0 0 14px; font: 800 clamp(28px, 3vw, 38px)/1.1 var(--display); }
.school-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 2px solid var(--navy); border-radius: 18px; background: var(--navy); }
.library-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 36px 48px; margin-top: 40px; padding: 38px; border: 2px solid var(--line); border-radius: 38px 26px 34px 24px; background: #fff; scroll-margin-top: 24px; }
.library-card h3 { margin: 0 0 20px; font: 700 clamp(28px, 3vw, 38px)/1.15 var(--display); letter-spacing: -.02em; }
.library-card p:last-child { margin-bottom: 0; }
.library-card__intro .btn-ghost { display: inline-block; max-width: 100%; line-height: 1.4; }
.library-card__note { display: flex; align-items: flex-start; gap: 16px; margin: 24px 0; padding: 24px; border-radius: 24px 34px 24px 12px; background: #E5F3EF; }
.library-card__icon { flex: 0 0 38px; display: block; width: 38px; height: 38px; color: var(--teal); }
.library-card__note h4 { margin: 0 0 12px; font: 700 23px/1.2 var(--display); }
.library-card__note p { margin: 0; font-size: 16px; line-height: 1.6; }
.library-card figure { min-width: 0; margin: 0; }
.library-card__feature { position: relative; width: 100%; max-width: 440px; justify-self: center; }
.library-card__photo { display: block; overflow: hidden; border: 2px solid var(--navy); border-radius: 22px; background: var(--sky); }
.library-card__photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.library-card__photo:hover img { transform: scale(1.035); }
.library-card__feature .library-card__photo { aspect-ratio: 3 / 4; border-radius: 46px 24px 40px 24px; box-shadow: 8px 8px 0 var(--aqua); }
.library-card .library-card__bubble { position: absolute; z-index: 1; top: -22px; right: -10px; background: #DAD0ED; font-size: 18px; rotate: 7deg; pointer-events: none; }
.library-card figcaption { margin-top: 14px; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.4; }
.library-card__feature figcaption { text-align: center; }
.library-card__shelf { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-top: 28px; border-top: 1px solid var(--line); }
.library-card__shelf .library-card__photo { aspect-ratio: 3 / 2; }
.library-card__photo--corner img { object-position: center 60%; }
@media (max-width: 860px) {
  .library-card__feature { max-width: 560px; margin-top: 16px; }
  .library-card__feature .library-card__photo { aspect-ratio: 4 / 3; }
  .library-card__feature img { object-position: center 35%; }
}
@media (max-width: 600px) {
  .library-card__note { flex-direction: column; }
  .library-card__shelf { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .library-card__feature .library-card__photo { aspect-ratio: 3 / 4; }
  .library-card .library-card__bubble { right: -4px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .library-card__photo img { transition: none; }
  .library-card__photo:hover img { transform: none; }
}
.team-grid, .activity-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.team > .pill, #attivita > .pill { display: table; }
.teacher-card { overflow: hidden; border: 2px solid var(--navy); border-radius: 30px; background: #fff; box-shadow: 7px 7px 0 var(--accent); }
.teacher-card__photo { aspect-ratio: 3 / 2; overflow: hidden; border-bottom: 2px solid var(--navy); background: #EAF4F7; }
.teacher-card__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.teacher-card__photo--lauren img { object-position: center 55%; transform: scale(1.2); }
.teacher-card__photo--spela img { object-position: center top; }
.teacher-card__body { padding: 28px; }
.teacher-card h3 { margin: 0 0 16px; font: 800 32px/1.1 var(--display); }
.teacher-card p { margin: 0 0 14px; color: var(--ink); font-size: 17px; line-height: 1.65; }
.teacher-card p:last-child { margin-bottom: 0; }
.teacher-card.is-purple .news-card__tag { color: #70518D; }
.activity-card__photo { margin: -28px -28px 24px; border-bottom: 2px solid var(--navy); aspect-ratio: 3 / 2; overflow: hidden; }
.activity-card__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.activity-cards h3 { font-size: 32px; }
.activity-cards .is-purple .news-card__tag { color: #70518D; }
.activity-cards .is-green .news-card__tag { color: #236C58; }
.activity-detail__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.activity-detail .title { display: block; margin-bottom: 22px; line-height: 1.05; }
.activity-detail p { color: var(--ink); font-size: 18px; line-height: 1.65; }
.activity-detail .section-lead { font-size: 21px; margin-bottom: 24px; }
.activity-detail .btn { margin-top: 10px; }
.activity-detail__feature { margin: 0; }
.activity-detail__feature img { display: block; width: 100%; height: auto; border: 4px solid var(--navy); border-radius: 30px; box-shadow: 10px 10px 0 var(--aqua); }
.activity-detail__feature figcaption { margin: 24px 0 0; font: 500 17px/1.5 var(--hand); text-align: center; }
.photo-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 42px; }
.photo-strip figure { margin: 0; padding: 10px 10px 18px; border: 2px solid var(--navy); border-radius: 22px; background: #fff; }
.photo-strip figure:nth-child(2) { rotate: 1deg; }
.photo-strip img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 35%; border-radius: 12px; }
.photo-strip figcaption { margin: 16px 0 0; font: 500 16px/1.5 var(--hand); text-align: center; }
.camp-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 40px; padding: 30px; border: 2px solid var(--navy); border-radius: 28px; background: #E5F3EC; }
.camp-facts span { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.camp-facts strong { display: block; font: 800 25px/1.15 var(--display); }
.camp-facts p { margin: 10px 0 0; font-size: 16px; }
.lab-facts { background: #F0ECF7; }
.lab-fees { margin-top: 28px; padding: 30px; border: 2px solid var(--line); border-radius: 28px; background: #fff; }
.lab-fees h3 { margin: 0 0 28px; font: 700 27px/1.2 var(--display); }
.lab-fees__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0; }
.lab-fees__grid > div { display: flex; flex-direction: column; align-items: flex-start; }
.lab-fees__grid dt { color: var(--ink); font-size: 17px; line-height: 1.5; }
.lab-fees__grid dd { margin: 12px 0 0; color: var(--teal); font: 700 32px/1.2 var(--display); }
.age__photo { aspect-ratio: 4 / 3; overflow: hidden; margin: -30px -26px 24px; border-bottom: 2px solid var(--navy); border-radius: 31px 21px 0 0; }
.age__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.adult-course { display: flex; align-items: center; gap: 36px; background: #F0ECF7; }
.adult-course > div { flex: 1; }
.adult-course h2 { max-width: 20em; line-height: 1.1; }
.adult-course p { max-width: 42em; margin-bottom: 0; color: var(--ink); font-size: 18px; line-height: 1.6; }
.adult-course .btn { flex-shrink: 0; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.gallery-filters a { padding: 11px 17px; border: 2px solid var(--navy); border-radius: 999px; background: #fff; color: var(--navy); font-weight: 700; }
.gallery-filters a[aria-current="page"] { background: var(--navy); color: #fff; }
.gallery-filters a:hover { box-shadow: 3px 3px 0 var(--aqua); }
.gallery-count { margin: 0 0 26px; color: var(--ink); font-size: 15px; }
.gallery-grid img { object-position: center 35%; }
.lightbox__caption { max-width: min(86vw, 1000px); font-size: clamp(20px, 3vw, 30px); }
.faq summary { position: relative; padding-right: 32px; }
.faq summary::after { content: '+'; position: absolute; top: 0; right: 0; color: var(--blue); font-size: 28px; line-height: 1.1; }
.faq details[open] summary::after { content: '−'; }
.faq details a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) {
  .activity-detail__grid, .school-video, .library-card { grid-template-columns: 1fr; }
  .activity-detail__feature { max-width: 640px; width: 100%; margin: 0 auto; }
  .adult-course { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 700px) {
  .team-grid, .activity-cards, .photo-strip, .camp-facts, .lab-fees__grid { grid-template-columns: 1fr; }
  .teacher-card__body, .school-video, .camp-facts, .lab-fees, .library-card, .library-card__note { padding: 24px; }
  .library-card { gap: 26px; }
  .lab-fees__grid > div + div { padding-top: 22px; border-top: 1px solid var(--line); }
  .activity-detail__grid { gap: 30px; }
  .photo-strip { gap: 24px; }
  .photo-strip img { aspect-ratio: 3 / 2; }
  .camp-facts > div + div { border-top: 1px solid #153D5733; padding-top: 22px; }
}

/* ---------- Footer ---------- */
.site-footer { padding: 56px 24px 40px; background: var(--navy); color: var(--ink-light); }
.site-footer a { color: var(--ink-light); }
.site-footer a:hover, .site-footer a.accent { color: var(--aqua); }
.footer__grid { max-width: var(--site-width); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer__logo { display: inline-block; padding: 12px 16px; border-radius: 18px; background: #fff; }
.footer__logo img { display: block; width: auto; height: 56px; }
.footer__name { margin-top: 12px; color: var(--aqua); font-family: var(--display); font-weight: 800; font-size: 22px; }
.footer__grid p { margin: 12px 0 0; font-size: 15px; line-height: 1.6; }
.footer__title { margin-bottom: 12px; color: #fff; font-weight: 800; font-size: 15px; }
.footer__links { display: grid; gap: 8px; font-size: 15px; }
.footer__bottom { max-width: var(--site-width); margin: 36px auto 0; padding-top: 22px; border-top: 1px solid #3F6A82; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; font-size: 13px; }

/* Icone social: "blob" come i bottoni della lightbox, acquamarina al passaggio del mouse */
.social { display: flex; gap: 12px; }
.social a {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 2px solid #3F6A82;
  border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%;
  color: var(--ink-light);
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.social a:nth-child(2) { border-radius: 54% 46% 58% 42% / 45% 55% 45% 55%; }
.social a:hover { border-color: var(--aqua); background: var(--aqua); color: var(--navy); transform: translateY(-3px) rotate(-8deg); }
.social svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.social .fill { fill: currentColor; }
.social .dot { fill: currentColor; stroke: none; }

/* "Fatto con ♥ da STUDIO 09" */
.credit { display: inline-flex; align-items: center; gap: 5px; }
.credit a { color: #fff; font-weight: 800; letter-spacing: .04em; }
.heart { width: 17px; height: 17px; fill: var(--teal); rotate: -10deg; }
@keyframes hd-beat { 0%, 50%, 100% { scale: 1; } 15%, 35% { scale: 1.25; } }
@media (prefers-reduced-motion: no-preference) {
  .heart { animation: hd-beat 1.6s ease-in-out infinite; }
}

/* ---------- Cursore personalizzato (creato da main.js) ---------- */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; border-radius: 50%; pointer-events: none; opacity: 0; transform: translate3d(-50%, -50%, 0); }
.cursor-dot { z-index: 120; width: 26px; height: 26px; background: var(--green); mix-blend-mode: multiply; transition: opacity .3s ease, background .25s ease; }
.cursor-ring { z-index: 119; width: 54px; height: 54px; border: 2px solid #153D5755; transition: opacity .3s ease, width .25s ease, height .25s ease, border-color .25s ease; }
.cursor-dot.on { opacity: .55; }
.cursor-ring.on { opacity: 1; }
.cursor-dot.hot { background: var(--aqua); }
.cursor-ring.hot { width: 86px; height: 86px; border-color: var(--teal); }

/* ---------- Animazioni: solo se l'utente non ha chiesto movimento ridotto ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: hd-fade .7s both; }
  .page-hero .hl__line { animation: hd-grow .7s cubic-bezier(.16, .9, .3, 1) 700ms both; } /* nella home la traccia il pastello */
  .hero__cue span { animation: hd-bounce 1.5s ease-in-out infinite; }
  .lightbox[open], .nav-toggle[aria-expanded="true"] + .menu { animation: hd-pop .45s ease-out; }
  .lightbox[open]::backdrop { animation: hd-fade .3s ease; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
}

/* ---------- Revisione giocosa: parole, natura e OpenDyslexic ---------- */
/* La palette resta quella delle aule. Il carattere espressivo è riservato
   ai titoli e alle parole brevi; navigazione e testi lunghi usano Figtree. */
.hero h1, .page-hero h1, .title, .metodo h2 {
  font-family: var(--play);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.35;
}
.hero h1 { font-size: clamp(30px, 3vw, 44px); margin-bottom: 32px; line-height: 1.5; }
.hero .hl__line { bottom: -14px; height: 16px; }
.hero h1 > span:last-child { color: var(--teal); }
.title, .corsi .title, .centro .title, .cta .title { font-size: clamp(28px, 3.1vw, 42px); line-height: 1.4; }
.page-hero h1 { max-width: 17em; font-size: clamp(32px, 4vw, 54px); }
.metodo h2 { max-width: 21em; padding-right: 120px; font-size: clamp(30px, 3.3vw, 46px); }
.hero__lead, .page-hero__lead { line-height: 1.65; }
.hero { padding-top: 80px; background: linear-gradient(115deg, var(--paper) 48%, #ECF6F5 100%); }
.hero__grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 64px; }
.hero__media { margin: 18px 18px 30px 0; isolation: isolate; }
.hero__photo { border-radius: 43% 47% 22% 24% / 25% 28% 18% 20%; box-shadow: 14px 16px 0 var(--aqua); }
.hero__age { z-index: 3; left: -18px; background: var(--paper); }
.hero__age-num { font-size: 28px; }
.hero__conversation { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.word-bubble {
  display: inline-block;
  width: max-content;
  max-width: 100%;
  padding: 13px 22px 16px;
  border: 2px solid var(--navy);
  border-radius: 52% 48% 46% 12% / 48% 50% 50% 20%;
  background: var(--sky);
  color: var(--navy);
  box-shadow: 4px 5px 0 #153D571A;
  font: 700 clamp(17px, 1.65vw, 23px)/1.45 var(--play);
  letter-spacing: -.04em;
  white-space: nowrap;
}
.word-bubble--hello { position: absolute; top: -24px; left: -32px; rotate: -10deg; background: var(--aqua); font-size: clamp(22px, 2.2vw, 30px); padding: 15px 28px 20px; }
.word-bubble--imagine { position: absolute; top: 47%; right: -30px; rotate: 8deg; background: #DAD0ED; border-radius: 48% 52% 10% 48% / 50% 50% 20% 50%; }
.word-bubble--talk { position: absolute; bottom: 22px; right: -18px; rotate: -7deg; background: var(--sky); }
.hero__star { position: absolute; width: 84px; height: 84px; top: -24px; right: 8px; color: var(--purple); rotate: 14deg; filter: drop-shadow(3px 4px 0 #153D5712); }
.hero__leaf { position: absolute; width: 74px; height: 74px; left: -30px; bottom: 110px; color: var(--green); rotate: -24deg; }
.nature__branch { opacity: .45; right: -90px; width: 310px; height: 310px; }
.nature__leaf { width: 110px; height: 110px; left: -65px; top: 42%; opacity: .7; color: var(--green); }
.nature__moon { width: 100px; height: 100px; left: 44%; bottom: 35px; opacity: .8; }
.nature__star { width: 36px; height: 36px; left: 44%; top: 24px; color: var(--sky); rotate: 18deg; }
.nature__sparkle { width: 35px; height: 35px; left: 3%; bottom: 28px; color: var(--green); }
.nature__ripples { width: 100px; height: 48px; right: 4%; bottom: 18px; color: var(--teal); rotate: -8deg; }
.nature__waves { height: 105px; }
.nature__waves path:first-child { fill: var(--sky); opacity: .7; }
.nature__waves path:last-child { fill: var(--aqua); opacity: .65; }
.marquee { margin-top: 0; padding: 18px 0; background: var(--sky); border-block: 1px solid #153D5714; }
.marquee__strip { gap: 24px; }
.marquee span { padding: 4px 18px 6px; border: 1.5px solid #153D5733; border-radius: 999px 999px 9px 999px; font-family: var(--play); font-size: 19px; background: #FFFFFF8C; rotate: -3deg; }
.marquee span.alt { background: var(--aqua); border-radius: 999px 999px 999px 9px; rotate: 3deg; }
.marquee i { width: 18px; height: 18px; border-radius: 0; background: var(--teal); clip-path: polygon(50% 0, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0 50%, 39% 35%); }
.marquee i.alt { background: #70518D; }

/* Le fasce crescono anche nel linguaggio visivo: più essenziale per i teen. */
.course--baby { --bg: #E5F3EC; --fg: var(--navy); --edge: #B7DACE; --text: var(--ink); --o: 1; }
.course--kids { --bg: #F0ECF7; --fg: var(--navy); --edge: #D2C5E8; --text: var(--ink); --o: 1; }
.course--junior { --bg: #E3F3FA; --fg: var(--navy); --edge: #B4DCEA; --text: var(--ink); --o: 1; }
.course--teen { --bg: var(--navy); --fg: #fff; --edge: #A4E4DB; --text: var(--ink-light); --o: 1; }
.course__word { display: table; align-self: flex-start; margin: 0 0 20px; padding: 7px 14px 10px; border: 1.5px solid currentColor; border-radius: 20px 24px 22px 5px; color: var(--teal); background: #FFFFFFB3; font: 700 15px/1.5 var(--play); rotate: -4deg; }
.course--kids .course__word { color: #70518D; rotate: 4deg; }
.course--junior .course__word { color: var(--blue); rotate: -2deg; }
.course--teen .course__word { border-radius: 14px 14px 4px 14px; background: transparent; color: var(--aqua); rotate: 0deg; }
.course--teen .course__more, .course--teen .course__age { color: var(--aqua); }
.course--teen .nature-icon { background: #28546A; color: var(--aqua); }
.course--teen .age__facts li { background: #28546A; color: var(--aqua); }
.course--teen:hover { transform: translateY(-6px); }
.course--kids .course__heading .nature-icon { color: #70518D; background: #E3D9F2; }
.course--junior .course__heading .nature-icon { color: var(--blue); background: #CBE7F5; }
.course h3 { min-height: 0; }
.course .course__heading { margin-bottom: 18px; }
.courses .course { padding-top: 24px; }
.age__panel { border-color: #AACED4; }
.age__panel .course__word { margin-bottom: 18px; }

.metodo__decor { position: absolute; inset: 0; pointer-events: none; }
.metodo__decor svg { position: absolute; }
.metodo__moon { top: 115px; right: max(30px, calc((100vw - var(--site-width)) / 2)); width: 120px; height: 120px; color: var(--purple); rotate: -18deg; }
.metodo__star { top: 100px; right: max(155px, calc((100vw - var(--site-width)) / 2 + 120px)); width: 42px; height: 42px; color: var(--sky); }
.metodo__waves { bottom: 58px; right: 5%; width: 140px; height: 67px; color: var(--aqua); opacity: .5; }
.metodo__lead { margin-bottom: 26px; }
.word-trail { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 0 0 40px; }
.word-trail .word-bubble { border-color: transparent; font-size: 18px; padding: 8px 20px 11px; rotate: -4deg; }
.word-trail .word-bubble:nth-of-type(3) { background: var(--aqua); rotate: 5deg; }
.word-trail .word-bubble:nth-of-type(5) { background: #DAD0ED; rotate: -3deg; }
.word-trail .word-bubble:last-child { color: var(--aqua); background: transparent; border-color: var(--aqua); rotate: 2deg; }
.word-trail__plus { color: var(--aqua); font-size: 25px; }
.school-mosaic { position: relative; }
.school-mosaic__hello { position: absolute; z-index: 1; right: -10px; top: -24px; rotate: 7deg; background: var(--aqua); font-size: 20px; }
.room-names li { padding: 9px 14px; background: #E5F3EC; border-radius: 22px 22px 7px 22px; }
.room-names li:nth-child(2) { color: #70518D; background: #F0ECF7; }
.room-names li:nth-child(3) { color: var(--blue); background: #E3F3FA; }
.room-names .nature-icon { color: inherit; }
.library-card__note { background: #F0ECF7; }
.library-card__icon { color: #70518D; }
.cta__box { position: relative; }
.cta__box::before, .cta__box::after { content: ''; position: absolute; width: 44px; height: 44px; background: var(--purple); clip-path: polygon(50% 0, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0 50%, 39% 35%); pointer-events: none; }
.cta__box::before { left: 26px; top: 20px; rotate: -15deg; }
.cta__box::after { right: 25px; bottom: 22px; background: var(--teal); width: 34px; height: 34px; }

.page-hero { padding-top: 64px; padding-bottom: 66px; }
.page-conversation { position: absolute; right: 12px; top: 40px; display: flex; flex-direction: column; align-items: flex-end; gap: 32px; width: 28%; pointer-events: none; }
.page-conversation .word-bubble { rotate: 8deg; background: #DAD0ED; font-size: clamp(16px, 1.8vw, 24px); }
.page-conversation .word-bubble + .word-bubble { align-self: flex-start; background: var(--aqua); rotate: -9deg; }
.page-hero__inner:has(.page-conversation) > h1, .page-hero__inner:has(.page-conversation) > .page-hero__lead { max-width: 66%; }
.page-hero .nature__moon { right: 28%; bottom: 30px; width: 65px; height: 65px; opacity: .65; }
.page-hero .nature__star { left: auto; right: 35%; top: 34px; }
.page-hero .nature__ripples { width: 90px; bottom: 22px; right: 5%; opacity: .6; }
.page-hero .nature__leaf { top: 50%; }
.page-hero .nature__waves { height: 45px; opacity: 1; }

@media (min-width: 901px) and (max-width: 1150px) {
  .hero__grid { gap: 36px; }
  .hero h1 { font-size: 32px; }
  .word-bubble--imagine { right: -14px; }
}
@media (max-width: 900px) {
  .hero { padding-top: 42px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 62px; }
  .hero h1 { font-size: clamp(32px, 6vw, 48px); }
  .hero__media { width: calc(100% - 30px); max-width: 560px; justify-self: center; margin: 0 0 24px; }
  .hero__photo { aspect-ratio: 5 / 4; }
  .hero__age { left: -10px; }
  .word-bubble--hello { left: -14px; top: -26px; }
  .word-bubble--imagine { right: -14px; top: 42%; }
  .word-bubble--talk { right: -8px; bottom: 22px; }
  .hero__star { width: 60px; height: 60px; right: 12px; top: -26px; }
  .hero__leaf { left: -18px; width: 56px; height: 56px; bottom: 70px; }
  .nature__moon { left: auto; right: 14%; bottom: 36px; width: 60px; height: 60px; }
  .nature__branch { width: 210px; height: 210px; top: -10px; right: -90px; opacity: .35; }
  .nature__star { left: auto; right: 28%; top: 18px; width: 24px; height: 24px; }
  .nature__leaf { left: -75px; }
  .hero > .nature .nature__leaf, .page-hero .nature__leaf { display: none; }
  .metodo h2 { padding-right: 0; }
  .metodo__moon { width: 70px; height: 70px; top: 42px; right: 30px; }
  .metodo__star { top: 58px; right: 112px; width: 28px; height: 28px; }
  .page-conversation { position: static; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 18px; width: auto; margin: 0 0 30px; }
  .page-conversation .word-bubble { padding: 7px 16px 10px; rotate: -4deg; font-size: 16px; }
  .page-conversation .word-bubble + .word-bubble { rotate: 4deg; }
  .page-hero__inner:has(.page-conversation) > h1, .page-hero__inner:has(.page-conversation) > .page-hero__lead { max-width: 100%; }
}
@media (max-width: 600px) {
  .hero { padding-inline: 22px; padding-bottom: 75px; }
  .hero h1 { font-size: clamp(22px, 6.4vw, 34px); letter-spacing: -.045em; }
  .hero__eyebrow { max-width: 26em; font-size: 11px; }
  .hero__lead { font-size: 18px; }
  .hero__cue { font-size: 11px; letter-spacing: .08em; margin-top: 28px; }
  .hero__media { width: calc(100% - 16px); }
  .hero__photo { aspect-ratio: 1 / 1; }
  .hero__age { padding: 12px 14px; left: -8px; bottom: -28px; }
  .hero__age-num { font-size: 23px; }
  .hero__age-label { font-size: 11px; }
  .word-bubble--hello { font-size: 21px; padding: 10px 22px 15px; }
  .word-bubble--imagine, .word-bubble--talk { font-size: 15px; padding: 9px 14px 12px; }
  .word-bubble--talk { bottom: 28px; }
  .title, .corsi .title, .centro .title, .cta .title { font-size: clamp(25px, 6.8vw, 34px); letter-spacing: -.04em; }
  .page-hero h1 { font-size: clamp(27px, 7.3vw, 38px); }
  .page-hero .hl { display: inline; }
  .page-hero .hl__line { display: none; }
  .page-hero .hl > span:first-child { text-decoration: underline; text-decoration-color: var(--aqua); text-decoration-thickness: 5px; text-underline-offset: 5px; }
  .page-hero .nature__star { display: none; }
  .metodo h2 { font-size: clamp(27px, 7vw, 36px); }
  .word-trail { gap: 8px; }
  .word-trail .word-bubble { font-size: 13px; padding: 7px 11px 9px; }
  .word-trail__plus { font-size: 18px; }
  .school-mosaic__hello { font-size: 15px; padding: 9px 16px 12px; right: 0; }
  .cta__box { padding: 52px 24px; }
  .cta__box::before { width: 28px; height: 28px; left: 14px; top: 10px; }
  .cta__box::after { width: 24px; height: 24px; right: 12px; bottom: 12px; }
}
@keyframes hd-conversation { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@media (prefers-reduced-motion: no-preference) {
  .hero__conversation .word-bubble { animation: hd-conversation 6s ease-in-out 2; }
  .hero__conversation .word-bubble--imagine { animation-delay: -2s; }
  .hero__conversation .word-bubble--talk { animation-delay: -4s; }
}
@media (prefers-reduced-motion: reduce) {
  .course, .word-bubble { transition: none; }
}
