/* ==========================================================================
   Up A.s.d. — Design tokens
   ========================================================================== */

:root {
  /* Neutrals */
  --cream: #FAF4EC;
  --cream-dim: #F1E8DB;
  --ink: #201A17;
  --ink-soft: #4A3F38;
  --line: #E4D8C6;

  /* Accenti: il rosso della giacca, il palco, la palestra */
  --coral: #E1472C;
  --coral-dark: #B3341C;
  --teal: #1F7A70;
  --teal-dark: #145A52;
  --blush: #E8A0A8;
  --blush-dark: #C97783;
  --gold: #C9932E;

  --bg: var(--cream);
  --bg-alt: var(--cream-dim);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --border: var(--line);
  --surface: #FFFFFF;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Work Sans', system-ui, sans-serif;
  --font-script: 'Caveat', cursive;

  --wrap: 1180px;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130F;
    --bg-alt: #1E1813;
    --text: #F3E9DD;
    --text-soft: #C9BAA9;
    --border: #362C24;
    --surface: #211A15;
    --coral: #FF6544;
    --teal: #2A8C81;
    --blush: #EFB4BB;
    --gold: #E0AC4C;
  }
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  margin: 0 0 0.5em;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; max-width: 64ch; }

a { color: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-narrow { max-width: 820px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ==========================================================================
   Bottoni e micro-elementi
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--coral);
  color: #FFF8F3;
  box-shadow: 0 8px 22px -8px rgba(225, 71, 44, 0.6);
}
.btn-primary:hover { background: var(--coral-dark); }

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(250, 244, 236, 0.55);
}
.btn-ghost:hover { background: rgba(250, 244, 236, 0.12); }

.btn-small { padding: 10px 20px; font-size: 0.85rem; }

.header-cta { background: var(--ink); color: var(--cream); }
.header-cta:hover { background: var(--coral); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
  margin: 0 0 0.9em;
}
.eyebrow-light { color: var(--blush); }
.eyebrow-gold { color: var(--gold); }
.eyebrow-sand { color: #FFD9CC; }

.script-tag {
  font-family: var(--font-script);
  font-size: 2rem;
  font-weight: 700;
  color: var(--coral);
  margin: 0 0 0.4em;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(250, 244, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
}
@media (prefers-color-scheme: dark) {
  .site-header.is-scrolled { background: rgba(23, 19, 15, 0.9); }
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cream);
  margin-right: auto;
  transition: color 0.3s ease;
}
.site-header.is-scrolled .logo { color: var(--text); }
.logo-mark { display: flex; color: currentColor; }
.logo-text { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.logo-text em { font-style: normal; color: var(--coral); }

.main-nav {
  display: flex;
  gap: 22px;
  font-weight: 600;
  font-size: 0.92rem;
}
.main-nav a {
  text-decoration: none;
  color: var(--cream);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.site-header.is-scrolled .main-nav a { color: var(--text); }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--coral);
  transition: right 0.25s ease;
}
.main-nav a:hover::after { right: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}
.site-header.is-scrolled .nav-toggle span { background: var(--text); }

@media (max-width: 1040px) {
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--ink);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
    gap: 22px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 120;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav a { color: var(--cream); font-size: 1.18rem; }
  .site-header.is-scrolled .main-nav a { color: var(--cream); }
  .header-cta { display: none; }
  .nav-toggle { display: flex; z-index: 130; }
  .nav-toggle.is-open span { background: var(--cream); }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(16, 12, 9, 0.93) 0%, rgba(16, 12, 9, 0.6) 45%, rgba(16, 12, 9, 0.28) 75%, rgba(16, 12, 9, 0.38) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  color: var(--cream);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 140px 24px 90px;
  width: 100%;
}
.hero h1 {
  font-size: clamp(2.6rem, 7.5vw, 5.6rem);
  margin-bottom: 0.15em;
}
.hero-script {
  font-family: var(--font-script);
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 700;
  color: var(--blush);
  margin: 0 0 0.5em;
  max-width: none;
}
.hero-sub {
  font-size: 1.12rem;
  max-width: 50ch;
  color: rgba(250, 244, 236, 0.88);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 1.6em;
}

/* ==========================================================================
   Sezioni generiche
   ========================================================================== */

.section { padding: 100px 0; }
.section-bg      { background: var(--bg); }
.section-alt     { background: var(--bg-alt); }
.section-surface { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-teal    { background: var(--teal); color: #F3FBFA; }
.section-coral   { background: var(--coral); color: #FFF6F1; }

.section-teal h2, .section-teal h3, .section-coral h2, .section-coral h3 { color: #FFFFFF; }
.section-teal .eyebrow { color: #BFEAE3; }
.section-teal p, .section-coral p { color: rgba(255, 255, 255, 0.92); }

.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.lead { font-size: 1.08rem; color: var(--text-soft); }
.section-teal .lead, .section-coral .lead { color: rgba(255, 255, 255, 0.9); }

.big-quote {
  margin: 56px 0 0;
  padding: 0 0 0 24px;
  border-left: 4px solid var(--coral);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.45;
  max-width: 62ch;
  color: var(--text);
}
.quote-light {
  border-left-color: #BFEAE3;
  color: #FFFFFF;
  margin: 0 0 48px;
}

/* ==========================================================================
   Slider
   ========================================================================== */

.slider { position: relative; }

.slider-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.06);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.slider-track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) {
  .slider-track { scroll-behavior: auto; }
}

.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 4 / 3;
}
.slider-wide .slide { aspect-ratio: 16 / 10; }
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.45);
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  z-index: 3;
}
.slider-btn:hover { background: #FFFFFF; }
.slider-btn:active { transform: translateY(-50%) scale(0.94); }
.slider-btn[disabled] { opacity: 0.28; cursor: default; }
.slider-btn svg { width: 20px; height: 20px; }
.slider-prev { left: 12px; }
.slider-next { right: 12px; }

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.slider-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.28;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.slider-dot.is-active { opacity: 1; transform: scale(1.35); }

.slider-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(32, 26, 23, 0.62);
  color: #FFF;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 3;
  pointer-events: none;
}

