/* =========================================================
   FIAS · Aquatica Sub — foglio di stile principale
   ========================================================= */

:root {
  --ink: #eaf7fb;
  --ink-soft: rgba(234, 247, 251, .74);
  --ink-faint: rgba(234, 247, 251, .5);
  --line: rgba(234, 247, 251, .14);
  --glass: rgba(255, 255, 255, .06);
  --glass-strong: rgba(255, 255, 255, .1);
  --abyss: #020c18;
  --deep: #05264a;
  --mid: #0b5a86;
  --shallow: #1590b5;
  --surface: #6fd8e0;
  --sky: #d9f3f5;
  --coral: #ff6a45;
  --coral-soft: #ff9a7c;
  --sun: #ffd166;
  --flag: #e63946;
  --ok: #38d9a9;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .55);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--abyss);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--coral); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 .4em;
  font-weight: 700;
}
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--coral-soft);
  display: inline-flex;
  align-items: center;
  gap: .6em;
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.section-title { font-size: clamp(2.2rem, 5.5vw, 4rem); }
.section-lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 60ch; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .85em 1.4em;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 10px 30px -10px rgba(255, 106, 69, .8); }
.btn-primary:hover { background: #ff7d5c; }
.btn-ghost { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .04); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }
.btn-sm { padding: .55em 1em; font-size: .88rem; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Oceano di sfondo ---------- */
.ocean {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: linear-gradient(180deg, #127ea4, #0a4f7c);
  transition: background .25s linear;
}
.rays {
  position: fixed;
  inset: -20% -10% 0;
  z-index: -2;
  pointer-events: none;
  background:
    repeating-linear-gradient(100deg,
      rgba(255, 255, 255, 0) 0 60px,
      rgba(255, 255, 255, .07) 60px 90px,
      rgba(255, 255, 255, 0) 90px 170px,
      rgba(255, 255, 255, .04) 170px 185px,
      rgba(255, 255, 255, 0) 185px 260px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
  transform-origin: 50% 0;
  animation: sway 14s ease-in-out infinite alternate;
  transition: opacity .3s linear;
}
@keyframes sway {
  from { transform: skewX(-4deg) translateX(-2%); }
  to { transform: skewX(5deg) translateX(2%); }
}
#bubbles { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body.static-ocean .ocean { background: radial-gradient(120% 80% at 50% -10%, #0b4a78 0%, #052a4c 40%, var(--abyss) 100%); }
body.static-ocean .rays { opacity: .35; }

@media (prefers-reduced-motion: reduce) {
  .rays { animation: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background .3s ease, box-shadow .3s ease, color .3s ease;
}
.site-header.scrolled {
  background: rgba(3, 18, 34, .72);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 1px 0 var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  line-height: 1;
}
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-text strong { display: block; font-size: 1.15rem; letter-spacing: -.01em; }
.brand-text small { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; opacity: .7; margin-top: 4px; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block;
  padding: .5em .9em;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  transition: background .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background: rgba(255, 255, 255, .1); }
.nav-links .btn { margin-left: 8px; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .2);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .25s, background .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* header sopra il cielo (solo home, in cima) */
body.at-surface .site-header:not(.scrolled) { color: #063047; }
body.at-surface .site-header:not(.scrolled) .nav-links .btn-primary { color: #fff; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: 72px 12px auto 12px;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: rgba(3, 18, 34, .96);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .2s, transform .2s;
  }
  .nav-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: .8em 1em; }
  .nav-links .btn { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero-sky {
  position: absolute;
  inset: 0 0 auto 0;
  height: 30vh;
  min-height: 190px;
  background:
    radial-gradient(60% 120% at 78% 0%, rgba(255, 237, 190, .95) 0%, rgba(255, 237, 190, 0) 60%),
    linear-gradient(180deg, #bfe9f0 0%, #e8f8f6 100%);
}
.hero-sun {
  position: absolute;
  right: 14%;
  top: 8vh;
  width: 74px; height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6d8 0 40%, rgba(255, 220, 130, .7) 60%, rgba(255, 220, 130, 0) 72%);
  filter: blur(.3px);
}
.hero-waves {
  position: absolute;
  left: 0; right: 0;
  top: calc(max(30vh, 190px) - 46px);
  height: 90px;
  pointer-events: none;
}
.hero-waves svg { position: absolute; inset: 0; width: 200%; height: 100%; }
.hero-waves .w1 { animation: waves 16s linear infinite; }
.hero-waves .w2 { animation: waves 24s linear infinite reverse; opacity: .7; }
@keyframes waves { to { transform: translateX(-50%); } }

.hero-body {
  position: relative;
  margin-top: calc(max(30vh, 190px) + 40px);
  padding-bottom: 80px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero h1 {
  font-size: clamp(3.4rem, 12vw, 9.5rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.045em;
  margin-bottom: .25em;
}
.hero h1 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, .9);
}
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.hero-scroll i { width: 1px; height: 38px; background: linear-gradient(var(--ink-faint), transparent); animation: drip 2s ease-in-out infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

.diver-flag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}
.diver-flag svg { width: 34px; height: 24px; border-radius: 3px; box-shadow: 0 4px 12px rgba(0,0,0,.3); }

/* ---------- Sezioni ---------- */
.section { position: relative; padding: clamp(80px, 12vw, 150px) 0; }
.section-head { margin-bottom: clamp(40px, 6vw, 70px); }
.section-head.center { text-align: center; }
.section-head.center .section-lead { margin-inline: auto; }
.section-head.center .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; }

/* intro + numeri */
.intro-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: end; }
.intro-grid p.big { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.2; letter-spacing: -.015em; font-weight: 500; }
.intro-grid p.big strong { color: var(--sun); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: rgba(4, 30, 55, .55); padding: 26px 22px; backdrop-filter: blur(8px); }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; letter-spacing: -.03em; }
.stat b small { font-size: .45em; color: var(--coral-soft); margin-left: 2px; }
.stat span { font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; } }

/* ---------- Percorso corsi (la discesa) ---------- */
.descent { position: relative; padding-left: 120px; }
.descent::before {
  content: "";
  position: absolute;
  left: 48px; top: 0; bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.5) 0 8px, transparent 8px 16px);
}
.descent-line {
  position: absolute;
  left: 46px; top: 0;
  width: 6px;
  height: var(--progress, 0%);
  border-radius: 3px;
  background: linear-gradient(180deg, var(--sun), var(--coral));
  box-shadow: 0 0 20px rgba(255, 106, 69, .6);
}
.dive-stop { position: relative; margin-bottom: clamp(70px, 14vh, 140px); }
.dive-stop:last-child { margin-bottom: 0; }
.depth-tag {
  position: absolute;
  left: -120px;
  top: 26px;
  width: 98px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 999px;
  background: var(--abyss);
  border: 1px solid rgba(255,255,255,.3);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.02em;
  z-index: 1;
  transition: background .3s, border-color .3s, color .3s;
}
.dive-stop.reached .depth-tag { background: var(--coral); border-color: var(--coral); color: #fff; }

.course-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 30px;
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: var(--radius);
  background: linear-gradient(140deg, rgba(255,255,255,.1), rgba(255,255,255,.03));
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s;
}
.course-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.3); }
.course-card h3 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin-bottom: .15em; }
.course-card .tagline { color: var(--ink-soft); font-size: 1.05rem; max-width: 56ch; }
.stars { color: var(--sun); letter-spacing: .15em; font-size: 1rem; margin-bottom: .6rem; display: flex; align-items: center; gap: .6em; }
.stars small { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--ink-faint); text-transform: uppercase; }
.course-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .4rem; grid-column: 1 / -1; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .38em .8em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.18);
  font-size: .84rem;
  color: var(--ink-soft);
}
.chip svg { width: 14px; height: 14px; opacity: .8; }
.course-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 14px; }
.big-depth { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 7vw, 5.4rem); line-height: .85; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.55); }
.course-card.tech { background: linear-gradient(140deg, rgba(255,106,69,.14), rgba(255,255,255,.02)); }
.tech-label { display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; padding: .3em .7em; border-radius: 4px; background: rgba(255,106,69,.2); color: var(--coral-soft); margin-left: .6em; vertical-align: middle; }

