/* === fonts === */

/* Families are provided by next/font on <html> (--font-instrument, --font-dm-sans). */


/* === colors (base palette + semantic light/dark aliases) === */

/* ── Base palette ─────────────────────────────────────────────
   Every hex here is lifted from the source PPTX/one-pager XML or the
   brand notes. Gold family runs bright→deep; neutrals run onyx→paper. */
:root{
  /* Gold — muted warm brass; accent and emphasis ONLY */
  --gold-pale:#F2DFA1;      /* soft highlight on near-black */
  --gold-bright:#E2BE5C;    /* active underline, emphasis */
  --gold-mid:#D4AA4F;       /* mockup primary gold / brass */
  --gold:#D4AA4F;           /* brand primary gold (rebuild) */
  --gold-muted:#C39A45;     /* secondary gold */
  --gold-deep:#8F7340;      /* pressed states, hairlines */
  --gold-amber:#D4AF37;     /* rare hot accent — use sparingly */

  /* Dark neutrals — near-black graphite, cool teal undertone (rebuild) */
  --onyx-950:#030405;
  --onyx-900:#050607;
  --onyx-850:#080A0B;
  --onyx-800:#0B0E10;
  --onyx:#0E1214;
  --onyx-750:#121618;
  --onyx-700:#171C1F;
  --charcoal:#2A3236;
  --charcoal-light:#3A4449;
  --charcoal-soft:#4A555C;
  --slate:#6B757C;
  --teal-mist:#0D1816;
  --teal-veil-04:rgba(34,72,64,.04);
  --teal-veil-08:rgba(34,72,64,.08);
  --teal-veil-14:rgba(34,72,64,.14);

  /* Light neutrals — warm, never stark white */
  --cream:#F7F3E9;
  --cream-warm:#F6F3EE;
  --ivory:#F5F3ED;
  --paper:#F2F0EA;
  --tan:#E9DFC4;
  --tan-grey:#E4E0D6;
  --white:#FFFFFF;

  /* Alpha utilities — gold veils + cream veils */
  --scrim-40:rgba(0,0,0,.40);
  --scrim-70:rgba(0,0,0,.70);
  --gold-veil-06:rgba(197,160,89,.06);
  --gold-veil-08:rgba(197,160,89,.08);
  --gold-veil-12:rgba(197,160,89,.12);
  --gold-veil-16:rgba(197,160,89,.16);
  --gold-veil-22:rgba(197,160,89,.22);
  --gold-veil-24:rgba(197,160,89,.24);
  --gold-veil-32:rgba(197,160,89,.32);
  --cream-veil-04:rgba(247,243,233,.04);
  --cream-veil-06:rgba(247,243,233,.06);
  --cream-veil-08:rgba(247,243,233,.08);
  --cream-veil-12:rgba(247,243,233,.12);
  --cream-veil-16:rgba(247,243,233,.16);
  --cream-veil-55:rgba(247,243,233,.55);
  --cream-veil-72:rgba(247,243,233,.72);
  --cream-veil-88:rgba(247,243,233,.88);
}

/* ── Semantic aliases: LIGHT surface (default) ───────────────── */
:root{
  --surface-page:var(--cream);
  --surface-raised:var(--white);
  --surface-sunken:var(--paper);
  --surface-card:var(--white);
  --surface-card-tan:var(--tan);
  --surface-inverse:var(--onyx);
  --surface-inverse-soft:var(--charcoal);

  --text-heading:var(--onyx);
  --text-body:var(--charcoal);
  --text-muted:var(--slate);
  --text-eyebrow:var(--gold-deep);
  --text-accent:var(--gold-deep);
  --text-on-gold:var(--onyx);
  --text-on-inverse:var(--cream);

  --border-hairline:var(--tan-grey);
  --border-rule:var(--gold-deep);
  --border-strong:var(--charcoal);
  --border-focus:var(--gold);

  --accent:var(--gold);
  --accent-hover:var(--gold-bright);
  --accent-press:var(--gold-deep);

  --link:var(--gold-deep);
  --link-hover:var(--onyx);

  /* Status — desaturated to sit inside the neutral palette */
  --status-positive:#4E6B4A;
  --status-caution:var(--gold-deep);
  --status-negative:#8C4438;
  --status-neutral:var(--slate);
}

