/* =========================================================================
   tos.aixxycode.id
   Halaman ketentuan layanan — gaya korporat, monokrom, satu aksen warna.
   ========================================================================= */

:root {
  /* warna */
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-softer: #fbfcfd;
  --ink: #0f172a;
  --ink-2: #475569;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #edf1f6;
  --accent: #0f62fe;
  --accent-soft: #eff4ff;
  --danger: #b42318;
  --danger-soft: #fef4f2;
  --ok: #067647;
  --ok-soft: #eefaf3;

  /* tipografi */
  --font-head: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  /* ukuran */
  --shell: 1120px;
  --gutter: clamp(20px, 4vw, 32px);
  --head-h: 64px;
  --radius: 10px;
  --radius-sm: 8px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 6px 16px -8px rgba(15, 23, 42, 0.12);
}

/* ---------- dasar ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-head);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

em {
  font-style: italic;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

svg {
  display: block;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

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

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-size: 14px;
}
.skip-link:focus {
  left: 0;
  text-decoration: none;
}

/* ---------- progress baca ---------- */
.read-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 80;
}
.read-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

/* ---------- tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
  text-decoration: none;
}
.btn:active {
  background: #0b1220;
}
.btn--ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}
.btn--ghost:hover {
  background: var(--bg-soft);
  border-color: #cbd5e1;
  color: var(--ink);
}
/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.site-head__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--head-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.logo:hover {
  text-decoration: none;
}
.logo__img {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: cover;
}
.logo__name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.logo__name span {
  color: var(--muted-2);
  font-weight: 500;
}

.site-head__nav {
  display: none;
  gap: 4px;
}
.site-head__nav a {
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-head__nav a:hover {
  background: var(--bg-soft);
  color: var(--ink);
  text-decoration: none;
}
.site-head__nav a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--bg-softer), var(--bg));
  border-bottom: 1px solid var(--line);
  padding: clamp(48px, 7vw, 80px) 0 clamp(40px, 5vw, 60px);
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  letter-spacing: -0.028em;
  max-width: 24ch;
}

.hero__lead {
  margin-top: 20px;
  max-width: 60ch;
  font-size: clamp(16px, 1.6vw, 17.5px);
  color: var(--ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

/* ---------- layout dokumen ---------- */
.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding-block: clamp(40px, 5vw, 64px) clamp(64px, 8vw, 104px);
}

/* daftar isi */
.toc {
  align-self: start;
}
.toc__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
}
.toc nav {
  display: flex;
  flex-direction: column;
}
.toc a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 7px 10px 7px 12px;
  margin-left: -12px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.toc a span {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted-2);
}
.toc a:hover {
  color: var(--ink);
  background: var(--bg-soft);
  text-decoration: none;
}
.toc a.is-active {
  border-left-color: var(--accent);
  color: var(--accent);
  font-weight: 500;
}
.toc a.is-active span {
  color: var(--accent);
}

/* konten */
.content {
  max-width: 760px;
  min-width: 0;
}

.block {
  padding-top: clamp(36px, 4.5vw, 52px);
  border-top: 1px solid var(--line-soft);
}
.block:first-child {
  padding-top: 0;
  border-top: 0;
}
.block + .block {
  margin-top: clamp(36px, 4.5vw, 52px);
}

.block__head {
  margin-bottom: 20px;
}
.block__no {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.block h2 {
  font-size: clamp(21px, 2.6vw, 27px);
}

.block > p {
  font-size: 15.5px;
  max-width: 68ch;
}
.block > p + p,
.block > p + .table-wrap,
.block > p + .steps,
.block > p + .callout,
.block > p + .faq,
.block > p + .contact,
.block > p + .clauses {
  margin-top: 20px;
}

.note-inline {
  margin-top: 22px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  font-size: 14px;
  color: var(--muted);
  max-width: 66ch;
}

/* ---------- keunggulan / fitur ---------- */
.subhead {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 16.5px;
  letter-spacing: -0.01em;
}

.features {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}
.features li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-softer);
  font-size: 14.5px;
  color: var(--ink-2);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.features li:hover {
  border-color: #cbd5e1;
  background: #fff;
}
.features__ico {
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1;
}

