/* ==========================================================================
   HitungAja — design system
   Satu stylesheet untuk seluruh situs (kalkulator, artikel, halaman legal)
   ========================================================================== */

:root {
  --ink: #0b1220;
  --ink-2: #3d4761;
  --ink-3: #6a748d;
  --line: #e5e8f2;
  --line-2: #eef1f8;
  --bg: #f6f7fb;
  --card: #ffffff;

  --brand: #1650e8;
  --brand-2: #0a2ea8;
  --brand-soft: #eaf0ff;
  --accent: #00b39f;
  --accent-soft: #e2f8f4;
  --amber: #f0a500;
  --danger: #d64545;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, .05), 0 1px 3px rgba(11, 18, 32, .04);
  --shadow-md: 0 10px 30px -12px rgba(11, 18, 32, .18);
  --shadow-lg: 0 24px 60px -28px rgba(11, 18, 32, .35);
  --ff: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.12rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
ul, ol { padding-left: 1.2em; }
strong { color: var(--ink); }

:focus-visible {
  outline: 3px solid rgba(22, 80, 232, .45);
  outline-offset: 2px;
  border-radius: 6px;
}

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 14px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -.03em; font-size: 1.16rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--brand) 0%, #4f7bff 55%, var(--accent) 130%);
  color: #fff; display: grid; place-items: center; font-size: .95rem; font-weight: 800;
  box-shadow: 0 6px 16px -8px rgba(22, 80, 232, .9);
}
.brand small { display: block; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-2); font-weight: 600; font-size: .92rem;
  padding: 9px 12px; border-radius: 10px;
}
.nav a:hover { background: var(--line-2); color: var(--ink); text-decoration: none; }
.nav a.is-active { color: var(--brand); background: var(--brand-soft); }
.nav-toggle {
  margin-left: auto; display: none; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  padding: 9px 13px; border-radius: 10px; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 12px; right: 12px; top: calc(100% + 6px);
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 10px; box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .header-inner { position: relative; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 54px 0 46px;
  background:
    radial-gradient(900px 420px at 8% -10%, #dfe8ff 0%, rgba(223, 232, 255, 0) 62%),
    radial-gradient(760px 420px at 96% 0%, #dff7f2 0%, rgba(223, 247, 242, 0) 60%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-2); background: #fff; border: 1px solid #d7e1ff;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero h1 { margin-bottom: 14px; }
.hero h1 .hl { color: var(--brand); }
.hero .lede { font-size: clamp(1rem, 1.6vw, 1.12rem); color: var(--ink-2); max-width: 620px; }

.search-box {
  position: relative; margin: 26px 0 12px; max-width: 560px;
}
.search-box .ico {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); display: grid; place-items: center; pointer-events: none;
}
.search-box input {
  width: 100%; font: inherit; font-size: 1rem; font-weight: 600;
  padding: 15px 16px 15px 46px; color: var(--ink);
  border: 1px solid #d8deee; border-radius: 14px; background: #fff;
  box-shadow: var(--shadow-sm);
}
.search-box input::placeholder { color: #98a1b6; font-weight: 500; }
.search-box input:focus { border-color: #b9caff; box-shadow: 0 0 0 4px rgba(22, 80, 232, .12); outline: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
  font-size: .83rem; font-weight: 700; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; cursor: pointer; font-family: inherit;
}
.chip:hover { border-color: #b9caff; color: var(--brand); background: #fbfcff; }

/* ---------- Ads ---------- */
.ad-slot {
  margin: 26px 0; min-height: 96px;
  border: 1px dashed #cdd5e8; border-radius: var(--radius-sm);
  background: repeating-linear-gradient(135deg, #fbfcff 0 12px, #f4f6fc 12px 24px);
  display: grid; place-items: center; padding: 14px; text-align: center;
}
.ad-slot .ad-label {
  font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: #9aa4ba; display: block; margin-bottom: 4px;
}
.ad-slot .ad-note { font-size: .78rem; color: #98a1b6; margin: 0; }
.ad-slot[data-filled="true"] {
  border-style: solid; border-color: var(--line); background: #fff; min-height: 0;
}

/* ---------- Sections ---------- */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head p { color: var(--ink-2); margin: 0; max-width: 560px; }
.section-head h2 { margin-bottom: 6px; }
.tag {
  font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); display: block; margin-bottom: 6px;
}

/* ---------- Tool grid ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tool-grid { grid-template-columns: 1fr; } }

.tool-card {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.tool-card:hover {
  text-decoration: none; transform: translateY(-2px);
  border-color: #c9d5f8; box-shadow: var(--shadow-md);
}
.tool-card .tc-ico {
  flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.2rem; background: var(--brand-soft);
}
.tool-card .tc-body { min-width: 0; }
.tool-card h3 { margin: 0 0 3px; font-size: 1rem; }
.tool-card p { margin: 0; font-size: .855rem; color: var(--ink-3); line-height: 1.5; }
.tool-card .tc-go { margin-left: auto; align-self: center; color: #b8c2da; font-weight: 800; }
.tool-grid > .is-hidden { display: none; }

/* Varian 3 kolom yang tetap responsif (jangan pakai inline style,
   karena inline style mengalahkan media query dan bikin overflow di HP) */
.tool-grid--three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .tool-grid--three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tool-grid--three { grid-template-columns: 1fr; } }
.empty-note {
  display: none; padding: 22px; text-align: center; color: var(--ink-3);
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); font-size: .92rem;
}
.empty-note.is-visible { display: block; }

/* ---------- Calculator shell ---------- */
.calc-wrap { padding: 30px 0 10px; }
.breadcrumb { font-size: .82rem; color: var(--ink-3); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb span { color: #b6bfd2; margin: 0 6px; }
.page-head h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin-bottom: 8px; }
.page-head p { color: var(--ink-2); max-width: 660px; }

.calc-shell {
  display: grid; grid-template-columns: 1.08fr .92fr; gap: 16px;
  margin: 22px 0 8px; align-items: start;
}
@media (max-width: 900px) { .calc-shell { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.05rem; }
.card-head .pill {
  margin-left: auto; font-size: .7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); background: var(--accent-soft); padding: 4px 9px; border-radius: 999px;
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: .82rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field .row2 { display: grid; grid-template-columns: 1fr 160px; gap: 8px; }
input[type="number"], input[type="text"], input[type="email"], input[type="date"], select {
  width: 100%; font: inherit; font-size: .95rem; font-weight: 600; color: var(--ink);
  padding: 11px 13px; background: #fff; border: 1px solid #d9dfee; border-radius: var(--radius-sm);
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236a748d' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 34px;
}
input:focus, select:focus { outline: none; border-color: #b9caff; box-shadow: 0 0 0 4px rgba(22, 80, 232, .1); }
.hint { display: block; font-size: .76rem; color: var(--ink-3); margin-top: 5px; font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 22px -14px rgba(22, 80, 232, 1); }
.btn-primary:hover { background: var(--brand-2); text-decoration: none; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--line-2); text-decoration: none; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------- Result panel ---------- */
.result-empty { color: var(--ink-3); font-size: .9rem; margin: 0; }
.result-hero {
  background: linear-gradient(150deg, #0f2c7a 0%, var(--brand) 60%, #2f6cff 100%);
  color: #fff; border-radius: 16px; padding: 20px; margin-bottom: 14px; position: relative; overflow: hidden;
}
.result-hero::after {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  right: -80px; top: -110px; background: rgba(0, 179, 159, .32); filter: blur(6px);
}
.result-hero .rh-label { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #c3d2ff; margin: 0 0 4px; }
.result-hero .rh-value { font-size: clamp(1.6rem, 4.2vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; margin: 0; line-height: 1.15; }
.result-hero .rh-sub { font-size: .84rem; color: #d5dfff; margin: 6px 0 0; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 12px; }
.stat {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; background: #fdfdff;
}
.stat .s-label { font-size: .73rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; display: block; }
.stat .s-value { font-size: 1.08rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.stat.is-accent { background: var(--accent-soft); border-color: #bfeee7; }
.stat.is-accent .s-value { color: #067a6c; }
.stat.is-warn { background: #fff8e6; border-color: #f6e2ad; }
.stat.is-warn .s-value { color: #9a6b00; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { padding: 9px 11px; text-align: right; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { background: #f8f9fd; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 800; }
tbody tr:last-child td { border-bottom: 0; }
tbody td { font-weight: 600; color: var(--ink-2); }
tbody td strong { color: var(--ink); }

.note {
  font-size: .8rem; color: var(--ink-3); background: #f8f9fd; border-left: 3px solid #d5deef;
  padding: 10px 12px; border-radius: 0 10px 10px 0; margin: 14px 0 0;
}
.note strong { color: var(--ink-2); }

/* chart */
.chart-box { position: relative; height: 240px; margin-top: 6px; }

/* ---------- Prose / article ---------- */
.prose { font-size: .97rem; color: var(--ink-2); }
.prose h2 { font-size: 1.3rem; color: var(--ink); margin-top: 1.7em; }
.prose h3 { color: var(--ink); margin-top: 1.3em; font-size: 1.03rem; }
.prose li { margin-bottom: .4em; }
.prose table { font-size: .85rem; margin: 14px 0; }
.prose table td, .prose table th { text-align: left; }

.article-grid { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .article-grid { grid-template-columns: 1fr; } }
.sidebar { position: sticky; top: 84px; }
.sidebar .card { padding: 16px; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li + li { border-top: 1px solid var(--line-2); }
.link-list a { display: flex; gap: 8px; align-items: center; padding: 9px 0; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.link-list a:hover { color: var(--brand); text-decoration: none; }

/* ---------- FAQ ---------- */
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 9px;
}
.faq details[open] { border-color: #cdd9f6; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-weight: 700; font-size: .95rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 800; color: var(--brand); font-size: 1.1rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; font-size: .9rem; color: var(--ink-2); }

/* ---------- CTA band + newsletter ---------- */
.cta-band {
  margin: 34px 0 10px; padding: 30px;
  border-radius: 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #0b1f57 0%, #1c3fbd 55%, #1650e8 100%);
}
.cta-band::before {
  content: ""; position: absolute; inset: auto -60px -120px auto; width: 320px; height: 320px;
  background: radial-gradient(circle at center, rgba(0, 179, 159, .55), transparent 65%);
}
.cta-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; }
@media (max-width: 760px) { .cta-grid { grid-template-columns: 1fr; } }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: #cdd9ff; margin-bottom: 0; font-size: .94rem; }
.lead-form { display: flex; gap: 8px; flex-wrap: wrap; }
.lead-form input {
  flex: 1 1 190px; min-width: 0; font: inherit; font-size: .92rem; font-weight: 600;
  padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .12); color: #fff;
}
.lead-form input::placeholder { color: #a9baf0; }
.lead-form input:focus { outline: none; background: rgba(255, 255, 255, .2); border-color: #8fb0ff; }
.lead-form .btn { background: #fff; color: var(--brand-2); }
.lead-form .btn:hover { background: #eaf0ff; }
.form-msg { font-size: .82rem; margin: 8px 0 0; min-height: 1.2em; color: #c9f6ef; }
.form-msg.is-error { color: #ffd9d9; }

/* ---------- Footer ---------- */
.site-footer { background: #0b1220; color: #aab4c8; padding: 44px 0 26px; margin-top: 44px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; margin-bottom: 10px; }
.site-footer h4 { color: #fff; font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #aab4c8; font-size: .87rem; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-about { font-size: .87rem; max-width: 290px; color: #8d99b0; }
.footer-bottom {
  margin-top: 28px; padding-top: 16px; border-top: 1px solid #1d2739;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-size: .8rem; color: #7d89a2;
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 14px; }
.mb-0 { margin-bottom: 0; }
.text-mono { font-variant-numeric: tabular-nums; }
.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;
}