/* ── Semantic aliases: DARK surface (institutional rebuild) ──── */
.ap-dark,[data-theme="dark"]{
  /* Required rebuild color system — deeper graphite than mock flat blacks */
  --color-bg:#020304;
  --color-surface:rgba(22,28,30,.88);
  --color-surface-hover:rgba(30,38,40,.94);
  --color-text-primary:rgba(247,243,233,.98);
  --color-text-secondary:rgba(247,243,233,.90);
  --color-text-muted:rgba(247,243,233,.74);
  --color-gold:var(--gold-mid);
  --color-gold-border:var(--gold-veil-22);
  --color-positive:#5F7A5A;
  --color-positive-fg:#8FA88A;
  --color-neutral:#6B757C;
  --color-neutral-fg:#9AA3A9;
  --color-warning:#B8954E;
  --color-warning-fg:#E8D49A;
  --color-error:#9A564C;
  --color-error-fg:#C4847A;

  --surface-page:var(--color-bg);
  --surface-raised:var(--onyx-750);
  --surface-sunken:var(--onyx-950);
  --surface-card:var(--onyx-700);
  --surface-card-tan:var(--onyx-750);
  --surface-elevated:var(--color-surface);
  --surface-elevated-hover:var(--color-surface-hover);
  --surface-panel:rgba(18,24,26,.55);
  --surface-inset:rgba(2,3,4,.62);

  /* Depth ladder — luminance hierarchy, not card chrome */
  --depth-0:var(--color-bg);                 /* app canvas */
  --depth-1:rgba(10,14,16,.55);              /* atmospheric page section */
  --depth-2:rgba(22,28,30,.42);              /* content surface */
  --depth-3:rgba(32,40,42,.58);              /* interactive / selected */
  --depth-4:rgba(42,52,54,.72);              /* focused action */

  --surface-atmosphere:var(--depth-1);
  --surface-content:var(--depth-2);
  --surface-interactive:var(--depth-3);
  --surface-focus:var(--depth-4);

  /* Open section wash — barely-there tonal shift, not a muted gray card */
  --surface-plate:linear-gradient(
    180deg,
    rgba(28,36,38,.28) 0%,
    rgba(12,16,18,.10) 60%,
    transparent 100%
  );
  --surface-plate-solid:rgba(18,24,26,.28);

  /* Semantic functional colors (sparing use) */
  --sem-gold:var(--gold-mid);                 /* emphasis / strategic */
  --sem-sage:#16C784;                         /* positive / advancing */
  --sem-sage-soft:#68E0B1;
  --sem-cool:#53B7EA;                         /* neutral / monitoring */
  --sem-cool-soft:#8EDBFF;
  --sem-amber:#D9AD42;                        /* attention / incomplete */
  --sem-amber-soft:#F0CE72;
  --sem-rose:#F04472;                         /* negative / blocked */
  --sem-rose-soft:#FF7B9D;
  --sem-teal:#20C9D7;                         /* comparison series */
  --sem-teal-soft:#72ECF3;

  --chart-series-1:var(--sem-gold);
  --chart-series-2:var(--sem-teal);
  --chart-series-3:var(--sem-sage);
  --chart-series-4:var(--sem-cool);
  --chart-series-5:var(--sem-amber);

  --surface-inverse:var(--cream);
  --surface-inverse-soft:var(--paper);

  --text-heading:var(--color-text-primary);
  --text-primary:var(--color-text-primary);
  --text-secondary:var(--color-text-secondary);
  --text-body:var(--cream-veil-88);
  --text-muted:var(--color-text-muted);
  --text-eyebrow:var(--color-gold);
  --text-accent:var(--gold-pale);
  --text-on-gold:var(--onyx-950);
  --text-on-inverse:var(--onyx-900);

  --border-hairline:rgba(247,243,233,.11);
  --border-subtle:rgba(247,243,233,.14);
  --border-rule:var(--color-gold-border);
  --border-gold:var(--color-gold-border);
  --border-strong:rgba(247,243,233,.22);
  --border-focus:var(--color-gold);
  --border-selected:var(--gold-veil-32);

  --accent:var(--color-gold);
  --accent-hover:var(--gold-bright);
  --accent-press:var(--gold-deep);

  --link:var(--color-gold);
  --link-hover:var(--gold-pale);

  /* Status — muted, calm + semantic aliases */
  --status-positive:var(--sem-sage);
  --status-positive-soft:var(--sem-sage-soft);
  --status-caution:var(--sem-amber);
  --status-caution-soft:var(--sem-amber-soft);
  --status-negative:var(--sem-rose);
  --status-negative-soft:var(--sem-rose-soft);
  --status-neutral:var(--sem-cool);
  --status-neutral-soft:var(--sem-cool-soft);
  --status-warning:var(--sem-amber);
  --status-warning-soft:var(--sem-amber-soft);

  --color-positive:var(--sem-sage);
  --color-positive-fg:var(--sem-sage-soft);
  --color-warning:var(--sem-amber);
  --color-warning-fg:var(--sem-amber-soft);
  --color-error:var(--sem-rose);
  --color-error-fg:var(--sem-rose-soft);
  --color-neutral:var(--sem-cool);
  --color-neutral-fg:var(--sem-cool-soft);

  /* Interaction language */
  --state-selected-bg:var(--gold-veil-08);
  --state-selected-border:var(--gold-veil-32);
  --state-hover-bg:var(--gold-veil-06);
  --state-hover-border:var(--gold-veil-16);
  --state-focus-ring:0 0 0 2px var(--onyx-950), 0 0 0 4px var(--color-gold);
  --state-disabled-opacity:.42;
}


