/* ============================================================
   pelindungandata.id — sistem desain
   Arah: "instrumen forensik / ruang kendali"
   Base indigo-malam • aksen iris-violet • warna status hanya di hasil
   ============================================================ */

:root {
  --bg:        #0B1020;
  --bg-2:      #090D1A;
  --surface:   #141A2E;
  --surface-2: #1B2238;
  --line:      #232B45;
  --line-2:    #2E3757;
  --ink:       #E8ECF6;
  --muted:     #8892A6;
  --muted-2:   #6C7692;

  --brand:     #7B6EF6;
  --brand-2:   #A99CFF;
  --brand-dim: rgba(123,110,246,.14);

  /* status — dipakai HANYA untuk hasil, bukan dekorasi UI */
  --safe:   #34D399;
  --warn:   #F5A623;
  --danger: #FF5C7A;
  --crit:   #FF3B5C;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -24px rgba(0,0,0,.7);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; margin: 0; }
.mono { font-family: var(--font-mono); }

/* ── ambient background ─────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: .10;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed; z-index: -1; pointer-events: none;
  width: 720px; height: 720px; top: -320px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(123,110,246,.22), transparent 62%);
  filter: blur(20px);
}

/* ── layout ─────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
section { padding: 64px 0; }

/* ── nav ────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11,16,32,.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .dot { width: 12px; height: 12px; border-radius: 3px; background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-dim); animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 0%,100%{ box-shadow: 0 0 0 4px var(--brand-dim);} 50%{ box-shadow: 0 0 0 8px transparent;} }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 14px; padding: 8px 12px; border-radius: 8px; }
.nav-links a:hover { color: var(--ink); background: var(--surface); text-decoration: none; }
.nav-links a.active { color: var(--ink); background: var(--surface-2); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); color: var(--ink); border-radius: 8px; padding: 8px 10px; cursor: pointer; }

/* ── eyebrow / labels ───────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--brand-2); font-weight: 500;
}

/* ── hero ───────────────────────────────────────────────── */
.hero { padding-top: 74px; padding-bottom: 30px; text-align: center; }
.hero h1 { font-size: clamp(34px, 6vw, 62px); margin: 18px 0 0; }
.hero h1 .accent { color: var(--brand-2); }
.hero p.lede { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 620px; margin: 18px auto 0; }

/* ── search instrument ──────────────────────────────────── */
.instrument {
  margin: 34px auto 0; max-width: 620px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 8px; box-shadow: var(--shadow);
  display: flex; gap: 8px; align-items: center;
  transition: border-color .2s, box-shadow .2s;
}
.instrument:focus-within { border-color: var(--brand); box-shadow: var(--shadow), 0 0 0 4px var(--brand-dim); }
.instrument input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--ink); font-family: var(--font-mono); font-size: 16px; padding: 14px 12px;
}
.instrument input::placeholder { color: var(--muted-2); }
.btn {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  background: var(--brand); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 14px 22px; cursor: pointer; transition: transform .12s, background .2s; white-space: nowrap;
}
.btn:hover { background: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink); }
.btn.ghost:hover { border-color: var(--brand); background: var(--brand-dim); }
.btn.sm { padding: 9px 14px; font-size: 13px; }

.trust-line {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  margin: 16px auto 0; color: var(--muted); font-size: 13px; max-width: 560px;
}
.trust-line svg { flex: none; color: var(--safe); }

/* ── stats strip ────────────────────────────────────────── */
.stats { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 22px; min-width: 150px; }
.stat .n { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ── generic card ───────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.card + .card { margin-top: 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(22px, 3vw, 30px); }
.muted { color: var(--muted); }

/* ── result dashboard ───────────────────────────────────── */
#result { display: none; }
#result.show { display: block; animation: rise .5s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(14px);} to { opacity: 1; transform: none; } }

.result-top {
  display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: center;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 26px;
}
.verdict h2 { font-size: 27px; }
.verdict .sub { color: var(--muted); margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font-family: var(--font-mono); font-size: 12.5px; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--muted); }
.chip b { color: var(--ink); }

/* ── risk ring (signature) ──────────────────────────────── */
.ring { position: relative; width: 200px; height: 200px; margin: 0 auto; }
.ring svg { transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--line-2); stroke-width: 14; }
.ring .fill { fill: none; stroke-width: 14; stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1), stroke .6s; }
.ring .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .center .score { font-family: var(--font-display); font-size: 46px; font-weight: 600; line-height: 1; }
.ring .center .label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-top: 6px; color: var(--muted); }

