/* ==========================================================================
   MYLO — Brand Design System · tokens.css
   Single source of truth. Deep navy + soft metallic gold. Calm authority.
   Derived from DESIGN.md (lint-clean, 0 errors / 0 warnings).
   ========================================================================== */

/* ---- Brand primitives (fixed brand values, never theme-dependent) -------- */
/* ---- Brand primitives (fixed brand values, never theme-dependent) -------- */
:root {
  /* Navy (sampled from MYLO logo) */
  --navy-900: #0B1A3C;   /* primary-deep — darkest canvas */
  --navy-800: #0B0F19;   /* primary — deepest page canvas */
  --navy-700: #14285A;   /* link / text-on-light */
  --navy-600: #1D4A8A;
  --navy-500: #2A5CA8;
  --navy-100: #DCE4F0;
  --navy-50:  #EEF2F8;

  /* Metallic gold (sampled from MYLO logo) */
  --gold-700: #9A7A2E;   /* bottom shade of the metal */
  --gold-600: #A9842F;   /* accent — soft metallic gold */
  --gold-500: #C9A24A;   /* core metal */
  --gold-300: #E3C98F;   /* top highlight */

  /* Neutrals */
  --ink-900: #14285A;    /* text — deep navy */
  --ink-500: #5B6479;    /* muted text */
  --ink-300: #9AA6C8;    /* subtle elements only */
  --line:    #E6E1D5;    /* hairline border */
  --paper:   #FFFFFF;    /* surface */
  --paper-2: #FAF8F3;    /* very light off-white — page background */

}

/* ---- Dark theme — same navy + gold, navy-deepened ---------------------- */
[data-theme="dark"] {
  color-scheme: dark;

  /* Surfaces — navy-deepened, never inverted to black */
  --bg: var(--navy-900);
  --bg-alt: #0A1633;
  --surface: #11234F;
  --surface-2: #163061;
  --surface-sunken: #0A1633;
  --panel: #11234F;

  /* Text — ivory on navy */
  --text: #FAF8F3;
  --text-strong: #FFFFFF;
  --text-muted: #AEB6C8;
  --text-subtle: #9AA6C8;
  --heading: #FFFFFF;
  --heading-display: #FFFFFF;

  /* Brand — gold relationship preserved, ivory text on gold */
  --primary: var(--gold-500);
  --primary-deep: var(--gold-600);
  --primary-hover: var(--gold-600);
  --primary-soft: rgba(201,162,74,0.12);
  --accent: var(--gold-500);
  --accent-hover: var(--gold-600);
  --accent-soft: rgba(201,162,74,0.12);
  --accent-ink: var(--navy-900);
  --brand: var(--gold-500);
  --brand-ink: var(--navy-900);

  /* Lines — gold hairlines */
  --border: rgba(201,162,74,0.25);
  --border-strong: rgba(201,162,74,0.40);
  --border-subtle: rgba(250,248,243,0.10);
  --border-gold: rgba(201,162,74,0.45);
  --hairline: 1px solid var(--border);

  /* Interactive */
  --link: var(--gold-600);
  --link-hover: var(--gold-300);
  --focus: var(--gold-500);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus);

  /* Inputs */
  --input-bg: var(--navy-700);
  --input-border: rgba(201,162,74,0.30);
  --input-text: #FAF8F3;

  /* Header — ivory */
  --header-bg: rgba(11,26,60,0.90);
  --header-border: rgba(201,162,74,0.22);
  --header-blur: saturate(180%) blur(12px);

  /* Elevation — navy-tinted on deep navy */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.30);
  --shadow-md: 0 6px 16px -4px rgba(0,0,0,0.45);
  --shadow-lg: 0 18px 40px -18px rgba(0,0,0,0.60);
  --shadow-gold: 0 8px 24px -10px rgba(201,162,74,0.40);
  --inset-hairline: inset 0 1px 0 rgba(255,255,255,0.08);

  /* Decorative */
  --hero-glow: radial-gradient(ellipse 120% 60% at 50% -10%, rgba(201,162,74,0.18), transparent 62%);
  --hero-glow-navy: radial-gradient(ellipse 120% 60% at 50% -10%, rgba(20,56,111,0.35), transparent 62%);
  --diagram-bg: rgba(250,248,243,0.02);
  --lattice: rgba(201,162,74,0.08);

  /* Logo */
  --logo-mark-bg: var(--gold-600);
  --logo-mark-ring: var(--gold-500);
  --logo-mark-ink: var(--navy-900);
  --logo-word: #FFFFFF;
  --logo-sub: #9AA6C8;
  --logo-glow: rgba(201,162,74,0.28);

  /* Misc */
  --stat: var(--gold-500);
  --price: #FFFFFF;
  --badge-live-bg: rgba(201,162,74,0.22);
  --badge-live-ink: var(--gold-600);
  --badge-soon-bg: rgba(250,248,243,0.08);
  --badge-soon-ink: var(--ink-500);
  --divider: rgba(201,162,74,0.22);
  --divider-gold: var(--gold-600);
  --divider-ink: var(--ink-500);

  /* Charts — navy + gold only */
  --chart-1: var(--gold-500);
  --chart-2: #7FA8E8;
  --chart-3: var(--gold-300);
  --chart-4: #4A6FA5;
  --chart-grid: rgba(250,248,243,0.10);

  /* Connection-layer background (fixed, behind content) */
  --bg-line: var(--gold-500);
  --bg-node: var(--gold-400);
  --bg-line-opacity: 0.18;
  --bg-node-opacity: 0.40;
  --bg-glow-opacity: 0.08;
}
/* ---- Type scale ---------------------------------------------------------
   Fluid via clamp() so hierarchy holds at 320px and 1440px.
   ---------------------------------------------------------------------- */