@media (max-width: 720px) {
  .descent { padding-left: 0; }
  .descent::before, .descent-line { left: 18px; }
  .depth-tag { position: relative; left: 0; top: 0; width: auto; display: inline-flex; padding: 0 14px; margin-bottom: 12px; }
  .dive-stop { padding-left: 46px; }
  .course-card { grid-template-columns: 1fr; }
  .course-side { flex-direction: row; align-items: center; }
}

/* specialità */
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.spec {
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: background .25s, transform .25s, border-color .25s;
}
.spec:hover { background: var(--glass-strong); transform: translateY(-3px); border-color: rgba(255,255,255,.28); }
.spec-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,209,102,.14); color: var(--sun); margin-bottom: 16px; }
.spec-icon svg { width: 24px; height: 24px; }
.spec h4 { font-size: 1.25rem; margin-bottom: .3em; }
.spec p { font-size: .93rem; color: var(--ink-soft); margin: 0; }

/* ---------- Esperienze (anteprima e lista) ---------- */
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.trip-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  background: #04203a;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.trip-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.trip-card:hover img { transform: scale(1.06); }
.trip-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2,12,24,0) 35%, rgba(2,12,24,.92) 100%);
  z-index: 1;
}
.trip-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; z-index: 2; }
.trip-info h3 { font-size: 1.55rem; margin-bottom: .2em; }
.trip-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; color: var(--ink-soft); }
.trip-meta span { display: inline-flex; align-items: center; gap: .35em; }
.trip-meta svg { width: 14px; height: 14px; }
.trip-badge {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  padding: .4em .75em; border-radius: 999px;
  background: rgba(2,12,24,.6); backdrop-filter: blur(6px);
  border: 1px solid var(--line);
}
.trip-count { left: auto; right: 16px; }
.trip-card.featured { grid-column: span 2; aspect-ratio: auto; min-height: 100%; }
@media (max-width: 700px) { .trip-card.featured { grid-column: auto; aspect-ratio: 4/5; } }