/* ── category cards ─────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.cat h3 { font-size: 15px; font-family: var(--font-body); font-weight: 600; margin-bottom: 12px; }
.cat .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13.5px; }
.cat .row .bar { flex: 1; height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 0 4px; }
.cat .row .bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.cat .row .v { font-family: var(--font-mono); font-size: 12px; color: var(--muted); min-width: 22px; text-align: right; }

/* ── breach list ────────────────────────────────────────── */
.breach { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.breach + .breach { margin-top: 10px; }
.breach .logo { width: 42px; height: 42px; border-radius: 9px; background: var(--surface-2); object-fit: contain; flex: none; padding: 5px; border: 1px solid var(--line); }
.breach .body { flex: 1; min-width: 0; }
.breach .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breach .head .name { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.breach .meta { color: var(--muted-2); font-family: var(--font-mono); font-size: 12px; margin-top: 2px; }
.breach .desc { color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.breach .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); }
.tag.warn { color: var(--warn); border-color: rgba(245,166,35,.35); }
.tag.danger { color: var(--danger); border-color: rgba(255,92,122,.35); }
.badge-v { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--safe); border: 1px solid rgba(52,211,153,.4); border-radius: 5px; padding: 2px 6px; font-family: var(--font-mono); }

/* ── action plan ────────────────────────────────────────── */
.steps { counter-reset: s; }
.step { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: none; }
.step .num { counter-increment: s; font-family: var(--font-mono); color: var(--brand-2); font-size: 13px; flex: none; width: 26px; }
.step .num::before { content: counter(s, decimal-leading-zero); }
.step h4 { margin: 0 0 3px; font-size: 15px; font-family: var(--font-body); }
.step p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ── feature nav cards (home footer) ────────────────────── */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 14px; }
.feat { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: border-color .2s, transform .2s; }
.feat:hover { border-color: var(--brand); transform: translateY(-3px); text-decoration: none; }
.feat .ic { width: 34px; height: 34px; color: var(--brand-2); margin-bottom: 12px; }
.feat h3 { font-size: 17px; color: var(--ink); }
.feat p { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }

/* ── password meter ─────────────────────────────────────── */
.pw-field { position: relative; }
.pw-meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 14px; }
.pw-meter i { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .4s, background .4s; }
.pw-verdict { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13.5px; }
.pw-verdict .lbl { font-family: var(--font-mono); }
.pw-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pw-leak { margin-top: 18px; padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); font-size: 14px; }
.gen-out { font-family: var(--font-mono); font-size: 18px; word-break: break-all; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 16px; margin-top: 6px; }
.slider { width: 100%; accent-color: var(--brand); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl { position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; cursor: pointer; transition: .2s; }
.switch .sl::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .sl { background: var(--brand); }
.switch input:checked + .sl::before { transform: translateX(18px); }

/* ── tables (directory) ─────────────────────────────────── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters input, .filters select {
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink);
  border-radius: var(--radius-sm); padding: 11px 14px; font-family: var(--font-body); font-size: 14px; outline: none;
}
.filters input { flex: 1; min-width: 200px; font-family: var(--font-mono); }
.filters input:focus, .filters select:focus { border-color: var(--brand); }
.dir-list { display: grid; gap: 10px; }

/* ── forms ──────────────────────────────────────────────── */
.form-note { color: var(--muted); font-size: 13px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin: 14px 0; cursor: pointer; }
label.check input { margin-top: 3px; accent-color: var(--brand); }
.field { width: 100%; background: var(--bg); border: 1px solid var(--line-2); color: var(--ink);
  border-radius: var(--radius-sm); padding: 14px; font-family: var(--font-mono); font-size: 15px; outline: none; }
.field:focus { border-color: var(--brand); }
.notice { border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; margin-top: 14px; }
.notice.ok { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); color: #A7F3D0; }
.notice.err { background: rgba(255,92,122,.1); border: 1px solid rgba(255,92,122,.3); color: #FECDD3; }

/* ── skeleton / loading ─────────────────────────────────── */
.skeleton { position: relative; overflow: hidden; background: var(--surface); border-radius: var(--radius); height: 120px; }
.skeleton::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent);
  animation: sweep 1.3s infinite; }
@keyframes sweep { to { transform: translateX(100%); } }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── footer ─────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted-2); font-size: 13px; }
.footer .cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer .disc { margin-top: 22px; max-width: 640px; line-height: 1.6; }

/* ── page header (subpages) ─────────────────────────────── */
.page-head { padding: 54px 0 20px; }
.page-head h1 { font-size: clamp(28px, 4vw, 44px); margin-top: 12px; }
.page-head p { color: var(--muted); max-width: 620px; margin-top: 14px; }

/* ── responsive ─────────────────────────────────────────── */
@media (max-width: 760px) {
  .nav-links { display: none; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 22px 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; }
  .nav-toggle { display: block; }
  .instrument { flex-direction: column; padding: 12px; }
  .instrument input { width: 100%; text-align: center; }
  .btn { width: 100%; }
  .result-top { grid-template-columns: 1fr; text-align: center; }
  .chips { justify-content: center; }
  .footer .cols { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
