/* pikolbai.com — PikolBai Brand Kit v1.0 on Astryx token names.
   Source of truth: PikolBai design system (claude.ai/artifact/HxT1BHcCAPbaSppqRA1kw2), _brands/pikolbai.md.
   Rules: orange (--live) only means LIVE; text on lime or orange is Court Ink, never white. */

:root {
  color-scheme: light dark;
  --brand-green: #1F7A4D;
  --brand-green-dark: #145236;
  --brand-green-bright: #2FA866;
  --brand-lime: #E2F84A;
  --on-brand-lime: #10241A;
  --brand-ink: #10241A;
  --brand-paper: #F3F5EC;
  --live: #FF7A1A;
  --on-live: #10241A;

  --color-background-body: #F3F5EC;
  --color-background-surface: #FFFFFF;
  --color-background-muted: #EBEEE0;
  --color-text-primary: #10241A;
  --color-text-secondary: #4B5E53;
  --color-text-brand: #1F7A4D;
  --color-border: #10241A1A;
  --color-border-emphasized: #7A8A7F;
  --color-accent: #1F7A4D;
  --color-accent-pressed: #145236;
  --color-on-accent: #FFFFFF;
  --color-focus: #1F7A4D;
  --color-success-muted: #E7F5EC;
  --color-text-success: #145236;

  --font-display: Fredoka, ui-rounded, system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-18: 72px;
  --radius-inner: 10px; --radius-element: 16px; --radius-container: 24px; --radius-full: 9999px;
  --size-element-md: 40px; --size-element-lg: 48px;
  --shadow-high: 0 12px 32px rgba(16, 36, 26, .16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background-body: #10241A;
    --color-background-surface: #183424;
    --color-background-muted: #0C1C14;
    --color-text-primary: #F3F5EC;
    --color-text-secondary: #A9BBAE;
    --color-text-brand: #4CC985;
    --color-border: #F3F5EC1F;
    --color-border-emphasized: #5E7F6A;
    --color-accent: #2FA866;
    --color-accent-pressed: #1F7A4D;
    --color-on-accent: #10241A;
    --color-focus: #E2F84A;
    --color-success-muted: #1F3D2C;
    --color-text-success: #BEE8CD;
    --shadow-high: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--color-background-body);
  color: var(--color-text-primary);
  font: 400 16px/24px var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--color-text-brand); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 6px; }

.container { width: min(1200px, 100% - 2 * var(--space-8)); margin-inline: auto; }
@media (max-width: 520px) { .container { width: calc(100% - 2 * var(--space-4)); } }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.stack-lg { display: flex; flex-direction: column; gap: var(--space-6); }
.row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.muted { color: var(--color-text-secondary); }
.eyebrow { font: 600 12px/16px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-secondary); }
.display { font-weight: 700; font-size: clamp(28px, 3.4vw, 36px); line-height: 1.15; }
.heading { font-weight: 600; font-size: 22px; line-height: 28px; }
.heading-sm { font-weight: 600; font-size: 18px; line-height: 24px; }
.caption { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--color-text-secondary); }
.lede { font-size: 18px; line-height: 28px; color: var(--color-text-secondary); max-width: 36em; }

.skip { position: absolute; left: var(--space-4); top: -60px; z-index: 10; padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); background: var(--color-accent); color: var(--color-on-accent); }
.skip:focus { top: var(--space-4); }

/* Buttons: pills in Fredoka */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--size-element-md); padding: 0 20px;
  border-radius: var(--radius-full); border: 1.5px solid transparent;
  font: 600 16px/20px var(--font-display); text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { min-height: var(--size-element-lg); padding: 0 24px; font-size: 17px; }
