/* ==========================================================================
   Psyhc AI, kumpulan open source yang layak dipakai
   Font: Fraunces (judul), Space Grotesk (antarmuka), JetBrains Mono (data).
   Satu aksen kuning. Simbol beranimasi di tiap sub bab, bukan nomor.
   ========================================================================== */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces.ttf") format("truetype-variations");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono.ttf") format("truetype-variations");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0c0e;
  --panel: #131519;
  --panel-2: #191c21;
  --line: rgba(242, 241, 236, .10);
  --line-2: #6e6d68;
  --ink: #f2f1ec;
  --muted: #a5a29b;
  --muted-2: #85837d;
  --aksen: #f5b301;
  --aksen-ink: #171104;
  --bahaya: #e5484d;
  --wrap: 1160px;
  --disp: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a, button, select, input, summary { font: inherit; }
a, button, select, input[type="search"], .baris, .fav { cursor: pointer; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--aksen);
  outline-offset: 2px;
}

.lewati {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  background: var(--aksen);
  color: var(--aksen-ink);
  padding: 10px 16px;
}
.lewati:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ------------------------------- Pala --------------------------------- */
.pala {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 12, 14, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.pala__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}
.tanda {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--disp);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -.01em;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 70;
}
.tanda__img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: block;
}
.pala__nav { display: flex; gap: 22px; }
.pala__nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.pala__nav a:hover { color: var(--ink); }

.pala__kanan { display: flex; align-items: center; gap: 12px; }
.user {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  max-width: 12ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.masuk {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink);
  border-radius: 2px;
  font-size: 13px;
  padding: 7px 14px;
}
.masuk:hover { border-color: var(--aksen); color: var(--aksen); }
.masuk--hantu { color: var(--muted); }

/* ------------------------------ Masuk --------------------------------- */
.masuk__kotak {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 26px;
  width: min(420px, calc(100vw - 40px));
  display: grid;
  gap: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.masuk__kotak h2 {
  margin: 0;
  font-family: var(--disp);
  font-weight: 560;
  font-size: 28px;
  letter-spacing: -.01em;
}
.masuk__ket { margin: 0; color: var(--muted-2); font-size: 14px; }
.masuk__penyedia { display: grid; gap: 8px; }
.masuk__penyedia button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
}
.masuk__penyedia button:hover { border-color: var(--aksen); }
.masuk__penyedia button:disabled { opacity: .45; cursor: default; }
.masuk__penyedia .gly {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  width: 16px;
}
.masuk__bagi {
  margin: 0;
  color: var(--muted-2);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.masuk__bagi::before,
.masuk__bagi::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.masuk__status { margin: 0; color: var(--bahaya); font-size: 13px; min-height: 1.2em; }
.masuk__status:empty { display: none; }
.masuk__tutup {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  padding: 6px;
  cursor: pointer;
}
.masuk__tutup:hover { color: var(--ink); }
.masuk__kotak { position: relative; }
.masuk-layar form { display: grid; gap: 8px; }
.masuk-layar label { font-size: 13px; color: var(--muted); }
.masuk-layar input {
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 11px 12px;
}
.masuk-layar input:focus { outline: 2px solid var(--aksen); outline-offset: 1px; }
.masuk__aksi { display: flex; gap: 10px; margin-top: 6px; }
.masuk__aksi button {
  flex: 1;
  border: 0;
  border-radius: 2px;
  background: var(--aksen);
  color: var(--aksen-ink);
  font-weight: 600;
  padding: 11px 14px;
}
.masuk__aksi .masuk__batal {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-weight: 400;
}
.masuk__aksi .masuk__batal:hover { color: var(--ink); border-color: var(--muted-2); }

.masuk-layar {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 12, 14, .78);
  backdrop-filter: blur(3px);
}
.masuk-layar[hidden] { display: none; }

.bilah { display: inline-flex; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; }

.bilah button {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  padding: 7px 12px;
}
.bilah button[aria-pressed="true"] {
  background: var(--aksen);
  color: var(--aksen-ink);
  font-weight: 600;
}

/* -------------------------------- Hero -------------------------------- */
.hero__in {
  padding-block: 84px 40px;
  display: grid;
  gap: 22px;
  max-width: 860px;
}
.hero h1 {
  margin: 0;
  font-family: var(--disp);
  font-weight: 560;
  font-size: clamp(42px, 6.6vw, 84px);
  line-height: 1.02;
  letter-spacing: -.015em;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 90;
  max-width: 16ch;
}
.hero h1 em { font-style: italic; color: var(--aksen); margin-right: .1em; }

.hero__lead {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 17px;
}