/* === typography === */

:root{
  /* Families */
  --font-display:var(--font-instrument),"Instrument Serif","Iowan Old Style","Palatino Linotype",Georgia,serif;
  --font-body:var(--font-dm-sans),"DM Sans","Helvetica Neue",Arial,sans-serif;
  --font-mono:ui-monospace,"SFMono-Regular",Menlo,monospace;

  /* Weights actually used in the source materials */
  --fw-light:300; /* @kind font */
  --fw-regular:400; /* @kind font */
  --fw-medium:500; /* @kind font */
  --fw-semibold:600; /* @kind font */
  --fw-bold:700; /* @kind font */
  --fw-display:700; /* @kind font */ /* Playfair headings */
  --fw-display-black:900; /* @kind font */

  /* Screen scale (px). pt equivalents are the PPTX values they came from. */
  --fs-display-1:82px;  /* 62pt — "AURUM" definition slide */
  --fs-display-2:51px;  /* 38pt — pull-quote / manifesto */
  --fs-display-3:43px;  /* 32pt — slide titles, page H1 */
  --fs-display-4:36px;  /* 27pt — hero statements */
  --fs-h1:32px;         /* 24pt — one-pager headline metric */
  --fs-h2:24px;         /* 18pt — card / phase titles */
  --fs-h3:21px;         /* 16pt — person names, sub-heads */
  --fs-h4:17px;         /* 13pt — inline metric label */
  --fs-body-lg:19px;    /* 14pt — deck + web body */
  --fs-body:16px;       /* 12pt — one-pager labels, UI default */
  --fs-body-sm:14px;    /* 10.5pt — one-pager body copy */
  --fs-caption:13px;    /* 10pt — footnotes, chips */
  --fs-micro:11px;      /* 8.5pt — page numbers, legal */

  /* Line heights */
  --lh-tight:1.05; /* @kind other */ /* display */
  --lh-snug:1.2; /* @kind other */ /* headings */
  --lh-normal:1.45; /* @kind other */ /* UI */
  --lh-relaxed:1.6; /* @kind other */ /* long-form body */

  /* Tracking — uppercase eyebrows are the brand's signature move */
  --ls-display:-0.015em; /* @kind other */
  --ls-heading:-0.005em; /* @kind other */
  --ls-normal:0; /* @kind other */
  --ls-wide:0.06em; /* @kind other */ /* spc=60 in PPTX */
  --ls-wider:0.10em; /* @kind other */ /* spc=100 */
  --ls-widest:0.20em; /* @kind other */ /* spc=200 — "EBITDA" style labels */

  /* Named roles */
  --type-eyebrow-size:var(--fs-caption);
  --type-eyebrow-tracking:var(--ls-widest); /* @kind other */
  --type-eyebrow-weight:var(--fw-semibold); /* @kind font */
}


/* === spacing === */

