/* Artha landing page stylesheet.
   Palette follows DESIGN.md (app theme tokens): neutral base + one teal accent.
   Contrast verified: body text #0f172a/#475569 on #fff/#f8fafc (>=7.0),
   accent #0e7490 on white 5.36, dark primary #5eead4 on #1e293b 9.89. */

:root,
[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --subtle: #64748b;
  --accent: #0e7490;
  --accent-strong: #155e75;
  --accent-soft: #ecfeff;
  --masuk: #15803d;
  --keluar: #b91c1c;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  --header-bg: rgba(248, 250, 252, 0.92);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-subtle: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --muted: #cbd5e1;
  --subtle: #cbd5e1;
  --accent: #5eead4;
  --accent-strong: #99f6e4;
  --accent-soft: #134e4a;
  --masuk: #4ade80;
  --keluar: #f87171;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 20px -4px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(15, 23, 42, 0.92);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
}

h1, h2, h3 { font-family: "Outfit", "Inter", sans-serif; line-height: 1.2; margin: 0 0 0.75rem; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1rem; }

a { color: var(--accent); }
a:hover { color: var(--accent-strong); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

/* Visible keyboard focus on every interactive element (R-32). */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link: hidden until keyboard focus. */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: var(--r-sm);
  z-index: 100;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

/* Buttons: one accent, rectangular radius (not pill), no arrows (R-08, R-11). */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.35rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-primer { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn-primer { color: #0f172a; }
.btn-primer:hover { background: var(--accent-strong); color: #fff; }
[data-theme="dark"] .btn-primer:hover { background: var(--accent-strong); color: #0f172a; }
.btn-sekunder { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-sekunder:hover { background: var(--accent-soft); color: var(--accent-strong); }
[data-theme="dark"] .btn-sekunder:hover { color: var(--accent); }
.btn-besar { font-size: 1.05rem; padding: 0.85rem 1.8rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--text); font-family: "Outfit", sans-serif; font-weight: 700; font-size: 1.3rem; margin-right: auto; }
.brand-mark { display: inline-flex; }
.brand-kecil { font-size: 1.05rem; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.site-nav a:not(.btn):hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: none; }
.menu-btn { display: none; }

/* Hero: asymmetric two-column (RHYTHM 2), text carries the focal point. */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center; padding: 4rem 1.25rem 3.5rem; }
.hero-sub { font-size: 1.125rem; color: var(--muted); max-width: 34rem; }
.hero-aksi { margin: 1.75rem 0 0.75rem; }
.hero-catatan { font-size: 0.9rem; color: var(--subtle); }

/* Ledger preview card: the one deliberate accent lives on the CTA, not here. */
.ledger {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
}
.ledger-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.ledger-title { font-weight: 700; font-family: "Outfit", sans-serif; }
.segment { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.seg-btn {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 0.85rem; font-weight: 600;
  padding: 0.45rem 0.9rem; cursor: pointer; min-height: 44px;
}
.seg-btn[aria-pressed="true"] { background: var(--accent); color: #fff; }
[data-theme="dark"] .seg-btn[aria-pressed="true"] { color: #0f172a; }
.empty-state { text-align: center; padding: 1.75rem 1rem; color: var(--muted); }
.empty-state svg { color: var(--subtle); }
.empty-title { font-weight: 600; color: var(--text); margin: 0.75rem 0 0.25rem; }
.empty-sub { font-size: 0.9rem; margin: 0; }
.ledger-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ledger-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; border-top: 1px solid var(--border); }
.ledger-list li:first-child { border-top: 0; }
.ledger-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ledger-dot.masuk { background: var(--masuk); }
.ledger-dot.keluar { background: var(--keluar); }
.ledger-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ledger-info strong { font-size: 0.95rem; }
.ledger-info small { color: var(--subtle); font-size: 0.8rem; }
.tag-contoh {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  border: 1px solid var(--border); border-radius: 4px;
  padding: 0 0.35rem; margin-left: 0.25rem; color: var(--subtle);
}
.ledger-nominal { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-nominal.masuk { color: var(--masuk); }
.ledger-nominal.keluar { color: var(--keluar); }
.ledger-caption { font-size: 0.8rem; color: var(--subtle); margin: 0.75rem 0 0; }

/* Sections: varied compositions for RHYTHM 2 (not centered-title-plus-grid everywhere). */
.seksi { padding: 3rem 1.25rem; }
.seksi-head { max-width: 44rem; margin-bottom: 2rem; }
.seksi-head p { color: var(--muted); font-size: 1.05rem; }

/* Spotlight: wide text panel beside a small visual (composition differs from lists below). */
.spotlight {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 2rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm);
}
.spotlight-teks h3 { margin-bottom: 0.5rem; }
.spotlight-teks > p { color: var(--muted); }
.check-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.check-list li { position: relative; padding-left: 1.6rem; color: var(--text); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.42em;
  width: 0.9em; height: 0.5em;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg) translateY(-0.1em);
}
.spotlight-visual { background: var(--surface-subtle); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.25rem; }
.mini-bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; }
.mini-bars span { flex: 1; background: var(--accent); opacity: 0.75; border-radius: 4px 4px 2px 2px; min-height: 8px; }
.mini-caption { font-size: 0.8rem; color: var(--subtle); margin: 0.75rem 0 0; text-align: center; }

/* Feature list: two-column rows with inline icons relevant to each item (R-04). */
.fitur-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fitur-list li {
  display: flex; gap: 0.9rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm);
}
.fitur-list svg { color: var(--accent); flex-shrink: 0; margin-top: 0.15rem; }
.fitur-list strong { display: block; margin-bottom: 0.15rem; }
.fitur-list span span, .fitur-list div span { color: var(--muted); font-size: 0.92rem; }

/* Alur: horizontal timeline on desktop, stacked on mobile.
   Three steps because the app genuinely works that way (register, record, review). */
.alur-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.alur-list li { padding: 1.5rem; position: relative; }
.alur-list li + li { border-left: 1px solid var(--border); }
.alur-no { font-family: "Outfit", sans-serif; font-weight: 800; font-size: 1.6rem; color: var(--accent); display: block; margin-bottom: 0.4rem; }
.alur-list strong { display: block; margin-bottom: 0.3rem; }
.alur-list div span { color: var(--muted); font-size: 0.92rem; }

/* Keamanan: list beside a companion card (different composition again). */
.keamanan-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 1.5rem; align-items: start; }
.keamanan-list { list-style: disc; margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.85rem; color: var(--muted); }
.keamanan-list strong { color: var(--text); }
.keamanan-card { background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.5rem; }
.keamanan-card h3 { margin-bottom: 0.5rem; }
.keamanan-card p { color: var(--muted); font-size: 0.95rem; }

/* FAQ: plain accordion, real questions about how Artha works (R-28). */
.seksi-sempit .seksi-head, .seksi-sempit .faq { max-width: 44rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); margin-bottom: 0.6rem; overflow: hidden; }
.faq-item h3 { margin: 0; font-size: 1rem; font-family: "Inter", sans-serif; }
.faq-item button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: none; border: 0; padding: 1rem 1.2rem; font: inherit; font-weight: 600;
  color: var(--text); cursor: pointer; text-align: left; min-height: 44px;
}
.faq-item button::after { content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--accent); flex-shrink: 0; }
.faq-item.open button::after { content: "\2212"; }
.faq-panel { padding: 0 1.2rem 1.1rem; color: var(--muted); }
.faq-panel p { margin: 0; }

