/* ==========================================================================
   Synq Design Tokens & Shared Primitives
   Aligned with Android ui/theme/Color.kt (#141116, #FF2D7A, #FF4D67)
   ========================================================================== */

:root {
  /* Surfaces — plum-tinted darks (from Color.kt) */
  --bg: #141116;
  --bg-lowest: #100d12;
  --surface-low: #1a141e;
  --surface: #1e1822;
  --surface-high: #261e2b;
  --surface-highest: #2e2535;

  /* Hairlines & Outlines */
  --border: #3a2f42;
  --border-subtle: rgba(247, 243, 248, 0.08);
  --border-strong: #5a4f61;

  /* Ink */
  --ink: #f7f3f8;
  --ink-muted: #a79ead;
  --ink-dim: #7c7283;

  /* Brand Pink & Sports Accent */
  --pink: #ff2d7a;
  --pink-soft: #ff6584;
  --pink-glow: #ff8fa3;
  --pink-deep: #d0165e;
  --pink-tint: rgba(255, 45, 122, 0.12);
  --pink-border: rgba(255, 45, 122, 0.34);

  --sports: #ff4d67;
  --sports-tint: rgba(255, 77, 103, 0.14);
  --sports-border: rgba(255, 77, 103, 0.36);

  /* Semantic */
  --green: #10b981;
  --green-tint: rgba(16, 185, 129, 0.14);
  --green-border: rgba(16, 185, 129, 0.36);
  --red: #ef4444;
  --red-tint: rgba(239, 68, 68, 0.15);
  --red-border: rgba(239, 68, 68, 0.38);
  --amber: #fbbf24;
  --amber-tint: rgba(251, 191, 36, 0.14);

  /* Typography */
  --font-display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Radii & Spacing */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 9999px;

  --wrap-max: 1200px;
  --gutter: 40px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  overflow-x: clip;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  overflow-x: clip;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--pink);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--r-sm);
  transition: top 0.15s var(--ease);
}

.skip-link:focus {
  top: 14px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Typography helpers */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.2vw, 4.35rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 3.6vw, 3rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
  flex-shrink: 0;
}

.eyebrow-dot.sports {
  background: var(--sports);
}

.eyebrow-dot.green {
  background: var(--green);
}

.tnum {
  font-variant-numeric: tabular-nums;
}

/* Buttons — Single consistent system */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--pink);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-primary:hover {
  background: var(--pink-deep);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-high);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid transparent;
  padding-inline: 12px;
}

.btn-ghost:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  background: rgba(20, 17, 22, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.025em;
  min-height: 44px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-accent {
  color: var(--pink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  border-radius: var(--r-xs);
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.nav-link:hover,
.nav-link[aria-current="true"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.beta-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-low);
  white-space: nowrap;
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-low);
  color: var(--ink);
}

.mobile-drawer {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 55;
  background: var(--bg-lowest);
  border-top: 1px solid var(--border-subtle);
  padding: 24px var(--gutter) 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s 0.2s;
}

html.drawer-open,
html.drawer-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.drawer-open body {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

.mobile-drawer.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 4px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--ink);
}

.mobile-drawer-link span:last-child {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
}

.mobile-drawer-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-lowest);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.footer-brand img {
  height: 24px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 13.5px;
  color: var(--ink-muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s var(--ease);
}

.footer-link:hover {
  color: var(--ink);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 16px);
  opacity: 0;
  z-index: 120;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--surface-high);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
  max-width: calc(100vw - 32px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  :root {
    --gutter: 28px;
  }
}

@media (max-width: 820px) {
  .nav-links,
  .nav-right .beta-note,
  .nav-right .btn {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 18px;
    --nav-h: 64px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
