/* ==========================================================================
   MoneyTalks Nation — design tokens
   Palette: deep-ink green + warm sage paper + coral CTA + gold accent
   Type: Bricolage Grotesque (display) / Manrope (body) / JetBrains Mono (numerals)
   Motif: receipt / ledger — dashed rules, notched cards, chat bubbles
   ========================================================================== */

:root {
  --ink: #16231C;
  --ink-soft: #3A4A3F;
  --paper: #EDEFE4;
  --paper-card: #F8F7EF;
  --coral: #FF5A36;
  --coral-dark: #E2431F;
  --gold: #F2B705;
  --green-deep: #1F6F4A;
  --line: rgba(22, 35, 28, 0.16);
  --line-strong: rgba(22, 35, 28, 0.28);
  --white: #FFFFFF;

  --font-display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --shadow-card: 0 18px 40px -22px rgba(22, 35, 28, 0.35);

  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
a { color: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  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: 12px; top: -60px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius-s);
  z-index: 200;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

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

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn--large { padding: 15px 28px; font-size: 1.02rem; }
.btn--small { padding: 9px 16px; font-size: 0.88rem; }

.btn--coral { background: var(--coral); color: var(--white); }
.btn--coral:hover { background: var(--coral-dark); }

.btn--outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--outline:hover { border-color: var(--ink); }

.btn--ghost { background: transparent; color: var(--ink-soft); border-color: transparent; }
.btn--ghost:hover { color: var(--ink); }

/* ==========================================================================
   Header / nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(237, 239, 228, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand__mark { border-radius: 22%; display: block; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--ink);
}
.brand__word-accent { color: var(--coral); }

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

.site-nav__link {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  margin-right: 28px;
}
.site-nav__link:hover { color: var(--ink); border-bottom-color: var(--line-strong); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle__bar {
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper-card);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 18px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav__link { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav__cta { margin-top: 14px; align-self: flex-start; }
}

/* ==========================================================================
   Add to Home Screen popup
   ========================================================================== */

.a2hs {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(22, 35, 28, 0.001);
  pointer-events: none;
}

.a2hs[hidden] { display: none; }

.a2hs__card {
  pointer-events: auto;
  width: 100%;
  max-width: 380px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  transform: translateY(24px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}

.a2hs.is-visible .a2hs__card {
  transform: translateY(0);
  opacity: 1;
}

.a2hs__close {
  position: absolute;
  top: 12px; right: 14px;
  background: none; border: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}

.a2hs__icon { border-radius: 22%; margin-bottom: 10px; }
.a2hs__title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.a2hs__desc { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 16px; }
.a2hs__actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (min-width: 640px) {
  .a2hs { justify-content: flex-start; align-items: flex-end; padding: 24px; }
  .a2hs__card { margin-left: 4px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { padding: 64px 0 56px; }

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero__title {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  max-width: 14ch;
}

.hero__lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 14px; }
.hero__note { font-size: 0.88rem; color: var(--ink-soft); }

.receipt {
  background: var(--paper-card);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  padding: 26px 22px 22px;
  position: relative;
  transform: rotate(-1.2deg);
  border: 1px solid var(--line);
}

.receipt__notch { height: 0; }

.receipt__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 12px;
}

.receipt__chat { display: flex; flex-direction: column; gap: 10px; min-height: 220px; }

.chat-bubble {
  padding: 12px 15px;
  border-radius: var(--radius-s);
  font-size: 0.94rem;
  line-height: 1.45;
  max-width: 86%;
}
.chat-bubble--user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--paper);
  border-bottom-right-radius: 4px;
}
.chat-bubble--ai {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.chat-typing {
  align-self: flex-start;
  display: none;
  gap: 4px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 12px 15px;
  border-radius: var(--radius-s);
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.chat-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-soft);
  opacity: 0.5;
  animation: mtn-bounce 1s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes mtn-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

/* ==========================================================================
   Trust strip
   ========================================================================== */

.strip {
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
  background: var(--paper-card);
}
.strip__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  padding: 20px 24px;
  justify-content: center;
}
.strip__item {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.strip__num {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--coral);
  font-size: 1.1rem;
}

/* ==========================================================================
   Sections generic
   ========================================================================== */

.section { padding: 76px 0; }
.section--tinted { background: var(--paper-card); }

.section__head { max-width: 640px; margin-bottom: 40px; }
.section__title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section__lede { color: var(--ink-soft); font-size: 1.05rem; }

/* ==========================================================================
   Ledger (features) — receipt line-items, not a card grid
   ========================================================================== */

