/* ==========================================================================
   Tifoso — Landing theme
   Plain CSS, no build step. Load after the Google Fonts <link>.
   Structure: 1) tokens  2) base  3) layout  4) components  5) sections
              6) responsive
   ========================================================================== */

/* 1. TOKENS ------------------------------------------------------------- */
:root {
  --surface-0: oklch(0.15 0.02 250);
  --surface-1: oklch(0.19 0.02 250);
  --surface-2: oklch(0.24 0.02 250);
  --surface-3: oklch(0.34 0.02 250);
  --text: oklch(0.97 0.005 250);
  --text-muted: oklch(0.68 0.02 250);

  --ok: oklch(0.72 0.17 145);
  --pending: oklch(0.78 0.13 85);
  --bad: oklch(0.63 0.2 25);
  --on-accent: oklch(0.18 0.02 85);

  --grass: oklch(0.32 0.09 145);
  --grass-dark: oklch(0.27 0.08 145);
  --hero-glow: oklch(0.3 0.05 240);

  --font-display: "Oswald", sans-serif;
  --font-body: "Manrope", sans-serif;

  --wrap: 1160px;
  --radius-card: 20px;
  --radius-pill: 999px;
}

/* 2. BASE --------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface-0);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  text-wrap: pretty;
}
a { color: inherit; text-decoration: none; transition: opacity 0.15s ease; }
a:hover { opacity: 0.85; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
img, svg { display: block; }

/* 3. LAYOUT ------------------------------------------------------------- */
.wrap { max-width: var(--wrap); margin: 0 auto; }
.wrap--narrow { max-width: 760px; }
.wrap--mid { max-width: 900px; }
.section { padding: 100px 6vw; }
.section--alt { background: var(--surface-1); }
.section-head { text-align: center; margin-bottom: 48px; }

/* 4. COMPONENTS --------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.eyebrow--accent { color: var(--pending); }

.h1 { font-weight: 700; font-size: clamp(38px, 6vw, 74px); line-height: 1.02; letter-spacing: -0.01em; }
.h2 { font-weight: 700; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.2; }
.h2--lg { font-size: clamp(28px, 3.6vw, 42px); }
.lead { font-size: 18px; line-height: 1.6; color: var(--text-muted); }
.body-copy { font-size: 15px; line-height: 1.7; color: var(--text-muted); }
.fineprint { font-size: 12px; color: var(--text-muted); }

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 16px 32px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); opacity: 1; }
.btn--accent { background: var(--pending); color: var(--on-accent); }
.btn--ghost { background: transparent; border: 1px solid var(--surface-3); color: var(--text); font-weight: 600; }
.btn--sm { font-size: 14px; padding: 10px 20px; }

.pill-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-1); border: 1px solid var(--surface-3);
  border-radius: var(--radius-pill); padding: 7px 16px;
  font-family: var(--font-display); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--pending);
}
.pill-tag__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pending); }

.card { background: var(--surface-1); border-radius: var(--radius-card); padding: 28px; }
.card--inset { background: var(--surface-0); border-radius: 16px; padding: 24px; text-align: center; }
.card__kicker { font-family: var(--font-display); font-size: 12px; color: var(--text-muted); letter-spacing: 0.1em; margin-bottom: 10px; }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 20px; margin-bottom: 10px; }
.card__text { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin-bottom: 16px; }
.card__note { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.card__note--accent { color: var(--pending); }
.card__note--ok { color: var(--ok); }

.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--roles { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.grid--badges { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.grid--clubs { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 18px 10px; max-width: 820px; margin: 0 auto 28px; }

/* Ticket — signature component */
.ticket { border-radius: 22px; overflow: hidden; background: var(--surface-1); box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.6); }
.ticket__label { text-align: center; font-family: var(--font-display); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); padding: 12px 0; background: var(--surface-2); }
.ticket__halves { display: flex; position: relative; }
.ticket__half { flex: 1; padding: 30px 18px; text-align: center; }
.ticket__club { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.06em; margin-bottom: 8px; }
.ticket__score { font-family: var(--font-display); font-weight: 700; font-size: 62px; line-height: 1; font-variant-numeric: tabular-nums; }
.ticket__perforation { position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px dashed rgba(255, 255, 255, 0.35); transform: translateX(-1px); }
.ticket__hole { position: absolute; left: 50%; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-0); transform: translateX(-50%); }
.ticket__hole--top { top: -14px; }
.ticket__hole--bottom { bottom: -14px; }
.ticket__footer { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ticket__verdict { font-size: 14px; line-height: 1.5; }

/* Club chip — full club name above a two-color shirt badge; links to the club's dedicated page */
.club-chip { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; text-decoration: none; transition: transform 0.15s ease; font-family: inherit; }
.club-chip:hover { transform: translateY(-2px); }
.club-chip__name { font-size: 11px; font-weight: 600; line-height: 1.25; color: var(--text-muted); text-align: center; }
.club-chip__badge { position: relative; height: 44px; border-radius: 10px; overflow: hidden; }
.club-chip__badge--lg { height: 88px; border-radius: 16px; }
.club-chip__badge svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Callout — muted centered note box (e.g. loyalty note on club pages) */
.callout { background: var(--surface-2); border: 1px solid var(--surface-3); border-radius: 14px; padding: 18px 22px; font-size: 13px; color: var(--text-muted); text-align: center; max-width: 640px; margin: 0 auto; }
.callout strong { color: var(--text); font-weight: 600; }
.callout--accent { border-color: var(--pending); }

/* Feature checklist */
.checklist { display: flex; flex-direction: column; gap: 12px; }
.checklist__item { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-muted); }
.checklist__mark { color: var(--ok); font-size: 18px; line-height: 1.4; }