:root {
  --fs-display: clamp(2.75rem, 7vw, 4.5rem);
  --fs-h1:      clamp(2.25rem, 4.6vw, 3.25rem);
  --fs-h2:      clamp(1.75rem, 3.2vw, 2.25rem);
  --fs-h3:      clamp(1.25rem, 2.2vw, 1.5rem);
  --fs-h4:      1.125rem;
  --fs-lead:    clamp(1.0625rem, 1.6vw, 1.1875rem);
  --fs-body:    1rem;
  --fs-sm:      0.875rem;
  --fs-label:   0.8125rem;
  --fs-eyebrow: 0.8125rem;
  --fs-number:  clamp(1.5rem, 2.6vw, 2rem);
  --fs-mono:    0.875rem;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 650;
  --fw-display: 450;

  --lh-tight: 1.06;
  --lh-heading: 1.14;
  --lh-body: 1.62;

  --track-eyebrow: 0.14em;
  --track-label: 0.06em;
  --track-display: -0.02em;
}

/* ---- Motion ------------------------------------------------------------ */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 140ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;
}

/* ---- Compatibility tokens ---------------------------------------------- */
/* Pages written before the token consolidation reference these names.
   They resolve to the current palette so nothing renders unstyled. */
:root {
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --muted: var(--text-muted);
  --text-body: var(--text);
  --text-dim: var(--text-subtle);
  --subtle: var(--text-subtle);
  --radius: var(--r-md, 8px);
  --border-w: 1px;
  --gold-300: var(--blue-300);
  --gold-400: var(--blue-400);
  --gold-500: var(--blue-500);
  --gold-600: var(--blue-600);
  --accent: var(--primary);
  --accent-glow: rgba(201, 162, 39, 0.16);
  --accent-rgb: 201, 162, 39;
  --void: var(--bg-alt);
  --border-subtle: var(--border);
}

/* Spacing + radius scales used by /services */
:root {
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 16px;
  --s-lg: 24px;
  --s-xl: 32px;
  --s-2xl: 48px;
  --s-3xl: 64px;
  --r-md: 8px;
  --r-lg: 12px;
}


/* Light theme — opt-in only */

/* ==========================================================================
   LIGHT THEME — opt-in via [data-theme="light"]
   White cards on a cool off-white canvas, electric blue accent.
   Declared last so it overrides the dark defaults.
   ========================================================================== */
