/* ==========================================================================
   SplashBall design tokens  v1  (2026-11-13)
   One source for the official site (static CSS) and the booking form (Next + Tailwind v4).
   The React Native app gets the same names in theme.ts.
   Every text/background pair used below is listed with its WCAG ratio in design-system.md.
   Rule: components use the SEMANTIC tokens (--sb-text, --sb-surface...), never the raw palette.
   ========================================================================== */

:root {
  /* ---------- 1. Raw palette (from the logo, the blue tarp and the red rim) ---------- */
  --sb-navy-900: #0A1F5E;   /* deepest: footer, app header, dark sections */
  --sb-navy-800: #0D2A80;   /* headings, strong text, blue tube shadow */
  --sb-blue-600: #1546C9;   /* the tarp: primary blue, links, selected state */
  --sb-blue-500: #1C55DE;   /* lighter tarp stripe, hover on blue */
  --sb-blue-100: #E3F0FF;   /* selected background, info notice */
  --sb-sky-400:  #3FB8F0;   /* the splash: decoration and focus ring on dark ONLY (2.25:1 on white) */
  --sb-sky-200:  #8FDBFF;   /* highlight text on navy */
  --sb-foam-100: #EAF7FF;   /* light water: alternate section background */
  --sb-foam-50:  #F4FAFF;   /* page background of form and app */
  --sb-red-600:  #E3252E;   /* the rim: splash button background (white text 4.59:1) */
  --sb-red-700:  #C81E27;   /* red TEXT on light backgrounds, error text */
  --sb-red-800:  #A3141C;   /* tube shadow under red, danger button text */
  --sb-red-100:  #FDECEE;   /* danger notice background */
  --sb-ink:      #16244F;   /* body text */
  --sb-slate-600:#4A5B85;   /* muted text (6.72:1 on white) */
  --sb-slate-400:#7385B0;   /* input borders, non-text UI (3.68:1 on white) */
  --sb-line:     #D5E3F5;   /* decorative dividers and card borders (not for inputs) */
  --sb-placeholder: #63729A;/* input placeholder (4.77:1 on white) */
  --sb-white:    #FFFFFF;

  --sb-wa-600:   #12803B;   /* WhatsApp button (white text 5.03:1). Brand #25D366 fails with white text */
  --sb-wa-800:   #0B5A29;   /* tube shadow under WhatsApp */

  --sb-amber-800:#8A4B00;   /* attention text */
  --sb-amber-700:#B45309;   /* attention solid (white text 5.02:1) */
  --sb-amber-100:#FFF1D6;
  --sb-green-700:#0B6B3F;   /* success */
  --sb-green-100:#E3F6EC;
  --sb-gray-600: #4A5872;   /* closed / neutral */
  --sb-gray-100: #EDF1F7;

  /* Activity accents (always shown with an icon and a name, never color alone) */
  --sb-soccer:      var(--sb-blue-600);  --sb-soccer-soft: var(--sb-blue-100);
  --sb-gaming:      #B8166A;             --sb-gaming-soft: #FCE7F3;   /* 5.32:1 on soft, 6.25:1 on white */
  --sb-tag:         #0A6E78;             --sb-tag-soft:    #E0F6F7;   /* 5.32:1 on soft, 5.98:1 on white */

  /* Gaming night scope (official gaming.html only) */
  --sb-night-900: #120B26;
  --sb-night-800: #1D1340;
  --sb-neon-pink: #FF3DAE;   /* glow and big display text on night (5.93:1) */
  --sb-pink-600:  #D81B7A;   /* gaming button bg (white 4.82:1) */
  --sb-pink-900:  #7E0C46;   /* tube shadow under gaming button */
  --sb-neon-cyan: #35E8FF;   /* glow, highlights on night (12.83:1) */
  --sb-night-text:#E4DEFA;   /* body on night (14.64:1) */
  --sb-night-muted:#BDB3E6;  /* muted on night-800 (8.82:1) */

  /* ---------- 2. Semantic colors (use these in components) ---------- */
  --sb-bg:              var(--sb-foam-50);
  --sb-bg-alt:          var(--sb-foam-100);
  --sb-surface:         var(--sb-white);
  --sb-surface-dark:    var(--sb-navy-900);
  --sb-text:            var(--sb-ink);
  --sb-text-strong:     var(--sb-navy-800);
  --sb-text-muted:      var(--sb-slate-600);
  --sb-text-on-dark:    #E6EEFF;           /* 10.87:1 on navy-800 */
  --sb-text-on-dark-muted: #BFCBF0;        /* 9.50:1 on navy-900 */
  --sb-link:            var(--sb-blue-600);
  --sb-border:          var(--sb-line);
  --sb-border-input:    var(--sb-slate-400);
  --sb-focus:           var(--sb-blue-600);
  --sb-focus-on-dark:   var(--sb-sky-400);

  --sb-splash:          var(--sb-red-600);  /* the one CTA on customer-facing screens */
  --sb-splash-deep:     var(--sb-red-800);
  --sb-primary:         var(--sb-blue-600); /* main action in the owner app; strong secondary on site/form */
  --sb-primary-deep:    var(--sb-navy-800);
  --sb-wa:              var(--sb-wa-600);
  --sb-wa-deep:         var(--sb-wa-800);
  --sb-danger-text:     var(--sb-red-800);
  --sb-error:           var(--sb-red-700);

  /* Status tags: bg / text  (customer page + app use the same set) */
  --sb-st-attention-bg: var(--sb-amber-100);  --sb-st-attention-fg: var(--sb-amber-800);  /* 6.09:1 */
  --sb-st-urgent-bg:    var(--sb-amber-700);  --sb-st-urgent-fg:    var(--sb-white);      /* 5.02:1 */
  --sb-st-waiting-bg:   var(--sb-blue-100);   --sb-st-waiting-fg:   #0D3F8F;              /* 8.55:1 */
  --sb-st-success-bg:   var(--sb-green-100);  --sb-st-success-fg:   var(--sb-green-700);  /* 5.85:1 */
  --sb-st-closed-bg:    var(--sb-gray-100);   --sb-st-closed-fg:    var(--sb-gray-600);   /* 6.32:1 */
  --sb-st-danger-bg:    var(--sb-red-100);    --sb-st-danger-fg:    var(--sb-red-800);    /* 6.88:1 */

  /* ---------- 3. Typography ---------- */
  --sb-font-display: "Fredoka", "Rubik", system-ui, sans-serif;            /* headings, prices, big numbers, buttons */
  --sb-font-body:    "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --sb-fs-display: clamp(2.25rem, 1.35rem + 4vw, 4rem);      /* 36 -> 64  hero h1 */
  --sb-fs-h1:      clamp(1.875rem, 1.35rem + 2.4vw, 3rem);   /* 30 -> 48  page title */
  --sb-fs-h2:      clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);   /* 24 -> 36  section title */
  --sb-fs-h3:      1.25rem;     /* 20  card / form-section title */
  --sb-fs-lead:    1.1875rem;   /* 19  intro paragraph */
  --sb-fs-body-lg: 1.0625rem;   /* 17  site body, inputs */
  --sb-fs-body:    1rem;        /* 16  UI body */
  --sb-fs-sm:      0.875rem;    /* 14  hints, meta */
  --sb-fs-xs:      0.8125rem;   /* 13  tags only. Nothing smaller anywhere */

  --sb-lh-tight: 1.1;
  --sb-lh-snug:  1.3;
  --sb-lh-body:  1.6;

  --sb-fw-regular: 400;
  --sb-fw-medium:  500;
  --sb-fw-semibold:600;
  --sb-fw-bold:    700;

  /* ---------- 4. Space (4px grid) ---------- */
  --sb-space-1: 4px;   --sb-space-2: 8px;   --sb-space-3: 12px;  --sb-space-4: 16px;
  --sb-space-5: 20px;  --sb-space-6: 24px;  --sb-space-8: 32px;  --sb-space-10: 40px;
  --sb-space-12: 48px; --sb-space-16: 64px; --sb-space-20: 80px; --sb-space-24: 96px;
  --sb-gutter: 20px;                         /* page side padding on phones */
  --sb-section-y: clamp(64px, 8vw, 96px);    /* vertical padding of a site section */
  --sb-container: 1160px;
  --sb-container-form: 640px;

  /* ---------- 5. Radii ---------- */
  --sb-r-sm: 10px;    /* time slots, small thumbs */
  --sb-r-md: 14px;    /* inputs */
  --sb-r-lg: 20px;    /* cards, notices, choice cards */
  --sb-r-xl: 28px;    /* photos, form card, feature cards */
  --sb-r-2xl: 36px;   /* hero media, phone-shaped video frames */
  --sb-r-pill: 999px; /* buttons, tags, chips */

  /* ---------- 6. Shadows ---------- */
  --sb-shadow-sm: 0 1px 2px rgba(13, 42, 128, .08), 0 2px 8px rgba(13, 42, 128, .06);
  --sb-shadow-md: 0 4px 10px rgba(13, 42, 128, .06), 0 12px 28px rgba(13, 42, 128, .10);
  --sb-shadow-lg: 0 18px 40px rgba(13, 42, 128, .16);
  --sb-shadow-xl: 0 24px 60px rgba(3, 16, 42, .40);       /* form card floating over the photo */
  --sb-shadow-up: 0 -8px 24px rgba(3, 16, 42, .16);       /* sticky bottom bars */
  /* "Tube": the solid shadow that makes a button look inflated */
  --sb-tube-h: 5px;
  --sb-tube-splash:  0 var(--sb-tube-h) 0 var(--sb-splash-deep);
  --sb-tube-primary: 0 var(--sb-tube-h) 0 var(--sb-primary-deep);
  --sb-tube-wa:      0 var(--sb-tube-h) 0 var(--sb-wa-deep);
  --sb-tube-white:   0 var(--sb-tube-h) 0 rgba(10, 31, 94, .18);
  --sb-tube-gaming:  0 var(--sb-tube-h) 0 var(--sb-pink-900);
  --sb-ring-focus: 0 0 0 2px var(--sb-white), 0 0 0 5px var(--sb-focus);

  /* ---------- 7. Motion ---------- */
  --sb-dur-1: 120ms;   /* press */
  --sb-dur-2: 200ms;   /* hover, color, toggle */
  --sb-dur-3: 320ms;   /* expand, section enter, progress */
  --sb-dur-4: 560ms;   /* splash ripple, celebration */
  --sb-ease-out:    cubic-bezier(.2, .8, .2, 1);
  --sb-ease-bounce: cubic-bezier(.3, 1.5, .5, 1);

  /* ---------- 8. Layers ---------- */
  --sb-z-sticky: 40;
  --sb-z-header: 50;
  --sb-z-float: 60;
  --sb-z-dialog: 100;
}

