/* =============================================================================
   Innovation Hub design tokens
   Source of truth: Accenture brand materials in assets/brand/
   Rules: see 02-color.md, 03-typography.md, 04-layout-and-spacing.md, 06-motion.md
   Use semantic tokens (--color-*) in components. Use raw brand tokens only here.
   Light mode is the default and first choice, always, regardless of the system setting.
   Dark mode is a second option that people choose with the toggle in the page footer.
   It is applied by setting data-theme="dark" on <html>. See DECISIONS.md.
   ============================================================================= */

/* Typeface: Graphik is Accenture's primary typeface and is licensed. If the font
   files are available for web use, self-host them in frontend/fonts/ and enable
   the @font-face block below. Never load fonts from a third-party CDN.

   @font-face { font-family: "Graphik"; font-weight: 400; font-style: normal; font-display: swap;
                src: url("../fonts/Graphik-Regular.woff2") format("woff2"); }
   @font-face { font-family: "Graphik"; font-weight: 500; font-style: normal; font-display: swap;
                src: url("../fonts/Graphik-Medium.woff2") format("woff2"); }
   @font-face { font-family: "Graphik"; font-weight: 600; font-style: normal; font-display: swap;
                src: url("../fonts/Graphik-Semibold.woff2") format("woff2"); }
*/

:root {
  color-scheme: light;

  /* ---- Brand palette (raw values, do not use directly in components) ---- */
  --purple-darkest: #460073;   /* RGB 70, 0, 115    */
  --purple-dark:    #7500C0;   /* RGB 117, 0, 192   */
  --purple-core:    #A100FF;   /* RGB 161, 0, 255   */
  --purple-light:   #C2A3FF;   /* RGB 194, 163, 255 */
  --purple-lightest:#E6DCFF;   /* RGB 230, 220, 255 */

  --neutral-black:       #000000;
  --neutral-gray-dark:   #818180;
  --neutral-gray-medium: #CFCFCF;
  --neutral-gray-light:  #F1F1EF;
  --neutral-white:       #FFFFFF;

  --secondary-pink: #FF50A0;   /* use sparingly, never for body text */
  --secondary-blue: #224BFF;   /* light mode only, never in dark mode */
  --secondary-aqua: #05F2DB;   /* dark mode surfaces and accents only, never on white */

  /* DERIVED, not in the brand materials: accessible secondary text on white
     (contrast 7.0:1). Brand dark gray #818180 is only 3.9:1 on white. */
  --neutral-text-muted: #595958;

  /* ---- Typography ---- */
  --font-sans: "Graphik", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --weight-regular: 400;
  --weight-medium: 500;        /* body copy in dark mode */
  --weight-semibold: 600;      /* headlines, emphasis */

  /* Sized against the Method One console: ~60px at 1440, not ~80px. */
  --text-display: clamp(2.25rem, 1.2rem + 2.6vw, 3.5rem);
  --text-h1:      clamp(2.25rem, 1.4rem + 3.4vw, 4rem);
  --text-h2:      clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  --text-h3:      1.5rem;
  --text-h4:      1.25rem;
  --text-body-lg: 1.1875rem;   /* 19px */
  --text-body:    1.125rem;    /* 18px, matches the Method One body size */
  --text-small:   0.9375rem;   /* 15px */
  --text-caption: 0.8125rem;   /* 13px, minimum size anywhere */

  --leading-display: 1.02;
  --leading-heading: 1.12;
  --leading-body: 1.6;

  --tracking-display: -0.03em;
  --tracking-h1: -0.025em;
  --tracking-h2: -0.02em;
  --tracking-h3: -0.01em;
  --tracking-body: 0;

  /* ---- Spacing (4px base) ---- */
  --space-1: 0.25rem;   /* 4   */
  --space-2: 0.5rem;    /* 8   */
  --space-3: 0.75rem;   /* 12  */
  --space-4: 1rem;      /* 16  */
  --space-5: 1.5rem;    /* 24  */
  --space-6: 2rem;      /* 32  */
  --space-7: 3rem;      /* 48  */
  --space-8: 4rem;      /* 64  */
  --space-9: 6rem;      /* 96  */
  --space-10: 8rem;     /* 128 */
  --space-11: 10rem;    /* 160 */
  --section-space: clamp(4rem, 2rem + 8vw, 9rem);

  /* ---- Layout ---- */
  /* NOTE: base.css restates --container-max, --container-narrow and --grid-size in
     rem so they scale together above 1440px, and being later in the cascade it wins.
     Change those there, not here. 76rem is 19 x the 4rem grid, which keeps the
     container edges exactly on grid lines so the rails never draw a second line
     a few pixels away. */
  --container-max: 76rem;
  --container-narrow: 760px;   /* reading and form width */
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 2.5rem);
  /* Breakpoints (use literal values in @media): 640px, 768px, 1024px, 1280px */

  /* ---- Shape (decided: crisp corners, see DECISIONS.md) ---- */
  --radius-none: 0;
  --radius-control: 2px;
  --radius-panel: 4px;
  --border-width: 1px;

  /* ---- Motion ---- */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 360ms;
  --duration-ambient: 40s;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);

  /* ---- Background grid (see 04-layout-and-spacing.md and DECISIONS.md) ---- */
  --grid-size: 64px;
  --grid-line: rgba(0, 0, 0, 0.05);
  --grid-line-h: rgba(0, 0, 0, 0.05);
  --grid-rail: rgba(0, 0, 0, 0.10);   /* two vertical lines at the container edges, wide screens only */

  /* ---- Layering ---- */
  --z-nav: 100;
  --z-overlay: 200;

  /* ---- Semantic colors: LIGHT MODE (default) ---- */
  --color-bg: var(--neutral-white);
  --color-bg-subtle: var(--neutral-gray-light);
  --color-bg-inverse: var(--neutral-black);
  --color-text: var(--neutral-black);
  --color-text-muted: var(--neutral-text-muted);
  --color-text-inverse: var(--neutral-white);
  --color-border: var(--neutral-gray-medium);
  --color-border-strong: var(--neutral-black);
  --color-accent: var(--purple-core);           /* fills, large display type, chevron */
  --color-accent-hover: var(--purple-dark);
  --color-accent-pressed: var(--purple-darkest);
  --color-accent-soft: var(--purple-lightest);  /* selected backgrounds */
  --color-on-accent: var(--neutral-white);
  --color-link: var(--purple-dark);             /* 8.3:1 on white */
  --color-focus: var(--purple-core);
  --focus-ring: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-focus);

  /* Gradients are built only from palette values. See 07-imagery-and-icons.md */
  --gradient-hero:
    radial-gradient(60% 80% at 18% 30%, var(--purple-core) 0%, transparent 62%),
    radial-gradient(55% 75% at 82% 62%, var(--purple-dark) 0%, transparent 66%),
    radial-gradient(75% 95% at 50% 105%, var(--purple-darkest) 0%, transparent 72%),
    var(--neutral-black);
  --gradient-soft:
    radial-gradient(60% 80% at 20% 25%, var(--purple-light) 0%, transparent 65%),
    radial-gradient(55% 75% at 85% 70%, var(--purple-lightest) 0%, transparent 68%),
    var(--neutral-white);
}

