/* ---------- fonts (self-hosted, only the weights actually used) ---------- */
@font-face {
  font-family: "GT Eesti Display";
  src: url("../font/GT-Eesti-Display-Regular-Trial.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GT Eesti Display";
  src: url("../font/GT-Eesti-Display-Bold-Trial.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GT Eesti Text";
  src: url("../font/GT-Eesti-Text-Regular-Trial.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GT Eesti Text";
  src: url("../font/GT-Eesti-Text-Medium-Trial.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- reset & base ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent: #3557ff;
  --accent-light: #5f7dff;
  --white: #f5f7ff;
  --muted: #97a1c4;
  --muted-dim: #616c93;
  --line: rgba(255, 255, 255, 0.26);
  --line-soft: rgba(255, 255, 255, 0.17);
  --font: "GT Eesti Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "GT Eesti Display", var(--font);
}

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--font);
  color: var(--white);
  background:
    radial-gradient(circle at 88% 92%, rgba(53, 87, 255, 0.55), transparent 45%),
    radial-gradient(circle at 105% 105%, rgba(35, 66, 230, 0.45), transparent 60%),
    linear-gradient(135deg, #01030a 0%, #050a1c 45%, #081536 72%, #0a1c4a 100%);
  min-height: 100dvh;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

.accent {
  color: var(--accent-light);
}

/* ---------- pitch background ---------- */
.pitch-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
}

.pitch-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  transform: translate(-50%, -50%);
  mask-image: radial-gradient(circle at center, black 55%, transparent 105%);
  -webkit-mask-image: radial-gradient(circle at center, black 55%, transparent 105%);
}

@media (orientation: portrait) {
  .pitch-svg {
    width: 100vh;
    height: 100vw;
    width: 100dvh;
    height: 100dvw;
    transform: translate(-50%, -50%) rotate(90deg);
  }
}

.pitch-line {
  fill: none;
  stroke: var(--line-soft);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.pitch-dot {
  fill: var(--line-soft);
  stroke: none;
}

.pitch-goal {
  stroke: var(--line);
  stroke-width: 3;
}

/* ---------- player decoration ---------- */
.player-decor {
  display: none;
  position: fixed;
  left: 0;
  top: 50%;
  width: clamp(340px, 37.4vw, 680px);
  height: auto;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
  animation: player-slide-in 1.15s cubic-bezier(0.16, 0.84, 0.44, 1) 0.2s both;
}

@keyframes player-slide-in {
  from {
    transform: translate(-115%, -50%);
    opacity: 0;
  }
  to {
    transform: translate(14%, -50%);
    opacity: 0.8;
  }
}

@media (min-width: 860px) and (min-aspect-ratio: 1/1) {
  .player-decor {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-decor {
    animation: none;
    transform: translate(14%, -50%);
    opacity: 0.8;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 11px 22px;
  box-shadow: 0 6px 20px -8px rgba(53, 87, 255, 0.7);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -8px rgba(53, 87, 255, 0.85);
}

.btn-large {
  padding: clamp(11px, 2vmin, 17px) clamp(22px, 4vmin, 36px);
  font-size: clamp(0.95rem, 1.9vmin, 1.25rem);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(60px, 9vh, 110px) 24px;
}

.hero-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3.5vh, 36px);
}

/* ---------- network hub ---------- */
.network {
  position: relative;
  width: clamp(260px, 52vmin, 470px);
  height: clamp(260px, 52vmin, 470px);
  flex-shrink: 0;
}

.network-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.network-boundary {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.network-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1em 1.7em;
  background-color: #09102e8c;
  border-radius: 999px;
  transition: transform 0.2s ease;
}

.network-logo:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.network-logo img {
  width: clamp(143px, 29vmin, 238px);
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.55));
}

.network-spoke {
  stroke: var(--line-soft);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.network-pulse {
  fill: var(--accent-light);
}

@media (prefers-reduced-motion: reduce) {
  .network-pulse { display: none; }
}

.node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: clamp(66px, 11.5vmin, 96px);
  height: clamp(66px, 11.5vmin, 96px);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 16, 38, 0.55);
  border: 1px solid rgba(95, 125, 255, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.node:hover {
  transform: translate(-50%, -50%) scale(1.08);
  border-color: rgba(95, 125, 255, 0.75);
  background: rgba(16, 24, 58, 0.75);
}

.node-label {
  font-size: clamp(0.72rem, 1.5vmin, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
}

.node-sub {
  margin-top: 2px;
  font-size: clamp(0.6rem, 1.2vmin, 0.72rem);
  color: var(--muted);
}

.node-clubs { left: 50%; top: 6%; }
.node-agents { left: 91.8%; top: 36.4%; }
.node-scouts { left: 75.9%; top: 85.6%; }
.node-players { left: 24.1%; top: 85.6%; }
.node-academies { left: 8.2%; top: 36.4%; }

.content-top,
.content-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.content-top {
  max-width: 640px;
}

.content-bottom {
  max-width: 440px;
}

.eyebrow {
  margin-bottom: 14px;
  font-weight: 500;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-light);
}

.headline {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--white);
  font-size: clamp(1.8rem, 4.2vw, 3.1rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.headline .accent {
  color: inherit;
}

.subtext {
  max-width: 40ch;
  font-weight: 400;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.6;
  color: var(--muted);
}

.hero .btn-large {
  margin-top: 20px;
}

/* ---------- footer ---------- */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(36px, 5vh, 60px) clamp(20px, 4vw, 56px);
  font-size: 0.78rem;
  color: var(--muted-dim);
  background: linear-gradient(to top, rgba(2, 4, 10, 0.7), rgba(2, 4, 10, 0) 100%);
  /* let clicks pass through the (mostly empty) fixed bar to the CTA behind it */
  pointer-events: none;
}

.footer-brand,
.footer-links {
  pointer-events: auto;
}

.footer-links {
  display: flex;
  gap: clamp(12px, 2vw, 22px);
}

.footer-links a {
  color: var(--muted-dim);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-brand {
  transition: color 0.15s ease;
}

.footer-brand:hover {
  color: var(--white);
}

/* ---------- legal pages ---------- */
html.legal-html,
body.legal-body {
  height: 100dvh;
  overflow: hidden;
}

body.legal-body {
  display: flex;
  flex-direction: column;
}

.legal-header {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: clamp(32px, 6vh, 56px) 24px 0;
}

.legal-logo {
  display: inline-flex;
  transition: transform 0.2s ease;
}

.legal-logo:hover {
  transform: scale(1.04);
}

.legal-logo img {
  width: clamp(96px, 14vw, 150px);
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.legal-main {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  padding: clamp(28px, 5vh, 48px) 24px;
}

.legal-card {
  width: 100%;
  max-width: 720px;
}

.legal-eyebrow {
  font-weight: 500;
  font-size: clamp(0.75rem, 1.3vw, 0.9rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-light);
}

.legal-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: 10px;
}

.legal-updated {
  margin-top: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-style: italic;
  color: var(--muted-dim);
  font-size: 0.9rem;
}

.legal-card section {
  margin-top: 32px;
}

.legal-card h2 {
  font-family: var(--font);
  font-weight: 500;
  color: var(--white);
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  margin-bottom: 10px;
}

.legal-card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
}

.legal-card a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- short / landscape mobile ---------- */
@media (max-height: 480px) and (orientation: landscape) {
  .subtext { display: none; }
  .site-footer { padding-top: 14px; padding-bottom: 14px; }
  .hero { padding-top: 50px; padding-bottom: 50px; }
  .hero-stack { gap: 10px; }
  .hero .btn-large { margin-top: 8px; }
  .eyebrow { font-size: 0.75rem; margin-bottom: 4px; }
  .headline { font-size: clamp(1rem, 2.8vmin, 1.4rem); }
  .network {
    width: clamp(170px, 40vmin, 260px);
    height: clamp(170px, 40vmin, 260px);
  }
  .node { width: 42px; height: 42px; }
  .node-sub { display: none; }
  .network-logo { padding: 0.6em 1.1em; }
  .network-logo img { width: 108px; }
  .player-decor { display: none; }
}

@media (max-width: 480px) {
  .node-sub { display: none; }
  .node { width: 56px; height: 56px; }
}

@media (max-width: 420px) {
  .site-footer { font-size: 0.7rem; }
}

/* ---------- custom football cursor ---------- */
.ball-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  object-fit: contain;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  will-change: transform;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
}

.ball-cursor.visible {
  opacity: 1;
}

html.has-custom-cursor,
html.has-custom-cursor a,
html.has-custom-cursor button {
  cursor: none;
}

@media (hover: none), (pointer: coarse) {
  .ball-cursor { display: none !important; }
}