/* Newsletter form */
.newsletter { display: flex; gap: 10px; max-width: 480px; margin: 0 auto 14px; flex-wrap: wrap; }
.newsletter__input {
  flex: 1; min-width: 220px;
  background: var(--surface-1); border: 1px solid var(--surface-3);
  border-radius: var(--radius-pill); padding: 16px 22px;
  color: var(--text); font-family: var(--font-body); font-size: 15px;
}
.newsletter__input::placeholder { color: var(--text-muted); }
.newsletter__input:focus { outline: 2px solid var(--pending); outline-offset: 1px; }
.newsletter__input.is-invalid { border-color: var(--bad); }
.newsletter__feedback { font-size: 13px; min-height: 20px; margin-bottom: 6px; }
.newsletter__feedback--ok { color: var(--ok); }
.newsletter__feedback--error { color: var(--bad); }

/* 5. SECTIONS ----------------------------------------------------------- */

/* Hero */
.hero {
  position: relative;
  padding: 64px 6vw 0;
  overflow: hidden;
  background: radial-gradient(ellipse 120% 70% at 50% -10%, var(--hero-glow) 0%, var(--surface-0) 55%);
}
.hero__floodlight {
  position: absolute; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, oklch(0.9 0.05 90 / 0.35), transparent 70%);
  filter: blur(4px); pointer-events: none;
}
.hero__floodlight--left { left: 6%; }
.hero__floodlight--right { right: 6%; }
.hero__inner { position: relative; max-width: 900px; margin: 0 auto; text-align: center; padding-bottom: 40px; }
.hero__title { margin: 0 0 22px; }
.hero__title em { font-style: normal; color: var(--pending); }
.hero__lead { max-width: 560px; margin: 0 auto 34px; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }

/* Nav */
.nav { position: relative; display: flex; justify-content: space-between; align-items: center; max-width: var(--wrap); margin: 0 auto 40px; padding: 0 4px; }
.nav__brand { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; }
.nav__links { display: flex; gap: 28px; font-size: 14px; color: var(--text-muted); }

