/* CasCus — situs publik (landing + dokumen hukum). Warna diambil dari logo dan aplikasi
   (apps/mobile/src/theme/colors.ts); font sama dengan aplikasi. */

:root {
  --bg: #000;
  --surface: #0f1118;
  --surface-2: #171a24;
  --line: #262a37;
  --ink: #f5f7ff;
  --muted: #a0a6b8;
  --yellow: #fdc114;
  --yellow-ink: #000;
  --blue: #0061fd;
  --blue-light: #7daeff;
  --green: #2fd38a;
  --danger: #ff6b6f;

  --radius: 20px;
  --radius-sm: 12px;
  --wrap: 1120px;
  --gutter: clamp(16px, 5vw, 40px);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

a {
  color: var(--yellow);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--yellow);
  color: var(--yellow-ink);
  padding: 10px 16px;
  border-radius: 10px;
}

/* ── Header ─────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(0 0 0 / 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand img {
  width: 30px;
  height: auto;
}
.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 10px;
}
.nav a:hover {
  color: var(--ink);
}
.nav + .btn {
  margin-left: 8px;
}
@media (max-width: 760px) {
  .nav {
    display: none;
  }
  .site-header .btn {
    margin-left: auto;
  }
}

/* ── Tombol ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  border: 0;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s,
    transform 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--yellow);
  color: var(--yellow-ink);
}
.btn-primary:hover {
  background: #ffd043;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-ghost:hover {
  box-shadow: inset 0 0 0 1.5px var(--muted);
}
.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ── Tipografi bagian ───────────────────────────────────── */

.eyebrow-bars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  margin-bottom: 18px;
}
.eyebrow-bars i {
  width: 5px;
  border-radius: 3px;
  background: var(--blue);
}
.eyebrow-bars i:nth-child(1),
.eyebrow-bars i:nth-child(3) {
  height: 10px;
}
.eyebrow-bars i:nth-child(2) {
  height: 18px;
  background: var(--yellow);
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(40px, 7.2vw, 80px);
  font-weight: 800;
}
h2 {
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 800;
}
h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.lead {
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  max-width: 34em;
}
.hl {
  color: var(--yellow);
}

section {
  padding-block: clamp(64px, 10vw, 120px);
}
.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head p {
  margin: 16px 0 0;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  padding-top: clamp(40px, 7vw, 88px);
  padding-bottom: clamp(56px, 8vw, 96px);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero .lead {
  margin: 24px 0 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
}

/* Contoh percakapan di hero: isinya contoh episode "Memesan kopi" dari aplikasi. */
.chat-demo {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  max-width: 440px;
  justify-self: end;
  width: 100%;
}
@media (max-width: 880px) {
  .chat-demo {
    justify-self: start;
  }
}
.chat-demo::before {
  /* Lengkung "C" dari logo, sebagai bingkai. */
  content: '';
  position: absolute;
  inset: -1px auto auto -1px;
  width: 120px;
  height: 120px;
  border: 10px solid var(--yellow);
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 28px 0 0 0;
  pointer-events: none;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.chat-head img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #0a1a3a;
}
.chat-head strong {
  display: block;
  font-size: 16px;
}
.chat-head span {
  font-size: 13px;
  color: var(--muted);
}
.bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.45;
  margin-bottom: 10px;
}
.bubble small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.8;
}
.bubble.ai {
  background: var(--surface-2);
  border-bottom-left-radius: 6px;
}
.bubble.me {
  background: var(--blue);
  margin-left: auto;
  border-bottom-right-radius: 6px;
}
.word-score {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 14px auto;
  justify-content: flex-end;
}
.word-score span {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: #0e2c20;
  color: var(--green);
}
.word-score span.warn {
  background: #3a2a0c;
  color: var(--yellow);
}
.chat-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.mic {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
}
.mic svg {
  width: 22px;
  height: 22px;
}