.ledger { border-top: 1px dashed var(--line-strong); }
.ledger__row {
  padding: 24px 0;
  border-bottom: 1px dashed var(--line-strong);
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 24px;
}
.ledger__title { font-size: 1.15rem; margin-bottom: 0; }
.ledger__desc { color: var(--ink-soft); margin-bottom: 0; }

@media (max-width: 700px) {
  .ledger__row { grid-template-columns: 1fr; gap: 8px; }
}

/* ==========================================================================
   Timeline (how it works) — legitimate sequence
   ========================================================================== */

.timeline { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.timeline__step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  padding-bottom: 36px;
  position: relative;
}
.timeline__step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 25px; top: 52px; bottom: 0;
  width: 1px;
  background: var(--line-strong);
}
.timeline__index {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.timeline__title { font-size: 1.12rem; margin-bottom: 6px; }
.timeline__desc { color: var(--ink-soft); margin-bottom: 0; }

/* ==========================================================================
   Example chat quotes
   ========================================================================== */

.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.quote-bubble {
  margin: 0;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  border-bottom-left-radius: 4px;
  padding: 22px;
  font-size: 1rem;
  color: var(--ink);
}
.quote-bubble p { margin: 0; }

@media (max-width: 860px) {
  .quotes { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta {
  background: var(--ink);
  color: var(--paper);
  padding: 68px 0;
}
.cta__inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cta__title {
  color: var(--paper);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  max-width: 20ch;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq { border-top: 1px dashed var(--line-strong); max-width: 780px; }
.faq__item { border-bottom: 1px dashed var(--line-strong); }
.faq__question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 4px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq__icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  position: relative;
}
.faq__icon::before, .faq__icon::after {
  content: '';
  position: absolute;
  background: var(--ink);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.faq__icon::before { width: 14px; height: 2px; }
.faq__icon::after { width: 2px; height: 14px; transition: transform .15s ease; }
.faq__question[aria-expanded="true"] .faq__icon::after { transform: translate(-50%, -50%) rotate(90deg) scale(0); }

.faq__answer { padding: 0 4px 20px; max-width: 64ch; }
.faq__answer p { color: var(--ink-soft); margin: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 56px 0 24px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 32px;
}
.site-footer .brand__word,
.site-footer .brand__word-accent { color: var(--paper); }
.site-footer .brand__word-accent { color: var(--gold); }
.site-footer__tagline { color: rgba(237, 239, 228, 0.7); margin-top: 12px; font-size: 0.92rem; }
.site-footer__heading {
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--paper);
}
.site-footer__col { display: flex; flex-direction: column; gap: 9px; font-size: 0.92rem; }
.site-footer__col a { text-decoration: none; color: rgba(237, 239, 228, 0.75); }
.site-footer__col a:hover { color: var(--paper); }
.site-footer__fine { color: rgba(237, 239, 228, 0.6); font-size: 0.84rem; margin: 0; }
.site-footer__bottom {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(237, 239, 228, 0.15);
  font-size: 0.82rem;
  color: rgba(237, 239, 228, 0.6);
}
.site-footer__bottom p { margin: 0; }

@media (max-width: 860px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Consultation page (konsultasi.php)
   ========================================================================== */

.consult { padding: 40px 0 60px; }
.consult__wrap { display: flex; justify-content: center; }

.consult__panel {
  width: 100%;
  max-width: 720px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.consult__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px dashed var(--line-strong);
}
.consult__panel-title { display: flex; align-items: center; gap: 10px; }
.consult__panel-title img { border-radius: 22%; }
.consult__panel-name { font-weight: 700; margin: 0; font-size: 0.98rem; }
.consult__panel-status { margin: 0; font-size: 0.8rem; color: var(--ink-soft); }

.consult__messages {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 360px;
  max-height: 52vh;
  overflow-y: auto;
}

.consult__suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 20px 14px;
}
.chip {
  border: 1px solid var(--line-strong);
  background: var(--white);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }

.consult__form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 14px 20px;
  border-top: 1px dashed var(--line-strong);
  background: var(--white);
}
.consult__input {
  flex: 1;
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.96rem;
  max-height: 160px;
  background: var(--paper-card);
}
.consult__input:focus { border-color: var(--ink); outline: none; }
.consult__send { flex-shrink: 0; }

.consult__disclaimer {
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
  padding: 0 20px 18px;
  margin: 0;
}

/* ==========================================================================
   Responsive: hero stack on small screens
   ========================================================================== */

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .receipt { transform: none; max-width: 460px; }
}
