/* ============================================================
   AhmdAPIs Landing — FULLY MANUAL (tanpa Bootstrap sama sekali)
   Palet biru, modern & elegan. Variabel warna dari theme.css.
   ============================================================ */

/* ---------- Base & layout helpers ---------- */
.container { max-width: 1160px; margin: 0 auto; padding: 0 22px; }
.section { padding-top: 10px; }
.landing-body { margin: 0; overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; background:
  radial-gradient(900px circle at 12% -5%, rgba(37,99,235,.12), transparent 45%),
  radial-gradient(900px circle at 100% 0%, rgba(6,182,212,.10), transparent 45%),
  var(--bg); background-attachment: fixed; }
.landing-body a { text-decoration: none; }
.text-muted-2 { color: var(--text-muted); }

/* ---------- Buttons (manual, premium + efek shine) ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700; font-size: .95rem; letter-spacing: .2px; padding: 12px 22px; border-radius: 14px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; line-height: 1; white-space: nowrap; transition: transform .2s ease, background .25s ease, box-shadow .25s ease, color .2s ease, border-color .2s ease; }
.btn::after { content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); transition: left .6s ease; pointer-events: none; }
.btn:hover::after { left: 140%; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; border-radius: 16px; }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 10px 24px rgba(37,99,235,.35); }
.btn-primary:hover { box-shadow: 0 16px 34px rgba(37,99,235,.5); transform: translateY(-3px); }
.btn-outline { background: rgba(37,99,235,.05); color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; transform: translateY(-3px); box-shadow: 0 12px 26px rgba(37,99,235,.32); }
.btn-icon { width: 46px; height: 46px; padding: 0; border-radius: 14px; background: var(--surface); color: var(--text); border: 1.5px solid var(--border); box-shadow: 0 4px 12px rgba(15,23,42,.06); overflow: hidden; }
.btn-icon:hover { color: #fff; background: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
/* Animasi pergantian ikon bulan <-> matahari saat toggle tema */
#themeToggle i { transition: transform .5s cubic-bezier(.34,1.56,.64,1); }
/* Nama animasi dibedakan per ikon supaya animasi RESTART tiap kali diklik (class berganti) */
#themeToggle i.fa-moon { animation: iconSwapMoon .55s cubic-bezier(.34,1.56,.64,1); }
#themeToggle i.fa-sun { animation: iconSwapSun .55s cubic-bezier(.34,1.56,.64,1); }
@keyframes iconSwapMoon { 0% { transform: rotate(-160deg) scale(.2); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes iconSwapSun { 0% { transform: rotate(160deg) scale(.2); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(0) scale(1); opacity: 1; } }

/* ---------- Navbar ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: var(--glass); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--glass-border); box-shadow: 0 6px 24px rgba(15,23,42,.07); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { font-size: 1.35rem; font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; gap: 9px; letter-spacing: -.3px; transition: opacity .25s ease, transform .25s ease; }
.brand:hover { opacity: .85; transform: translateY(-1px); }
.brand i { color: var(--brand); transition: transform .35s ease; }
.brand:hover i { transform: rotate(-12deg) scale(1.1); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 150px 0 90px; text-align: center; overflow: hidden; }
.hero-glow { position: absolute; inset: 0; background: radial-gradient(650px circle at 50% -10%, rgba(37,99,235,.28), transparent 60%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--glass); border: 1px solid var(--glass-border); color: var(--brand); padding: .5rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.hero-title { font-size: clamp(3rem, 8vw, 6rem); font-weight: 800; letter-spacing: -2px; margin: 18px 0 10px; line-height: 1; }
.hero-sub { font-size: 1.15rem; color: var(--text-muted); max-width: 640px; margin: 0 auto; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Stats grid (angka ATAS, label BAWAH, tinggi seragam) ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: -46px; position: relative; z-index: 2; }
.stat-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 14px 34px rgba(37,99,235,.13); min-height: 172px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 26px 16px; text-align: center; transition: transform .3s ease, box-shadow .3s ease; }
.stat-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--brand-grad); }
.stat-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(37,99,235,.24); }
.stat-num { font-family: "Fira Code", monospace; font-size: 2.6rem; font-weight: 700; line-height: 1; }
/* Angka selalu biru gradient di light & dark (termasuk digit Odometer) */
.stat-num, .stat-num .odometer-value, .stat-num .odometer-digit, .stat-num .odometer-digit-inner, .stat-num .odometer-formatting-mark { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.stat-foot { display: inline-flex; align-items: center; gap: 9px; color: var(--text-muted); font-size: .92rem; font-weight: 600; }
.stat-foot i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(37,99,235,.12); color: var(--brand); font-size: .9rem; }

/* ---------- Section titles ---------- */
.section-title { font-weight: 700; font-size: 1.9rem; text-align: center; margin: 72px 0 26px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.section-title i { color: var(--brand); }

/* ---------- Features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 10px 28px rgba(37,99,235,.09); padding: 28px; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.feature-card:hover { transform: translateY(-8px); box-shadow: 0 22px 44px rgba(37,99,235,.2); border-color: rgba(37,99,235,.35); }
.feature-card h3 { font-size: 1.18rem; margin: 16px 0 6px; }
.feature-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: var(--brand-grad); color: #fff; font-size: 1.45rem; box-shadow: 0 10px 22px rgba(37,99,235,.35); }

/* ---------- Docs / Code (Fira Code + ligatures + radius + padding) ---------- */
.code-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.code-tabs { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
/* Segmented control: 3 tombol jadi 1 grup, indikator geser (slide) */
.code-tabs-left { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.code-tabs-left::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: 9px; background: var(--brand-grad); box-shadow: 0 6px 16px rgba(37,99,235,.35); transition: transform .35s cubic-bezier(.4,0,.2,1); z-index: 0; }
.code-tabs-left:has(.code-tab:nth-child(2).active)::before { transform: translateX(100%); }
.code-tabs-left:has(.code-tab:nth-child(3).active)::before { transform: translateX(200%); }
.code-tab { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: transparent; border: none; color: var(--text-muted); border-radius: 9px; padding: 9px 14px; font-family: "Plus Jakarta Sans", sans-serif; font-size: .85rem; font-weight: 700; cursor: pointer; transition: color .3s ease; }
.code-tab:hover { color: var(--brand); }
.code-tab.active { color: #fff; }
.code-copy { display: inline-flex; align-items: center; gap: 7px; background: var(--brand-grad); color: #fff; border: none; border-radius: 10px; padding: 8px 16px; font-size: .85rem; font-weight: 600; cursor: pointer; transition: transform .2s ease, opacity .2s ease, background .2s ease; }
.code-copy:hover { transform: translateY(-1px); opacity: .92; }
.code-copy.copied { background: #16a34a; }
.code-panels { position: relative; background: #282c34; }
.code-panel { display: none; margin: 0; padding: 20px 22px; overflow-x: auto; }
/* Animasi kode muncul dari atas ke bawah saat ganti tab */
.code-panel.active { display: block; animation: codeIn .4s cubic-bezier(.4,0,.2,1); }
@keyframes codeIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
/* Paksa Fira Code + ligatures ke SEMUA elemen kode (termasuk output Shiki) */
.code-card pre, .code-card code, .code-card .shiki, .code-card .shiki *, .code-panel, .code-panel * { font-family: "Fira Code", "SFMono-Regular", Menlo, monospace !important; font-feature-settings: "liga" 1, "calt" 1; font-variant-ligatures: contextual; }
.code-panel, .code-panel code { font-size: .9rem; line-height: 1.75; }
.code-panel .shiki { background: transparent !important; margin: 0; }
.code-panel code { color: #abb2bf; white-space: pre; display: block; } /* fallback sebelum Shiki load */

/* ---------- Timeline / Roadmap ---------- */
.timeline { max-width: 640px; margin: 0 auto; }
.timeline-item { display: flex; gap: 16px; padding: 14px 0; }
.timeline-item .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--surface-2); border: 3px solid var(--brand-3); margin-top: 5px; flex: none; }
.timeline-item .dot.done { background: var(--brand); border-color: var(--brand); }
.timeline-body h4 { margin: 0 0 4px; font-size: 1.05rem; }
.timeline-body p { margin: 0; }

/* ---------- FAQ (accordion custom, warna match background) ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 6px 18px rgba(15,23,42,.05); transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.faq-item:hover { transform: translateY(-2px); }
.faq-item.open { border-color: var(--brand); box-shadow: 0 12px 30px rgba(37,99,235,.2); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: transparent; border: none; cursor: pointer; padding: 19px 22px; font-family: "Plus Jakarta Sans", sans-serif; font-size: 1.02rem; font-weight: 700; color: var(--text); text-align: left; }
.faq-q > span { display: inline-flex; align-items: center; gap: 10px; }
.faq-q > span i { color: var(--brand); }
.faq-caret { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(37,99,235,.1); color: var(--brand); flex: none; transition: transform .3s ease, background .3s ease, color .3s ease; }
.faq-item.open .faq-caret { transform: rotate(180deg); background: var(--brand); color: #fff; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { margin: 0; padding: 2px 22px 20px; color: var(--text-muted); line-height: 1.7; }

/* ---------- Footer (background biru solid, grid, ikon + teks) ---------- */
/* Footer: warna biru SOLID (tanpa gradient), sosmed polos & kecil */
.footer { position: relative; background: #1e3a8a; color: #fff; margin-top: 70px; padding: 38px 0 20px; }
.footer-inner { position: relative; display: grid; grid-template-columns: 1.5fr 1fr; align-items: center; gap: 26px; }
.footer-logo { font-size: 1.12rem; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.footer-tagline { color: rgba(255,255,255,.8); margin: 8px 0 0; max-width: 360px; font-size: .87rem; line-height: 1.6; }
.footer-social { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; justify-content: flex-end; }
.footer-social a { display: inline-flex; align-items: center; gap: 7px; padding: 0; background: none; border: none; color: rgba(255,255,255,.82); text-decoration: none; font-weight: 600; font-size: .84rem; transition: color .25s ease, transform .25s ease; }
.footer-social a i { font-size: 1rem; }
.footer-social a:hover { color: #fff; transform: translateY(-2px); }
.footer-bottom { position: relative; text-align: center; margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.78); font-size: .8rem; }

/* ---------- Login card (dipakai ulang) ---------- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 22px; }
.login-card { width: 100%; max-width: 400px; margin: 0 auto; }
.login-head { text-align: center; margin-bottom: 20px; }
.login-head h3 { font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .field { display: flex; flex-direction: column; gap: 7px; }
.login-form .field > span { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--text); }
.login-form .field > span i { color: var(--brand); }
.login-form .field input { width: 100%; padding: 12px 15px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid var(--border); color: var(--text); outline: none; transition: border-color .25s ease, box-shadow .25s ease, background .25s ease; }
.login-form .field input:focus { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.login-submit { width: 100%; margin-top: 4px; }
.login-back { text-align: center; margin: 18px 0 0; }
.login-back a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: transform .2s ease; }
.login-back a:hover { transform: translateX(-3px); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); margin-top: 20px; gap: 16px; } /* tak lagi minus & menempel hero */
  .stat-card { min-height: auto; padding: 22px 14px; } /* tinggi mengikuti konten */
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-inner { height: 62px; }
  .nav-actions .btn-primary { display: none; } /* mobile: cukup tombol tema, Dashboard sudah ada di hero */
  .hero { padding: 116px 0 60px; }
  .stats-grid { margin-top: 22px; gap: 14px; row-gap: 14px; } /* jarak atas + antar kartu */
  .stat-card { min-height: auto; padding: 16px 12px; gap: 9px; border-radius: 16px; } /* tinggi pas konten */
  .stat-num { font-size: 2rem; }
  .stat-foot { font-size: .84rem; }
  .section-title { margin: 50px 0 20px; font-size: 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr; }
}