/* ============================================================
   KitaSiap — Main Stylesheet
   ============================================================ */

/* ── Reset & Root ─────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cream:      #f7f2e8;
  --cream2:     #ede6d3;
  --ink:        #1c160a;
  --orange:     #d9521a;
  --green:      #2d5a3d;
  --muted:      #7a6e5e;
  --warm-white: #faf8f3;
  --border:     #d8cebc;
  --shadow:     4px 4px 0 var(--ink);
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; }

/* ── Modal System ─────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(28,22,10,.72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--warm-white);
  border: 2px solid var(--ink);
  border-radius: 4px;
  max-width: 460px; width: 100%;
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow);
  transform: translateY(16px) scale(.97);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.modal-overlay.active .modal-box { transform: translateY(0) scale(1); }

.modal-tag {
  position: absolute; top: -13px; left: 24px;
  background: var(--orange); color: #fff;
  font-family: 'Caveat', cursive; font-size: .95rem; font-weight: 700;
  padding: 2px 12px; border-radius: 2px;
}

.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 1.3rem;
  cursor: pointer; color: var(--muted); line-height: 1; padding: 4px 8px;
}
.modal-close:hover { color: var(--ink); }

.modal-box h2 {
  font-family: 'Lora', serif; font-size: 1.65rem; font-weight: 600;
  margin-bottom: 20px;
}

/* ── Forms ────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: .78rem; font-weight: 500;
  letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 5px;
}
.field input {
  width: 100%; border: 1.5px solid var(--border); background: #fff;
  padding: 10px 14px; border-radius: 3px;
  font-family: 'DM Sans', sans-serif; font-size: .95rem; color: var(--ink);
  transition: border-color .15s; outline: none;
}
.field input:focus { border-color: var(--orange); }
.field-hint { font-size: .74rem; color: var(--muted); margin-top: 4px; }

.btn-full {
  width: 100%; background: var(--ink); color: var(--cream);
  border: 2px solid var(--ink); padding: 12px;
  font-family: 'Caveat', cursive; font-size: 1.15rem; font-weight: 700;
  border-radius: 2px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  margin-top: 6px;
}
.btn-full:hover:not(:disabled) { background: var(--orange); border-color: var(--orange); transform: translateY(-1px); }
.btn-full:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.modal-switch { text-align: center; margin-top: 16px; font-size: .85rem; color: var(--muted); }
.modal-switch a { color: var(--orange); text-decoration: underline; cursor: pointer; }

.msg-success {
  background: #f0faf4; border: 1.5px solid var(--green);
  border-radius: 3px; padding: 12px 14px;
  font-size: .86rem; color: var(--green);
  margin-bottom: 14px; display: none;
}
.msg-error {
  background: #fef5f2; border: 1.5px solid var(--orange);
  border-radius: 3px; padding: 12px 14px;
  font-size: .86rem; color: #b73e10;
  margin-bottom: 14px; display: none;
}

/* OTP input grid */
.otp-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; margin: 16px 0; }
.otp-grid input {
  border: 1.5px solid var(--border); background: #fff;
  text-align: center; padding: 10px 0;
  font-size: 1.2rem; font-weight: 600;
  border-radius: 3px; outline: none;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .15s;
}
.otp-grid input:focus { border-color: var(--orange); }

.resend-row { font-size: .79rem; color: var(--muted); text-align: center; margin-top: 10px; }
.resend-row button {
  background: none; border: none; color: var(--orange);
  cursor: pointer; font-size: .79rem; font-family: inherit;
  text-decoration: underline;
}
.resend-row button:disabled { opacity: .4; cursor: not-allowed; }

/* ── Nav ──────────────────────────────────────────────── */
nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 48px; border-bottom: 1.5px solid var(--border);
  background: var(--cream); position: sticky; top: 0; z-index: 200;
  transition: box-shadow .2s;
}
nav.scrolled { box-shadow: 0 2px 20px rgba(28,22,10,.08); }

.logo {
  font-family: 'Caveat', cursive; font-size: 1.6rem; font-weight: 700;
  letter-spacing: -.5px; color: var(--ink); text-decoration: none;
}
.logo sup { font-size: .5em; color: var(--orange); font-family: 'DM Sans', sans-serif; font-weight: 500; }

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

.nav-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 2px;
  font-family: 'DM Sans', sans-serif; font-size: .85rem; font-weight: 500;
  cursor: pointer; transition: all .15s; white-space: nowrap; text-decoration: none;
}
.nav-btn.ghost { background: none; border: 1.5px solid var(--border); color: var(--ink); }
.nav-btn.ghost:hover { border-color: var(--ink); background: rgba(28,22,10,.04); }
.nav-btn.fill { background: var(--green); color: #fff; border: none; }
.nav-btn.fill:hover { opacity: .88; transform: translateY(-1px); }
.nav-btn svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }

.user-pill { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 500; }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .78rem;
}
.nav-logout {
  background: none; border: none; font-size: .8rem; color: var(--muted);
  cursor: pointer; text-decoration: underline; font-family: inherit;
}
.nav-logout:hover { color: var(--ink); }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  padding: 80px 48px 60px; max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start;
}
.hero-eyebrow {
  font-size: .75rem; font-weight: 500; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 20px;
}
.hero h1 {
  font-family: 'Lora', serif; font-size: clamp(2.8rem,6.5vw,5.2rem);
  font-weight: 600; letter-spacing: -1.5px;
}
.hero h1 .scribble {
  font-family: 'Caveat', cursive; font-weight: 700;
  color: var(--orange); font-size: 1.15em;
  display: inline-block; transform: rotate(-1.5deg);
}
.hero-sub {
  font-family: 'Lora', serif; font-style: italic; font-size: 1.05rem;
  color: var(--muted); margin-top: 22px; max-width: 520px; line-height: 1.75;
}
.hero-actions { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; align-items: center; }

.btn-main {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--orange); color: #fff; border: 2px solid var(--orange);
  padding: 13px 28px; font-family: 'DM Sans', sans-serif;
  font-weight: 500; font-size: .95rem; border-radius: 2px;
  text-decoration: none; transition: transform .15s, box-shadow .15s; cursor: pointer;
}
.btn-main:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow); }
.btn-main svg { width: 18px; height: 18px; fill: white; flex-shrink: 0; }

.btn-ghost {
  font-family: 'Lora', serif; font-style: italic; font-size: .9rem;
  color: var(--muted); text-decoration: underline; text-underline-offset: 4px;
  background: none; border: none; cursor: pointer;
}
.btn-ghost:hover { color: var(--ink); }

.sticky-note {
  background: #f5e96a; border: 1px solid #ddd060;
  padding: 20px 18px; width: 180px; min-height: 160px;
  font-family: 'Caveat', cursive; font-size: 1rem; line-height: 1.6;
  color: #3a3000; transform: rotate(2.5deg);
  box-shadow: 3px 4px 14px rgba(0,0,0,.12);
  flex-shrink: 0; margin-top: 10px;
}
.sticky-note strong { font-weight: 700; display: block; margin-bottom: 6px; }