/* ---- Semantic colors: DARK MODE (second option, chosen by the person) ----
   Brand rules: lighter purples lead, neutrals are mostly black, only pink and
   aqua may be used as secondary colors (never blue), body copy at weight 500. */
[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: var(--neutral-black);
  --color-bg-subtle: var(--neutral-black);       /* separate with borders, not tints */
  --color-bg-inverse: var(--neutral-white);
  --color-text: var(--neutral-white);
  --color-text-muted: var(--neutral-gray-medium);
  --color-text-inverse: var(--neutral-black);
  --color-border: rgba(255, 255, 255, 0.24);
  --color-border-strong: var(--neutral-white);
  --color-accent: var(--purple-core);            /* fills and large text only (3.96:1 on black) */
  --color-accent-hover: var(--purple-light);
  --color-accent-pressed: var(--purple-lightest);
  --color-accent-soft: rgba(161, 0, 255, 0.24);
  --color-on-accent: var(--neutral-white);
  --color-link: var(--purple-light);             /* 10:1 on black */
  --color-focus: var(--purple-light);
  --font-body-weight: var(--weight-medium);
  --grid-line: rgba(255, 255, 255, 0.09);
  --grid-line-h: rgba(255, 255, 255, 0.09);
  --grid-rail: rgba(255, 255, 255, 0.16);
}

/* Body weight follows the theme. Default is regular. */
body { font-family: var(--font-sans); font-weight: var(--font-body-weight, var(--weight-regular)); }

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 1ms;
    --duration-base: 1ms;
    --duration-slow: 1ms;
    --duration-ambient: 0s;
  }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