/* Gaming page: night scope. Put class="sb-night" on <body> of gaming.html only. */
.sb-night {
  --sb-bg: var(--sb-night-900);
  --sb-bg-alt: var(--sb-night-800);
  --sb-surface: var(--sb-night-800);
  --sb-text: var(--sb-night-text);
  --sb-text-strong: #FFFFFF;
  --sb-text-muted: var(--sb-night-muted);
  --sb-border: rgba(53, 232, 255, .35);
  --sb-focus: var(--sb-neon-cyan);
  --sb-splash: var(--sb-pink-600);
  --sb-splash-deep: var(--sb-pink-900);
  --sb-tube-splash: var(--sb-tube-gaming);
  --sb-ring-focus: 0 0 0 2px var(--sb-night-900), 0 0 0 5px var(--sb-neon-cyan);
}

/* ---------- Keyframes shared by all web products ---------- */
@keyframes sb-splash {               /* ripple from the press point of a button */
  from { transform: translate(-50%, -50%) scale(0); opacity: .45; }
  to   { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
@keyframes sb-pop {                  /* a check mark appearing */
  0% { transform: scale(.4); opacity: 0; }
  70% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes sb-rise {                 /* a block entering */
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
@keyframes sb-drop {                 /* the hero logo landing */
  0% { transform: translateY(-60px) scale(.85); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
@keyframes sb-stripes {              /* tarp stripes sliding inside the progress bar */
  to { background-position: 48px 0; }
}
@keyframes sb-droplet {              /* celebration droplets, set --dx/--dy per drop */
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; }
}
@keyframes sb-shimmer {              /* loading skeleton */
  to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
