/* ==========================================================================
   Roadside Dink — design tokens v2.0 (18 Oct 2026)
   Source of truth: design-system/DESIGN-SYSTEM.md
   Shipped by the plugin as assets/css/rd-tokens.css (enqueued once, handle "rd-tokens").
   Every public block, the booking grid, the admin app and the email CSS read from here.
   v1.1: accent is pickleball GREEN (lime), buttons are squared with a glowing border, no pills.
   v1.3: Poppins is the ONLY typeface (display/H1/H2 included); green buttons glow green, navy buttons glow
         neon light blue.
   v2.0: sections alternate white / cream / navy-gradient / photo bands (only .rd-section--navy, --photo and
         .rd-dark remap to the dark context); uppercase editorial headlines; lime strip; bordered grids.
   Prefix: --rd-*  (public)   --rd-a-*  (admin app)   .rd-dark  (dark section remap)
   ========================================================================== */
:root {
  /* ---- Brand ramps -------------------------------------------------------- */
  --rd-navy-950: #051329;
  --rd-navy-900: #0C2345;   /* Dynasty Blue — measured from the client logo */
  --rd-navy-800: #133363;
  --rd-navy-700: #1C4582;
  --rd-navy-600: #2A5BA2;   /* links on light, focus ring on light */
  --rd-navy-500: #3F73C0;
  --rd-navy-400: #6F98CD;
  --rd-navy-300: #9BB8DE;
  --rd-navy-200: #C5D6ED;
  --rd-navy-100: #E3ECF7;
  --rd-navy-50:  #F3F7FC;

  --rd-lime-200: #E9FA9A;   /* tints */
  --rd-lime-300: #D4F24A;   /* hover of lime fills */
  --rd-lime-400: #BFE83A;   /* Pickleball Green — fills, glow, text on navy only (11.0:1 on navy-900) */
  --rd-lime-500: #A4CF22;   /* pressed */
  --rd-lime-600: #7FA60F;
  --rd-lime-700: #466000;   /* green-as-text on white (7.2:1) */
  --rd-lime-800: #2F4400;   /* green-as-text on white, AAA (10.8:1) */
  --rd-lime-logo: #A5BB44;  /* the lime in the supplied logo, reference only */

  --rd-gray-50:  #F4F8FB;
  --rd-gray-100: #EAF1F5;
  --rd-gray-200: #D7E3EA;
  --rd-gray-300: #AFBFC9;   /* Liberty Gray (Behr 570E-3) — borders, disabled, muted-on-navy */
  --rd-gray-400: #95A7B2;
  --rd-gray-500: #718694;
  --rd-gray-600: #586974;   /* secondary text on white (AA) */
  --rd-gray-700: #404F59;
  --rd-gray-800: #29353D;
  --rd-gray-900: #192329;
  --rd-white:    #FFFFFF;

  /* ---- Dusk (Seaside Views. Sunset Rallies.) — gradient stops only ------- */
  --rd-dusk-1: #1D356D;
  --rd-dusk-2: #54418B;
  --rd-dusk-3: #C1578C;
  --rd-dusk-4: #ED775A;     /* never a fill, chip or text */
  --rd-dusk-5: #F7B045;     /* never a fill, chip or text */
  --rd-gradient-dusk: linear-gradient(160deg, #0C2345 0%, #1D356D 30%, #54418B 52%, #C1578C 70%, #ED775A 86%, #F7B045 100%);
  --rd-gradient-dusk-safe: linear-gradient(180deg, #0C2345 0%, #1D356D 60%, #54418B 100%); /* white text OK everywhere */
  --rd-glow-floodlight: radial-gradient(closest-side, rgba(191, 232, 58, 0.16), transparent 72%);
  --rd-cream: #F4F6EE;         /* v2 light alternate: a whisper of lime in the white */
  --rd-cream-2: #EDF1E3;

  /* ---- Semantic (light context) ------------------------------------------ */
  --rd-bg: var(--rd-white);
  --rd-bg-alt: var(--rd-gray-50);
  --rd-surface: var(--rd-white);
  --rd-ink: var(--rd-navy-950);
  --rd-ink-2: var(--rd-gray-600);
  --rd-ink-3: var(--rd-gray-500);        /* large text / icons only */
  --rd-line: var(--rd-gray-200);
  --rd-line-strong: var(--rd-navy-900);
  --rd-primary: var(--rd-navy-900);
  --rd-primary-hover: var(--rd-navy-800);
  --rd-on-primary: var(--rd-white);
  --rd-accent: var(--rd-lime-400);
  --rd-accent-hover: var(--rd-lime-300);
  --rd-accent-active: var(--rd-lime-500);
  --rd-on-accent: var(--rd-navy-900);
  --rd-accent-text: var(--rd-lime-700);  /* the only green allowed as text on white */
  --rd-accent-rgb: 191, 232, 58;
  --rd-link: var(--rd-navy-600);
  --rd-focus: var(--rd-navy-600);
  --rd-danger: #B3261E;
  --rd-danger-bg: #FBE4E1;
  --rd-success: #1E9E6A;
  --rd-success-bg: #E3F5EC;

  /* ---- Booking-grid states (bg / text / line) ---------------------------- */
  --rd-open-bg: #E3F5EC;      --rd-open-text: #0E6B45;      --rd-open-line: #1E9E6A;      /* teal-green, hue 155 */
  --rd-booked-bg: #E3ECF7;    --rd-booked-text: #0C2345;    --rd-booked-line: #1C4582;
  --rd-pending-bg: #FFF6D1;   --rd-pending-text: #6B5300;   --rd-pending-line: #F2C200;   /* amber = waiting */
  --rd-passed-bg: #EAF1F5;    --rd-passed-text: #586974;    --rd-passed-line: #D7E3EA;
  --rd-closed-bg: #FBE4E1;    --rd-closed-text: #8C2318;    --rd-closed-line: #C9463A;
  --rd-openplay-bg: #F1F9CF;  --rd-openplay-text: #0C2345;  --rd-openplay-line: #A4CF22;  /* lime tint, hue 75 */
  --rd-promo-bg: #ECE6F7;     --rd-promo-text: #4B3684;     --rd-promo-line: #7257B5;
  --rd-selected-bg: var(--rd-navy-900); --rd-selected-text: var(--rd-lime-400); --rd-selected-line: var(--rd-lime-400);

  /* ---- Type ---------------------------------------------------------------- */
  /* Poppins only. The three font tokens are kept so components need no changes; all resolve to Poppins. */
  --rd-font: 'Poppins', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --rd-font-h1: var(--rd-font);        /* display line and H1 (800) */
  --rd-font-display: var(--rd-font);   /* H2, day-chip numbers, summary total, KPI numbers (800) */
  --rd-fs-display: clamp(2.75rem, 1.5rem + 5.4vw, 7.5rem);        /* 44 → 120, Poppins 800 uppercase (v2) */
  --rd-fs-h1:      clamp(2.5rem, 1.6rem + 3.9vw, 5.75rem);        /* 40 → 92, Poppins 800 uppercase (v2) */
  --rd-fs-h2:      clamp(2rem, 1.35rem + 2.8vw, 4.25rem);         /* 32 → 68, Poppins 800 uppercase (v2) */
  --rd-fs-eyebrow: 0.8125rem;                                      /* 13, uppercase, tracked */
  --rd-fs-h3:      clamp(1.375rem, 1.223rem + 0.647vw, 2rem);     /* 22 → 32, Poppins 700 */
  --rd-fs-h4:      clamp(1.125rem, 1.034rem + 0.388vw, 1.5rem);   /* 18 → 24, Poppins 600 */
  --rd-fs-lead:    clamp(1.125rem, 1.064rem + 0.259vw, 1.375rem); /* 18 → 22 */
  --rd-fs-body:    clamp(1rem, 0.969rem + 0.129vw, 1.125rem);     /* 16 → 18 */
  --rd-fs-small:   clamp(0.875rem, 0.86rem + 0.065vw, 0.9375rem); /* 14 → 15 */
  --rd-fs-micro:   0.8125rem;                                      /* 13, UI chrome only, never below */
  --rd-fs-button:  clamp(0.9375rem, 0.907rem + 0.129vw, 1.0625rem);/* 15 → 17 */
  --rd-fw-display: 800; --rd-fw-heading: 700; --rd-fw-ui: 600; --rd-fw-label: 500; --rd-fw-body: 400;
  --rd-lh-display: 0.94; --rd-lh-h1: 0.96; --rd-lh-h2: 1.0; --rd-lh-heading: 1.15; --rd-lh-tight: 1.3; --rd-lh-body: 1.6;
  --rd-ls-display: -0.03em; --rd-ls-h1: -0.03em; --rd-ls-h2: -0.025em; --rd-ls-heading: -0.01em; --rd-ls-ui: 0.01em;
  --rd-numeric: tabular-nums;

  /* ---- Space (4px base) --------------------------------------------------- */
  --rd-s1: 4px;  --rd-s2: 8px;  --rd-s3: 12px; --rd-s4: 16px; --rd-s5: 20px; --rd-s6: 24px;
  --rd-s8: 32px; --rd-s10: 40px; --rd-s12: 48px; --rd-s16: 64px; --rd-s20: 80px; --rd-s24: 96px; --rd-s32: 128px;
  --rd-section-y: clamp(56px, 38.5px + 4.66vw, 128px);  /* 56 @375 → 128 @1920 */
  --rd-gutter:    clamp(20px, 9.3px + 2.85vw, 64px);     /* 20 @375 → 64 @1920 */
  --rd-container: 1240px;
  --rd-container-wide: 1500px;
  --rd-prose: 680px;

  /* ---- Radii (one system; nothing is pill-shaped) ------------------------- */
  --rd-r-input: 6px;
  --rd-r-button: 8px;
  --rd-r-chip: 6px;
  --rd-r-cell: 8px;
  --rd-r-card: 12px;
  --rd-r-media: 0;

  /* ---- Court-line devices ------------------------------------------------- */
  --rd-rule-w: 2px;
  --rd-rule: var(--rd-rule-w) solid var(--rd-line-strong);
  --rd-kitchen: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 12px); /* non-volley line */

  /* ---- Elevation and glow ------------------------------------------------ */
  --rd-shadow-1: 0 1px 2px rgba(5, 19, 41, 0.06);
  --rd-shadow-2: 0 1px 2px rgba(5, 19, 41, 0.05), 0 18px 40px rgba(5, 19, 41, 0.10);
  --rd-shadow-nav: 0 8px 24px rgba(5, 19, 41, 0.18);
  /* Glows (v1.3): GREEN buttons glow GREEN; NAVY (blue) buttons glow NEON LIGHT BLUE. */
  --rd-neon: #5FD4FF;
  --rd-neon-rgb: 95, 212, 255;
  --rd-blue-glow: var(--rd-neon);            /* legacy name */
  --rd-blue-glow-rgb: var(--rd-neon-rgb);    /* legacy name */
  --rd-glow-on-accent: 0 0 0 1px rgba(var(--rd-accent-rgb), 0.75), 0 0 18px rgba(var(--rd-accent-rgb), 0.5);
  --rd-glow-on-accent-strong: 0 0 0 1px rgba(var(--rd-accent-rgb), 1), 0 0 28px rgba(var(--rd-accent-rgb), 0.65), 0 0 60px rgba(var(--rd-accent-rgb), 0.22);
  --rd-glow-on-primary: 0 0 0 1px rgba(var(--rd-neon-rgb), 0.7), 0 0 18px rgba(var(--rd-neon-rgb), 0.5);
  --rd-glow-on-primary-strong: 0 0 0 1px rgba(var(--rd-neon-rgb), 1), 0 0 28px rgba(var(--rd-neon-rgb), 0.65), 0 0 60px rgba(var(--rd-neon-rgb), 0.22);
  --rd-glow-neon-soft: 0 0 0 1px rgba(var(--rd-neon-rgb), 0.35), 0 0 14px rgba(var(--rd-neon-rgb), 0.25);
  --rd-glow-soft: 0 0 0 1px rgba(var(--rd-accent-rgb), 0.28), 0 0 14px rgba(var(--rd-accent-rgb), 0.22); /* ghost hover, open cells, selected chip */
  --rd-glow: var(--rd-glow-on-accent);                /* legacy alias (green glow) */
  --rd-glow-strong: var(--rd-glow-on-accent-strong);  /* legacy alias */

  /* ---- Section backgrounds (v1.3): every public section sits on navy; three gradient voices ------------ */
  --rd-gradient-section-a: linear-gradient(180deg, #0C2345 0%, #0A1E40 55%, #081A38 100%);
  --rd-gradient-section-b: linear-gradient(160deg, #102B55 0%, #0C2345 48%, #071530 100%);
  --rd-gradient-section-c: radial-gradient(1100px 560px at 88% -12%, rgba(95, 212, 255, 0.14), transparent 62%), radial-gradient(900px 500px at -10% 110%, rgba(191, 232, 58, 0.10), transparent 60%), linear-gradient(180deg, #0A1D3B 0%, #0C2345 100%);
  --rd-gradient-section-footer: linear-gradient(180deg, #081A38 0%, #051329 100%);
  /* v2: one richer navy voice plus two coloured glows layered over it */
  --rd-gradient-navy: radial-gradient(60% 55% at 14% 12%, rgba(21, 56, 200, 0.82) 0%, transparent 62%), radial-gradient(55% 60% at 88% 84%, rgba(11, 42, 154, 0.85) 0%, transparent 62%), linear-gradient(180deg, #060E2A 0%, #0A1C4A 52%, #040A1F 100%); /* v2.1: electric blue pools on near-black, like the reference stills */
  --rd-glow-lime: radial-gradient(900px 540px at 88% -12%, rgba(191, 232, 58, 0.20), transparent 60%);
  --rd-glow-neon: radial-gradient(820px 500px at -12% 108%, rgba(95, 212, 255, 0.16), transparent 60%);
  --rd-fade-photo: linear-gradient(180deg, rgba(8, 26, 56, 0.92) 0%, rgba(12, 35, 69, 0.55) 38%, rgba(12, 35, 69, 0.62) 62%, rgba(8, 26, 56, 0.96) 100%);

  /* ---- Motion -------------------------------------------------------------- */
  --rd-ease-out: cubic-bezier(0.16, 1, 0.3, 1);   /* entrances, selection, nav rule */
  --rd-ease-ios: cubic-bezier(0.32, 0.72, 0, 1);  /* sheets, drawers, crossfades */
  --rd-ease-std: cubic-bezier(0.4, 0, 0.2, 1);    /* colour / background */
  --rd-dur-fast: 150ms;
  --rd-dur-base: 220ms;
  --rd-dur-slow: 600ms;
  --rd-dur-glow: 3.2s;                             /* one revolution of the glowing border */

  /* ---- Layers ---------------------------------------------------------------- */
  --rd-z-raised: 10; --rd-z-sticky: 20; --rd-z-dock: 40; --rd-z-nav: 100; --rd-z-modal: 1000; --rd-z-cursor: 1100;

  /* ---- Controls --------------------------------------------------------------- */
  --rd-control-h: 48px;
  --rd-control-h-sm: 36px;
  --rd-cell-min-h: 44px;
  --rd-touch: 44px;
}

@media (prefers-reduced-motion: reduce) {
  :root { --rd-dur-fast: 0.01ms; --rd-dur-base: 0.01ms; --rd-dur-slow: 0.01ms; --rd-dur-glow: 0.01ms; }
}

/* Dark context: .rd-dark, the navy and photo bands remap the semantic tokens. Light sections (white / cream)
   keep the light context. Components must only ever read semantic tokens, so they invert for free. */
.rd-dark, .rd-section--navy, .rd-section--photo {
  --rd-bg: var(--rd-navy-900);
  --rd-bg-alt: var(--rd-navy-950);
  --rd-surface: var(--rd-navy-800);
  --rd-ink: var(--rd-white);
  --rd-ink-2: var(--rd-gray-300);
  --rd-ink-3: var(--rd-gray-400);
  --rd-line: rgba(255, 255, 255, 0.14);
  --rd-line-strong: var(--rd-white);
  --rd-link: var(--rd-lime-400);
  --rd-focus: var(--rd-lime-400);
  --rd-accent-text: var(--rd-lime-400);
  --rd-primary: var(--rd-white);
  --rd-primary-hover: var(--rd-gray-100);
  --rd-on-primary: var(--rd-navy-900);
  --rd-rule: var(--rd-rule-w) solid var(--rd-white);
  --rd-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.25);
  --rd-shadow-2: 0 1px 2px rgba(0, 0, 0, 0.2), 0 18px 40px rgba(0, 0, 0, 0.35);
  color: var(--rd-ink);
  background: var(--rd-bg);
}

/* Elementor Global Colors bridge: the kit sets these ids in Site Settings; variables exist on body.elementor-kit-N,
   so the mapping lives on body (never :root). Fallbacks keep the brand when Elementor is absent. */
body.elementor-kit-1, body[class*="elementor-kit-"] {
  --rd-primary: var(--e-global-color-primary, #0C2345);
  --rd-ink: var(--e-global-color-text, #051329);
  --rd-ink-2: var(--e-global-color-secondary, #586974);
  --rd-accent: var(--e-global-color-accent, #BFE83A);
  --rd-navy-800: var(--e-global-color-rdnavy800, #133363);
  --rd-navy-600: var(--e-global-color-rdnavy600, #2A5BA2);
  --rd-gray-300: var(--e-global-color-rdliberty, #AFBFC9);
  --rd-bg-alt: var(--e-global-color-rdsurface, #F4F8FB);
  --rd-accent-text: var(--e-global-color-rdlimetext, #466000);
}

/* Admin app (Onda-style calm density, translated to the brand) */
.rd-admin {
  --rd-a-bg: #F4F8FB;
  --rd-a-sidebar: #FFFFFF;
  --rd-a-card: #FFFFFF;
  --rd-a-border: #E1E9F0;
  --rd-a-divider: #EEF3F7;
  --rd-a-hover: #F4F8FB;
  --rd-a-ink: #0C2345;
  --rd-a-ink-2: #586974;
  --rd-a-muted: #718694;
  --rd-a-icon: #95A7B2;
  --rd-a-icon-active: #0C2345;
  --rd-a-primary: #0C2345;
  --rd-a-primary-hover: #133363;
  --rd-a-link: #2A5BA2;
  --rd-a-focus: rgba(42, 91, 162, 0.28);
  --rd-a-attention: #BFE83A;          /* pending-approval emphasis (brand green) */
  --rd-a-attention-bg: #F1F9CF;
  --rd-a-attention-text: #2F4400;
  --rd-a-r-card: 14px;
  --rd-a-r-control: 8px;
  --rd-a-r-row: 8px;
  --rd-a-sidebar-w: 256px;
  --rd-a-row-h: 36px;
  --rd-a-pad: 24px;
  --rd-a-shadow-control: 0 1px 2px rgba(5, 19, 41, 0.05);
  --rd-a-shadow-pop: 0 1px 2px rgba(12, 35, 69, 0.04), 0 18px 40px rgba(12, 35, 69, 0.08);
  --rd-a-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --rd-a-dur: 150ms;
  --rd-a-dur-sheet: 320ms;
}
