/* PT Tanra Power Resources — design tokens
   Palette sampled from the TPR emblem: navy ring, teal-to-green sweep, amber lightning. */

@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* brand */
  --navy-900: #06182b;
  --navy-800: #0a2540;
  --navy-700: #0c3157;
  --teal: #0b7a8a;
  --green: #119a6b;
  --amber: #f5b000;
  --amber-ink: #3a2a00;

  /* light theme (default) */
  --ground: #f6f5f1;
  --ground-2: #ecebe5;
  --surface: #ffffff;
  --ink: #0a2540;
  --ink-2: #33475e;
  --muted: #5c6b7c;
  --line: rgba(10, 37, 64, 0.14);
  --line-strong: rgba(10, 37, 64, 0.32);
  --accent: #0b7a8a;          /* text-safe teal on light */
  --accent-2: #0d7f58;        /* text-safe green on light */
  --cta: var(--amber);
  --cta-ink: #1a1300;
  --stage: #0a2540;           /* dark stage used by the haul road in both themes */
  --stage-ink: #eef3f8;
  --plate: #ffffff;           /* logo plates */
  --scrim: rgba(6, 24, 43, 0.62);
  --road: url(#roadGrad);

  /* company accent (overridden per page) */
  --co: var(--teal);
  --co-2: var(--green);

  /* type */
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-mega: clamp(3.1rem, 9.2vw, 9.6rem);
  --fs-h1: clamp(2.6rem, 6.4vw, 6.4rem);
  --fs-h2: clamp(2rem, 4.4vw, 4.2rem);
  --fs-h3: clamp(1.35rem, 2vw, 1.9rem);
  --fs-lead: clamp(1.1rem, 1.35vw, 1.32rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-micro: 0.78rem;

  /* layout: Apple HIG pixel rules (layout.md, accessibility.md)
     - 8pt spacing grid with a 4pt half-step; every gap/padding below is a multiple of 4
     - margins follow width (size classes), not device: 16 compact, 20 large phone, 24 regular, 32/48 wide
     - safe areas respected via env(safe-area-inset-*) on top of the margin
     - touch targets >= 44x44, >= 8 between adjacent controls
     - readable width ~68ch for running text (system readable content guide)
     - concentric corners: inner radius = outer radius - inset */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --margin: 16px;
  --gutter: calc(var(--margin) + env(safe-area-inset-left, 0px));
  --gutter-r: calc(var(--margin) + env(safe-area-inset-right, 0px));
  --col-gap: var(--s-4);
  --section-y: var(--s-9);
  --maxw: 1440px;
  --readable: 68ch;
  --tap: 44px;
  --radius: 16px;             /* outer surfaces */
  --radius-in: 8px;           /* = --radius - 8px inset (concentric) */
  --radius-pill: 999px;
  --header-h: 64px;

  /* motion: one easing family (expo-out), "haul" verb = heavy, steady, no overshoot */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --t-fast: 160ms;
  --t-mid: 420ms;
  --t-slow: 900ms;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #06182b;
    --ground-2: #0a2540;
    --surface: #0c2a48;
    --ink: #eef3f8;
    --ink-2: #c8d4e0;
    --muted: #93a6ba;
    --line: rgba(238, 243, 248, 0.14);
    --line-strong: rgba(238, 243, 248, 0.32);
    --accent: #35c2cf;
    --accent-2: #3fd39b;
    --stage: #041221;
    --scrim: rgba(3, 12, 22, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #06182b;
  --ground-2: #0a2540;
  --surface: #0c2a48;
  --ink: #eef3f8;
  --ink-2: #c8d4e0;
  --muted: #93a6ba;
  --line: rgba(238, 243, 248, 0.14);
  --line-strong: rgba(238, 243, 248, 0.32);
  --accent: #35c2cf;
  --accent-2: #3fd39b;
  --stage: #041221;
  --scrim: rgba(3, 12, 22, 0.7);
  color-scheme: dark;
}

/* company pages */
body[data-co="tdj"] { --co: #8a560c; --co-2: #0a2540; }
body[data-co="dms"] { --co: #0b4d2c; --co-2: #ffd800; }
body[data-co="mbe"] { --co: #b8904a; --co-2: #111114; }
:root[data-theme="dark"] body[data-co="dms"] { --co: #3fd39b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body[data-co="dms"] { --co: #3fd39b; }
}

/* margins by available width (compact / regular / wide) */
@media (min-width: 414px)  { :root { --margin: 20px; } }
@media (min-width: 744px)  { :root { --margin: 24px; --col-gap: var(--s-5); --section-y: var(--s-10); } }
@media (min-width: 1024px) { :root { --margin: 32px; --header-h: 72px; } }
@media (min-width: 1366px) { :root { --margin: 48px; --col-gap: var(--s-6); } }

@media (prefers-contrast: more) {
  :root { --line: rgba(10, 37, 64, 0.5); --muted: #2b3a4b; }
  :root[data-theme="dark"] { --line: rgba(238, 243, 248, 0.5); --muted: #d6e0ea; }
}
