/* Scuola del Lago — landing */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 600;
  font-display: swap;
  src: url('../fonts/newsreader.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans.woff2') format('woff2');
}

:root {
  /* Colori campionati dal logo */
  --blue: #00417e;
  --blue-deep: #00305e;
  --teal: #016f7d;
  --cyan: #01a1c2;

  --sand: #b9823a;
  --lake-900: #0a1926;
  --lake-800: #0f273d;

  /* Tinte chiare per sfondi e card */
  --cyan-soft: #e2f3f7;
  --blue-soft: #e7eef7;
  --teal-soft: #e0f0ee;
  --sand-soft: #f6eedf;

  --bg: #fbfaf6;
  --bg-tint: #edf6f7;
  --surface: #ffffff;
  --ink: #1d2a35;
  --ink-soft: #4c5a66;
  --ink-faint: #8a959e;
  --line: #dfe5e7;

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --text: 'Newsreader', Georgia, serif;
  /* Sans solo per i testi funzionali: pulsanti, menu, etichette */
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 14px;
  --wrap: 1080px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h1 em, h2 em {
  font-style: italic; color: var(--blue);
  background: linear-gradient(100deg, var(--blue) 20%, var(--cyan) 95%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  /* il corsivo sporge dal riquadro: lo allargo (anche sotto, per le code) senza spostare il testo */
  padding: 0 .12em .14em;
  margin: 0 -.12em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon--lg { width: 44px; height: 44px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.9rem;
}
.lead { color: var(--ink-soft); font-size: 1.2rem; max-width: 36em; }

/* Pulsanti */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 50px;
  padding: 0.7em 1.5em;
  border-radius: 999px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  font: 600 0.95rem/1.2 var(--sans);
  word-spacing: 0.1em;
  text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn--ghost { background: transparent; color: var(--blue); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); border-color: var(--blue); }
.btn--small { min-height: 40px; padding: 0.45em 1.1em; font-size: 0.86rem; white-space: nowrap; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* Barra superiore */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 246, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.topbar__brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--serif); font-size: 1.35rem; color: var(--blue);
}
.topbar__brand img { width: 40px; }
.topbar__nav { display: flex; gap: 28px; margin-left: auto; }
.topbar__nav a { text-decoration: none; color: var(--ink-soft); font-family: var(--sans); font-size: 0.9rem; font-weight: 500; }
.topbar__nav a:hover { color: var(--blue); }

/* Su schermi medi resta solo il pulsante di prenotazione */
@media (max-width: 960px) {
  .topbar__nav { display: none; }
  .topbar__inner { justify-content: space-between; }
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 104px) 0 clamp(96px, 13vw, 160px);
  text-align: center;
  background:
    radial-gradient(60% 50% at 12% 8%, rgba(1, 161, 194, 0.16), transparent 70%),
    radial-gradient(50% 45% at 90% 22%, rgba(0, 65, 126, 0.10), transparent 70%),
    radial-gradient(40% 35% at 70% 92%, rgba(185, 130, 58, 0.08), transparent 70%),
    linear-gradient(180deg, #eef7f8 0%, var(--bg) 85%);
}
.hero__wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(40px, 6vw, 90px); }
.hero__wave-back { fill: rgba(1, 161, 194, 0.12); }
.hero__wave-front { fill: var(--bg); }
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__logo { width: clamp(180px, 34vw, 280px); }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); max-width: 14em; margin-bottom: 1.25rem; }
.hero .lead { margin: 0 auto; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 2.25rem; }