/* Closing CTA: single centered block, distinct from other sections. */
.cta-akhir { text-align: center; max-width: 40rem; }
.cta-akhir p { color: var(--muted); }
.cta-note { font-size: 0.88rem; color: var(--subtle); }

/* Footer: single row of real links only (R-05, R-24). */
.site-footer { border-top: 1px solid var(--border); padding: 1.75rem 0; margin-top: 1rem; }
.footer-inner { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-footer nav a { text-decoration: none; color: var(--muted); font-size: 0.9rem; }
.site-footer nav a:hover { color: var(--text); }
.hak-cipta { margin: 0 0 0 auto; font-size: 0.85rem; color: var(--subtle); }

/* Responsive (R-03): no horizontal overflow, 44px targets, comfortable nav. */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 2.5rem; }
  .spotlight { grid-template-columns: 1fr; }
  .fitur-list { grid-template-columns: 1fr; }
  .alur-list { grid-template-columns: 1fr; }
  .alur-list li + li { border-left: 0; border-top: 1px solid var(--border); }
  .keamanan-grid { grid-template-columns: 1fr; }
  .hak-cipta { margin-left: 0; }
}

@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1rem;
  }
  .site-nav.buka { display: flex; }
  .site-nav a:not(.btn) { padding: 0.7rem 0; border-top: 1px solid var(--border); min-height: 44px; display: flex; align-items: center; }
  .site-nav a:not(.btn):first-child { border-top: 0; }
  .nav-cta { margin-top: 0.75rem; text-align: center; }
  .ledger-nominal { font-size: 0.9rem; }
}

/* Motion dial 1: color transitions only, and none at all when reduced motion is requested. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
