/* ============================================================
   AURUM — Base Design System
   Tokens, fonts, reset, typography helpers, and shared buttons.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "InterVariable";
  src: url("../fonts/InterSubsetLatin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "InterVariable";
  src: url("../fonts/InterSubsetLatinExt.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --night: #010e1c;   /* depth — body bg */
  --blue: #08335d;    /* dominan — surface/panel */
  --azure: #fdffff;   /* teks terang */
  --gold: #f7b538;    /* aksen — CTA & signature */
  --teal: #145a86;    /* mid hue — dekoratif */
  --ochre: #c98f2e;   /* shade aksen */

  --bg: var(--night);
  --text: var(--azure);
  --surface: #03172b;
  --muted: rgba(253, 255, 255, 0.62);
  --faint: rgba(253, 255, 255, 0.4);
  --line: rgba(253, 255, 255, 0.16);
  --surface-hover: rgba(8, 51, 93, 0.35);
  --code-bg: rgba(253, 255, 255, 0.08);
}

@supports (color: color-mix(in srgb, red, blue)) {
  :root {
    --surface: color-mix(in srgb, var(--blue) 26%, var(--night));
    --muted: color-mix(in srgb, var(--azure) 62%, transparent);
    --faint: color-mix(in srgb, var(--azure) 40%, transparent);
    --line: color-mix(in srgb, var(--azure) 22%, transparent);
    --surface-hover: color-mix(in srgb, var(--blue) 35%, transparent);
    --code-bg: color-mix(in srgb, var(--azure) 8%, transparent);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: InterVariable, Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: 'liga' 1, 'calt' 1;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--gold); color: var(--night); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--gold);
  color: var(--night);
  padding: 0.6rem 1.1rem;
  border-radius: 99px;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip:focus { top: 16px; }

.container {
  width: min(1180px, 100% - clamp(2.5rem, 7vw, 7rem));
  margin-inline: auto;
}

/* ---------- Type helpers ---------- */
.kicker {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-feature-settings: 'cpsp' 1;
  color: var(--gold);
}

.ds {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

.h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 570;
}

code {
  background: var(--code-bg);
  padding: 0.15em 0.45em;
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--azure);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s ease, background-color 0.25s ease,
              color 0.25s ease, border-color 0.25s ease;
}
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: var(--ochre); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--azure);
  border: 1px solid var(--line);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding-inline: 0.6rem;
}
.btn-ghost:hover { color: var(--gold); }
.btn-sm { min-height: 40px; padding: 0.5rem 1.1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn-xl { min-height: 60px; padding: 1.2rem 2.4rem; font-size: 1.1rem; }
.i-arrow { transition: transform 0.25s ease; }
.btn:hover .i-arrow { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

/* ---------- Shared Interactive Tools (AED Calculator & PII Tester) ---------- */
.aed-calc {
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
}
.aed-calc-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}
.aed-calc-head h3 {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 500;
  color: var(--azure);
  margin: 0.25rem 0 0;
}
.aed-calc-head strong { color: var(--gold); }
.aed-calc-presets { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.aed-slider {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
  margin: 0.4rem 0 1.2rem;
}
.aed-calc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.aed-calc-stats span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.aed-calc-stats strong {
  font-size: 1rem;
  color: var(--azure);
  font-weight: 600;
}
.aed-calc-stats strong.is-gold { color: var(--gold); }
.aed-calc-link {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.aed-calc-link a { color: var(--gold); text-decoration: none; }
.aed-calc-link a:hover { text-decoration: underline; }

.p-custom { display: grid; gap: 0.85rem; margin-bottom: 1rem; }
.p-custom[hidden], .p-flow[hidden] { display: none; }
.p-custom-label { font-size: 0.82rem; color: var(--muted); }
.p-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(1, 14, 28, 0.75);
  color: var(--azure);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  line-height: 1.5;
  padding: 0.75rem 0.9rem;
  resize: vertical;
}
.p-textarea:focus { outline: 1px solid var(--gold); border-color: var(--gold); }
.p-custom-out {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.p-custom-out mark {
  background: rgba(212, 175, 55, 0.22);
  color: var(--gold);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}
.p-empty { color: var(--muted); }

