/* Registrasi font lokal; pemakaian komponen hanya lewat token --font-*. */
@font-face {
  font-family: "Archivo Narrow";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/archivo-narrow-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
}

/* Token blok tunggal tema. Fallback sRGB (#hex / rgba) untuk semua browser; peningkatan oklch/color-mix di @supports. */
:root {
  color-scheme: light;

  /* Skala spasi, ukuran, gerak */
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px;
  --space-lg2: 32px; --space-xl: 40px; --space-xl2: 56px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;
  --space-nav: 72px; --space-touch: 44px; --space-field: 52px;
  --text-xs: 0.8125rem; --text-sm: 0.9375rem; --text-md: 1rem; --text-lg: 1.25rem; --text-xl: 1.5625rem; --text-2xl: 1.953rem; --text-3xl: 2.441rem;
  --text-prose: 1.1875rem;
  --text-display-s: clamp(2.25rem, 3.4vw + 0.75rem, 4rem);
  --text-display: clamp(2.5rem, 4.4vw + 0.75rem, 4.75rem);
  --text-section: clamp(2rem, 2.5vw + 1rem, 3.5rem);
  --text-title: clamp(1.1875rem, 0.6vw + 0.95rem, 1.5rem);
  --text-card: clamp(1.0625rem, 0.3vw + 1rem, 1.25rem);
  --text-lead: clamp(1.0625rem, 0.35vw + 1rem, 1.3125rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in: cubic-bezier(0.7, 0, 0.84, 0); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;
  --container: 1440px; --gutter: 64px; --gap-columns: 32px; --section-gap-s: 64px; --section-gap: 80px; --section-gap-l: 96px;
  --measure-prose: 66ch;
  --z-base: 1; --z-raised: 10; --z-dropdown: 100; --z-sticky: 200; --z-sticky-nav: 300; --z-modal: 400; --z-toast: 500; --z-tooltip: 600;
  --radius-card: 0px; --radius-control: 2px; --radius-pill: 2px; --rule-hair: 1px; --rule-strong: 2px; --shadow-card: none;
  --shadow-float: 0 18px 40px -18px rgba(24, 30, 38, 0.35);
  --color-visual-ground: #181818; --color-visual-main: #dfdfe0; --color-visual-soft: #6a6a6e; --color-visual-signal: #D6001C;
  --color-visual-line: #454548;
  --tracking-display: -0.015em;

  /* Mode Terang (sRGB dasar) */
  --color-paper: #fafafa;
  --color-paper-2: #eeeeef;
  --color-paper-3: #dedee0;
  --color-ink: #141414;
  --color-ink-2: #303034;
  --color-muted: #59595f;
  --color-rule: #ccccd0;
  --color-edge: #77777d;
  --color-accent: #D6001C;
  --color-accent-ink: #ffffff;
  --color-accent-deep: #B30018;
  --color-focus: #A30016;
  --color-accent-soft: #f7e8e9;
  --color-sea: #37373d;
  --color-sea-soft: #b5b5bc;
  --color-inverse: #101010;
  --color-inverse-ink: #fafafa;
  --color-inverse-muted: #bcbcc2;
  --color-inverse-rule: #424248;
  --color-scrim: rgba(0, 0, 0, 0.65);
  --color-selection: rgba(214, 0, 28, 0.22);
  --color-link-underline: rgba(20, 20, 20, 0.45);
  --color-error: #B30018;
  --color-error-soft: #f9eeee;
  --color-success: #226036;
  --color-success-soft: #e9f3eb;

  --font-display: "Archivo Narrow", "Arial Narrow", "Franklin Gothic Medium", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, system-ui, sans-serif;
  --font-outlier: var(--font-body);
}

/* Mode Gelap (sRGB dasar) */
[data-theme="dark"] {
  color-scheme: dark;
  --color-paper: #141414;
  --color-paper-2: #202022;
  --color-paper-3: #303035;
  --color-ink: #f4f4f5;
  --color-ink-2: #d7d7db;
  --color-muted: #aaaab2;
  --color-rule: #45454d;
  --color-edge: #8c8c96;
  --color-accent: #D6001C;
  --color-accent-ink: #ffffff;
  --color-accent-deep: #FF5C6C;
  --color-focus: #ff8790;
  --color-accent-soft: #391d23;
  --color-sea: #bcbcc4;
  --color-sea-soft: #393940;
  --color-inverse: #0b0b0b;
  --color-inverse-ink: #fafafa;
  --color-inverse-muted: #bcbcc2;
  --color-inverse-rule: #424248;
  --color-scrim: rgba(0, 0, 0, 0.75);
  --color-selection: rgba(214, 0, 28, 0.30);
  --color-link-underline: rgba(244, 244, 245, 0.45);
  --color-error: #ff969c;
  --color-error-soft: #391d23;
  --color-success: #a5d7ae;
  --color-success-soft: #1d3022;
  --shadow-float: 0 18px 40px -18px rgba(4, 5, 8, 0.7);
}

@supports (color: oklch(50% 0.1 20)) {
  :root {
    --shadow-float: 0 18px 40px -18px oklch(20% 0.04 230 / 0.35);
  }
  [data-theme="dark"] {
    --shadow-float: 0 18px 40px -18px oklch(5% 0.02 230 / 0.7);
  }
}

@supports (color: color-mix(in oklab, red 50%, transparent)) {
  :root,
  [data-theme="dark"] {
    --color-selection: color-mix(in oklab, var(--color-accent) 22%, transparent);
    --color-link-underline: color-mix(in oklab, currentColor 45%, transparent);
  }
}