/* ==========================================================================
   Valori
   ========================================================================== */

.valori-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}
.valori-media { position: sticky; top: 100px; }
.valori-media .big-quote { margin-top: 32px; font-size: clamp(1.1rem, 1.6vw, 1.35rem); }

.valori-grid { display: grid; gap: 20px; }

.valore {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 5px solid var(--coral);
  border-radius: var(--radius);
  padding: 28px 30px;
}
.valore h3 { font-size: 1.45rem; margin-bottom: 0.4em; }
.valore p { color: var(--text-soft); font-size: 0.98rem; }
.valore p:last-child { margin-bottom: 0; }
.valore-claim { font-weight: 600; color: var(--text) !important; }

.valore-blush { border-left-color: var(--blush-dark); }
.valore-blush h3 { color: var(--blush-dark); }
.valore-teal  { border-left-color: var(--teal); }
.valore-teal h3 { color: var(--teal); }
.valore-coral { border-left-color: var(--coral); }
.valore-coral h3 { color: var(--coral); }

/* ==========================================================================
   Corsi
   ========================================================================== */

.group-title {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin: 0 0 32px;
}
.group-title + .corsi-grid { margin-bottom: 72px; }

.corsi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}
@media (max-width: 760px) {
  .corsi-grid { grid-template-columns: 1fr; }
}

.corso {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.corso .slider-track { border-radius: 0; }
.corso-body { padding: 26px 28px 30px; }
.corso-age {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin: 0 0 0.6em;
}
.corso h4 { font-size: 1.45rem; margin-bottom: 0.45em; }
.corso p:last-child { margin-bottom: 0; color: var(--text-soft); }

/* ==========================================================================
   Split (testo + media)
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split-reverse .split-media { order: 2; }
.split-reverse .split-text  { order: 1; }
.split-text h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.split-text h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }

.section-teal .split { margin-top: 56px; }

/* ==========================================================================
   Camp tags
   ========================================================================== */

.camp-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0 0 40px;
}
.camp-tags li {
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-soft);
}

/* ==========================================================================
   Sedi
   ========================================================================== */

.sedi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}
.sede {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sede > img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 30%;
}
.sede-body { padding: 26px 28px 30px; }
.sede-tag {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.5em;
}
.sede h3 { font-size: 1.6rem; margin-bottom: 0.3em; }
.sede-addr { font-weight: 600; color: var(--text); }

.sede-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
  display: grid;
  gap: 14px;
}
.sede-list li {
  border-left: 3px solid var(--teal);
  padding-left: 14px;
}
.sede-list-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 3px;
}
.sede-list .sede-addr { display: block; font-size: 0.96rem; line-height: 1.45; }
.sede p { color: var(--text-soft); }
.sede-contact { font-weight: 600; margin-bottom: 0; }
.sede-contact a { color: var(--coral); text-decoration: none; }
.sede-contact a:hover { text-decoration: underline; }

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq { border-top: 1px solid var(--border); }
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  padding: 20px 40px 20px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--coral);
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: '−'; }
.faq details p {
  margin: 0 0 22px;
  color: var(--text-soft);
}

/* ==========================================================================
   Contatti
   ========================================================================== */

.contact {
  background: var(--ink);
  color: var(--cream);
  padding: 110px 0 90px;
  text-align: center;
}
.contact h2 { color: #FFFFFF; font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.contact-lead {
  max-width: 54ch;
  margin: 0 auto 2.2em;
  color: rgba(250, 244, 236, 0.78);
}
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 1060px;
  margin: 0 auto;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 180px;
  max-width: 260px;
  min-width: 0;
  overflow-wrap: break-word;
  padding: 22px 18px;
  border: 1.5px solid rgba(250, 244, 236, 0.18);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--cream);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.contact-card:hover {
  border-color: var(--coral);
  background: rgba(225, 71, 44, 0.08);
  transform: translateY(-3px);
}
.contact-label {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blush);
  font-weight: 700;
}
.contact-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
}
.contact-card-wide { flex: 1 1 240px; max-width: 300px; }
.contact-location {
  margin: 2.4em auto 0;
  color: rgba(250, 244, 236, 0.6);
  font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--bg-alt);
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.script-tag-footer { font-size: 1.3rem; margin: 0; }
.footer-copy { margin: 0; color: var(--text-soft); font-size: 0.9rem; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .valori-layout { grid-template-columns: 1fr; gap: 40px; }
  .valori-media { position: static; }
  .split, .split-reverse { grid-template-columns: 1fr; gap: 36px; }
  .split-reverse .split-media, .split-reverse .split-text { order: initial; }
  .split-media { order: -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 68px 0; }
  .hero-content { padding: 120px 20px 70px; }
  .contact { padding: 72px 0 64px; }
  .section-head { margin-bottom: 36px; }
  .big-quote { margin-top: 36px; }
  .corsi-grid, .sedi-grid { grid-template-columns: 1fr; gap: 24px; }
  .group-title + .corsi-grid { margin-bottom: 48px; }
  .slider-btn { width: 38px; height: 38px; }
  .slider-prev { left: 8px; }
  .slider-next { right: 8px; }
  .contact-card, .contact-card-wide { flex: 1 1 100%; max-width: none; }
  .valore { padding: 22px 22px; }
  .corso-body, .sede-body { padding: 22px 22px 26px; }
}
