/* ============================================================
   Il Calderone — token di design
   ============================================================ */
:root {
  --ink: #221A26;
  --paper: #F5EEDD;
  --paper-soft: #ECE1C6;
  --night: #241934;
  --night-soft: #33244A;
  --violet: #7A4FB0;
  --violet-deep: #5C3A87;
  --ember: #DD6B34;
  --teal: #2E9C90;
  --cream-text: #F3ECDD;
  --line: rgba(34, 26, 38, 0.14);
  --line-on-dark: rgba(243, 236, 221, 0.16);

  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Karla", ui-sans-serif, system-ui, sans-serif;

  --max-width: 1180px;
  --radius-soft: 22px;
  --radius-pill: 999px;
}

/* ============================================================
   Reset di base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }

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

/* ============================================================
   Bottoni
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--ember);
  color: var(--night);
}
.btn-primary:hover { background: #E67B44; }

.btn-ghost {
  background: transparent;
  border-color: currentColor;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cream-text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  transition: color 0.3s ease;
}
.site-header.is-scrolled .brand { color: var(--ink); }

.brand-mark { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.98rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--cream-text);
  transition: color 0.3s ease, opacity 0.2s ease;
  opacity: 0.9;
}
.site-nav a:hover { opacity: 1; }
.site-header.is-scrolled .site-nav a { color: var(--ink); }

.nav-cta {
  background: var(--ember);
  color: var(--night) !important;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  opacity: 1 !important;
}

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

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background: radial-gradient(120% 140% at 20% 0%, var(--night-soft) 0%, var(--night) 62%);
  color: var(--cream-text);
  padding-top: 30px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.spark {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.75;
  animation: drift 7s ease-in-out infinite;
}
.spark-a { width: 10px; height: 10px; background: var(--teal); top: 18%; left: 62%; animation-delay: 0s; }
.spark-b { width: 6px; height: 6px; background: var(--ember); top: 30%; left: 78%; animation-delay: 1.2s; }
.spark-c { width: 8px; height: 8px; background: var(--violet); top: 55%; left: 70%; animation-delay: 2.1s; }
.spark-d { width: 5px; height: 5px; background: var(--teal); top: 68%; left: 85%; animation-delay: 0.6s; }

@keyframes drift {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
  50% { transform: translateY(-14px) scale(1.3); opacity: 1; }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  padding: 56px 24px 90px;
  position: relative;
}

.kicker {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--teal);
  margin-bottom: 18px;
}

.hero h1 { color: #fff; max-width: 14ch; }

.hero-lead {
  font-size: 1.08rem;
  color: rgba(243, 236, 221, 0.86);
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .btn-ghost { color: var(--cream-text); }

.hero-art { display: flex; justify-content: center; }
.hero-logo {
  width: min(100%, 360px);
  filter: drop-shadow(0 30px 50px rgba(0,0,0,0.45));
}

/* ============================================================
   Trust strip
   ============================================================ */
.trust-strip {
  background: var(--paper-soft);
  border-bottom: 1px solid var(--line);
}
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  font-size: 0.92rem;
  font-weight: 600;
}
.trust-inner p { margin: 0; }
.trust-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink); opacity: 0.35;
}

/* ============================================================
   Sezioni generiche
   ============================================================ */
.section { padding: 96px 0; }
.section-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
}
.section-head h2 { max-width: 16ch; }
.section-intro { max-width: 60ch; font-size: 1.08rem; color: rgba(34,26,38,0.75); }
.lede { font-size: 1.12rem; }
.section-body p { max-width: 60ch; }

.network-list {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.network-list li {
  position: relative;
  padding-left: 26px;
  font-weight: 600;
}
.network-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid var(--ember);
}

/* ============================================================
   Attività (dark)
   ============================================================ */
.section-dark {
  background: var(--night);
  color: var(--cream-text);
}
.section-dark .section-head h2 { color: #fff; max-width: 18ch; }
.section-dark .section-intro { color: rgba(243,236,221,0.78); }

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 20px;
  margin-top: 48px;
}

.activity-card {
  background: var(--night-soft);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-soft);
  padding: 30px;
}
.activity-card h3 { color: #fff; }
.activity-card p { color: rgba(243,236,221,0.78); font-size: 0.98rem; }

.activity-featured {
  grid-column: span 2;
  grid-row: span 2;
  background: linear-gradient(155deg, var(--violet-deep), var(--night-soft) 65%);
  padding: 38px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.activity-featured h3 { font-size: 1.6rem; }
.activity-featured p { font-size: 1.02rem; max-width: 48ch; }

.activity-icon { width: 52px; height: 52px; margin-bottom: 20px; color: var(--ember); }
.activity-featured .activity-icon { width: 64px; height: 64px; color: var(--teal); }
.activity-icon svg { width: 100%; height: 100%; }

.activity-footnote {
  margin-top: 36px;
  color: rgba(243,236,221,0.7);
  max-width: 62ch;
  font-size: 0.98rem;
}

/* ============================================================
   RUNTS
   ============================================================ */
.section-runts {
  background: var(--paper-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.runts-inner { max-width: 760px; }
.runts-copy h2 { color: var(--violet-deep); }

.runts-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.runts-facts dt {
  font-size: 0.8rem;
  text-transform: none;
  font-weight: 700;
  color: var(--ember);
  margin-bottom: 6px;
}
.runts-facts dd { margin: 0; font-weight: 600; }

/* ============================================================
   Partecipa / steps
   ============================================================ */
.steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.steps li { display: flex; flex-direction: column; gap: 14px; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: rgba(34,26,38,0.75); font-size: 0.98rem; }

.partecipa-cta { margin-top: 48px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(243,236,221,0.85);
  padding-top: 64px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-on-dark);
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-mark { width: 56px; height: 56px; border-radius: 50%; }
.footer-brand p { font-family: var(--font-display); color: #fff; font-size: 1.05rem; max-width: 20ch; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.footer-cols h3 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 12px;
}
.footer-cols p { font-size: 0.94rem; margin-bottom: 8px; }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }

.footer-bottom {
  padding: 22px 24px;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding-bottom: 56px; }
  .hero-art { order: -1; }
  .hero-logo { width: min(70%, 260px); margin: 0 auto; }
  .hero h1 { max-width: none; }

  .section-grid { grid-template-columns: 1fr; gap: 28px; }
  .section-head h2 { max-width: none; }

  .activity-grid { grid-template-columns: 1fr 1fr; }
  .activity-featured { grid-column: span 2; grid-row: auto; }

  .steps { grid-template-columns: 1fr; }
  .runts-facts { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .section { padding: 64px 0; }

  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: 72px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    padding: 8px 24px 24px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
  }
  .site-nav a { color: var(--ink); width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav-cta { text-align: center; margin-top: 10px; border-bottom: none !important; }

  .activity-grid { grid-template-columns: 1fr; }
  .activity-featured { grid-column: auto; }

  .footer-cols { grid-template-columns: 1fr; gap: 28px; }
}
