/* ============================================================
   base.css — tokens, reset, tipografi, layout, header, hero
   Satu tema saja: broken white hangat + oranye GitLab sebagai
   warna utama. Warna status memakai warna alat nyata (Jenkins,
   OpenShift, Jira, Docker, GitHub) — lihat tabel kontras di
   usulan-palet-2026-10-07.md.
   ============================================================ */

:root {
  color-scheme: light;

  /* bidang — halaman putih; warna hangat bertahan hanya sebagai tint cekung.
     bg-2 sengaja sama dengan bg: pemisah kartu/blok selalu garis, bukan warna,
     jadi tidak ada pasangan yang kehilangan pemisahnya di atas putih. */
  --bg: #ffffff;
  --bg-2: #ffffff;
  --bg-3: #faf7f2;
  --surface-dark: #241c17; /* satu-satunya bidang gelap: terminal & cuplikan kode */

  /* teks — semua >= 4.5:1 di bg, bg-2, maupun bg-3 */
  --ink: #1c1917;        /* 15.7 - 17.2 */
  --ink-dim: #5c5348;    /* 6.4 - 7.4 */
  --ink-faint: #766b5f;  /* 4.7 - 5.1 */
  --line: rgba(28, 25, 23, 0.12);
  --line-strong: rgba(28, 25, 23, 0.26);

  /* merek: oranye GitLab. Varian B -> #C2410C untuk teks/bidang,
     #FC6D26 hanya untuk garis rel, hover, dan aksen kecil */
  --accent: #c2410c;
  --accent-strong: #a8360a;  /* oranye untuk teks DI ATAS tint --accent-dim: 5.49:1 */
  --accent-bright: #fc6d26;
  --accent-ink: #ffffff;                       /* teks di atas --accent: 5.18:1 */
  --accent-dim: rgba(194, 65, 12, 0.08);
  --accent-line: rgba(194, 65, 12, 0.42);

  /* status = alat nyata. Versi "teks" selalu >= 4.5:1, versi brand untuk dekor */
  --pass: #2e7d32; --pass-strong: #256a2b;  --pass-brand: #63a955;  --pass-dim: rgba(99, 169, 85, 0.12); /* Jenkins */
  --danger: #b42318;      --danger-brand: #da291c; --danger-dim: rgba(218, 41, 28, 0.07); /* OpenShift */
  --warn: #a94e09;        --warn-brand: #d97706;   --warn-dim: rgba(180, 83, 9, 0.08);    /* amber */
  --info: #0052cc;        --info-brand: #2496ed;   --info-dim: rgba(0, 82, 204, 0.07);    /* Jira + Docker */
  --tool-ink: #24292f;                                                                            /* GitHub */
  --on-dark: #faf7f2;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1140px;
  --pad: clamp(20px, 5vw, 48px);
  --section: clamp(84px, 11vw, 148px);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* latar grid halus */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }

/* ---------- layout ---------- */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}
section { padding-block: var(--section); }
section + section { border-top: 1px solid var(--line); }

/* ---------- tipografi ---------- */
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
}
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.025em; font-weight: 750; }
h2 { font-size: clamp(30px, 4.6vw, 50px); margin-top: 18px; }
.lead {
  color: var(--ink-dim);
  font-size: clamp(15px, 1.5vw, 17.5px);
  max-width: 64ch;
  margin-top: 18px;
}
.mono { font-family: var(--font-mono); }
.dim { color: var(--ink-dim); }

.section-head { margin-bottom: clamp(40px, 6vw, 68px); }
/* eyebrow sudah hilang di sebagian besar section: judul mengambil alih posisinya
   supaya jarak tepi section ke teks pertama tidak berubah */
.section-head > h2:first-child,
.hero-id > h1:first-child { margin-top: 0; }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand .mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  border-radius: 2px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.brand:hover .mark { background: var(--accent); color: var(--accent-ink); }
.brand .slash { color: var(--ink-faint); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  padding: 8px 11px;
  border-radius: 2px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--accent-dim); }
.nav a.active { color: var(--accent); }

.header-tools { display: flex; align-items: center; gap: 8px; }
.tool-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink-dim);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.tool-btn[aria-pressed="true"] { background: var(--accent-dim); border-color: var(--accent-line); color: var(--accent); }

.menu-btn { display: none; }

@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--pad) 20px;
    gap: 2px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.28s var(--ease);
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 12px 10px; font-size: 14px; border-bottom: 1px solid var(--line); }
  .menu-btn { display: inline-flex; }
}

/* ---------- hero ---------- */
.hero {
  padding-top: clamp(120px, 16vh, 180px);
  padding-bottom: clamp(56px, 8vw, 96px);
  border-top: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  grid-template-areas:
    "id    photo"
    "stack stack"
    "flow  flow"
    "after after";
  column-gap: clamp(40px, 6vw, 84px);
  row-gap: clamp(26px, 3.6vw, 40px);
  align-items: center;
}
.hero-id { grid-area: id; }
.hero-after { grid-area: after; }
/* terminal dan kartu include berdampingan; di layar sempit mereka menumpuk */
.hero-after { display: flex; flex-wrap: wrap; gap: 22px; align-items: stretch; }

/* kartu include: bentuk nyata file pipeline sebuah service repo.
   Sengaja terang - hero hanya boleh punya satu blok gelap, yaitu terminal. */