[data-theme="light"] {
  color-scheme: light;

  /* Surfaces */
  --bg: #F7FAFD;
  --bg-alt: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #EEF3F9;
  --surface-sunken: #FFFFFF;
  --panel: #FFFFFF;

  /* Text */
  --text: #0B0F19;
  --text-strong: #060A12;
  --text-muted: #4A5870;
  --text-subtle: #6B7A93;
  --heading: #060A12;
  --heading-display: #060A12;

  /* Accent */
  --primary: var(--blue-600);
  --primary-deep: var(--blue-700);
  --primary-hover: var(--blue-500);
  --primary-soft: rgba(201,162,39,0.12);
  --accent: var(--blue-600);
  --accent-hover: var(--blue-500);
  --accent-soft: rgba(201,162,39,0.12);
  --accent-ink: #FFFFFF;
  --brand: var(--blue-600);
  --brand-ink: #FFFFFF;

  /* Lines */
  --border: rgba(11,15,25,0.14);
  --border-strong: rgba(11,15,25,0.26);
  --border-subtle: rgba(11,15,25,0.08);
  --border-gold: rgba(201,162,39,0.40);
  --border-accent: rgba(201,162,39,0.40);
  --hairline: 1px solid var(--border);

  /* Interactive */
  --link: var(--blue-700);
  --link-hover: var(--blue-600);
  --focus: var(--blue-600);
  --focus-ring: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--focus);

  /* Inputs */
  --input-bg: #FFFFFF;
  --input-border: rgba(11,15,25,0.20);
  --input-text: #0B0F19;

  /* Header */
  --header-bg: rgba(255,255,255,0.90);
  --header-border: rgba(11,15,25,0.12);
  --header-blur: saturate(180%) blur(12px);

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(11,15,25,0.08);
  --shadow-md: 0 6px 16px -6px rgba(11,15,25,0.16);
  --shadow-lg: 0 18px 40px -20px rgba(11,15,25,0.22);
  --shadow-gold: 0 8px 24px -10px rgba(201,162,39,0.30);
  --inset-hairline: inset 0 1px 0 rgba(255,255,255,0.7);

  /* Decorative */
  --hero-glow: radial-gradient(ellipse 110% 55% at 50% -8%, rgba(201,162,39,0.12), transparent 62%);
  --hero-glow-navy: radial-gradient(ellipse 110% 55% at 50% -8%, rgba(19,27,46,0.05), transparent 62%);
  --diagram-bg: rgba(11,15,25,0.02);
  --lattice: rgba(11,15,25,0.05);
  --logo-glow: rgba(201,162,39,0.20);

  /* Connection-layer background */
  --bg-line: var(--blue-700);
  --bg-node: var(--blue-600);
  --bg-line-opacity: 0.12;
  --bg-node-opacity: 0.30;
  --bg-glow-opacity: 0.05;

  /* Logo */
  --logo-mark-bg: var(--navy-900);
  --logo-mark-ring: var(--blue-500);
  --logo-mark-ink: var(--blue-500);
  --logo-word: var(--navy-900);
  --logo-sub: var(--text-muted);

  /* Misc */
  --stat: var(--navy-900);
  --price: var(--navy-900);
  --badge-live-bg: rgba(201,162,39,0.14);
  --badge-live-ink: var(--blue-700);
  --badge-soon-bg: rgba(11,15,25,0.06);
  --badge-soon-ink: var(--text-muted);
  --divider: rgba(11,15,25,0.14);
  --divider-gold: var(--blue-600);
  --divider-ink: var(--text-muted);

  /* Charts */
  --chart-1: var(--navy-900);
  --chart-2: var(--blue-500);
  --chart-3: var(--navy-500);
  --chart-4: var(--blue-300);
  --chart-grid: rgba(11,15,25,0.08);
}