.btn-primary { background: var(--color-accent); color: var(--color-on-accent); }
.btn-primary:hover { background: var(--color-accent-pressed); }
.btn-lime { background: var(--brand-lime); color: var(--on-brand-lime); }
.btn-outline-light { border-color: #fff; color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; border-radius: var(--radius-full); font: 700 12px/1 var(--font-display); letter-spacing: .05em; white-space: nowrap; align-self: flex-start; }
.badge-live { background: var(--live); color: var(--on-live); }
.badge-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--on-live); }
.badge-lime { background: var(--brand-lime); color: var(--on-brand-lime); }
.badge-free { background: var(--color-success-muted); color: var(--color-text-success); font-family: var(--font-body); letter-spacing: .02em; }
.badge-club { background: var(--brand-green); color: #fff; font-family: var(--font-body); letter-spacing: .02em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--color-background-surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--color-border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 68px; }
.site-header .logo img { height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: var(--space-6); }
.site-nav a:not(.btn) { color: var(--color-text-primary); text-decoration: none; font: 500 15px var(--font-body); }
.site-nav a:not(.btn):hover { color: var(--color-text-brand); }
@media (max-width: 760px) { .site-nav a:not(.btn) { display: none; } }

/* Hero */
.hero { position: relative; isolation: isolate; background: radial-gradient(120% 90% at 85% 40%, #24885A 0%, var(--brand-green) 55%, #1A6E45 100%); color: #fff; padding: var(--space-18) 0 80px; overflow: hidden; }
.hero-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--space-12); align-items: center; }
.hero h1 { font-weight: 700; font-size: clamp(38px, 5.2vw, 60px); line-height: 1.07; letter-spacing: -.01em; }
.hero .lede { color: #E7F5EC; font-size: 19px; line-height: 30px; }
@media (max-width: 900px) { .hero { padding: var(--space-12) 0 var(--space-18); } .hero .container { grid-template-columns: 1fr; } }

/* Hero illustration: a stream tile drawn with brand pieces */
.stream-card { justify-self: center; width: min(440px, 100%); background: var(--brand-ink); border-radius: var(--radius-container); padding: 14px; box-shadow: var(--shadow-high); }
.vid { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-inner); overflow: hidden; background: #0C1C14; }
.court { position: absolute; inset: 0; background: linear-gradient(180deg, #2C5E86 0 34%, #1F7A4D 34% 100%); }
.court::before { content: ""; position: absolute; left: 14%; right: 14%; top: 44%; bottom: 6%; border: 2px solid rgba(255, 255, 255, .85); background: #2B7FB0; }
.court::after { content: ""; position: absolute; left: 12%; right: 12%; top: 62%; height: 3px; background: #F3F5EC; }
.vid .badge-live { position: absolute; left: 10px; top: 10px; }
.logobug { position: absolute; right: 10px; top: 10px; display: inline-flex; padding: 4px 8px; border-radius: var(--radius-full); background: var(--brand-green); }
.logobug img { height: 18px; width: auto; }
.scorebar { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); display: flex; border-radius: var(--radius-full); overflow: hidden; font-family: var(--font-display); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.scorebar span { display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; white-space: nowrap; }
.scorebar .t { background: #fff; color: #10241A; font-weight: 600; font-size: 13px; }
.scorebar .s { background: var(--brand-green); color: #fff; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.serve { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-lime); }
.stream-meta { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 12px 6px 2px; color: var(--brand-paper); }
.stream-meta b { font: 600 16px/20px var(--font-display); display: block; }
.stream-meta small { font-size: 13px; color: #A9BBAE; }

/* Sections */
.section { padding: var(--space-18) 0; }
.section-surface { background: var(--color-background-surface); }
.section-ink { background: var(--brand-ink); color: var(--brand-paper); }
.section-head { margin-bottom: var(--space-8); }
.grid { display: grid; gap: var(--space-4); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.card { background: var(--color-background-surface); border: 1px solid var(--color-border); border-radius: var(--radius-container); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.card p { color: var(--color-text-secondary); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 17px var(--font-display); flex: none; }
.av-lime { background: var(--brand-lime); color: var(--on-brand-lime); }
.av-green { background: var(--brand-green); color: #fff; }
.av-ink { background: var(--brand-ink); color: var(--brand-paper); outline: 1px solid var(--color-border); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--radius-full); border: 1px solid var(--color-border-emphasized); background: var(--color-background-surface); font: 500 14px/20px var(--font-body); }

.court-card { background: var(--color-background-surface); border: 1px solid var(--color-border); border-radius: var(--radius-element); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.section-surface .court-card { background: var(--color-background-body); }
.court-card .head { display: flex; justify-content: space-between; align-items: center; }
.court-card .num { font: 700 22px/28px var(--font-display); }
.court-card .teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--space-2); font-size: 14px; }
.court-card .vs { font-size: 12px; color: var(--color-text-secondary); }
.court-card.next { background: var(--brand-green); color: #fff; border-color: transparent; }
.court-card.next .vs { color: #E7F5EC; }
.queue-row { display: flex; justify-content: space-between; font-size: 15px; }

.step { background: var(--color-background-surface); border-radius: var(--radius-element); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); }
.section-ink .step { background: #183424; }
.section-ink .step p { color: #A9BBAE; font-size: 15px; line-height: 22px; }
.step-num { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 16px var(--font-display); background: var(--brand-lime); color: var(--on-brand-lime); margin-bottom: var(--space-2); }

.tier { background: var(--color-background-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-element); padding: var(--space-6); display: flex; flex-direction: column; gap: 10px; }
.tier.featured { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-success-muted); }
.tier .price { font: 700 24px/30px var(--font-display); }
.check, .nocheck { display: flex; gap: 8px; font-size: 14px; line-height: 20px; }
.check::before { content: ""; width: 18px; height: 18px; flex: none; margin-top: 1px; border-radius: 50%; background: var(--color-success-muted) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23145236' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.nocheck { color: var(--color-text-secondary); }
.nocheck::before { content: "–"; width: 18px; text-align: center; flex: none; }

.cta { background: var(--brand-lime); color: var(--on-brand-lime); border-radius: var(--radius-container); padding: var(--space-12); display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: center; justify-content: space-between; }
@media (max-width: 520px) { .cta { padding: var(--space-8) var(--space-6); } }

.site-footer { background: var(--color-background-surface); border-top: 1px solid var(--color-border); padding: var(--space-8) 0; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); align-items: center; justify-content: space-between; }
.site-footer img { height: 28px; width: auto; }
