/* Match Analyze — Apple-grade premium site */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --bg-soft: #111111;
  --surface-1: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-tertiary: rgba(255, 255, 255, 0.44);
  --text-quaternary: rgba(255, 255, 255, 0.22);

  --accent: #ff2d75;
  --accent-2: #a855f7;
  --accent-3: #6366f1;
  --accent-soft: rgba(255, 45, 117, 0.08);
  --accent-glow: rgba(168, 85, 247, 0.24);

  --max-content: 1280px;
  --max-narrow: 720px;
  --max-text: 980px;

  --ease-apple: cubic-bezier(0.42, 0, 0.18, 1);
  --ease-out-strong: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'SF Pro Display', 'Inter', -apple-system, BlinkMacSystemFont,
    'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection { background: var(--accent); color: white; }

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

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

/* ── Nav (Apple-style) ────────────────────────────────────────── */
nav.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s var(--ease-apple);
}
nav.top .container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav.top .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
nav.top .brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
nav.top .brand .wordmark {
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 15px;
  color: var(--text-primary);
}
nav.top .links {
  display: flex;
  gap: 36px;
  align-items: center;
}
nav.top .links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  letter-spacing: 0;
}
nav.top .links a:hover { color: var(--text-primary); }
nav.top .links a.active { color: var(--accent); }
nav.top .lang-toggle {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  transition: all 0.2s ease;
}
nav.top .lang-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

body { padding-top: 56px; }

