/**
 * Adio Strategy Design Tokens — Warm Ivory & Signal Coral (Executive Advisory)
 * Brand DNA sampled directly from the Adio logo:
 * - Wordmark Slate: #53505B  |  Brand Coral: #F6525D  |  Tagline Slate: #6A6670
 * Complete WCAG 2.1 AA/AAA Light & Dark Mode Tokens (zero violet/purple, zero pure black, zero neon).
 */

:root {
  /* =========================================================
     LAYER 1: BRAND PRIMITIVES (Sampled From Logo)
     ========================================================= */
  --raw-adio-slate: #53505B;
  --raw-adio-coral: #F6525D;
  --raw-adio-tagline: #6A6670;

  --raw-obsidian: #151317;
  --raw-obsidian-surface: #1F1D23;
  --raw-obsidian-elevated: #2A2730;
  --raw-obsidian-border: #3B3743;
  --raw-obsidian-border-strong: #524D5C;

  --raw-light-ivory: #F6F4F0;
  --raw-light-stone: #ECE9E2;
  --raw-white: #FFFFFF;
  --raw-charcoal: #26232C;
  --raw-charcoal-hover: #3B3743;

  --raw-coral-dark-action: #FF6E78;
  --raw-coral-dark-hover: #FF8991;
  --raw-pine-light: #1E6F64;
  --raw-pine-dark: #6AC4B7;

  /* Typography */
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Responsive Type Scale (Hero 48-64px desktop / 36-44px mobile; essential text >= 14px) */
  --text-hero: clamp(2.375rem, 4.4vw, 3.875rem);     /* 38px -> 62px */
  --text-page-title: clamp(2.125rem, 3.6vw, 3.375rem); /* 34px -> 54px */
  --text-section: clamp(1.875rem, 2.7vw, 2.5rem);    /* 30px -> 40px */
  --text-card: clamp(1.375rem, 1.75vw, 1.625rem);    /* 22px -> 26px */
  --text-lead: clamp(1.0625rem, 1.25vw, 1.1875rem);  /* 17px -> 19px */
  --text-body: 1.0625rem;                            /* 17px */
  --text-label: 0.9375rem;                           /* 15px */
  --text-meta: 0.875rem;                             /* 14px min */

  /* 8px Spacing Scale */
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-5: 2.5rem;   /* 40px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-10: 5rem;    /* 80px */
  --space-12: 6rem;    /* 96px */
  --space-14: 7rem;    /* 112px */

  /* Geometry & Radii */
  --container-max: 75rem;  /* 1200px */
  --gutter: 1.5rem;        /* 24px */
  --header-height: 5.5rem; /* 88px floating bar footprint */
  --radius-control: 0.5rem;/* 8px buttons & inputs */
  --radius-card: 0.75rem;  /* 12px cards */
  --radius-stage: 1.25rem; /* 20px architectural hero/CTA frames */
  --radius-pill: 9999px;

  /* Custom Motion Curves (Emil Kowalski + Apple Fluid Interfaces) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-wipe: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-press: 120ms;
  --dur-fast: 160ms;
  --dur-ui: 240ms;
  --dur-drawer: 340ms;
  --dur-wipe: 560ms;
}

/* =========================================================
   LAYER 2: LIGHT MODE TOKENS ([data-theme="light"])
   ========================================================= */
:root,
[data-theme="light"] {
  /* Surfaces & Borders */
  --bg-page: #F6F4F0;
  --bg-surface: #FFFFFF;
  --bg-subtle: #ECE9E2;
  --bg-elevated: #FFFFFF;
  --border: #DDD9D0;
  --border-strong: #C5C0B5;
  --border-specular: rgba(255, 255, 255, 0.88);

  --bg-pill-nav: rgba(255, 255, 255, 0.84);
  --bg-pill-nav-solid: #FFFFFF;

  /* Dark Executive Anchor Surfaces (CROS Section, Ink Bento, Closing CTA, Footer) */
  --bg-anchor: #151317;
  --bg-anchor-surface: #1F1D23;
  --bg-anchor-elevated: #2A2730;
  --border-anchor: #3B3743;
  --text-on-anchor: #F6F4F0;
  --text-on-anchor-muted: #C3BEC8;
  --accent-on-anchor: #FF6E78;

  /* Typography */
  --text-primary: #26232C;
  --text-secondary: #53505B;
  --text-muted: #6A6670;

  /* Brand & Accents */
  --brand-coral: #F6525D;
  --accent: #C8323F;
  --accent-hover: #AA2632;
  --accent-subtle: #FCECED;
  --accent-tint: #FCECED;
  --accent-secondary: #1E6F64;
  --accent-secondary-subtle: #E6F4F1;
  --focus-ring: #C8323F;
  --focus-ring-shadow: 0 0 0 3px rgba(200, 50, 63, 0.28);

  /* Atmospheric Studio Warm Light (Subtle Coral + Warm Stone + Calm Pine — zero violet/neon) */
  --stage-glow-1: rgba(246, 82, 93, 0.085);
  --stage-glow-2: rgba(30, 111, 100, 0.075);
  --stage-surface: linear-gradient(155deg, #FFFFFF 0%, #F4F1EC 55%, #ECE9E2 100%);
  --anchor-glow: radial-gradient(720px circle at 12% 10%, rgba(246, 82, 93, 0.14), transparent 58%),
                 radial-gradient(620px circle at 88% 90%, rgba(106, 196, 183, 0.11), transparent 56%);
  --grid-hairline: rgba(38, 35, 44, 0.042);

  /* Buttons */
  --btn-primary-bg: #26232C;
  --btn-primary-fg: #FFFFFF;
  --btn-primary-hover: #3B3743;
  --btn-primary-bg-hover: #3B3743;

  --btn-accent-bg: #C8323F;
  --btn-accent-fg: #FFFFFF;
  --btn-accent-hover: #AA2632;

  --btn-secondary-bg: #FFFFFF;
  --btn-secondary-bg-hover: #ECE9E2;
  --btn-secondary-fg: #26232C;
  --btn-secondary-border: #DDD9D0;

  /* Semantic Status Colors */
  --status-success: #1E6F64;
  --status-success-bg: #E6F4F1;
  --status-success-fg: #FFFFFF;
  --status-success-tint: #E6F4F1;

  --status-warning: #965A05;
  --status-warning-bg: #FDF3E3;
  --signal-amber-bg: #FDF3E3;
  --signal-amber-fg: #965A05;
  --signal-amber-tint: #FDF3E3;
  --signal-amber-text: #965A05;

  --status-error: #B82836;
  --status-error-bg: #FCECED;
  --status-error-fg: #B82836;
  --status-error-tint: #FCECED;
  --status-error-text: #B82836;

  --status-info: #4D5C70;
  --status-info-bg: #EDF1F6;

  /* Soft Warm Editorial Shadows */
  --shadow-nav: 0 10px 32px -8px rgba(38, 35, 44, 0.11), 0 1px 3px rgba(38, 35, 44, 0.05);
  --shadow-sm: 0 1px 2px rgba(38, 35, 44, 0.04), 0 6px 18px -6px rgba(38, 35, 44, 0.06);
  --shadow-md: 0 12px 32px -8px rgba(38, 35, 44, 0.10), 0 2px 6px rgba(38, 35, 44, 0.04);
  --shadow-lg: 0 24px 56px -12px rgba(38, 35, 44, 0.16), 0 6px 18px -4px rgba(38, 35, 44, 0.07);

  /* Inputs & Cards */
  --input-bg: #FFFFFF;
  --input-fg: #26232C;
  --input-border: #C5C0B5;
  --input-border-focus: #C8323F;

  --card-bg: #FFFFFF;
  --card-border: #DDD9D0;

  color-scheme: light;
}

/* =========================================================
   LAYER 3: DARK MODE TOKENS ([data-theme="dark"])
   ========================================================= */
:root[data-theme="dark"],
[data-theme="dark"] {
  /* Surfaces & Borders */
  --bg-page: #151317;
  --bg-surface: #1F1D23;
  --bg-subtle: #2A2730;
  --bg-elevated: #2A2730;
  --border: #3B3743;
  --border-strong: #524D5C;
  --border-specular: rgba(246, 244, 240, 0.09);

  --bg-pill-nav: rgba(31, 29, 35, 0.82);
  --bg-pill-nav-solid: #1F1D23;

  --bg-anchor: #1B181F;
  --bg-anchor-surface: #24212A;
  --bg-anchor-elevated: #2E2A35;
  --border-anchor: #3B3743;
  --text-on-anchor: #F6F4F0;
  --text-on-anchor-muted: #C3BEC8;
  --accent-on-anchor: #FF6E78;

  /* Typography */
  --text-primary: #F6F4F0;
  --text-secondary: #C3BEC8;
  --text-muted: #97919E;

  /* Brand & Accents */
  --brand-coral: #F6525D;
  --accent: #FF6E78;
  --accent-hover: #FF8991;
  --accent-subtle: #3A1E23;
  --accent-tint: #3A1E23;
  --accent-secondary: #6AC4B7;
  --accent-secondary-subtle: #183330;
  --focus-ring: #FF6E78;
  --focus-ring-shadow: 0 0 0 3px rgba(255, 110, 120, 0.36);

  /* Subtle Warm Studio Glow (No neon, no violet) */
  --stage-glow-1: rgba(246, 82, 93, 0.13);
  --stage-glow-2: rgba(106, 196, 183, 0.09);
  --stage-surface: linear-gradient(155deg, #27242D 0%, #1F1D23 55%, #19171C 100%);
  --anchor-glow: radial-gradient(720px circle at 12% 10%, rgba(246, 82, 93, 0.14), transparent 58%),
                 radial-gradient(620px circle at 88% 90%, rgba(106, 196, 183, 0.10), transparent 56%);
  --grid-hairline: rgba(246, 244, 240, 0.04);

  /* Buttons */
  --btn-primary-bg: #FF6E78;
  --btn-primary-fg: #151317;
  --btn-primary-hover: #FF8991;
  --btn-primary-bg-hover: #FF8991;

  --btn-accent-bg: #F6525D;
  --btn-accent-fg: #151317;
  --btn-accent-hover: #FF6E78;

  --btn-secondary-bg: #1F1D23;
  --btn-secondary-bg-hover: #2A2730;
  --btn-secondary-fg: #F6F4F0;
  --btn-secondary-border: #3B3743;

  /* Semantic Status Colors */
  --status-success: #6AC4B7;
  --status-success-bg: #183330;
  --status-success-fg: #151317;
  --status-success-tint: #183330;

  --status-warning: #EEB757;
  --status-warning-bg: #362A15;
  --signal-amber-bg: #362A15;
  --signal-amber-fg: #EEB757;
  --signal-amber-tint: #362A15;
  --signal-amber-text: #EEB757;

  --status-error: #FF7D87;
  --status-error-bg: #3A1E23;
  --status-error-fg: #FF7D87;
  --status-error-tint: #3A1E23;
  --status-error-text: #FF7D87;

  --status-info: #95B0CF;
  --status-info-bg: #1E2936;

  /* Dark Elevation Shadows */
  --shadow-nav: 0 14px 36px -8px rgba(10, 8, 12, 0.56), 0 1px 0 rgba(246, 244, 240, 0.05) inset;
  --shadow-sm: 0 2px 8px rgba(10, 8, 12, 0.30), 0 1px 0 rgba(246, 244, 240, 0.04) inset;
  --shadow-md: 0 14px 36px -8px rgba(10, 8, 12, 0.50), 0 1px 0 rgba(246, 244, 240, 0.05) inset;
  --shadow-lg: 0 28px 64px -12px rgba(10, 8, 12, 0.66), 0 1px 0 rgba(246, 244, 240, 0.06) inset;

  /* Inputs & Cards */
  --input-bg: #2A2730;
  --input-fg: #F6F4F0;
  --input-border: #524D5C;
  --input-border-focus: #FF6E78;

  --card-bg: #1F1D23;
  --card-border: #3B3743;

  color-scheme: dark;
}

@media (prefers-reduced-transparency: reduce) {
  :root,
  [data-theme="light"],
  [data-theme="dark"] {
    --bg-pill-nav: var(--bg-pill-nav-solid);
  }
}

@media (prefers-contrast: more) {
  :root,
  [data-theme="light"] {
    --border: #26232C;
    --border-strong: #26232C;
    --text-secondary: #26232C;
    --text-muted: #26232C;
  }
  [data-theme="dark"] {
    --border: #F6F4F0;
    --border-strong: #F6F4F0;
    --text-secondary: #F6F4F0;
    --text-muted: #F6F4F0;
  }
}
