:root {
  --pine: #1F3A2E;
  --pine-soft: #2E5241;
  --ball: #E9C33A;
  --paper: #F4F6F0;
  --ink: #1B2420;
  --muted: #56655C;
  --line: #D5DCD2;
  --white: #FFFFFF;

  --font-head: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --font-hand: "Caveat", "Comic Sans MS", cursive;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }

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

a { color: var(--pine); }

a:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ball);
  outline-offset: 3px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 88px 0; }

/* ---------- Barra in alto ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ball);
  border-bottom: 1px solid #D4AC25;
}

.site-header a:focus-visible { outline-color: var(--pine); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--pine);
  text-decoration: none;
}

.site-header .btn { padding: 9px 22px; font-size: 1rem; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-dark { background: var(--pine); color: var(--white); }

/* ---------- Sezione 1: foto + chi sono ---------- */
.hero { padding: 96px 0; }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(260px, 400px) 1fr;
  gap: 120px;
  align-items: center;
}

.photo-wrap { position: relative; }

.photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
}

/* La pallina, ora come "adesivo" sulla foto */
.ball {
  position: absolute;
  top: -44px;
  left: -44px;
  width: 160px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F3D867, var(--ball) 60%, #D4AC25);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  transform: rotate(-12deg);
  box-shadow: 0 6px 18px rgba(31, 58, 46, 0.25);
  animation: bounce-in 0.9s cubic-bezier(.3, 1.6, .5, 1) both;
}

.ball-seams {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ball-seams path {
  fill: none;
  stroke: var(--white);
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.8;
}

.ball-text {
  position: relative;
  font-family: var(--font-head);
  font-size: 0.95rem;
  line-height: 1.15;
  color: var(--pine);
}

.ball-text strong { display: block; font-size: 1.05rem; }

@keyframes bounce-in {
  from { transform: translateY(-60px) rotate(-12deg) scale(0.8); opacity: 0; }
  to   { transform: translateY(0) rotate(-12deg) scale(1); opacity: 1; }
}

.hero-text { position: relative; }

/* La freccia disegnata a mano che punta alla foto */
.pointer {
  position: absolute;
  top: -78px;
  left: -116px; /* la punta si ferma appena fuori dalla foto */
  width: 230px;
  pointer-events: none;
}

.pointer-arrow {
  width: 170px;
  height: auto;
  overflow: visible;
}

.pointer-arrow path {
  fill: none;
  stroke: var(--pine);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pointer-note {
  position: absolute;
  top: -10px;
  left: 172px;
  font-family: var(--font-hand);
  font-size: 1.9rem;
  color: var(--pine);
  transform: rotate(-6deg);
  white-space: nowrap;
}

.kicker {
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.lead { font-size: 1.2rem; color: var(--muted); }

.hero-text .btn { margin-top: 12px; }

/* ---------- Sezione 2: come funziona ---------- */
.steps { background: var(--pine); color: var(--white); text-align: center; }

.steps h2 { color: var(--ball); margin-bottom: 48px; }

.step-list {
  list-style: none;
  counter-reset: passo;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.step-list li { counter-increment: passo; }

.step-list li::before {
  content: counter(passo);
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border: 3px solid var(--ball);
  border-radius: 50%;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ball);
}

.step-list p { color: #DCE5DF; margin: 0 auto; max-width: 30ch; }

/* ---------- Sezione 3: FAQ ---------- */
.faq { background: var(--white); }

.faq-inner { max-width: 760px; }

.faq h2 { text-align: center; margin-bottom: 40px; }

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list details:first-child { border-top: 1px solid var(--line); }

.faq-list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 500;
}

.faq-list summary::-webkit-details-marker { display: none; }

/* Il "+" che diventa "×" quando la domanda è aperta */
.faq-list summary::after {
  content: "+";
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ball);
  color: var(--pine);
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq-list details[open] summary::after { transform: rotate(45deg); }

.faq-list details p {
  color: var(--muted);
  padding: 0 4px 22px;
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--pine);
  color: #B9C7BE;
  font-size: 0.95rem;
  padding: 24px 0;
  text-align: center;
}

.site-footer p { margin: 0 auto; }

/* ---------- Schermi medi (laptop piccoli, tablet in orizzontale) ---------- */
@media (max-width: 1180px) {
  .hero-inner { gap: 80px; }
  .ball { left: -8px; top: -36px; }
  .pointer { left: -76px; }
}

/* ---------- Telefono ---------- */
@media (max-width: 860px) {
  section, .hero { padding: 64px 0; }

  .brand { font-size: 1.4rem; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 96px;
  }

  .photo-wrap { max-width: 340px; margin: 0 auto; width: 100%; }

  .ball { width: 130px; top: -30px; left: -4px; }
  .ball-text { font-size: 0.8rem; }
  .ball-text strong { font-size: 0.88rem; }

  /* Su telefono la freccia punta in su, verso la foto */
  /* la punta della freccia sta esattamente al centro, sotto la foto */
  .pointer { top: -90px; left: 50%; width: 170px; margin-left: -9px; }
  .pointer-arrow { width: 80px; transform: scaleY(-1); }
  .pointer-note { top: 26px; left: 76px; font-size: 1.5rem; }

  .step-list { grid-template-columns: 1fr; gap: 36px; }
}

/* Telefoni molto stretti */
@media (max-width: 360px) {
  .pointer-note { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ball { animation: none; }
  .btn, .faq-list summary::after { transition: none; }
}
.faq-list details p + p { margin-top: -10px; }
