/* ============================================================
   TemanUlangan.my.id — Clean Minimalist Educational Design System
   Primary Blue (#2563EB) + Crisp Neutral Slate & White
   ============================================================ */

:root {
  /* Soft eye-comfort light palette (anti-glare, nyaman dibaca lama) */
  --bg: #F4F6FA;
  --bg-subtle: #ECEFF5;
  --surface: #FCFDFE;
  --surface-muted: #EEF2F7;
  --border: #DCE3EE;
  --border-strong: #C4CFDF;

  --ink: #131B2E;
  --ink-secondary: #3A465C;
  --muted: #606E87;

  --blue: #2563EB;
  --blue-hover: #1D4ED8;
  --blue-soft: #E8F0FE;
  --blue-border: #B8D0FC;

  --green: #059669;
  --green-soft: #E7F8F1;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(19, 27, 46, 0.04);
  --shadow-md: 0 8px 24px rgba(19, 27, 46, 0.06);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

[data-theme="sepia"] {
  /* Warm paper sepia mode — super nyaman untuk mata pelajar di malam hari */
  --bg: #F5EFE2;
  --bg-subtle: #EDE4D3;
  --surface: #FBF8F0;
  --surface-muted: #ECE3D0;
  --border: #DDD2BC;
  --border-strong: #C9BA9E;

  --ink: #2B2418;
  --ink-secondary: #4D4230;
  --muted: #756750;

  --blue: #2457C5;
  --blue-hover: #1D47A3;
  --blue-soft: #E5ECF9;
  --blue-border: #B6C8EE;

  --green: #0E7C5B;
  --green-soft: #E2F2EC;

  --shadow-sm: 0 1px 2px rgba(43, 36, 24, 0.05);
  --shadow-md: 0 8px 24px rgba(43, 36, 24, 0.08);
}

[data-theme="dark"] {
  --bg: #0D111A;
  --bg-subtle: #131926;
  --surface: #171F2E;
  --surface-muted: #1F293B;
  --border: #263146;
  --border-strong: #364561;

  --ink: #EDF2FA;
  --ink-secondary: #C5D0E3;
  --muted: #8E9CB5;

  --blue: #3B82F6;
  --blue-hover: #60A5FA;
  --blue-soft: rgba(59, 130, 246, 0.15);
  --blue-border: rgba(59, 130, 246, 0.36);

  --green: #10B981;
  --green-soft: rgba(16, 185, 129, 0.15);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.38);
}

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

html { scroll-behavior: smooth; }

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

a { color: inherit; }
button, select { font-family: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 18px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-sm { padding: 8px 14px; font-size: 0.86rem; }
.btn-lg { padding: 12px 22px; font-size: 0.95rem; }
.btn-full { width: 100%; }

.btn-primary {
  background: var(--blue);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--blue-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--surface-muted);
  border-color: var(--muted);
}

/* ================= 1. NAVBAR ================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  background: #05050D;
  padding: 6px 12px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid rgba(37, 99, 235, 0.28);
}

.nav-logo {
  height: 28px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--blue); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle, .menu-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle:hover, .menu-toggle:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }

.menu-toggle { display: none; }

.mobile-drawer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 16px 0 20px;
}
.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.drawer-link {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-secondary);
  padding: 6px 0;
}
.drawer-link:hover { color: var(--blue); }
.drawer-cta { margin-top: 4px; }

/* ================= 2. HERO ================= */
.hero {
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.01em;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-lead {
  margin: 0 0 28px;
  font-size: 1.04rem;
  color: var(--ink-secondary);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-metrics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.metric-item {
  display: flex;
  flex-direction: column;
}
.metric-value {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.metric-label {
  font-size: 0.82rem;
  color: var(--muted);
}
.metric-sep {
  width: 1px;
  height: 30px;
  background: var(--border);
}

/* Right Hero Panel */
.hero-panel {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.panel-grade {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.panel-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.panel-desc {
  margin: 0 0 20px;
  font-size: 0.89rem;
  color: var(--ink-secondary);
}

.panel-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  margin-bottom: 8px;
}
.progress-head strong {
  font-family: var(--font-mono);
  color: var(--blue);
}

.progress-bar {
  height: 7px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.panel-sublinks {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.84rem;
  font-weight: 600;
}
.panel-sublinks a {
  color: var(--blue);
  text-decoration: none;
}
.panel-sublinks a:hover { text-decoration: underline; }

/* ================= SECTIONS ================= */
.section {
  padding: 72px 0;
}
.section-tinted {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.section-kicker {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.section-note {
  margin: 0;
  max-width: 400px;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ================= 3. SUBJECTS GRID ================= */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.subject-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.subject-card.is-active {
  border-color: var(--blue-border);
  box-shadow: var(--shadow-sm);
}
.subject-card.is-active:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}

.subject-card.is-soon {
  opacity: 0.86;
  cursor: pointer;
}
.subject-card.is-soon:hover {
  border-color: var(--border-strong);
}

.subject-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.subject-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--ink-secondary);
  display: grid;
  place-items: center;
}
.subject-card.is-active .subject-icon {
  background: var(--blue-soft);
  color: var(--blue);
}

.subject-status {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  color: var(--muted);
}
.subject-card.is-active .subject-status {
  background: var(--green-soft);
  color: var(--green);
}

.subject-card h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.subject-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1;
}

.subject-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.subject-card.is-active .subject-foot {
  color: var(--blue);
}

/* ================= 4. FEATURES ================= */
.feature-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.feature-item {
  padding-top: 18px;
  border-top: 2px solid var(--border);
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.feature-item h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 700;
}

.feature-item p {
  margin: 0;
  font-size: 0.89rem;
  color: var(--ink-secondary);
}

/* ================= 5. PERSIAPAN ULANGAN ================= */
.prep-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  align-items: center;
}

.prep-info h2 {
  margin: 0 0 10px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.prep-desc {
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink-secondary);
}

.prep-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-secondary);
}
.form-field select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 500;
}
.form-field select:focus {
  outline: 2px solid var(--blue);
  border-color: transparent;
}

.prep-submit { margin-top: 4px; }

/* ================= 6. FOOTER ================= */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.footer-logo-wrap {
  display: inline-flex;
  background: #05050D;
  padding: 6px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.footer-logo { height: 26px; width: auto; display: block; }

.footer-tagline {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--ink);
}
.footer-about {
  margin: 0;
  font-size: 0.87rem;
  color: var(--muted);
  max-width: 320px;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-col a {
  text-decoration: none;
  font-size: 0.87rem;
  color: var(--muted);
}
.footer-col a:hover { color: var(--blue); }
.footer-muted { font-size: 0.83rem; color: var(--muted); }

.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ================= TOAST ================= */
.toast-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast-msg {
  background: var(--ink);
  color: var(--bg);
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .subject-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-list { grid-template-columns: repeat(2, 1fr); }
  .prep-box { grid-template-columns: 1fr; padding: 28px; gap: 24px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero { padding: 40px 0 48px; }
  .section { padding: 52px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .subject-grid { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; gap: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .metric-sep { display: none; }
  .hero-metrics { gap: 18px; }
}