.empty-state {
  padding: 50px 30px;
  text-align: center;
  border: 1px dashed rgba(255,255,255,.25);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

/* ---------- Sosta di sicurezza ---------- */
.safety-stop {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: calc(var(--radius) * 1.4);
  background: linear-gradient(120deg, rgba(255,209,102,.16), rgba(255,255,255,.04));
  border: 1px solid rgba(255,209,102,.3);
}
.stop-timer {
  width: clamp(150px, 20vw, 200px);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
}
.stop-timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.stop-timer circle { fill: none; stroke-width: 6; }
.stop-timer .track { stroke: rgba(255,255,255,.12); }
.stop-timer .bar { stroke: var(--sun); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.stop-timer .readout { text-align: center; font-family: var(--font-mono); }
.stop-timer .readout b { display: block; font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.stop-timer .readout small { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-faint); }
.club-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 1.6rem; }
.club-points div { border-top: 1px solid var(--line); padding-top: 14px; }
.club-points h4 { font-size: 1.05rem; margin-bottom: .25em; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.club-points p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) { .safety-stop { grid-template-columns: 1fr; justify-items: center; text-align: left; } }

/* ---------- Contatti ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 6vw, 80px); }
.contact-list { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.12); }
.contact-list .ic svg { width: 20px; height: 20px; }
.contact-list b { display: block; font-size: .8rem; font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500; }
.form {
  display: grid;
  gap: 14px;
  padding: clamp(24px, 4vw, 38px);
  border-radius: var(--radius);
  background: rgba(2, 20, 38, .45);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: .97rem;
  color: var(--ink);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-sm);
  padding: .75em .9em;
  transition: border-color .2s, background .2s;
}
.field select option { color: #0b2236; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sun); background: rgba(255,255,255,.1); }
.form-note { font-size: .8rem; color: var(--ink-faint); margin: 0; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form .row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  padding: 50px 0 40px;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  color: var(--ink-soft);
}
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: #fff; }

/* ---------- Computer subacqueo ---------- */
.dive-computer {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 196px;
  padding: 10px;
  border-radius: 26px;
  background: linear-gradient(160deg, #2b3440, #0d1117);
  box-shadow: 0 18px 40px -10px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.15);
  font-family: var(--font-mono);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .3s;
}
.dive-computer.hidden { transform: translateY(140%); opacity: 0; }
.dc-screen {
  border-radius: 18px;
  background: radial-gradient(120% 100% at 30% 0%, #0f2a2d, #050a0b);
  padding: 10px 12px 8px;
  color: #b8ffe9;
  text-shadow: 0 0 8px rgba(120,255,210,.45);
  position: relative;
  overflow: hidden;
}
.dc-top { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .12em; opacity: .7; }
.dc-depth { display: flex; align-items: baseline; gap: 4px; margin: 2px 0; }
.dc-depth b { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.dc-depth small { font-size: 13px; opacity: .8; }
.dc-depth .dc-arrow { margin-left: auto; font-size: 13px; opacity: .8; }
.dc-row { display: flex; justify-content: space-between; font-size: 11px; font-variant-numeric: tabular-nums; }
.dc-row span { opacity: .6; font-size: 9px; letter-spacing: .1em; display: block; }
.dc-profile { display: block; width: 100%; height: 34px; margin-top: 6px; }
.dc-profile path.p { fill: rgba(184,255,233,.12); stroke: #b8ffe9; stroke-width: 1.2; }
.dc-profile circle { fill: var(--coral); filter: drop-shadow(0 0 3px var(--coral)); }
.dc-alert {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(230, 57, 70, .9);
  color: #fff; text-shadow: none;
  font-weight: 700; font-size: 14px; letter-spacing: .1em; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.dc-alert.on { opacity: 1; animation: blink .5s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }
.dc-buttons { display: flex; justify-content: space-between; padding: 6px 8px 0; }
.dc-buttons button {
  width: 46px; height: 16px; border-radius: 8px; border: 0; cursor: pointer;
  background: linear-gradient(#3b4552, #1a2029);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
  font-size: 8px; letter-spacing: .1em; color: #9aa7b4;
}
.dc-buttons button:hover { color: #fff; }
@media (max-width: 600px) {
  .dive-computer { width: 150px; right: 10px; bottom: 10px; padding: 7px; border-radius: 20px; }
  .dc-depth b { font-size: 30px; }
  .dc-profile { height: 24px; }
}

/* ---------- Dialog corsi ---------- */
dialog.sheet {
  width: min(760px, 100% - 24px);
  max-height: min(88vh, 900px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.2);
  background: linear-gradient(170deg, #0a3557, #041a30);
  color: var(--ink);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.8);
}
dialog.sheet::backdrop { background: rgba(1, 8, 16, .7); backdrop-filter: blur(6px); }
dialog.sheet[open] { animation: sheetIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(30px) scale(.98); } }
.sheet-inner { padding: clamp(26px, 4vw, 44px); overflow: auto; max-height: inherit; }
.sheet-close {
  position: sticky; top: 0; float: right;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(0,0,0,.3);
  cursor: pointer; font-size: 20px; line-height: 1;
  margin: -10px -10px 0 10px;
}
.sheet h2 { font-size: clamp(2rem, 5vw, 3rem); }
.sheet h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--coral-soft); margin: 1.8em 0 .8em; font-weight: 500; }
.sheet ul.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sheet ul.ticks li { position: relative; padding-left: 28px; color: var(--ink-soft); }
.sheet ul.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 10px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg) scale(.8); }
.sheet .facts-table { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius-sm); overflow: hidden; margin-top: 1.4rem; }
.sheet .facts-table div { background: rgba(2, 20, 38, .7); padding: 14px 16px; }
.sheet .facts-table b { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500; margin-bottom: 2px; }
.sheet-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2rem; }