:root{
  /* 4px base step */
  --space-0:0;
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:20px;
  --space-6:24px;
  --space-8:32px;
  --space-10:40px;
  --space-12:48px;
  --space-16:64px;
  --space-20:80px;
  --space-24:96px;
  --space-32:128px;

  /* Document / slide gutters measured from the source files */
  --gutter-slide:32px;      /* 304800 EMU on a 12192000-wide slide */
  --gutter-page:18px;       /* 162000 EMU on an 8.5in one-pager */
  --gutter-web:48px;

  /* Canonical breakpoint scale for new @media rules. CSS custom properties
     can't be used inside @media conditions, so these are reference values to
     copy literally, not usable tokens — keep new code on one of these instead
     of picking a fresh nearby number:
       640px  — phone
       720px  — large phone / small tablet (most single-column collapses)
       900px  — tablet (shell gutter narrows to --page-gutter-sm)
       1100px — most two-column content grids collapse to one column here
       1280px — wide desktop refinements
     Existing rules on 960px/1040px predate this scale and serve their own
     components (not accidental splits of the ones above) — left as-is rather
     than renumbered without visual QA on every affected page. */

  /* Page composition grid — one desktop width everywhere */
  --page-max:1440px;
  --page-gutter:var(--gutter-web);
  --page-gutter-md:28px;
  --page-gutter-sm:16px;
  --page-nav-gap:28px;          /* top spacing after nav */
  --page-bottom:64px;
  --page-section-gap:24px;      /* between major sections */
  --page-card-gap:16px;         /* between sibling panels / cards */
  --page-panel-pad:20px;        /* internal panel padding */
  --page-hero-gap:22px;         /* hero → first content */
  --page-lede-max:44rem;

  /* Legacy aliases (prefer --page-* above) */
  --content-max:var(--page-max);

  /* Vertical rhythm between titled sections */
  --stack-section:var(--page-section-gap);
  --stack-block:var(--space-6);
  --stack-tight:var(--space-3);

  /* Density defaults (overridden by [data-density]) */
  --density-title-size:clamp(32px, 3.4vw, 44px);
  --density-lede-size:15px;
  --density-row-pad-y:10px;
  --density-metric-value:clamp(28px, 2.6vw, 40px);
}


/* === borders / radii === */

:root{
  /* Radii — the brand is squared-off. Cards are the only rounded thing,
     and only gently. Nothing is a pill except contact chips. */
  --radius-0:0;
  --radius-sm:2px;
  --radius-card:6px;        /* roundRect cards in the one-pager / deck */
  --radius-lg:10px;
  --radius-pill:999px;

  /* Hairline widths, in the source's own units */
  --rule-hair:1px;          /* 9525 EMU — table dividers */
  --rule-thin:1.5px;        /* 19050 EMU — section rules under eyebrows */
  --rule-accent:4px;        /* 50800 EMU — left bar on callout bands */
  --rule-icon:1.5px; /* @kind other */        /* line-icon stroke */

  --border-hair:var(--rule-hair) solid var(--border-hairline);
  --border-gold-rule:var(--rule-thin) solid var(--border-rule);
}


/* === elevation (surfaces, restrained glows — no glassmorphism) === */

