/* =============================================================
   KIT & LEO FC — styles
   ============================================================= */

:root {
  --grass-dark: #1e5e2e;
  --grass:      #2a7a3d;
  --grass-lite: #348a48;
  --line:       rgba(255, 255, 255, 0.55);
  --ncfc-yellow:#FFF200;
  --ncfc-green: #00A650;
  --rm-white:   #FFFFFF;
  --rm-gold:    #FFD700;
  --ink:        #0c1f11;
  --panel-bg:   rgba(10, 28, 14, 0.78);
  --panel-edge: rgba(255, 255, 255, 0.15);
  --shadow-lg:  0 30px 60px -20px rgba(0,0,0,0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--grass-dark);
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body { position: relative; }

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

/* ============================================================
   PITCH BACKGROUND
   ============================================================ */

.pitch-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 245, 180, 0.18), transparent 60%),
    linear-gradient(180deg, var(--grass) 0%, var(--grass-dark) 100%);
}

.pitch-stripes {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.035) 0 80px,
    transparent 80px 160px
  );
}

.pitch-markings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.floodlight {
  position: absolute;
  top: -15%;
  width: 80vmax;
  height: 80vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  mix-blend-mode: screen;
}
.floodlight-left {
  left: -30vmax;
  background: radial-gradient(circle, rgba(255, 245, 200, 0.65), transparent 60%);
  animation: drift 18s ease-in-out infinite alternate;
}
.floodlight-right {
  right: -30vmax;
  background: radial-gradient(circle, rgba(180, 230, 255, 0.5), transparent 60%);
  animation: drift 22s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(4vw, 3vh) scale(1.08); }
}

/* ============================================================
   LAYOUT
   ============================================================ */

main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(80px, 12vw, 140px);
}

section { position: relative; }

.section-heading {
  font-family: 'Anton', 'Archivo Black', sans-serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0 0 1em;
  text-transform: uppercase;
  text-shadow: 0 4px 0 rgba(0,0,0,0.35);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 10vw, 120px) 0 clamp(20px, 5vw, 40px);
}

.scoreboard {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.3)),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.15) 0 4px, transparent 4px 8px);
  border: 3px solid rgba(255, 242, 0, 0.75);
  border-radius: 24px;
  padding: clamp(24px, 5vw, 48px);
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 0 6px rgba(0,0,0,0.25), inset 0 0 30px rgba(0,0,0,0.35);
  position: relative;
  max-width: 820px;
  width: 100%;
}

.scoreboard::before,
.scoreboard::after {
  content: '';
  position: absolute;
  top: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffe066 50%, transparent 70%);
  box-shadow: 0 0 24px rgba(255, 242, 0, 0.9);
}
.scoreboard::before { left: 20px; }
.scoreboard::after  { right: 20px; }

.scoreboard-tag {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--ncfc-yellow);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.title {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: clamp(3rem, 14vw, 8rem);
  line-height: 0.92;
  margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow:
    0 4px 0 rgba(0,0,0,0.5),
    0 0 40px rgba(255, 242, 0, 0.45);
}
.title-line { display: block; }
.title-fc {
  color: var(--ncfc-yellow);
  -webkit-text-stroke: 3px var(--ncfc-green);
}

.tagline {
  font-weight: 600;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  opacity: 0.9;
  margin: 16px 0 24px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

.chip {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
}
.chip-yellow { background: rgba(255, 242, 0, 0.2); border-color: rgba(255, 242, 0, 0.55); }
.chip-green  { background: rgba(0, 166, 80, 0.2); border-color: rgba(0, 166, 80, 0.6); }
.chip-white  { background: rgba(255,255,255,0.18); }

/* ============================================================
   CARROW ROAD — polaroid
   ============================================================ */

.carrow {
  display: flex;
  justify-content: center;
}

.frame { perspective: 1200px; max-width: 520px; width: 100%; }

.polaroid {
  background: #fafafa;
  padding: 16px 16px 24px;
  border-radius: 6px;
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.7),
    0 10px 20px -5px rgba(0,0,0,0.4);
  transform: rotate(-2deg);
  transition: transform 0.4s ease;
  color: #222;
}
.polaroid:hover { transform: rotate(0deg) scale(1.02); }
.polaroid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
}
.polaroid .caption {
  font-family: 'Caveat', 'Inter', cursive;
  text-align: center;
  margin: 18px 8px 6px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  font-style: italic;
}

/* ============================================================
   PLAYER SECTIONS
   ============================================================ */

.player {
  padding: clamp(32px, 6vw, 64px) 0;
  position: relative;
}

.player-kit::before,
.player-leo::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.15));
  pointer-events: none;
}

.player-grid {
  display: grid;
  grid-template-columns: minmax(260px, 400px) 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.player-grid-flip {
  grid-template-columns: 1fr minmax(260px, 400px);
}
.player-grid-flip .card-wrap { order: 2; }

@media (max-width: 820px) {
  .player-grid,
  .player-grid-flip {
    grid-template-columns: 1fr;
  }
  .player-grid-flip .card-wrap { order: 0; }
}

/* ============================================================
   FC26 CARD — tilt, shine, flip
   ============================================================ */

.card-wrap {
  perspective: 1400px;
  display: flex;
  justify-content: center;
  position: sticky;
  top: 24px;
}

.card-3d {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1024 / 1536;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(.2,.8,.2,1);
  cursor: pointer;
  outline: none;
}
.card-3d.is-flipped { transform: rotateY(180deg); }

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.8),
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 40px rgba(255, 242, 0, 0.18);
}
.card-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}
.card-front { transform: rotateY(0deg); }
.card-back  { transform: rotateY(180deg); }