/* ---- Font tokens (were missing -> body text fell back to Times New Roman) -- */
:root {
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* ==========================================================================
   MYLO — NAVY + GOLD TRUST THEME (authoritative, declared last)
   Navy carries the trust. Gold is used sparingly — buttons, key highlights,
   logo elements only. No cyan anywhere.
   ========================================================================== */
:root,
[data-theme="dark"] {
  color-scheme: dark;

  /* Navy canvas */
  --navy-950: #081426;
  --navy-900: #0B1D36;
  --navy-850: #0F2340;
  --navy-800: #12263F;
  --navy-700: #1A3050;
  --navy-600: #24406B;
  --navy-500: #335485;
  --navy-300: #6C86AC;

  /* Gold */
  --gold-700: #8F7114;
  --gold-600: #A8891C;
  --gold-500: #C9A227;
  --gold-400: #D9B84A;
  --gold-300: #E6CB7A;

  /* Ivory text on navy */
  --ivory-50:  #F7FAFD;
  --ivory-100: #F1F5F9;
  --ivory-300: #CBD5E1;
  --ivory-500: #94A3B8;
  --ivory-700: #64748B;

  /* Surfaces */
  --bg: #0B1D36;
  --bg-alt: #081426;
  --surface: #12263F;
  --surface-2: #1A3050;
  --surface-sunken: #081426;
  --panel: #12263F;

  /* Text */
  --text: #F1F5F9;
  --text-strong: #F7FAFD;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --heading: #F7FAFD;
  --heading-display: #FFFFFF;

  /* Accent = gold */
  --primary: #C9A227;
  --primary-deep: #A8891C;
  --primary-hover: #D9B84A;
  --primary-soft: rgba(201,162,39,0.14);
  --accent: #C9A227;
  --accent-hover: #D9B84A;
  --accent-soft: rgba(201,162,39,0.14);
  --accent-ink: #0B1D36;
  --brand: #C9A227;
  --brand-ink: #0B1D36;
  --accent-rgb: 201, 162, 39;
  --accent-glow: rgba(201, 162, 39, 0.18);

  /* Lines — gold muted 20-30% */
  --border: rgba(201,162,39,0.22);
  --border-strong: rgba(201,162,39,0.32);
  --border-subtle: rgba(241,245,249,0.08);
  --border-gold: rgba(201,162,39,0.40);
  --border-accent: rgba(201,162,39,0.38);
  --hairline: 1px solid var(--border);

  /* Interactive */
  --link: #D9B84A;
  --link-hover: #E6CB7A;
  --focus: #C9A227;
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus);

  /* Inputs */
  --input-bg: #0F2340;
  --input-border: rgba(201,162,39,0.28);
  --input-text: #F1F5F9;

  /* Header */
  --header-bg: rgba(8,20,38,0.90);
  --header-border: rgba(201,162,39,0.20);
  --header-blur: saturate(180%) blur(12px);

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-md: 0 6px 16px -4px rgba(0,0,0,0.50);
  --shadow-lg: 0 18px 40px -18px rgba(0,0,0,0.65);
  --shadow-gold: 0 8px 24px -10px rgba(201,162,39,0.35);
  --inset-hairline: inset 0 1px 0 rgba(255,255,255,0.07);

  /* Decorative */
  --hero-glow: radial-gradient(ellipse 110% 55% at 50% -8%, rgba(201,162,39,0.13), transparent 62%);
  --hero-glow-navy: radial-gradient(ellipse 110% 55% at 50% -8%, rgba(26,48,80,0.55), transparent 62%);
  --diagram-bg: rgba(241,245,249,0.02);
  --lattice: rgba(201,162,39,0.06);
  --logo-glow: rgba(201,162,39,0.30);

  /* Connection-layer background — muted gold, strictly behind content */
  --bg-line: rgba(201,162,39,0.55);
  --bg-node: rgba(217,184,74,0.70);
  --bg-line-opacity: 0.18;
  --bg-node-opacity: 0.30;
  --bg-glow-opacity: 0.08;

  /* Logo */
  --logo-mark-bg: #0B1D36;
  --logo-mark-ring: #C9A227;
  --logo-mark-ink: #C9A227;
  --logo-word: #F1F5F9;
  --logo-sub: #94A3B8;

  /* Misc */
  --stat: #F1F5F9;
  --price: #F1F5F9;
  --badge-live-bg: rgba(201,162,39,0.14);
  --badge-live-ink: #D9B84A;
  --badge-soon-bg: rgba(241,245,249,0.06);
  --badge-soon-ink: #94A3B8;
  --divider: rgba(201,162,39,0.20);
  --divider-gold: #C9A227;
  --divider-ink: #94A3B8;

  /* Charts */
  --chart-1: #F1F5F9;
  --chart-2: #C9A227;
  --chart-3: #6C86AC;
  --chart-4: #D9B84A;
  --chart-grid: rgba(241,245,249,0.08);
}

