/* Hashmark product gateway — split-screen sport chooser. Intentionally independent of sport app styles. */
:root {
  color-scheme: dark;
  --bg: #0a0f0d;
  --ink: #f4f6f2;
  --muted: #adb7b0;
  --line: #2c3630;
  font-family: "Archivo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; line-height: 1.5; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
svg { display: block; flex-shrink: 0; }
p, h1, h2, ul { margin: 0; }
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 20; top: 12px; left: 16px; padding: 12px 18px; background: var(--ink); color: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding-inline: clamp(20px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 19px; font-weight: 900; letter-spacing: -.6px; }
.account-note { color: var(--muted); font-size: 13px; }

/* Split screen */
main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.split { flex: 1; display: flex; min-height: 0; }
.half { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; gap: 22px; flex: 1 1 0; min-width: 0; min-height: 480px; overflow: hidden; padding: clamp(24px, 4vw, 56px); transition: flex-grow 360ms cubic-bezier(.22,.61,.24,1); }
.football { flex-grow: 1; background: radial-gradient(130% 95% at 68% -5%, #143926 0%, #0c1d13 46%, #06100a 100%); }
.basketball { flex-grow: 1; background: radial-gradient(130% 95% at 32% -5%, #3c2411 0%, #1d1209 46%, #0e0805 100%); }
.half::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(5, 10, 7, .92) 0%, rgba(5, 10, 7, 0) 62%); }
.half::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--tint, none); opacity: 0; transition: opacity 360ms ease-out; }
.football { --accent: #75dfa5; --on-accent: #07130c; --tint: linear-gradient(160deg, #143424 0%, #0d1f15 78%); }
.basketball { --accent: #ffa15d; --on-accent: #1a0e04; --tint: linear-gradient(200deg, #3a2312 0%, #20130a 78%); }

.chip { position: absolute; top: clamp(20px, 3.5vw, 44px); left: clamp(24px, 4vw, 56px); display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .24em; }
.chip::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* Chalkboard sport art — perspective illustration dissolving into darkness */
.art { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.football .art { color: #8fd8ae; opacity: .5; }
.basketball .art { color: #f0ae78; opacity: .58; }
.half:hover .art { opacity: .74; }
.art text { font-family: inherit; stroke: none; }
.art .numerals { letter-spacing: 3px; }
.art .nodes circle { fill: var(--bg); }
.art .nodes text { font-weight: 700; }
.art .tag-accent rect { fill: #ffa95e; }
.art .tag-accent text { fill: #1a0e04; font-size: 12px; font-weight: 800; letter-spacing: .12em; }

.half-copy h2 { font-size: clamp(46px, 6.2vw, 104px); font-weight: 900; line-height: .96; letter-spacing: -.05em; }
.half-lede { margin-top: 14px; max-width: 34ch; color: var(--muted); font-size: clamp(14px, 1.3vw, 17px); line-height: 1.55; }

.stats { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 0; list-style: none; }
.stats li { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: #c8d0ca; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .3px; white-space: nowrap; }

.enter { display: inline-flex; align-self: flex-start; align-items: center; gap: 12px; min-height: 48px; padding: 12px 18px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 800; letter-spacing: .2px; }
.enter svg { transition: transform 220ms ease-out; }

/* Hover: hovered half grows, sibling shrinks; every change has a reason */
@media (hover: hover) and (pointer: fine) {
  .split:hover .half { flex-grow: .82; }
  .split .half:hover { flex-grow: 1.3; }
  .half:hover::after { opacity: 1; }
  .half:hover .enter svg { transform: translateX(4px); }
}
.half:active .enter { transform: translateY(1px); }
.enter { transition: transform 180ms ease-out; }

/* Footer strip */
.shared-note { padding: 14px clamp(20px, 4vw, 48px); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.shared-note strong { color: #d9e0da; font-weight: 600; margin-right: 5px; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 16px clamp(20px, 4vw, 48px) 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.play-note { font-weight: 600; letter-spacing: .3px; color: #c8d0ca; }

/* Arrive animation — brief, once */
@media (prefers-reduced-motion: no-preference) {
  .half { animation: half-arrive 480ms ease-out backwards; }
  .basketball { animation-delay: 90ms; }
  @keyframes half-arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

  /* Chalk lines draw in once on load; routes, labels and tag fade in after */
  .art .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-in 1100ms ease-out 120ms forwards; }
  .art .marks, .art .numerals, .art .routes, .art .nodes { opacity: 0; animation: art-fade 600ms ease-out 780ms forwards; }
  .art .tag-accent { opacity: 0; animation: art-fade 500ms ease-out 1050ms forwards, tag-pulse 2600ms ease-in-out 1900ms infinite alternate; }
  @keyframes draw-in { to { stroke-dashoffset: 0; } }
  @keyframes art-fade { to { opacity: 1; } }
  @keyframes tag-pulse { from { opacity: 1; } to { opacity: .72; } }
}

/* Mobile: halves stack, each at least ~44vh */
@media (max-width: 820px) {
  .split { flex-direction: column; }
  .half { flex: 1 1 auto; min-height: 44svh; gap: 18px; }
  .half-copy h2 { font-size: clamp(44px, 13vw, 64px); }
  .chip { top: 20px; left: 24px; }
  .account-note { font-size: 11px; max-width: 110px; text-align: right; }
  .brand { font-size: 16px; gap: 7px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 360px) {
  .half { padding: 20px; }
  .stats li { font-size: 11px; padding: 6px 10px; }
}

/* Reduced motion: freeze, don't slow */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .half, .art, .enter svg { transform: none; opacity: 1; }
  .football .art, .basketball .art { opacity: .5; }
  .split:hover .half, .split .half:hover { flex-grow: 1; }
  .half:hover::after { opacity: 1; }
}