/* Pitch */
.pitch-wrap { position: relative; max-width: 1080px; margin: 0 auto; border-radius: 28px 28px 0 0; overflow: hidden; }
.pitch {
  position: relative; height: 320px; overflow: hidden;
  border: 1px solid var(--surface-3); border-bottom: none; border-radius: 28px 28px 0 0;
  background: repeating-linear-gradient(90deg, var(--grass) 0px, var(--grass) 64px, var(--grass-dark) 64px, var(--grass-dark) 128px);
}
.pitch__markings { position: absolute; inset: 0; width: 100%; height: 100%; }
.pitch__player { position: absolute; fill: rgba(255, 255, 255, 0.9); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); width: 40px; height: 40px; }
.pitch__player--a { left: 22%; top: 38%; }
.pitch__player--b { left: 70%; top: 30%; }
.pitch__player--c { left: 46%; top: 58%; width: 34px; height: 34px; fill: rgba(255, 255, 255, 0.75); }
.pitch__ball { position: absolute; width: 26px; height: 26px; left: 55%; top: 48%; animation: floatBall 3.2s ease-in-out infinite; }
.pitch__ticket { position: absolute; bottom: -34px; left: 50%; transform: translateX(-50%); width: 340px; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.65); }
.pitch__ticket .ticket__halves { display: flex; }
.pitch__ticket .ticket__half { padding: 16px; }
.pitch__ticket .ticket__club { font-size: 12px; margin-bottom: 0; }
.pitch__ticket .ticket__score { font-size: 34px; }

@keyframes floatBall {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  .pitch__ball { animation: none; }
  html { scroll-behavior: auto; }
}

/* Levels */
.level-card--1 { border-top: 3px solid #000000; }
.level-card--2 { border-top: 3px solid var(--text-muted); }
.level-card--3 { border-top: 3px solid var(--ok); }

/* Roles (Formazione) */
.roles { position: relative; overflow: hidden; }
.roles__stripes { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, transparent 0, transparent 46px, rgba(255, 255, 255, 0.02) 46px, rgba(255, 255, 255, 0.02) 92px); }
.roles__inner { position: relative; }
.role-face { margin: 0 auto 12px; }
.role__title { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin-bottom: 6px; }
.role__text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.roles__note { background: var(--surface-2); border: 1px solid var(--surface-3); border-radius: 14px; padding: 18px 22px; font-size: 13px; color: var(--text-muted); text-align: center; max-width: 640px; margin: 20px auto 0; }
.roles__note strong { color: var(--text); font-weight: 600; }

/* Challenge */
.challenge__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.challenge__copy strong { color: var(--text); }

/* Badges */
.badge-card { background: var(--surface-0); border-radius: 16px; padding: 22px; text-align: center; }
.badge-card--mid { border: 1px solid var(--surface-3); }
.badge-card--top { border: 1px solid var(--pending); }
.badge-card__pct { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--text-muted); margin-bottom: 8px; }
.badge-card--mid .badge-card__pct,
.badge-card--top .badge-card__pct { color: var(--pending); }
.badge-card__name { font-family: var(--font-display); font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.badge-card__desc { font-size: 12px; color: var(--text-muted); }

/* Signup */
.signup { position: relative; overflow: hidden; padding-bottom: 90px; }
.signup__turf { position: absolute; bottom: 0; left: 0; right: 0; height: 140px; opacity: 0.5; pointer-events: none; background: repeating-linear-gradient(90deg, var(--grass) 0px, var(--grass) 64px, var(--grass-dark) 64px, var(--grass-dark) 128px); }
.signup__inner { position: relative; text-align: center; }

/* Footer */
.footer { padding: 32px 6vw; background: var(--surface-0); border-top: 1px solid var(--surface-2); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer__brand { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.footer__links { display: flex; gap: 22px; font-size: 13px; color: var(--text-muted); }

/* 6. RESPONSIVE --------------------------------------------------------- */
@media (max-width: 900px) {
  .challenge__grid { grid-template-columns: 1fr; gap: 36px; }
  .nav__links { display: none; }
  .section { padding: 72px 6vw; }
}
@media (max-width: 620px) {
  .grid--clubs { grid-template-columns: repeat(3, 1fr); }
  .pitch { height: 240px; }
  .pitch__ticket { width: 280px; }
  .pitch__ticket .ticket__score { font-size: 28px; }
  .ticket__score { font-size: 46px; }
  .footer { flex-direction: column; text-align: center; }
}