.cari { display: grid; gap: 8px; max-width: 560px; }
.cari__label { font-size: 13px; color: var(--muted); }
.cari__baris {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cari__baris:focus-within {
  border-color: var(--aksen);
  box-shadow: 0 0 0 3px rgba(245, 179, 1, .16);
}
.cari input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 16px;
  padding: 13px 14px;
}
.cari input::placeholder { color: var(--muted-2); }
.cari input:focus { outline: none; }
.cari button {
  border: 0;
  background: var(--aksen);
  color: var(--aksen-ink);
  font-weight: 600;
  padding: 0 22px;
}
.cari button:hover { background: #ffc21f; }
.cari button:active { transform: translateY(1px); }

.hero__meta {
  margin: 0;
  color: var(--muted-2);
  font-size: 14px;
  display: flex;
  gap: 6px 0;
  flex-wrap: wrap;
}
.hero__meta > span { white-space: nowrap; }
.hero__meta > span i { margin-left: .6em; font-style: normal; }
.hero__meta span span { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ------------------------------ Bagian -------------------------------- */
.bagian { padding-block: 64px; }
.bagian__pala {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0 20px;
  align-items: center;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.bagian__pala h2 {
  margin: 0 0 6px;
  font-family: var(--disp);
  font-weight: 560;
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -.015em;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 60;
}
.bagian__pala p { margin: 0; color: var(--muted); max-width: 62ch; }

.simbol {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--aksen);
}
.simbol svg { width: 30px; height: 30px; display: block; }
.simbol .g {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
}
.simbol.masuk .g { animation: gambar .7s ease forwards; }
.simbol.masuk .g:nth-child(2) { animation-delay: .12s; }
.simbol.masuk .g:nth-child(3) { animation-delay: .24s; }
@keyframes gambar { to { stroke-dashoffset: 0; } }
.simbol:hover { background: var(--panel); }

/* ------------------------------ Filter -------------------------------- */
.filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filter__chip { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--muted);
  padding: 8px 13px;
  border-radius: 2px;
  font-size: 14px;
  line-height: 1;
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.chip:hover { color: var(--ink); border-color: var(--muted-2); }
.chip[aria-pressed="true"] {
  background: var(--aksen);
  border-color: var(--aksen);
  color: var(--aksen-ink);
  font-weight: 600;
}
.filter__urut {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}
.filter__urut select {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  padding: 8px 10px;
}
.filter__hasil {
  margin: 0 0 8px;
  color: var(--muted-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------ Daftar -------------------------------- */
.daftar {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.baris {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) 5.5rem;
  gap: 0 16px;
  padding: 16px 8px;
  border-top: 1px solid var(--line);
  border-radius: 2px;
  transition: background .14s ease, transform .14s ease;
}
.baris:hover { background: var(--panel); transform: translateX(2px); }
.baris__no {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}
.baris:hover .baris__no { color: var(--aksen); }

.baris__atas {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.baris__nama {
  font-family: var(--mono);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.baris__nama span { color: var(--muted-2); font-weight: 400; }
.baris__nama:hover { color: var(--aksen); }

.fav {
  flex: none;
  background: transparent;
  border: 0;
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  transition: color .14s ease, transform .14s ease;
}
.fav:hover { color: var(--aksen); transform: scale(1.15); }
.fav[aria-pressed="true"] { color: var(--aksen); }

.baris__desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.baris__fitur { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 0; }
.baris__fitur span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 2px 7px;
}
.baris__fitur:empty { display: none; }
.baris__meta {
  margin: 9px 0 0;
  color: var(--muted-2);
  font-size: 13px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.baris__meta b { color: var(--muted); font-weight: 500; margin-right: 4px; }
.baris__plat {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1px 5px;
}

.baris__bintang {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-top: 3px;
}

/* ----------------------------- Mutakhir ------------------------------- */
.terbaru {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.terbaru li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) 5.5rem;
  gap: 0 18px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.terbaru li:first-child { border-top: 0; }
.terbaru time {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.terbaru__nama {
  font-family: var(--mono);
  font-weight: 600;
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.terbaru__nama:hover { color: var(--aksen); }
.terbaru__desc {
  display: block;
  color: var(--muted-2);
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.terbaru__bintang {
  text-align: right;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------- Kontak -------------------------------- */
.kontak__kartu { display: flex; gap: 14px; flex-wrap: wrap; }
.kontak__taut {
  display: grid;
  gap: 2px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 2px;
  text-decoration: none;
  background: var(--panel);
  min-width: 260px;
  transition: border-color .14s ease, transform .14s ease;
}
.kontak__taut:hover { border-color: var(--aksen); transform: translateY(-2px); }
.kontak__nama {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 16px;
  color: var(--aksen);
}
.kontak__ket { color: var(--muted-2); font-size: 14px; }

/* -------------------------------- Kaki --------------------------------- */
.kaki {
  border-top: 1px solid var(--line);
  padding-block: 40px 56px;
  color: var(--muted-2);
  font-size: 14px;
}
.kaki__in { display: grid; gap: 6px; }
.kaki p { margin: 0; }
.kaki__tag { color: var(--muted); }

/* ------------------------------ Status -------------------------------- */
.status {
  padding: 40px 0;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
}
.status strong { color: var(--ink); font-weight: 600; }

/* ---------------------------- Responsif ------------------------------- */
@media (max-width: 820px) {
  .pala__nav { gap: 16px; }
  .hero__in { padding-block: 60px 42px; }
  .bagian { padding-block: 50px; }
}
@media (max-width: 768px) {
  .pala__nav { display: none; }
  .hero__in { padding-block: 48px 34px; }
  .bagian { padding-block: 42px; }
  .bagian__pala { grid-template-columns: 1fr; gap: 10px; }
  .baris { grid-template-columns: 1.75rem minmax(0, 1fr); }
  .baris__bintang { display: none; }
  .terbaru li { grid-template-columns: 1fr; gap: 4px; }
  .terbaru__bintang { text-align: left; }
}
@media (max-width: 390px) {
  .wrap { padding-inline: 18px; }
  .cari__baris { flex-direction: column; }
  .cari button { padding: 13px 22px; }
}

/* --------------------------- Masuk sekali ----------------------------- */
[data-masuk] > * { animation: angkat .5s cubic-bezier(.2, .7, .3, 1) both; }
[data-masuk] > *:nth-child(2) { animation-delay: .07s; }
[data-masuk] > *:nth-child(3) { animation-delay: .14s; }
@keyframes angkat {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-masuk] > * { animation: none; }
  .simbol .g { animation: none; stroke-dashoffset: 0; }
  .baris, .chip, .cari__baris, .kontak__taut, .fav { transition: none; }
  .baris:hover { transform: none; }
}