.card-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.12) 18%,
    transparent 45%
  );
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card-3d:hover .card-shine,
.card-3d:focus-visible .card-shine { opacity: 1; }

.card-back-inner {
  width: 100%;
  height: 100%;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 242, 0, 0.35), transparent 60%),
    linear-gradient(160deg, #0a3a18 0%, #062610 100%);
  color: #fff;
  text-align: center;
}
.card-back-inner-leo {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 215, 0, 0.4), transparent 60%),
    linear-gradient(160deg, #132a52 0%, #0a1733 100%);
}

.card-back-badge {
  font-family: 'Anton', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 16px;
}
.card-back-club {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  opacity: 0.85;
}
.card-back-traits {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
}
.card-back-motto {
  margin-top: auto;
  font-style: italic;
  font-size: 1rem;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

/* ============================================================
   PLAYER COPY
   ============================================================ */

.player-copy { display: flex; flex-direction: column; gap: 28px; }

.name-plate {
  background: var(--panel-bg);
  border: 1px solid var(--panel-edge);
  border-radius: 18px;
  padding: 20px 24px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
  border-left: 6px solid var(--ncfc-yellow);
}
.name-plate-leo { border-left-color: var(--rm-gold); }

.name-plate-eyebrow {
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--ncfc-yellow);
  margin-bottom: 8px;
}
.name-plate-leo .name-plate-eyebrow { color: var(--rm-gold); }

.name-plate-name {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}
.name-plate-sub {
  margin: 8px 0 0;
  opacity: 0.85;
  font-size: 1rem;
}

/* Stats grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat {
  background: var(--panel-bg);
  border: 1px solid var(--panel-edge);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat:hover { transform: translateY(-3px); border-color: var(--ncfc-yellow); }
.stat-num {
  font-family: 'Anton', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--ncfc-yellow);
  line-height: 1;
}
.stat-lbl {
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  opacity: 0.8;
}
.stat-ovr .stat-num { color: #fff; text-shadow: 0 0 12px var(--ncfc-yellow); }
.player-leo .stat-num { color: var(--rm-gold); }
.player-leo .stat-ovr .stat-num { color: #fff; text-shadow: 0 0 12px var(--rm-gold); }

/* Story (kids' paragraphs) */
.story {
  background: var(--panel-bg);
  border: 1px solid var(--panel-edge);
  border-radius: 18px;
  padding: 22px 26px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
}
.story h3 {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: var(--ncfc-yellow);
}
.player-leo .story h3 { color: var(--rm-gold); }
.story p {
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0 0 12px;
  color: #f5f5f5;
}
.story p:last-child { margin-bottom: 0; }

/* Goal banner button */
.goal-banner {
  all: unset;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 24px;
  border-radius: 20px;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.25) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, #ffd600 0%, #ff9900 100%);
  color: #1a1a00;
  text-align: center;
  cursor: pointer;
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  box-shadow:
    0 14px 28px -10px rgba(255, 170, 0, 0.7),
    inset 0 2px 0 rgba(255,255,255,0.55),
    inset 0 -4px 0 rgba(0,0,0,0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  user-select: none;
}
.goal-banner:hover {
  transform: translateY(-2px) scale(1.01);
}
.goal-banner:active { transform: translateY(2px); }
.goal-banner-text {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  letter-spacing: 0.04em;
  line-height: 1;
}
.goal-banner-hint {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  opacity: 0.75;
}
.goal-banner-leo {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.18) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, #ffffff 0%, #ffe680 100%);
}
.goal-banner.is-celebrating {
  animation: shake 0.5s ease;
}
@keyframes shake {
  0%,100% { transform: translate(0,0) rotate(0); }
  20% { transform: translate(-4px,2px) rotate(-1deg); }
  40% { transform: translate(4px,-2px) rotate(1deg); }
  60% { transform: translate(-3px,-1px) rotate(-0.5deg); }
  80% { transform: translate(3px,2px) rotate(0.5deg); }
}

/* ============================================================
   REEL / GALLERY
   ============================================================ */

.reel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.reel-item {
  margin: 0;
  background: var(--panel-bg);
  border: 1px solid var(--panel-edge);
  border-radius: 18px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}
.reel-item:hover { transform: translateY(-4px); }
.reel-item img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}
.reel-item figcaption {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.9;
}
.reel-item-placeholder .placeholder-box {
  aspect-ratio: 4/5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 20px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 12px, transparent 12px 24px);
  font-weight: 700;
  opacity: 0.7;
}
.placeholder-emoji { font-size: 3rem; }

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  text-align: center;
  padding: 40px 0 80px;
  opacity: 0.85;
  font-weight: 600;
}
.footer a {
  color: var(--ncfc-yellow);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.footer a:hover { border-bottom-color: var(--ncfc-yellow); }

/* ============================================================
   KICKABLE BALL
   ============================================================ */

.ball {
  position: fixed;
  left: 20px;
  bottom: 20px;
  font-size: 56px;
  line-height: 1;
  z-index: 50;
  cursor: grab;
  user-select: none;
  touch-action: none;
  filter: drop-shadow(0 10px 12px rgba(0,0,0,0.5));
  transition: transform 0.1s ease;
  will-change: transform, left, top;
}
.ball:active { cursor: grabbing; }
.ball.is-spinning { animation: spin 0.6s linear infinite; }
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (max-width: 600px) {
  .ball { font-size: 44px; }
}

/* ============================================================
   CONFETTI CANVAS
   ============================================================ */

#confetti {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

.story,
.stat-grid,
.name-plate,
.polaroid,
.goal-banner,
.reel-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.is-in-view {
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .story, .stat-grid, .name-plate, .polaroid, .goal-banner, .reel-item {
    opacity: 1; transform: none;
  }
}