:root{
  /* Atmosphere — deeper graphite + cool teal undertone + soft vignette.
     Low-contrast depth only — no flat black, no obvious gradient blobs, no glass. */
  --atmosphere-base:#010203;
  --atmosphere-radial:
    radial-gradient(980px 560px at 12% -10%, rgba(34,72,64,.11), transparent 64%),
    radial-gradient(720px 440px at 98% 0%, rgba(197,160,89,.04), transparent 58%),
    radial-gradient(1180px 700px at 50% 128%, rgba(14,34,30,.08), transparent 62%);
  --atmosphere-vignette:radial-gradient(ellipse 76% 66% at 50% 26%, transparent 42%, rgba(0,0,0,.64) 100%);

  /* Shadows stay quiet. Gold glow is reserved for selected work items only. */
  --shadow-none:none;
  --shadow-card:0 1px 0 rgba(255,255,255,.03), 0 12px 28px -22px rgba(0,0,0,.75);
  --shadow-raised:0 1px 0 rgba(255,255,255,.04), 0 16px 36px -24px rgba(0,0,0,.8);
  --shadow-inset-hair:inset 0 0 0 1px rgba(247,243,233,.06);
  --shadow-on-dark:0 12px 40px rgba(0,0,0,.45);
  --shadow-inset-highlight:inset 0 1px 0 rgba(255,255,255,.04);
  --shadow-panel:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 18px 40px -30px rgba(0,0,0,.85);
  --shadow-plate:
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 2px 0 0 var(--gold-veil-32),
    0 22px 48px -34px rgba(0,0,0,.88);
  --shadow-hero-plate:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 18px 44px -32px rgba(0,0,0,.85),
    0 0 0 1px var(--gold-veil-12);

  /* Elevated tinted fills — flat, no glass blur */
  --glass-fill:var(--color-surface, rgba(18,22,24,.92));
  --glass-border:1px solid var(--border-subtle, rgba(247,243,233,.10));
  --glass-shadow:var(--shadow-panel);
  --glass-blur:none;
  --surface-fill:var(--color-surface, rgba(18,22,24,.92));
  --surface-border:1px solid var(--border-subtle, rgba(247,243,233,.10));

  /* Selected / hover — thin gold edge, no neon bloom */
  --glow-hover:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 0 0 1px var(--gold-veil-22),
    0 14px 32px -24px rgba(0,0,0,.75);
  --glow-hover-row:
    inset 0 0 0 1px var(--gold-veil-16);
  --glow-press:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 1px var(--gold-veil-32),
    0 10px 24px -20px rgba(0,0,0,.78);
  --bar-gold:linear-gradient(180deg, #D4B86A 0%, #C5A059 58%, #8F7340 100%);
  --bar-gold-h:linear-gradient(90deg, #C5A059 0%, #D4B86A 100%);
  --bar-glow-rest:none;
  --bar-glow:0 0 0 1px var(--gold-veil-16);
  --glow-gold:none;
  --glow-gold-text:none;

  /* Protection scrims for type over photography */
  --scrim-bottom:linear-gradient(to top,rgba(5,6,7,.92) 0%,rgba(5,6,7,.65) 38%,rgba(5,6,7,0) 100%); /* @kind other */
  --scrim-left:linear-gradient(to right,rgba(5,6,7,.94) 0%,rgba(5,6,7,.60) 45%,rgba(5,6,7,0) 100%); /* @kind other */
  --scrim-flat:rgba(5,6,7,.55);

  /* Gradients: brushed-gold fill for rules/mark */
  --gradient-gold:linear-gradient(135deg,#8F7340 0%,#D4B86A 38%,#C5A059 62%,#8F7340 100%); /* @kind other */
  --gradient-gold-rule:linear-gradient(to right,rgba(197,160,89,0) 0%,#C5A059 12%,#D4B86A 50%,#C5A059 88%,rgba(197,160,89,0) 100%); /* @kind other */
  --gradient-gold-foil:linear-gradient(165deg,#E8D49A 0%,#C5A059 38%,#8F7340 72%,#D4B86A 100%); /* @kind other */
  --glow-gold-foil:drop-shadow(0 1px 0 rgba(0,0,0,.55)) drop-shadow(0 8px 20px rgba(0,0,0,.4)); /* @kind shadow */
}


/* === motion === */

:root{
  --dur-instant:90ms; /* @kind other */
  --dur-fast:150ms; /* @kind other */
  --dur-base:220ms; /* @kind other */
  --dur-slow:400ms; /* @kind other */
  --dur-reveal:700ms; /* @kind other */

  /* Restrained easing. No bounce, no overshoot — this is a finance brand. */
  --ease-standard:cubic-bezier(.32,.72,0,1); /* @kind other */
  --ease-out:cubic-bezier(.16,1,.3,1); /* @kind other */
  --ease-in:cubic-bezier(.4,0,1,1); /* @kind other */

  --transition-hover:color var(--dur-fast) var(--ease-standard),background-color var(--dur-fast) var(--ease-standard),border-color var(--dur-fast) var(--ease-standard),opacity var(--dur-fast) var(--ease-standard); /* @kind other */
}
@media (prefers-reduced-motion:reduce){
  :root{--dur-instant:0ms; /* @kind other */ --dur-fast:0ms; /* @kind other */ --dur-base:0ms; /* @kind other */ --dur-slow:0ms; /* @kind other */ --dur-reveal:0ms; /* @kind other */}
}