.trust-badges { display: flex; gap: 20px; margin-top: 28px; flex-wrap: wrap; }
.badge { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

/* ── Divider ──────────────────────────────────────────── */
.divider { border: none; border-top: 1.5px solid var(--border); margin: 0 48px; }

/* ── Services ─────────────────────────────────────────── */
.section { max-width: 1100px; margin: 0 auto; padding: 72px 48px; }
.section-header { display: flex; align-items: baseline; gap: 16px; margin-bottom: 48px; flex-wrap: wrap; }
.section-header h2 { font-family: 'Lora', serif; font-size: clamp(1.7rem,3.2vw,2.5rem); font-weight: 600; letter-spacing: -.8px; }
.section-header span { font-family: 'Caveat', cursive; color: var(--muted); font-size: 1.2rem; }

.services-list { list-style: none; border-top: 1.5px solid var(--ink); }
.service-row {
  display: flex; align-items: center; gap: 24px;
  padding: 22px 12px; border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent; margin-left: -12px;
  transition: all .15s;
}
.service-row:hover { border-left-color: var(--orange); background: rgba(217,82,26,.04); }
.service-row:hover .row-arrow { opacity: 1; transform: translateX(0); }
.row-num { font-size: .72rem; color: var(--muted); min-width: 28px; font-weight: 500; }
.row-emoji { font-size: 1.35rem; min-width: 32px; text-align: center; }
.row-info { flex: 1; }
.row-info strong { display: block; font-family: 'Lora', serif; font-weight: 600; font-size: 1rem; margin-bottom: 2px; }
.row-info small { font-size: .81rem; color: var(--muted); }
.row-tag { font-size: .7rem; font-weight: 500; letter-spacing: .5px; text-transform: uppercase; padding: 4px 10px; border-radius: 2px; background: var(--cream2); color: var(--muted); white-space: nowrap; }
.row-arrow {
  opacity: 0; transform: translateX(-8px); transition: all .15s;
  background: none; border: none; display: flex; align-items: center; gap: 4px;
  font-size: .8rem; color: var(--orange); white-space: nowrap; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

/* ── Steps ────────────────────────────────────────────── */
.steps-area { background: var(--ink); color: var(--cream); padding: 80px 48px; }
.steps-inner { max-width: 1100px; margin: 0 auto; }
.steps-inner h2 { font-family: 'Lora', serif; font-size: clamp(1.7rem,3.2vw,2.5rem); font-weight: 600; letter-spacing: -.8px; margin-bottom: 56px; color: var(--cream); }
.steps-inner h2 em { font-style: italic; color: #f5e96a; }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); }
.step-item { padding: 0 40px 0 0; border-right: 1px solid #2e2a22; }
.step-item:last-child { border-right: none; padding-right: 0; }
.step-item:not(:first-child) { padding-left: 40px; }
.step-n { font-family: 'Caveat', cursive; font-size: 3.2rem; font-weight: 700; color: var(--orange); line-height: 1; display: block; margin-bottom: 12px; }
.step-item h4 { font-family: 'Lora', serif; font-size: 1.05rem; font-weight: 600; color: var(--cream); margin-bottom: 8px; }
.step-item p { font-size: .85rem; color: #9a9082; line-height: 1.7; }

/* ── Testimonials ─────────────────────────────────────── */
.testi-area { padding: 72px 48px; background: var(--cream2); }
.testi-inner { max-width: 1100px; margin: 0 auto; }
.testi-inner h2 { font-family: 'Lora', serif; font-size: clamp(1.7rem,3.2vw,2.5rem); font-weight: 600; letter-spacing: -.8px; margin-bottom: 36px; }
.testi-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.testi-card { background: var(--warm-white); border: 1.5px solid var(--border); border-radius: 3px; padding: 24px; }
.testi-card::before { content: '\201C'; font-family: 'Lora', serif; font-size: 3rem; color: var(--orange); line-height: .8; display: block; margin-bottom: 8px; }
.testi-card p { font-family: 'Lora', serif; font-style: italic; font-size: .9rem; color: var(--ink); line-height: 1.7; margin-bottom: 14px; }
.testi-author { font-size: .78rem; font-weight: 500; color: var(--muted); }
.testi-stars { color: var(--orange); font-size: .9rem; margin-bottom: 10px; }

/* ── Quote / CTA ──────────────────────────────────────── */
.quote-band { padding: 72px 48px; max-width: 1100px; margin: 0 auto; text-align: center; }
.big-quote { font-family: 'Lora', serif; font-style: italic; font-size: clamp(1.4rem,3vw,2.4rem); font-weight: 400; line-height: 1.4; max-width: 700px; margin: 0 auto 28px; }
.big-quote em { font-weight: 600; font-style: normal; color: var(--orange); }
.quote-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--green); color: #fff; padding: 14px 32px;
  border: none; font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 1rem;
  border-radius: 2px; transition: transform .15s, box-shadow .15s; cursor: pointer;
}
.quote-cta:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow); }
.quote-cta svg { width: 18px; height: 18px; fill: white; flex-shrink: 0; }

/* ── Profile section ──────────────────────────────────── */
.profile-section { display: none; max-width: 1100px; margin: 0 auto; padding: 60px 48px; }
.profile-card { background: var(--warm-white); border: 2px solid var(--ink); border-radius: 4px; box-shadow: var(--shadow); padding: 36px; max-width: 520px; }
.profile-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1.5px solid var(--border); }
.profile-avatar-lg { width: 56px; height: 56px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; font-family: 'Caveat', cursive; font-size: 1.6rem; font-weight: 700; color: #fff; }
.profile-header h3 { font-family: 'Lora', serif; font-size: 1.3rem; font-weight: 600; margin-bottom: 2px; }
.profile-header small { font-size: .8rem; color: var(--muted); }
.verified-badge { display: inline-flex; align-items: center; gap: 4px; background: #f0faf4; border: 1px solid var(--green); border-radius: 2px; padding: 2px 8px; font-size: .72rem; font-weight: 500; color: var(--green); margin-top: 5px; }

/* ── Footer ───────────────────────────────────────────── */
footer { background: var(--cream2); border-top: 1.5px solid var(--border); padding: 32px 48px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
footer .logo { font-size: 1.3rem; }
footer p { font-size: .78rem; color: var(--muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: .78rem; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* ── Live Chat ────────────────────────────────────────── */
.chat-fab { position: fixed; bottom: 24px; right: 24px; z-index: 800; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.chat-bubble { background: var(--ink); color: var(--cream); border-radius: 12px 12px 2px 12px; padding: 8px 14px; font-family: 'Caveat', cursive; font-size: .95rem; font-weight: 500; box-shadow: 3px 3px 0 var(--orange); animation: bubblePop .4s cubic-bezier(.34,1.56,.64,1); white-space: nowrap; }
@keyframes bubblePop { from { transform: scale(.8) translateY(8px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

.chat-toggle { width: 54px; height: 54px; border-radius: 50%; background: #25D366; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 18px rgba(37,211,102,.4); transition: transform .2s; position: relative; }
.chat-toggle:hover { transform: scale(1.07); }
.chat-toggle svg { width: 26px; height: 26px; fill: white; }
.chat-toggle .notif { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; background: var(--orange); border: 2px solid var(--cream); border-radius: 50%; font-size: .55rem; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }

.chat-window { position: fixed; bottom: 90px; right: 24px; width: 320px; background: var(--warm-white); border: 2px solid var(--ink); border-radius: 4px; box-shadow: var(--shadow); z-index: 800; display: none; flex-direction: column; overflow: hidden; max-height: 440px; animation: slideUp .2s ease; }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.chat-window.open { display: flex; }
.chat-head { background: var(--ink); color: var(--cream); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.chat-head-info { display: flex; align-items: center; gap: 10px; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; font-family: 'Caveat', cursive; font-size: 1.1rem; font-weight: 700; color: #fff; }
.chat-head h4 { font-size: .88rem; font-weight: 500; margin-bottom: 1px; }
.chat-head small { font-size: .72rem; color: #9a9082; display: flex; align-items: center; gap: 4px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.5} }
.chat-close-btn { background: none; border: none; color: #9a9082; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.chat-close-btn:hover { color: #fff; }

.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.chat-msg { max-width: 82%; font-size: .83rem; line-height: 1.5; }
.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }
.chat-msg .bubble { padding: 8px 12px; border-radius: 12px; }
.chat-msg.bot .bubble { background: var(--cream2); color: var(--ink); border-radius: 2px 12px 12px 12px; }
.chat-msg.user .bubble { background: var(--green); color: #fff; border-radius: 12px 2px 12px 12px; }
.chat-msg .time { font-size: .67rem; color: var(--muted); margin-top: 3px; padding: 0 2px; }
.chat-msg.user .time { text-align: right; }

.qr-wrap { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.qr-btn { background: none; border: 1px solid var(--border); border-radius: 16px; padding: 5px 12px; font-size: .77rem; color: var(--ink); cursor: pointer; text-align: left; transition: all .15s; font-family: 'DM Sans', sans-serif; }
.qr-btn:hover { border-color: var(--orange); color: var(--orange); background: rgba(217,82,26,.04); }

.chat-input-row { padding: 10px 12px; border-top: 1.5px solid var(--border); display: flex; gap: 8px; }
.chat-input-row input { flex: 1; border: 1.5px solid var(--border); background: #fff; padding: 8px 12px; border-radius: 20px; font-size: .83rem; font-family: 'DM Sans', sans-serif; outline: none; transition: border-color .15s; }
.chat-input-row input:focus { border-color: var(--orange); }
.chat-send { background: var(--orange); border: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: opacity .15s; }
.chat-send:hover { opacity: .85; }
.chat-send svg { width: 16px; height: 16px; fill: white; }

.typing-indicator .bubble { display: flex; align-items: center; gap: 4px; padding: 10px 14px; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typingAnim 1.2s infinite; }
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typingAnim { 0%,80%,100%{transform:translateY(0)}40%{transform:translateY(-4px)} }

/* ── Scroll animate ───────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .5s, transform .5s; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) { .testi-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) {
  nav { padding: 14px 20px; }
  .nav-btn.ghost { display: none; }
  .hero { grid-template-columns: 1fr; padding: 44px 20px 32px; }
  .sticky-note { display: none; }
  .section { padding: 52px 20px; }
  .divider { margin: 0 20px; }
  .steps-area, .testi-area { padding: 56px 20px; }
  .steps-grid { grid-template-columns: 1fr; gap: 0; }
  .step-item { border-right: none; padding: 0 0 28px 0 !important; border-bottom: 1px solid #2e2a22; }
  .step-item:last-child { border-bottom: none; padding-bottom: 0 !important; }
  .testi-grid { grid-template-columns: 1fr; }
  .quote-band { padding: 52px 20px; }
  footer { padding: 22px 20px; flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; gap: 12px; }
  .row-tag { display: none; }
  .row-arrow { opacity: 1; transform: none; }
  .chat-window { width: calc(100vw - 32px); right: 16px; }
  .profile-section { padding: 40px 20px; }
}