/* ---------- tabel ringkasan ---------- */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.rules-table th {
  text-align: left;
  padding: 12px 18px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rules-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  vertical-align: middle;
}
.rules-table tbody tr:last-child td {
  border-bottom: 0;
}
.rules-table td:first-child {
  color: var(--ink);
  font-weight: 500;
}
.rules-table th:last-child,
.rules-table td:last-child {
  width: 190px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 3px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status--no {
  background: var(--danger-soft);
  color: var(--danger);
}
.status--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

/* ---------- klausul bernomor ---------- */
.clauses {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  counter-reset: clause;
}
.clauses > li {
  counter-increment: clause;
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line-soft);
}
.clauses > li:first-child {
  border-top: 0;
  padding-top: 0;
}
.clauses > li::before {
  content: counter(clause, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / span 2;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted-2);
  padding-top: 3px;
}
.clauses h3 {
  grid-column: 2;
  font-size: 16.5px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.clauses p {
  grid-column: 2;
  font-size: 15px;
  max-width: 68ch;
}

/* ---------- tahapan sanksi ---------- */
.steps {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.step {
  padding: 20px 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.step__no {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
}
.step h3 {
  font-size: 15.5px;
  margin-bottom: 6px;
}
.step p {
  font-size: 14px;
}

/* ---------- callout ---------- */
.callout {
  margin-top: 24px;
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout p {
  font-size: 15px;
  max-width: 66ch;
}

/* ---------- faq ---------- */
.faq {
  margin-top: 20px;
}
.faq details {
  border-top: 1px solid var(--line-soft);
}
.faq details:last-child {
  border-bottom: 1px solid var(--line-soft);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-head);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}
.faq summary:hover {
  color: var(--accent);
}
.faq__body {
  padding: 0 0 20px;
}
.faq__body p {
  font-size: 15px;
  max-width: 68ch;
}

/* ---------- kontak ---------- */
.contact {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line-soft);
  max-width: 460px;
}
.contact li {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 13px 18px;
  background: #fff;
  font-size: 14.5px;
}
.contact li span {
  flex: 0 0 96px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 40px 0 44px;
}
.site-foot__inner {
  display: grid;
  gap: 22px;
}
.logo--foot {
  margin-right: 0;
}
.site-foot__brand p {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--muted);
}
.site-foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.site-foot__nav a {
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
}
.site-foot__nav a:hover {
  color: var(--accent);
}
.site-foot__legal {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted-2);
}

/* ---------- tombol ke atas + toast ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.15s ease;
}
.to-top.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.to-top:hover {
  color: var(--ink);
  border-color: #cbd5e1;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  transform: translate(-50%, 160%);
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.05);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.is-on {
  transform: translate(-50%, 0);
}

/* ---------- responsif ---------- */
@media (min-width: 700px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .site-foot__inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .site-foot__legal {
    grid-column: 1 / -1;
  }
}

@media (min-width: 860px) {
  .site-head__nav {
    display: flex;
  }
}

@media (min-width: 1000px) {
  .doc {
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 64px;
    padding-block: 64px 120px;
  }
  .toc {
    position: sticky;
    top: calc(var(--head-h) + 28px);
  }
}

@media (max-width: 999px) {
  .toc {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-soft);
  }
  .toc nav {
    display: grid;
    gap: 2px;
  }
}

@media (max-width: 560px) {
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .rules-table {
    min-width: 0;
    font-size: 13.5px;
  }
  .rules-table th,
  .rules-table td {
    padding: 11px 13px;
  }
  .rules-table th:last-child,
  .rules-table td:last-child {
    width: 124px;
  }
  .status {
    font-size: 11.5px;
    padding: 2px 9px 2px 8px;
  }
  .clauses > li {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }
  .clauses > li::before {
    grid-row: auto;
    padding-top: 0;
  }
  .clauses h3,
  .clauses p {
    grid-column: 1;
  }
  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

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

@media print {
  .site-head,
  .toc,
  .to-top,
  .toast,
  .read-progress,
  .hero__actions {
    display: none;
  }
  body {
    font-size: 11.5pt;
  }
  .block {
    break-inside: avoid;
  }
  .doc {
    display: block;
    padding: 0;
  }
}