/* ---------- Pagine interne ---------- */
.page-hero { padding: 150px 0 50px; }
.page-hero h1 { font-size: clamp(2.8rem, 8vw, 6rem); font-weight: 800; letter-spacing: -.04em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 30px; }
.toolbar .search {
  flex: 1 1 240px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; height: 46px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--line);
}
.toolbar .search svg { width: 18px; height: 18px; opacity: .6; }
.toolbar .search input { flex: 1; background: none; border: 0; color: inherit; font: inherit; outline: none; }
.pill { height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 500; }
.pill[aria-pressed="true"] { background: #fff; color: var(--abyss); border-color: #fff; }

/* galleria singola */
.gallery-hero { position: relative; min-height: 70vh; display: flex; align-items: flex-end; padding: 140px 0 50px; overflow: hidden; }
.gallery-hero .cover { position: absolute; inset: 0; z-index: -1; }
.gallery-hero .cover img { width: 100%; height: 100%; object-fit: cover; }
.gallery-hero .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2,12,24,.4) 0%, rgba(2,12,24,.2) 40%, var(--abyss) 100%); }
.gallery-hero h1 { font-size: clamp(2.6rem, 8vw, 6.5rem); font-weight: 800; letter-spacing: -.04em; max-width: 14ch; }
.gallery-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.gallery-desc { font-size: 1.15rem; color: var(--ink-soft); max-width: 65ch; margin: 30px 0 50px; }
.back-link { display: inline-flex; align-items: center; gap: .5em; text-decoration: none; color: var(--ink-soft); font-size: .92rem; margin-bottom: 1.2rem; }
.back-link:hover { color: #fff; }

.masonry { columns: 3 300px; column-gap: 14px; }
.masonry figure {
  margin: 0 0 14px;
  break-inside: avoid;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  background: rgba(255,255,255,.05);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1);
}
.masonry figure.in { opacity: 1; transform: none; }
.masonry img { width: 100%; height: auto; transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .3s; }
.masonry figure:hover img { transform: scale(1.04); }
.masonry figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 30px 14px 12px;
  font-size: .86rem;
  background: linear-gradient(transparent, rgba(2,12,24,.85));
  opacity: 0; transition: opacity .3s;
}
.masonry figure:hover figcaption { opacity: 1; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(1, 6, 12, .96);
  display: grid;
  grid-template-rows: auto 1fr auto;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb-top, .lb-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.lb-counter { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }
.lb-actions { display: flex; gap: 8px; }
.lb-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.06);
  display: grid; place-items: center; cursor: pointer;
  text-decoration: none;
}
.lb-btn:hover { background: rgba(255,255,255,.16); }
.lb-btn svg { width: 20px; height: 20px; }
.lb-stage { position: relative; display: grid; place-items: center; overflow: hidden; touch-action: pan-y; }
.lb-stage img { max-width: calc(100vw - 140px); max-height: calc(100vh - 160px); object-fit: contain; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.6); transition: opacity .25s, transform .25s; }
.lb-stage img.swap { opacity: 0; transform: scale(.98); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-caption { color: var(--ink-soft); font-size: .95rem; text-align: center; flex: 1; }
.lb-progress { position: absolute; left: 0; top: 0; height: 2px; background: var(--coral); width: 0; }
@media (max-width: 700px) {
  .lb-stage img { max-width: 100vw; max-height: calc(100vh - 150px); border-radius: 0; }
  .lb-nav { display: none; }
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .masonry figure { opacity: 1; transform: none; transition: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 10px; z-index: 200; background: #fff; color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 10px; }

/* mappa sede */
.map { margin-top: 24px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: rgba(255,255,255,.05); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: saturate(.8) contrast(1.05); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* pulsante per riaccendere il computer */
.dc-show {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px 10px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(184,255,233,.35);
  background: linear-gradient(160deg, #2b3440, #0d1117); color: #b8ffe9;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.7);
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: opacity .3s, transform .3s cubic-bezier(.2,.8,.2,1), border-color .2s;
}
.dc-show svg { width: 20px; height: 20px; }
.dc-show:hover { border-color: #b8ffe9; }
.dive-computer.hidden ~ .dc-show { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 600px) { .dc-show { right: 10px; bottom: 10px; } .dc-show span { display: none; } .dc-show { padding: 10px; } }

/* ---------- Logo / mascotte ---------- */
.brand-mark { width: auto; height: 54px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.brand-text strong { font-size: 1.45rem; font-weight: 800; letter-spacing: -.025em; line-height: 1; }
.brand-fias {
  display: inline-block; font-family: var(--font-mono); font-weight: 700; font-size: 10px; letter-spacing: .22em;
  padding: 2px 7px 2px 9px; border-radius: 4px; background: var(--flag); color: #fff; line-height: 1.4;
}
.brand-text small { margin-top: 1px; }
body.at-surface .site-header:not(.scrolled) .brand-text strong { color: #052a46; }
.site-footer .brand-mark { height: 46px; }

.hero-club { display: flex; align-items: center; gap: 12px; margin-bottom: 1.1rem; }
.hero-fias {
  font-family: var(--font-mono); font-weight: 700; font-size: clamp(.8rem, 1.4vw, 1rem); letter-spacing: .25em;
  padding: .35em .6em .35em .8em; border-radius: 6px; background: var(--flag); color: #fff;
  box-shadow: 0 6px 18px -6px rgba(230,57,70,.8);
}
.hero-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3.6vw, 2.6rem); letter-spacing: -.03em; line-height: 1; }

.hero-mascot {
  position: absolute; z-index: 2;
  right: max(4vw, calc((100vw - var(--wrap)) / 2));
  top: calc(max(30vh, 190px) - clamp(110px, 14vw, 190px));
  width: clamp(200px, 27vw, 380px); height: auto;
  filter: drop-shadow(0 25px 30px rgba(0, 20, 40, .45));
  animation: bob 6s ease-in-out infinite;
  transform-origin: 50% 80%;
  cursor: pointer;
}
.hero-mascot:hover { animation-duration: 2.5s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-18px) rotate(3deg); }
}
.hero-body { position: relative; z-index: 3; }
@media (max-width: 900px) {
  .hero-mascot { width: clamp(120px, 30vw, 200px); top: calc(max(30vh, 190px) - 120px); right: 12px; }
}
@media (max-width: 520px) {
  .hero-mascot { width: 112px; top: calc(max(30vh, 190px) - 120px); }
  .brand-mark { height: 46px; }
  .brand-text strong { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .hero-mascot { animation: none; } }