/* Sezioni */
.section { padding: clamp(64px, 10vw, 112px) 0; }
.section--tint { background: linear-gradient(180deg, var(--bg-tint), #e4f1f4); }
.section--deep {
  color: #fff;
  background:
    radial-gradient(55% 60% at 15% 0%, rgba(1, 161, 194, 0.28), transparent 70%),
    radial-gradient(45% 50% at 95% 100%, rgba(43, 179, 187, 0.16), transparent 70%),
    linear-gradient(160deg, var(--lake-800), var(--lake-900) 75%);
}
.section--deep .eyebrow { color: #7ec4c8; }
.section--deep h2 { color: #fff; }
.section__head { margin-bottom: clamp(32px, 5vw, 56px); }
.section h2 { font-size: clamp(2.1rem, 5vw, 3.2rem); }

/* Chi siamo */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about__text .lead { margin-top: 1.1rem; }
.about__founder {
  margin-top: 1.5rem; padding-left: 14px;
  border-left: 2px solid var(--cyan);
  color: var(--ink-soft); font-size: 1.05rem;
}
.about__founder strong { color: var(--blue); font-weight: 600; }
.values { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 1.6rem 0 0; padding: 0; }
.values li { padding: 6px 14px; border-radius: 999px; font-family: var(--sans); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em; background: var(--cyan-soft); color: var(--teal); }
.values li:nth-child(2) { background: var(--blue-soft); color: var(--blue); }
.values li:nth-child(3) { background: var(--sand-soft); color: #8a5d22; }
.about__quote {
  position: relative; overflow: hidden;
  margin: 0; padding: clamp(32px, 4.5vw, 52px);
  border-radius: 22px;
  background: linear-gradient(150deg, var(--blue), #0a5e8f 55%, var(--cyan));
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 65, 126, 0.18);
}
.about__quote::before {
  content: '\201C';
  position: absolute; top: -0.12em; right: 0.12em;
  font-family: var(--serif); font-size: 9rem; line-height: 1;
  color: rgba(255, 255, 255, 0.16);
}
.about__quote p { position: relative; font-family: var(--serif); font-style: italic; font-size: clamp(1.7rem, 3.2vw, 2.3rem); line-height: 1.2; }

/* Cosa facciamo */
.offer {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(14px, 2vw, 22px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.offer li {
  --tone: var(--cyan); --tone-soft: var(--cyan-soft);
  position: relative; overflow: hidden;
  padding: clamp(24px, 3.5vw, 36px);
  border-radius: 18px;
  background: linear-gradient(160deg, var(--tone-soft), rgba(255, 255, 255, 0.6));
}
.offer li:nth-child(2) { --tone: var(--blue); --tone-soft: var(--blue-soft); }
.offer li:nth-child(3) { --tone: var(--teal); --tone-soft: var(--teal-soft); }
.offer li:nth-child(4) { --tone: var(--sand); --tone-soft: var(--sand-soft); }
.offer__num { display: block; font-family: var(--sans); font-size: 0.78rem; color: var(--tone); letter-spacing: 0.1em; margin-bottom: 10px; font-weight: 600; }
.offer h3 { font-size: 1.75rem; margin-bottom: 0.5rem; color: var(--blue); }
.offer p { color: var(--ink-soft); }

/* Video */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}
.video iframe, .video__poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__poster {
  background: #0b1d2c center / cover no-repeat;
  cursor: pointer;
  display: grid; place-items: center;
}
.video__play {
  display: grid; place-items: center;
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92); color: var(--blue);
  transition: transform .2s;
}
.video__play .icon { width: 30px; height: 30px; margin-left: 4px; }
.video__poster:hover .video__play { transform: scale(1.06); }
.video__soon {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: rgba(255, 255, 255, 0.72); text-align: center; padding: 24px;
}
.video__soon p { font-size: 1.1rem; }

/* Social (sotto il logo) */
.socials__label {
  margin-bottom: 14px;
  font-family: var(--sans); font-weight: 600;
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint);
}
.socials {
  list-style: none; margin: 0 0 clamp(36px, 6vw, 52px); padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.social {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 16px 8px 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--blue);
  text-decoration: none; font-family: var(--sans); font-size: 0.88rem; font-weight: 500; line-height: 1.2;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.social .icon { width: 20px; height: 20px; }
a.social:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(1, 161, 194, 0.14); }
.social.is-soon { color: var(--ink-faint); background: transparent; border-style: dashed; cursor: not-allowed; }
.social small {
  font-size: 0.58rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
  padding: 2px 8px; border-radius: 999px; background: var(--bg-tint); color: var(--ink-soft);
}

/* Contatti */
.contact { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.contact__intro .lead { margin: 1.1rem 0 2rem; }
.contact__list {
  list-style: none; margin: 0; padding: 8px 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.contact__list li { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; }
.contact__list li + li { border-top: 1px solid var(--line); }
.contact__list .icon { color: var(--teal); margin-top: 4px; }
.contact__list .label { display: block; font-family: var(--sans); font-weight: 600; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.contact__list a { color: var(--blue); text-decoration: none; font-size: 1.15rem; }
.contact__list a:hover { text-decoration: underline; }
.placeholder { color: var(--ink-faint); font-style: italic; }

/* Footer */
.footer { padding: 40px 0; border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: center; gap: 14px; color: var(--ink-faint); font-family: var(--sans); font-size: 0.82rem; }
.footer__inner img { width: 44px; }

/* CTA fissa su mobile */
.mobile-cta { display: none; }

@media (max-width: 760px) {
  .topbar__nav { display: none; }
  .topbar__inner { justify-content: space-between; }
  .topbar .btn--small { display: none; }
  .offer { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .socials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 340px; }
  .social { display: flex; justify-content: center; width: 100%; height: 100%; min-height: 56px; padding: 8px 10px; border-radius: 18px; }
  .social.is-soon { flex-wrap: wrap; row-gap: 2px; }
  .contact { grid-template-columns: 1fr; }
  .contact__list { padding: 4px 20px; }
  .hero__actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; }

  body { padding-bottom: 84px; }
  .mobile-cta {
    position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 20;
    display: flex; align-items: center; justify-content: center; gap: 0.55em;
    min-height: 54px; border-radius: 999px;
    background: var(--blue); color: #fff; text-decoration: none; font-family: var(--sans); font-size: 0.95rem; font-weight: 600; word-spacing: 0.1em;
    box-shadow: 0 10px 30px rgba(0, 48, 94, 0.25);
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .show-cta .mobile-cta { opacity: 1; visibility: visible; transform: none; }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .mobile-cta { transition: none; }
}

/* ==========================================================================
   Effetti leggeri
   ========================================================================== */

/* Barra superiore: il bordo compare solo dopo aver iniziato a scorrere */
.topbar { border-bottom-color: transparent; transition: border-color .3s, box-shadow .3s; }
.is-scrolled .topbar { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(0, 48, 94, 0.05); }

/* Hero: entrata morbida in sequenza */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes settle {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: none; }
}
.hero__mark { animation: settle 1.2s cubic-bezier(.2, .7, .2, 1) both; }
.hero .socials__label, .hero .socials, .hero .eyebrow, .hero h1, .hero .lead, .hero__actions { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero .socials__label, .hero .socials { animation-delay: .42s; }
.hero .eyebrow  { animation-delay: .42s; }
.hero h1        { animation-delay: .54s; }
.hero .lead     { animation-delay: .66s; }
.hero__actions  { animation-delay: .78s; }

/* Hero: specchio d'acqua sotto il logo (disegnato da landing.js) */
.hero { overflow: hidden; }
.hero__mark { position: relative; display: grid; place-items: center; margin-bottom: clamp(60px, 8vw, 84px); }
.hero__mark .hero__logo { position: relative; margin-bottom: 0; }
.hero__water {
  position: absolute;
  left: 50%; top: 92%;
  width: 360%; aspect-ratio: 3.6 / 1.5;
  transform: translate(-50%, -50%);
  pointer-events: none;
  /* le onde si dissolvono prima del bordo: nessun taglio dritto */
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent);
          mask-image: radial-gradient(closest-side, #000 62%, transparent);
  opacity: 0;
  transition: opacity 1.4s ease .2s;
}
.hero__water.is-on { opacity: 1; }

/* Hero: particelle di luce attorno al logo (disegnate da landing.js) */
.hero__particles {
  position: absolute;
  left: 50%; top: 50%;
  width: 190%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s ease .4s;
}
.hero__particles.is-on { opacity: 1; }
/* Il testo sotto resta sopra le particelle */
.hero__inner > :not(.hero__mark) { position: relative; z-index: 1; }

/* Intro alla prima visita: il logo si dipinge con una pennellata circolare,
   mentre la goccia, l'acqua e le particelle sono disegnate da landing.js */
@property --sweep { syntax: '<angle>'; inherits: false; initial-value: 400deg; }
.intro .hero__mark { animation: none; }
.intro .hero__water, .intro .hero__particles { transition: none; }
.intro .hero__logo {
  -webkit-mask-image: conic-gradient(from -115deg, #000 var(--sweep), transparent calc(var(--sweep) + 28deg));
          mask-image: conic-gradient(from -115deg, #000 var(--sweep), transparent calc(var(--sweep) + 28deg));
  animation: brush .95s cubic-bezier(.6, 0, .3, 1) 1.2s both;
}
@keyframes brush {
  from { --sweep: -30deg; transform: scale(.965); }
  to   { --sweep: 400deg; transform: none; }
}

/* Comparsa allo scorrimento */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Le linee sopra le attività si disegnano da sinistra */
.offer li::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tone), transparent 85%);
  transform-origin: left;
}
.js .offer li.reveal::before { transform: scaleX(0); transition: transform 1.2s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0ms) + .15s); }
.js .offer li.reveal.is-visible::before { transform: none; }

/* Leggero riflesso sui pulsanti principali al passaggio del mouse */
.btn:not(.btn--ghost) { position: relative; overflow: hidden; isolation: isolate; }
.btn:not(.btn--ghost)::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%);
  transform: translateX(-100%);
  z-index: -1;
}
.btn:not(.btn--ghost):hover::after { transform: translateX(100%); transition: transform .8s ease; }

/* Chi preferisce meno movimento vede tutto subito, senza animazioni */
@media (prefers-reduced-motion: reduce) {
  .intro .hero__logo { animation: none; -webkit-mask-image: none; mask-image: none; }
  .hero__mark, .hero .socials__label, .hero .socials, .hero .eyebrow, .hero h1, .hero .lead, .hero__actions { animation: none; }
  .js .reveal, .js .offer li.reveal::before { opacity: 1; transform: none; transition: none; }
  .btn::after { display: none; }
}