[data-theme="light"] {
  color-scheme: light;

  /* Surfaces */
  --bg: #F7F5F0;
  --bg-alt: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F1EDE4;
  --surface-sunken: #FFFFFF;
  --panel: #FFFFFF;

  /* Text */
  --text: #0B1D36;
  --text-strong: #081426;
  --text-muted: #475569;
  --text-subtle: #64748B;
  --heading: #081426;
  --heading-display: #081426;

  /* Accent = deeper gold for contrast on white */
  --primary: #B8961F;
  --primary-deep: #8F7114;
  --primary-hover: #C9A227;
  --primary-soft: rgba(184,150,31,0.10);
  --accent: #B8961F;
  --accent-hover: #C9A227;
  --accent-soft: rgba(184,150,31,0.10);
  --accent-ink: #FFFFFF;
  --brand: #B8961F;
  --brand-ink: #FFFFFF;
  --accent-rgb: 184, 150, 31;
  --accent-glow: rgba(184, 150, 31, 0.14);

  /* Lines — gold muted 15-25% */
  --border: rgba(201,162,39,0.22);
  --border-strong: rgba(201,162,39,0.34);
  --border-subtle: rgba(11,29,54,0.08);
  --border-gold: rgba(184,150,31,0.45);
  --border-accent: rgba(184,150,31,0.42);
  --hairline: 1px solid var(--border);

  /* Interactive */
  --link: #8F7114;
  --link-hover: #B8961F;
  --focus: #B8961F;
  --focus-ring: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--focus);

  /* Inputs */
  --input-bg: #FFFFFF;
  --input-border: rgba(11,29,54,0.20);
  --input-text: #0B1D36;

  /* Header */
  --header-bg: rgba(255,255,255,0.90);
  --header-border: rgba(201,162,39,0.24);
  --header-blur: saturate(180%) blur(12px);

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(11,29,54,0.08);
  --shadow-md: 0 6px 16px -6px rgba(11,29,54,0.16);
  --shadow-lg: 0 18px 40px -20px rgba(11,29,54,0.22);
  --shadow-gold: 0 8px 24px -10px rgba(184,150,31,0.28);
  --inset-hairline: inset 0 1px 0 rgba(255,255,255,0.7);

  /* Decorative */
  --hero-glow: radial-gradient(ellipse 110% 55% at 50% -8%, rgba(184,150,31,0.09), transparent 62%);
  --hero-glow-navy: radial-gradient(ellipse 110% 55% at 50% -8%, rgba(18,38,63,0.05), transparent 62%);
  --diagram-bg: rgba(11,29,54,0.02);
  --lattice: rgba(11,29,54,0.05);
  --logo-glow: rgba(184,150,31,0.18);

  /* Connection-layer background */
  --bg-line: rgba(184,150,31,0.45);
  --bg-node: rgba(201,162,39,0.60);
  --bg-line-opacity: 0.12;
  --bg-node-opacity: 0.30;
  --bg-glow-opacity: 0.05;

  /* Logo */
  --logo-mark-bg: #0B1D36;
  --logo-mark-ring: #C9A227;
  --logo-mark-ink: #C9A227;
  --logo-word: #0B1D36;
  --logo-sub: #475569;

  /* Misc */
  --stat: #0B1D36;
  --price: #0B1D36;
  --badge-live-bg: rgba(184,150,31,0.12);
  --badge-live-ink: #8F7114;
  --badge-soon-bg: rgba(11,29,54,0.05);
  --badge-soon-ink: #475569;
  --divider: rgba(201,162,39,0.20);
  --divider-gold: #B8961F;
  --divider-ink: #475569;

  /* Charts */
  --chart-1: #0B1D36;
  --chart-2: #C9A227;
  --chart-3: #6C86AC;
  --chart-4: #B8961F;
  --chart-grid: rgba(11,29,54,0.08);
}
