/* ==========================================================================
   Komori — komori.web.id
   Palet warna diambil langsung dari aplikasi Flutter (lib/theme.dart) agar
   web dan aplikasi terlihat sebagai satu produk:
     bg        #0F0E1B   surface     #1C1B29   surfaceHigh #2A2940
     primary   #6C63FF   primarySoft #3B3880   accent      #FF6B3D
     textDim   #9A98AE
   Gradien latar meniru SpaceBackground (lib/widgets/space_background.dart).

   CATATAN KOMPATIBILITAS: `gap` pada flexbox baru didukung Chrome 84+,
   sedangkan perangkat Android lama masih memakai Chrome 79. Karena itu jarak
   antar elemen flex di sini memakai margin, bukan `gap`.
   ========================================================================== */

:root {
  --bg: #0F0E1B;
  --surface: #1C1B29;
  --surface-high: #2A2940;
  --primary: #6C63FF;
  --primary-soft: #3B3880;
  --accent: #FF6B3D;
  --text: #EDEDF5;
  --text-dim: #9A98AE;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 0 20px 56px;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% -10%, #1B1842 0%, rgba(27, 24, 66, 0) 55%),
    radial-gradient(circle at 50% 110%, #14122B 0%, rgba(20, 18, 43, 0) 50%),
    linear-gradient(180deg, #1B1842 0%, var(--bg) 42%, #14122B 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Bintang halus, meniru latar aplikasi. */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.2px 1.2px at 78% 12%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.6px 1.6px at 33% 64%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.2px 1.2px at 88% 72%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.3px 1.3px at 62% 34%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.1px 1.1px at 22% 88%, rgba(255, 255, 255, 0.38), transparent),
    radial-gradient(1.5px 1.5px at 92% 44%, rgba(255, 255, 255, 0.28), transparent),
    radial-gradient(1.2px 1.2px at 47% 8%, rgba(255, 255, 255, 0.42), transparent);
  opacity: 0.85;
}

/* ---------- Kerangka halaman ---------- */

.wrap {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin: 0 auto;
  padding: 64px 0 0;
  text-align: center;
}

/* ---------- Identitas ---------- */

.avatar {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45),
    0 0 0 6px rgba(108, 99, 255, 0.06);
}

.avatar img {
  width: 58px;
  height: 58px;
  display: block;
}

.brand-name {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--text);
}

.tagline {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--text-dim);
  font-weight: 500;
}

/* ---------- Daftar tautan ---------- */

.links {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.links li {
  margin-bottom: 12px;
}

.links li:last-child {
  margin-bottom: 0;
}

.link {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.16s ease, border-color 0.16s ease,
    transform 0.16s ease;
}

.link:hover,
.link:focus-visible {
  background: var(--surface-high);
  border-color: rgba(108, 99, 255, 0.42);
  transform: translateY(-1px);
  outline: none;
}

.link:active {
  transform: scale(0.99);
}

.link-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  margin-right: 14px;
  border-radius: 11px;
  background: rgba(108, 99, 255, 0.13);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.link-icon svg {
  width: 19px;
  height: 19px;
  display: block;
}

.link-label {
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.link-chevron {
  flex-shrink: 0;
  margin-left: 10px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  transition: transform 0.16s ease, color 0.16s ease;
}

.link-chevron svg {
  width: 17px;
  height: 17px;
  display: block;
}

.link:hover .link-chevron {
  color: var(--primary);
  transform: translateX(2px);
}

/* Sorotan untuk tautan utama (opsional). */
.link.is-featured .link-icon {
  background: rgba(255, 107, 61, 0.14);
  color: var(--accent);
}

/* ---------- Footer ---------- */

.foot {
  margin: 34px 0 0;
  padding: 0;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.8;
}

.foot .quote {
  display: block;
  font-style: italic;
  opacity: 0.75;
  margin-bottom: 4px;
}

.foot a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.foot a:hover {
  color: var(--text);
  border-bottom-color: var(--border-strong);
}

.foot .sep {
  margin: 0 6px;
  opacity: 0.5;
}

/* ---------- Halaman teks (kebijakan / hapus akun) ---------- */

.doc {
  max-width: 680px;
  text-align: left;
}

.doc .back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 22px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
}

.doc .back svg {
  width: 15px;
  height: 15px;
  margin-right: 7px;
}

.doc .back:hover {
  color: var(--primary);
}

.doc h1 {
  margin: 0 0 6px;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.doc .updated {
  margin: 0 0 26px;
  font-size: 13px;
  color: var(--text-dim);
}

.doc h2 {
  margin: 34px 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.doc h3 {
  margin: 22px 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #D6D4E6;
}

.doc p,
.doc li {
  font-size: 14.5px;
  color: #C9C7D8;
}

.doc ul,
.doc ol {
  padding-left: 20px;
}

.doc li {
  margin: 6px 0;
}

.doc a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(108, 99, 255, 0.35);
}

.doc a:hover {
  border-bottom-color: var(--primary);
}

.doc code {
  background: var(--surface-high);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 13px;
  color: #C9C2FF;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 20px 0;
}

.card p:first-child {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

.note {
  border-left: 3px solid var(--primary);
  padding: 2px 0 2px 14px;
  margin: 18px 0;
  font-size: 13.5px;
  color: var(--text-dim);
}

.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.doc th,
.doc td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.doc th {
  color: var(--text);
  font-weight: 700;
  background: var(--surface);
  white-space: nowrap;
}

.doc td {
  color: #C4C2D4;
}

/* ---------- Responsif ---------- */

@media (max-width: 480px) {
  body {
    padding: 0 16px 48px;
  }
  .wrap {
    padding-top: 48px;
  }
  .avatar {
    width: 74px;
    height: 74px;
  }
  .avatar img {
    width: 50px;
    height: 50px;
  }
  .brand-name {
    font-size: 22px;
  }
  .link {
    padding: 13px 14px;
  }
  .doc h1 {
    font-size: 23px;
  }
}

/* Hormati preferensi pengguna yang mengurangi animasi. */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
