/* ============================================================
   SPORTUP COURT — Design System
   Bianco & blu · stile campo da padel · energico, pulito
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* ---- Color: neutrals ---- */
  --white:      #FFFFFF;
  --paper:      #F2F6FD;   /* off-white, blue tinted */
  --paper-2:    #E8EFFA;   /* slightly deeper panel */
  --ink:        #0A1A33;   /* near-navy text */
  --ink-soft:   #45577A;   /* muted body */
  --ink-faint:  #8294B4;   /* captions, placeholders */
  --line:       #DCE6F5;   /* hairline borders */
  --line-strong:#C3D4ee;

  /* ---- Color: blue brand scale ---- */
  --blue-950:   #061634;
  --blue-900:   #07245A;
  --blue-800:   #0B2E66;
  --blue-700:   #0B3A82;   /* PRIMARY brand / court fill */
  --blue-600:   #134CA6;
  --blue-500:   #1F6FE5;   /* COURT electric / interactive */
  --blue-400:   #4E94F5;
  --blue-300:   #8FBAF8;
  --blue-200:   #BCD5FA;
  --blue-100:   #DCE9FB;
  --blue-50:    #EEF4FE;

  /* ---- Semantic ---- */
  --bg:         var(--white);
  --brand:      var(--blue-700);
  --accent:     var(--blue-500);
  --court:      var(--blue-700);
  --court-line: rgba(255,255,255,0.85);

  /* ---- Radii ---- */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* ---- Shadows (blue tinted) ---- */
  --shadow-xs: 0 1px 2px rgba(11,58,130,0.06);
  --shadow-sm: 0 2px 8px rgba(11,58,130,0.08);
  --shadow-md: 0 14px 34px -14px rgba(11,58,130,0.26);
  --shadow-lg: 0 34px 70px -28px rgba(11,58,130,0.40);
  --shadow-blue: 0 16px 40px -12px rgba(31,111,229,0.45);

  /* ---- Type ---- */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Hanken Grotesk', sans-serif;

  /* ---- Spacing scale (4px base) ---- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  --maxw: 1180px;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--blue-500); color: #fff; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.display-xl { font-size: clamp(3.2rem, 8.5vw, 6.75rem); }
.display-lg { font-size: clamp(2.6rem, 6vw, 4.75rem); }
.display-md { font-size: clamp(2rem, 4.5vw, 3.4rem); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-500);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.eyebrow::before {
  content: '';
  width: 22px; height: 2px;
  background: var(--blue-500);
  display: inline-block;
}

.lead {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: var(--ink-soft);
  line-height: 1.6;
  font-weight: 400;
}
.lead strong { color: var(--ink); font-weight: 600; }

.muted { color: var(--ink-soft); }
.text-blue { color: var(--blue-500); }
.text-brand { color: var(--blue-700); }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section-head .display { margin-top: 1rem; }
.section-head .lead { margin-top: 1.25rem; }

.stack-sm > * + * { margin-top: 0.75rem; }
.stack > * + * { margin-top: 1.25rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  border: none;
  border-radius: var(--r-pill);
  padding: 1rem 1.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--blue-500);
  color: #fff;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover { background: var(--blue-600); transform: translateY(-2px); box-shadow: 0 22px 48px -12px rgba(31,111,229,0.55); }

.btn-dark {
  background: var(--blue-700);
  color: #fff;
}
.btn-dark:hover { background: var(--blue-800); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--blue-700);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px var(--blue-500); color: var(--blue-500); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding-inline: 0.4rem;
}
.btn-ghost:hover { color: var(--blue-500); }

.btn-lg { padding: 1.15rem 2.2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.7rem 1.2rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ============================================================
   PILL / BADGE / TAG
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-100);
  border-radius: var(--r-pill);
  padding: 0.5rem 1rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: fit-content;
  white-space: nowrap;
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue-500);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.45;transform:scale(.7)} }

.tag {
  display: inline-block;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  color: var(--blue-600);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  letter-spacing: 0.01em;
}

.icon-chip {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.icon-chip.solid { background: var(--blue-700); border-color: var(--blue-700); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-200); }
.card-tint { background: var(--paper); }
.card-navy { background: var(--blue-700); color: #fff; border-color: var(--blue-700); }
.card-navy .muted { color: var(--blue-200); }

/* ============================================================
   FORM / LEAD FORM
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field-label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.input, .select {
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.95rem 1.1rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input::placeholder { color: var(--ink-faint); }
.input:focus, .select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(31,111,229,0.12);
}
.select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231F6FE5' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  padding-right: 2.6rem;
}
.select option { color: #000; }

.lead-form { display: flex; flex-direction: column; gap: 0.85rem; max-width: 460px; text-align: left; }
.lead-row { display: flex; gap: 0.7rem; }
.lead-row .input { flex: 1; min-width: 0; }

/* segmented control */
.seg { display: flex; gap: 0.6rem; }
.seg label {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--white);
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: all 0.18s ease;
}
.seg label:hover { border-color: var(--blue-300); color: var(--ink); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) {
  border-color: var(--blue-500);
  background: var(--blue-50);
  color: var(--blue-700);
  box-shadow: inset 0 0 0 1px var(--blue-500);
}

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; }

.form-note { font-size: 0.85rem; color: var(--ink-faint); }
.form-note strong { color: var(--blue-600); }

.success-msg {
  display: none;
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--blue-700);
  border-radius: var(--r-md);
  padding: 1.1rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.success-msg strong { color: var(--blue-600); }

/* ============================================================
   COURT GRAPHIC (SVG container)
   ============================================================ */
.court-svg { display: block; width: 100%; height: auto; }
.court-svg .surface { fill: var(--blue-700); }
.court-svg .surface-deep { fill: var(--blue-800); }
.court-svg .ln { stroke: var(--court-line); stroke-width: 3; fill: none; }
.court-svg .ln-thin { stroke: rgba(255,255,255,0.45); stroke-width: 1.5; fill: none; }
.court-svg .net { stroke: rgba(255,255,255,0.9); stroke-width: 2.5; stroke-dasharray: 5 6; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  text-align: left;
  padding: 1.5rem 0.25rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 500;
  color: var(--ink);
  transition: color 0.2s ease;
}
.faq-q:hover { color: var(--blue-500); }
.faq-icon {
  flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-500); font-size: 1.3rem; line-height: 1;
  transition: transform 0.3s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease;
  color: var(--ink-soft);
  font-size: 1rem; line-height: 1.7;
}
.faq-a-inner { padding: 0 3rem 1.5rem 0.25rem; }

/* ============================================================
   STAT
   ============================================================ */
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--blue-700);
}
.stat-label {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
  line-height: 1.4;
}

/* ============================================================
   DIVIDER WITH COURT-LINE MOTIF
   ============================================================ */
.rule { height: 1px; background: var(--line); border: none; }

/* ============================================================
   ANIMATION UTILITIES — CSS-driven, never leaves content hidden
   ============================================================ */
.reveal { animation: revealUp 0.7s cubic-bezier(.2,.7,.2,1) both; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.16s; }
.reveal.d3 { animation-delay: 0.24s; }
.reveal.d4 { animation-delay: 0.32s; }
/* transform-only entrance: content stays visible even if the animation is paused/stuck */
@keyframes revealUp {
  from { transform: translateY(22px); }
  to   { transform: none; }
}

/* shot trajectory — flowing dashes (decorative, never hides content) */
.court-svg .shot { animation: shotDash 2.6s linear infinite; }
@keyframes shotDash { to { stroke-dashoffset: -120; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .pill .dot { animation: none; }
}