/* ── Scroll-reveal base ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1.2s var(--ease-out-strong),
              transform 1.2s var(--ease-out-strong);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Hero section ─────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, var(--accent-glow) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 30% 70%, rgba(255, 45, 117, 0.12) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero-logo {
  width: 140px;
  height: 140px;
  margin-bottom: 56px;
  position: relative;
  animation: logo-entrance 1.6s var(--ease-out-strong) forwards;
}
.hero-logo::before {
  content: '';
  position: absolute;
  inset: -60px;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  z-index: -1;
  animation: glow-pulse 5s ease-in-out infinite;
}
.hero-logo img {
  width: 100%;
  height: 100%;
  border-radius: 32px;
}

@keyframes logo-entrance {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.hero h1 {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  max-width: 14ch;
  margin-bottom: 24px;
  animation: word-enter 1.2s 0.3s var(--ease-out-strong) backwards;
}
.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 580px;
  letter-spacing: -0.005em;
  line-height: 1.4;
  margin-bottom: 48px;
  animation: word-enter 1.2s 0.5s var(--ease-out-strong) backwards;
}

@keyframes word-enter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.005em;
  animation: word-enter 1.2s 0.7s var(--ease-out-strong) backwards;
}
.hero-cta::after {
  content: '→';
  transition: transform 0.4s var(--ease-apple);
}
.hero-cta:hover::after { transform: translateX(6px); }

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-quaternary);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  animation: bounce-hint 2s ease-in-out infinite;
}
@keyframes bounce-hint {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

/* ── Story sections (Apple-style alternating) ─────────────────── */
.story {
  padding: 160px 28px;
  position: relative;
  overflow: hidden;
}
.story.dark { background: #050505; }
.story.darker { background: #000000; }
.story.glow {
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 60%),
    #000000;
}

.story-inner {
  max-width: var(--max-text);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.story-inner.center { text-align: center; }
.story-inner.narrow { max-width: 720px; }

.story .eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: block;
}

.story h2 {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 32px;
  max-width: 16ch;
}
.story-inner.center h2 { margin-left: auto; margin-right: auto; }
.story h2 .gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.story h3 {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.story p {
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 60ch;
  letter-spacing: -0.005em;
}
.story-inner.center p { margin-left: auto; margin-right: auto; }

/* ── Stats counter (Apple-style) ──────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 56px;
  margin-top: 96px;
  text-align: center;
}
.stat-block .num {
  display: block;
  font-size: clamp(64px, 9vw, 112px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.stat-block .num.accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-block .label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Capability grid ──────────────────────────────────────────── */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 4px;
  margin-top: 80px;
  background: var(--border);
  border-radius: 24px;
  overflow: hidden;
}
.cap-tile {
  background: #050505;
  padding: 48px 36px;
  transition: background 0.3s ease;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.cap-tile:hover { background: #0a0a0a; }
.cap-tile .tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.cap-tile h4 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.2;
}
.cap-tile p {
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* ── Quote-style callout ──────────────────────────────────────── */
.callout-large {
  margin: 64px auto 0;
  max-width: 780px;
  padding: 48px;
  background: linear-gradient(135deg, rgba(255, 45, 117, 0.08) 0%, rgba(168, 85, 247, 0.05) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  text-align: center;
}
.callout-large h3 {
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.callout-large p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0 auto;
}

/* ── Leagues marquee ──────────────────────────────────────────── */
.leagues-strip {
  margin-top: 64px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.leagues-strip::before,
.leagues-strip::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.leagues-strip::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}
.leagues-strip::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg), transparent);
}
.leagues-track {
  display: flex;
  gap: 64px;
  animation: scroll-leagues 40s linear infinite;
  width: max-content;
}
.leagues-track span {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
@keyframes scroll-leagues {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Final CTA section ────────────────────────────────────────── */
.final-section {
  padding: 200px 28px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 60% at 50% 50%, rgba(255, 45, 117, 0.12) 0%, transparent 60%),
    #000000;
}
.final-section h2 {
  font-size: clamp(60px, 12vw, 140px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.98;
  margin-bottom: 32px;
}
.final-section h2 .gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.final-section p {
  font-size: 22px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}

/* ── Footer (Apple-style) ─────────────────────────────────────── */
footer {
  background: #050505;
  padding: 64px 28px 32px;
  border-top: 1px solid var(--border);
}
footer .container {
  max-width: var(--max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: start;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
footer .brand-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
footer .brand-block .brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
footer .brand-block img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
footer .brand-block .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
footer .brand-block p {
  font-size: 12px;
  color: var(--text-tertiary);
  max-width: 380px;
  line-height: 1.5;
}
footer .nav-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
footer .nav-col h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 0;
}
footer .nav-col a {
  font-size: 12px;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}
footer .nav-col a:hover { color: var(--text-primary); }
footer .bottom {
  max-width: var(--max-content);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-quaternary);
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Document pages (privacy/terms/support) ───────────────────── */
.doc-page-hero {
  padding: 120px 28px 80px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 40% at 50% 30%, rgba(168, 85, 247, 0.08) 0%, transparent 60%);
}
.doc-page-hero .eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}
.doc-page-hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.doc-page-hero .meta {
  font-size: 14px;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.lang-tabs {
  display: flex;
  gap: 2px;
  justify-content: center;
  margin: 40px auto 56px;
  padding: 3px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 100px;
  width: fit-content;
}
.lang-tab {
  padding: 8px 22px;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 100px;
  transition: all 0.25s ease;
  font-family: inherit;
}
.lang-tab.active {
  background: var(--text-primary);
  color: #000;
}
.lang-section { display: none; }
.lang-section.active { display: block; }

.doc-body {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 28px 120px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.doc-body h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 56px 0 16px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.doc-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 10px;
  letter-spacing: -0.01em;
}
.doc-body p { margin-bottom: 16px; }
.doc-body ul, .doc-body ol { margin: 0 0 16px 24px; }
.doc-body li { margin-bottom: 6px; }
.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.doc-body th, .doc-body td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.doc-body tr:last-child td { border-bottom: none; }
.doc-body th {
  background: var(--surface-1);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.doc-body a {
  color: var(--text-primary);
  border-bottom: 1px solid var(--accent);
  transition: color 0.2s ease;
}
.doc-body a:hover { color: var(--accent); }
.doc-body strong { color: var(--text-primary); font-weight: 600; }
.doc-body code {
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SF Mono', Monaco, monospace;
}
.doc-callout {
  padding: 24px 28px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 45, 117, 0.18);
  border-radius: 16px;
  margin: 24px 0;
  font-size: 15px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav.top .container { padding: 0 20px; }
  nav.top .links { gap: 20px; }
  nav.top .links a { font-size: 12px; }
  .story { padding: 96px 24px; }
  .final-section { padding: 120px 24px; }
  .stats-grid { gap: 32px; margin-top: 64px; }
  .cap-grid { grid-template-columns: 1fr; margin-top: 48px; }
  .cap-tile { padding: 36px 28px; min-height: 200px; }
  .callout-large { padding: 32px 24px; }
  footer .container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  footer .bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-logo { width: 110px; height: 110px; margin-bottom: 40px; }
}

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
