/* ==========================================================================
   SplashBall design tokens  v2  (2026-11-25)  "Photo first, quiet brand"
   One source for the official site (static CSS) and the booking site (Next + Tailwind v4).
   The owner app (React Native web) gets the same names and values in theme.ts.

   What v2 changes (details and reasons: design-system-v2.md):
   - One typeface: Rubik. Fredoka is gone. Headings are Rubik 700/800.
   - Fixed scale: 6 text sizes, 3 radii, 2 shadows, one 4px spacing grid.
   - No "tube" shadows, no double rims, no glow. Red is kept for the ONE main action
     on customer screens; blue is the main action in the owner app.
   - Every text/background pair is listed with its WCAG ratio (checked by script, see
     design-system-v2.md section 3). AA = 4.5:1 for text, 3:1 for UI parts and large text.

   Rule: components use the SEMANTIC tokens (section 2), never the raw palette.
   Fonts: fonts.css (self-hosted static Rubik 400/500/700/800, Hebrew + Latin). Not the Google variable font: see design-system-v2.md.
   ========================================================================== */

:root {
  /* ---------- 1. Raw palette ---------- */
  --sb-navy-900: #0A1F5E;   /* the brand's deep blue: headings, wordmark, app header */
  --sb-ink:      #16244F;   /* body text */
  --sb-slate-600:#4A5B85;   /* muted text */
  --sb-slate-500:#63729A;   /* placeholder only */
  --sb-slate-400:#7385B0;   /* input borders and other non-text UI */
  --sb-line:     #DCE3EE;   /* dividers, card borders (decorative, not for inputs) */
  --sb-gray-50:  #F4F6FA;   /* app background, quiet panels */
  --sb-white:    #FFFFFF;

  --sb-blue-600: #1546C9;   /* the tarp: links, selection, the app's main action */
  --sb-blue-700: #0F37A3;   /* pressed/hover of blue */
  --sb-blue-50:  #EEF3FF;   /* selected background, info */
  --sb-info-800: #0D3F8F;   /* info text on blue-50 */

  --sb-red-600:  #E3252E;   /* the rim: the one main action on customer screens */
  --sb-red-700:  #C81E27;   /* pressed red, error text */
  --sb-red-800:  #A3141C;   /* danger text on red-50 */
  --sb-red-50:   #FDEDEE;

  --sb-wa-600:   #12803B;   /* WhatsApp, when it is a secondary button next to a red one */
  --sb-amber-800:#8A4B00;   --sb-amber-50: #FFF4DE;
  --sb-green-700:#0B6B3F;   --sb-green-50: #E6F6EE;
  --sb-gray-600: #4A5872;

  /* Activity accents: a small dot or round photo next to the NAME, never color alone */
  --sb-act-soccer: #1546C9;
  --sb-act-gaming: #B8166A;
  --sb-act-tag:    #0A6E78;

  /* ---------- 2. Semantic colors ---------- */
  --sb-bg:            var(--sb-white);     /* site and customer pages */
  --sb-bg-subtle:     var(--sb-gray-50);   /* app background, alternate section */
  --sb-surface:       var(--sb-white);     /* cards */
  --sb-surface-dark:  var(--sb-navy-900);  /* footer, app header */
  --sb-text:          var(--sb-ink);       /* 15.0:1 on white */
  --sb-text-strong:   var(--sb-navy-900);  /* 15.3:1 on white, headings */
  --sb-text-muted:    var(--sb-slate-600); /* 6.72:1 on white, 6.21:1 on gray-50 */
  --sb-text-on-dark:  #FFFFFF;             /* 15.3:1 on navy-900 */
  --sb-text-on-dark-muted: #C3CEEE;        /* 9.77:1 on navy-900 */
  --sb-placeholder:   var(--sb-slate-500); /* 4.77:1 on white */
  --sb-link:          var(--sb-blue-600);  /* 7.63:1 on white */
  --sb-border:        var(--sb-line);
  --sb-border-input:  var(--sb-slate-400); /* 3.68:1 on white, 3.40:1 on gray-50 (UI parts need 3:1) */
  --sb-focus:         var(--sb-blue-600);

  --sb-action:          var(--sb-red-600);  /* customer main action. White text 4.59:1, bold 17px+ */
  --sb-action-pressed:  var(--sb-red-700);  /* white 5.72:1 */
  --sb-primary:         var(--sb-blue-600); /* app main action. White text 7.63:1 */
  --sb-primary-pressed: var(--sb-blue-700);
  --sb-wa:              var(--sb-wa-600);   /* white text 5.03:1 */
  --sb-error:           var(--sb-red-700);  /* 5.72:1 on white */

  /* Status tags: one soft background + one text color. Always with a word and an icon. */
  --sb-st-attention-bg: var(--sb-amber-50); --sb-st-attention-fg: var(--sb-amber-800); /* 6.23:1 needs Dudi */
  --sb-st-info-bg:      var(--sb-blue-50);  --sb-st-info-fg:      var(--sb-info-800);  /* 8.90:1 opened, awaiting signature */
  --sb-st-success-bg:   var(--sb-green-50); --sb-st-success-fg:   var(--sb-green-700); /* 5.89:1 filled, confirmed */
  --sb-st-neutral-bg:   var(--sb-gray-50);  --sb-st-neutral-fg:   var(--sb-ink);       /* 13.87:1 ready (link) */
  --sb-st-closed-bg:    var(--sb-gray-50);  --sb-st-closed-fg:    var(--sb-gray-600);  /* 6.62:1 expired, cancelled */
  --sb-st-danger-bg:    var(--sb-red-50);   --sb-st-danger-fg:    var(--sb-red-800);   /* 6.93:1 permit missing */

  /* ---------- 3. Typography: Rubik only ---------- */
  --sb-font: "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* The 6 sizes. Nothing else, anywhere. Inputs use size 4 (18px), so iOS never zooms. */
  --sb-fs-1: clamp(2.25rem, 1.55rem + 3vw, 3.5rem);    /* 36 -> 56  display: hero h1, the event date */
  --sb-fs-2: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem); /* 26 -> 36  page / section title */
  --sb-fs-3: 1.25rem;    /* 20  card title, step title */
  --sb-fs-4: 1.125rem;   /* 18  lead paragraph, inputs, buttons */
  --sb-fs-5: 1rem;       /* 16  body, labels */
  --sb-fs-6: 0.875rem;   /* 14  hints, meta, tags. The minimum */

  --sb-fw-regular: 400;  /* body */
  --sb-fw-medium:  500;  /* labels, values, tags */
  --sb-fw-bold:    700;  /* titles 2-3, buttons */
  --sb-fw-black:   800;  /* display (size 1) only */

  --sb-lh-tight: 1.1;    /* sizes 1-2 */
  --sb-lh-snug:  1.3;    /* size 3, buttons */
  --sb-lh-body:  1.55;   /* sizes 4-6 */
  --sb-tracking-display: -0.015em;

  /* ---------- 4. Space (4px grid) ---------- */
  --sb-s-1: 4px;  --sb-s-2: 8px;  --sb-s-3: 12px; --sb-s-4: 16px; --sb-s-5: 24px;
  --sb-s-6: 32px; --sb-s-7: 48px; --sb-s-8: 64px; --sb-s-9: 96px;
  --sb-gutter: 16px;                          /* page side padding on phones (20px from 600px) */
  --sb-section-y: clamp(64px, 8vw, 96px);     /* between site sections */
  --sb-container: 1200px;
  --sb-container-text: 640px;                 /* forms and reading */
  --sb-hit: 48px;                             /* smallest tappable thing */
  --sb-hit-lg: 56px;                          /* main action, sticky bars */

  /* ---------- 5. Radii: three ---------- */
  --sb-r-1: 8px;      /* inputs, small thumbnails, notices */
  --sb-r-2: 16px;     /* cards, photos, panels */
  --sb-r-full: 999px; /* buttons, tags, avatars */

  /* ---------- 6. Shadows: two ---------- */
  --sb-shadow-1: 0 1px 2px rgba(10, 31, 94, .06), 0 4px 14px rgba(10, 31, 94, .07);  /* sticky bars, raised card */
  --sb-shadow-2: 0 16px 40px rgba(10, 31, 94, .18);                                  /* dialogs, menus, floating panel */
  --sb-ring-focus: 0 0 0 2px var(--sb-white), 0 0 0 4px var(--sb-focus);

  /* ---------- 7. Motion ---------- */
  --sb-dur-1: 120ms;  /* press */
  --sb-dur-2: 220ms;  /* hover, toggle, reveal */
  --sb-ease: cubic-bezier(.2, .8, .2, 1);

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

/* Gaming page keeps its night mood through the photos, not through neon frames.
   Put class="sb-night" on a SECTION (not the whole site) when it sits on a dark photo band. */
.sb-night {
  --sb-bg: #120B26;
  --sb-surface: #1D1340;
  --sb-text: #E4DEFA;          /* 14.6:1 on #120B26 */
  --sb-text-strong: #FFFFFF;
  --sb-text-muted: #BDB3E6;    /* 8.8:1 */
  --sb-border: rgba(228, 222, 250, .18);
  --sb-focus: #35E8FF;
}

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