/* ── Alur episode ───────────────────────────────────────── */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.steps li {
  padding: 28px 24px 8px 0;
  position: relative;
}
.steps li + li {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.step-no {
  font-size: 14px;
  font-weight: 700;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}
.steps h3 {
  margin: 10px 0 8px;
}
.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.step-meta {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-light);
}
@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .steps li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .steps li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .steps li,
  .steps li + li {
    padding: 24px 0;
    border-left: 0;
  }
  .steps li + li {
    border-top: 1px solid var(--line);
  }
}

/* ── Evaluasi ───────────────────────────────────────────── */

.eval {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.eval .wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 880px) {
  .eval .wrap {
    grid-template-columns: 1fr;
  }
}
.eval-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 14px;
}
.eval-list li {
  display: flex;
  gap: 12px;
  color: var(--muted);
}
.eval-list svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--yellow);
  margin-top: 3px;
}
.eval-list strong {
  color: var(--ink);
  font-weight: 700;
}

.report {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}
.report-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.total {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--v) * 1%), var(--surface-2) 0);
  flex: none;
}
.total span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--bg);
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.report-top p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.report-top strong {
  display: block;
  font-size: 18px;
  color: var(--ink);
}
.bars {
  display: grid;
  gap: 14px;
}
.bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  font-size: 15px;
}
.bar b {
  font-variant-numeric: tabular-nums;
}
.bar .track {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.bar .track i {
  display: block;
  height: 100%;
  width: calc(var(--v) * 1%);
  border-radius: inherit;
  background: var(--blue);
}
.fix {
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 15px;
}
.fix .was {
  color: var(--danger);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.fix .now {
  color: var(--green);
  font-weight: 600;
}
.fix p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.caption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ── Kelas ──────────────────────────────────────────────── */

.levels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: end;
}
.level {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  padding: 16px;
  min-height: calc(90px + var(--i) * 28px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.level:first-child {
  background: var(--yellow);
  color: var(--yellow-ink);
  border-color: var(--yellow);
}
.level b {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.75;
}
.level span {
  font-size: 18px;
  font-weight: 800;
}
.levels-base {
  height: 2px;
  background: var(--line);
}
.levels-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 15px;
}
.levels-note strong {
  color: var(--ink);
}
@media (max-width: 640px) {
  .levels {
    grid-template-columns: 1fr;
  }
  .level,
  .level:first-child {
    min-height: 0;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
  .level:first-child {
    border-color: var(--yellow);
  }
  .levels-base {
    display: none;
  }
}

.langs {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.lang {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
}
.lang.on {
  border-color: var(--blue);
  color: var(--blue-light);
}
.lang.soon {
  color: var(--muted);
}

/* ── Harga ──────────────────────────────────────────────── */

.pricing {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 16px;
}
@media (max-width: 860px) {
  .pricing {
    grid-template-columns: 1fr;
  }
}
.plan {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
  background: var(--surface);
}
.plan.premium {
  border-color: var(--yellow);
}
.plan h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.plan h3 svg {
  width: 22px;
  height: 22px;
  color: var(--yellow);
}
.price {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 14px 0 4px;
  font-variant-numeric: tabular-nums;
}
.price small {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 10px;
  font-size: 15px;
  color: var(--muted);
}
.plan li {
  display: flex;
  gap: 10px;
}
.plan li svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--green);
  margin-top: 2px;
}
.terms {
  margin-top: 22px;
  display: grid;
  gap: 8px;
}
.term {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.term b {
  font-size: 16px;
}
.term .amount {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.term small {
  color: var(--muted);
  font-size: 13px;
}
.term .save {
  color: var(--green);
  font-weight: 700;
  text-align: right;
}
.price-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

/* ── Sekolah ────────────────────────────────────────────── */

.org {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 860px) {
  .org {
    grid-template-columns: 1fr;
  }
}
.org-plans {
  display: grid;
  gap: 12px;
}
.org-plan {
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.org-plan b {
  display: block;
  font-size: 17px;
}
.org-plan span {
  color: var(--muted);
  font-size: 15px;
}
.org-plan .amount {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-weight: 700;
}

/* ── Penutup ────────────────────────────────────────────── */

.closing {
  text-align: center;
}
.closing .wrap {
  display: grid;
  justify-items: center;
}
.closing img {
  width: 180px;
  margin-bottom: 8px;
}
.closing .lead {
  margin: 18px auto 32px;
  text-align: center;
}

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 40px;
  font-size: 15px;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: space-between;
  align-items: center;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ── Dokumen hukum ──────────────────────────────────────── */

.doc {
  padding-top: clamp(40px, 6vw, 72px);
}
.doc .wrap {
  max-width: 760px;
}
.doc h1 {
  font-size: clamp(34px, 5vw, 52px);
}
.doc-meta {
  color: var(--muted);
  font-size: 15px;
  margin: 16px 0 40px;
}
.doc h2 {
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 48px 0 12px;
  scroll-margin-top: 96px;
}
.doc h3 {
  font-size: 18px;
  margin: 28px 0 8px;
}
.doc p,
.doc li {
  color: #d3d7e3;
}
.doc ul,
.doc ol {
  padding-left: 22px;
}
.doc li {
  margin-bottom: 6px;
}
.doc strong {
  color: var(--ink);
}
.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  background: var(--surface);
}
.toc ol {
  margin: 8px 0 0;
  columns: 2;
  column-gap: 32px;
  font-size: 15px;
}
@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
}
.toc a {
  color: var(--ink);
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}
.table-scroll {
  overflow-x: auto;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0;
}
.doc th,
.doc td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.doc th {
  color: var(--ink);
  font-weight: 700;
}
.doc td {
  color: #d3d7e3;
}
/* Di layar sempit, tiap baris tabel ditumpuk: kolom pertama jadi judul. */
@media (max-width: 600px) {
  .doc table,
  .doc tbody,
  .doc tr,
  .doc td {
    display: block;
  }
  .doc thead {
    display: none;
  }
  .doc tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .doc td {
    border: 0;
    padding: 2px 0;
  }
  .doc td:first-child {
    color: var(--ink);
    font-weight: 700;
  }
  .doc td + td {
    color: var(--muted);
  }
}
.callout {
  border-left: 3px solid var(--yellow);
  background: var(--surface);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
}
.callout p {
  margin: 0;
}

/* ── Hapus akun ─────────────────────────────────────────── */

.delete-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 8px;
}
@media (max-width: 760px) {
  .delete-grid {
    grid-template-columns: 1fr;
  }
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
  background: var(--surface);
}
.panel h2 {
  margin-top: 0;
  font-size: 20px;
}
.field {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}
.field label {
  font-weight: 600;
  font-size: 15px;
}
.field input {
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  min-height: 50px;
  padding: 0 14px;
  width: 100%;
}
.field input:focus {
  outline: none;
  border-color: var(--blue-light);
}
.field input[aria-invalid='true'] {
  border-color: var(--danger);
}
.hint {
  font-size: 14px;
  color: var(--muted);
}
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  margin: 18px 0;
  cursor: pointer;
}
.check input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--danger);
  flex: none;
}
.status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
}
.status:empty {
  display: none;
}
.status.error {
  background: #3a1316;
  color: #ffb3b5;
}
.status.ok {
  background: #0e2c20;
  color: #9bf0c6;
}
.btn-danger {
  background: var(--danger);
  color: #000;
}
.btn-danger:hover {
  background: #ff8a8d;
}
.steps-mini {
  padding-left: 20px;
  margin: 12px 0 0;
}
.steps-mini li {
  margin-bottom: 8px;
}

/* ── Gerak ──────────────────────────────────────────────── */

/* Hanya dengan JS (kelas .js di <html>): tanpa JS konten langsung tampil. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 0.6s ease-out,
      transform 0.6s ease-out;
  }
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}