.hero-yml {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}
.hy-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
}
.hy-file { color: var(--ink); font-weight: 600; }
.hy-where { margin-left: auto; }
.hy-code {
  margin: 0;
  padding: 11px 14px 13px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-dim);
  white-space: pre;
}
.hy-k { color: var(--accent); }
.hy-v { color: var(--ink); }
.hy-c { color: var(--ink-faint); }
@media (max-width: 520px) {
  /* nama file dan keterangan tidak saling mendorong di kepala kartu */
  .hy-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .hy-where { margin-left: 0; }
}
.hy-foot {
  margin-top: auto;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
}

/* strip stack di bawah tombol hero: satu baris mark + nama, tanpa wadah.
   Di 390 strip ikut di atas rel — Anda menerima bahwa rel terdorong turun. */
.hero-stack {
  grid-area: stack;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 20px;
  border-top: 1px solid var(--line);
  padding-top: clamp(16px, 2.4vw, 22px);
}
.hs-label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex: none;
}
.hs-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
@media (max-width: 860px) {
  .hero-stack { gap: 8px; }
  .hs-row { gap: 6px 16px; }
}
.hero h1 {
  font-size: clamp(42px, 7.4vw, 84px);
  margin-top: 22px;
  letter-spacing: -0.035em;
}
.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.7vw, 17px);
  color: var(--ink);
  margin-top: 16px;
  letter-spacing: 0.01em;
}
.hero-tag {
  color: var(--ink-dim);
  font-size: clamp(15px, 1.6vw, 17.5px);
  max-width: 52ch;
  margin-top: 18px;
}
/* baris bukti skala: angka yang sama dipakai di seluruh situs, tidak ada klaim baru */
.hero-proof {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  margin-top: 14px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 13px 22px;
  border-radius: 2px;
  border: 1px solid var(--accent);
  transition: all 0.22s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -12px var(--accent-line); }
.btn-ghost { color: var(--ink-dim); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--ink); }

/* terminal: dua baris visual (perintah + keluaran berdampingan) */
.terminal {
  margin-top: 0;
  flex: 1 1 420px;
  min-width: 0;
  background: var(--surface-dark);
  border: 1px solid rgba(250, 247, 242, 0.14);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 560px;
}
.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(250, 247, 242, 0.14);
}
.terminal-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(250, 247, 242, 0.28); }
.terminal-bar i:first-child { background: var(--accent-bright); }
.terminal-bar span {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #a9a29a;
  letter-spacing: 0.08em;
}
.terminal-body {
  padding: 12px 16px 14px;
  font-family: var(--font-mono);
  font-size: 12.8px;
  line-height: 1.6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 4px;
}
/* min-height menjaga tinggi blok tetap saat teks diketik (tanpa CLS) */
.terminal-body .ln { white-space: pre-wrap; min-height: 1.6em; }
.terminal-body .cmd { color: var(--on-dark); }
.terminal-body .out { color: var(--accent-bright); }   /* 5.87:1 di atas bidang gelap */
.terminal-body .out.dim-out { color: #a9a29a; }               /* 6.64:1 */

/* foto */
.hero-photo { position: relative; justify-self: end; width: min(100%, 240px); grid-area: photo; }
.photo-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
.photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06) brightness(0.98);
  transition: filter 0.6s var(--ease), transform 0.9s var(--ease);
}
.hero-photo:hover .photo-frame img { filter: grayscale(0) contrast(1.02); transform: scale(1.025); }
.photo-caption {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  padding-left: 14px;
  border-left: 1px solid var(--accent-line);
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "id" "stack" "flow" "after" "photo";
    row-gap: 24px;
  }
  /* rel naik ke bawah kolom nama; foto turun ke paling bawah agar rel muat di layar pertama */
  .hero-photo { justify-self: start; width: min(46%, 190px); }
}

/* ---------- stats ---------- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-in {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: clamp(26px, 4vw, 40px) clamp(16px, 2.5vw, 32px);
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; }
.stat .v {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat .l {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
@media (max-width: 760px) {
  .stats-in { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}


/* ---------- accessibility: focus & reduced motion (audit D2/D3) ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
/* situs ini punya hover dan focus ring, tapi tidak pernah punya state tertekan
   (0 aturan :active sebelumnya) — sentuh/klik tidak memberi umpan balik sama sekali.
   Hanya kontrol nyata; rel hero (.hf-node) sengaja tidak ikut, sesuai veto Anda. */
.btn:active, .wsn:active, .ms-tab:active, .tf-btn:active, .bd-btn:active, .bd-dot:active,
.tool-btn:active, .lc-node:active, .lc-chip:active, .copy-btn:active, [data-act]:active {
  transform: translateY(1px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    transition-delay: 0s !important;
  }
}


/* ---------- print: semua konten & status akhir widget (audit v2 #10) ---------- */
@media print {
  .gate-check .box { background: #2e7d32 !important; border-color: #2e7d32 !important; color: #fff !important; }
  .gate-result { border-color: #2e7d32 !important; background: #e7f2e6 !important; }
  .gate-result .g-state { font-size: 0; color: #2e7d32 !important; }
  .gate-result .g-state::before { content: attr(data-ready); font-size: 22px; font-weight: 700; }
  .hf-packet, .lc-packet, .rp-sse i, .bd-live i { display: none !important; }
  .rp-view::before, .bd-narr::before { content: "Interactive demo — see written description."; font-family: var(--font-mono); font-size: 12px; color: #555; }
  .dg-link { stroke-dashoffset: 0 !important; } /* animasi dimatikan di cetak: garis diagram harus tetap terlihat */
  * { animation: none !important; transition: none !important; }
}
