/* ==========================================================================
   GRIYA ASRI — style.css
   Design tokens: Navy (trust) + Amber (premium) + blueprint grid motif
   Heading: Poppins | Body: Inter | Data/Angka: IBM Plex Mono
   ========================================================================== */

:root {
  /* Colors */
  --navy-900: #0F2540;
  --navy-800: #16324F;
  --navy-700: #1E4066;
  --gold-500: #C9974C;
  --gold-600: #B5813A;
  --gold-100: #F4E7CE;
  --wa-green: #25D366;
  --wa-green-dark: #1DAF56;
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --ink-900: #172433;
  --ink-700: #37455A;
  --ink-500: #667085;
  --ink-400: #8894A6;
  --line: #E4E8ED;
  --line-strong: #D3D9E1;
  --success-bg: #E8F8EE;
  --success-ink: #157A45;
  --danger: #C4453A;

  /* Typography */
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Radius / Shadow */
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 10px;
  --shadow-soft: 0 10px 30px rgba(15, 37, 64, 0.08);
  --shadow-card: 0 6px 18px rgba(15, 37, 64, 0.06);
  --shadow-pop: 0 20px 45px rgba(15, 37, 64, 0.16);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
/* PENTING: pastikan atribut [hidden] selalu menang dibanding display:flex/grid
   pada elemen seperti .modal-overlay dan .catalog-grid (perbaikan bug tampilan). */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); color: var(--navy-900); margin: 0; line-height: 1.15; }
p { margin: 0; }
ul, dl { margin: 0; padding: 0; }
input, select, textarea { font-family: inherit; font-size: 15px; }

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

:focus-visible {
  outline: 2.5px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 620px; margin-bottom: 36px; }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-600);
  font-weight: 600;
  margin-bottom: 10px;
}
.section-head h2 { font-size: 28px; font-weight: 700; margin-bottom: 10px; }
.section-desc { color: var(--ink-500); font-size: 15.5px; line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--r-md);
  padding: 13px 22px;
  border: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-lg { padding: 16px 26px; font-size: 16px; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn-primary { background: var(--navy-800); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--navy-900); }
.btn-ghost { background: transparent; color: var(--navy-800); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--navy-700); background: #fff; }
.btn-wa { background: var(--wa-green); color: #fff; box-shadow: 0 10px 24px rgba(37,211,102,0.28); }
.btn-wa:hover { background: var(--wa-green-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 247, 249, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--navy-900); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--navy-900); color: var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.main-nav { display: none; align-items: center; gap: 28px; }
.main-nav a { font-size: 14.5px; font-weight: 500; color: var(--ink-700); transition: color .15s; }
.main-nav a:hover { color: var(--navy-900); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-wa { display: none; }
.nav-toggle {
  width: 40px; height: 40px; border: none; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--navy-900); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.main-nav.open {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  position: absolute; top: 68px; left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 10px 20px 18px; box-shadow: var(--shadow-soft);
}
.main-nav.open a { width: 100%; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 15.5px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy-900);
  overflow: hidden;
  padding: 56px 0 60px;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201,151,76,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,151,76,0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}
.hero-inner { position: relative; display: flex; flex-direction: column; gap: 40px; }
.hero-copy { color: #fff; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold-500); background: rgba(201,151,76,0.12);
  border: 1px solid rgba(201,151,76,0.35);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 20px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); }
.hero h1 {
  color: #fff; font-size: 34px; font-weight: 700; letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.hero-sub { color: #C7D2E0; font-size: 16px; line-height: 1.65; max-width: 520px; margin-bottom: 28px; }
.hero-cta { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px; }
.hero-stats dt { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--gold-500); }
.hero-stats dd { font-size: 12.5px; color: #A9B7CB; margin-top: 2px; }

.hero-panel { position: relative; display: flex; justify-content: center; }
.panel-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  padding: 24px;
  width: 100%;
  max-width: 340px;
  position: relative;
}
.panel-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--gold-600); font-weight: 700; margin-bottom: 16px;
}
.panel-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--ink-500); padding: 7px 0; }
.panel-row strong { font-family: var(--font-mono); color: var(--navy-900); font-weight: 600; font-size: 14.5px; }
.panel-divider { height: 1px; background: var(--line); margin: 8px 0; }
.panel-row--total strong { color: var(--gold-600); font-size: 19px; }
.panel-row--total span { font-weight: 600; color: var(--navy-900); }
.panel-pin {
  margin-top: 16px; display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-500);
  background: var(--bg); border-radius: var(--r-sm); padding: 8px 10px;
}
.panel-pin svg { color: var(--gold-600); flex-shrink: 0; }

/* ---------- Benefits ---------- */
.benefits { padding-top: 48px; padding-bottom: 48px; }
.benefit-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.benefit-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px 22px;
  box-shadow: var(--shadow-card);
}
.benefit-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--gold-100); color: var(--gold-600);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.benefit-card h3 { font-size: 17px; margin-bottom: 8px; }
.benefit-card p { color: var(--ink-500); font-size: 14.5px; line-height: 1.6; }

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px; margin-bottom: 28px;
  box-shadow: var(--shadow-card);
}
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 150px; }
.field-full { flex-basis: 100%; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.field select, .field input, .field textarea {
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 11px 12px; color: var(--ink-900); background: var(--surface);
  transition: border-color .15s;
}
.field select:focus, .field input:focus, .field textarea:focus {
  border-color: var(--navy-700); outline: none;
}
.field-error { font-size: 12.5px; color: var(--danger); }

/* ---------- Catalog ---------- */
.catalog-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.unit-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.unit-card:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.unit-thumb {
  height: 150px; position: relative;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85);
}
.unit-thumb svg { opacity: 0.9; }
.unit-badge {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  padding: 5px 10px; border-radius: 999px; text-transform: uppercase;
}
.badge-subsidi { background: var(--gold-100); color: var(--gold-600); }
.badge-komersil { background: rgba(255,255,255,0.16); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.status-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
}
.status-tersedia { background: var(--success-bg); color: var(--success-ink); }
.status-terbatas { background: #FDF1DC; color: #A6650F; }
.status-habis { background: #F5E5E3; color: var(--danger); }

.unit-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.unit-code { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-400); }
.unit-body h3 { font-size: 16.5px; }
.unit-loc { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-500); }
.unit-specs { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-500); flex-wrap: wrap; }
.unit-price-row { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line-strong); display: flex; align-items: center; justify-content: space-between; }
.unit-price-label { font-size: 11.5px; color: var(--ink-400); }
.unit-price { font-family: var(--font-mono); font-weight: 700; font-size: 16px; color: var(--navy-900); }
.unit-actions { padding: 0 18px 18px; }

.empty-state {
  text-align: center; padding: 48px 20px;
  background: var(--surface); border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-lg); color: var(--ink-500);
}
.empty-icon { font-size: 32px; margin-bottom: 10px; }
.empty-state p { margin-bottom: 6px; font-size: 14.5px; }
.empty-state .btn { margin-top: 14px; }

/* ---------- KPR Simulator ---------- */
.kpr-panel { display: grid; grid-template-columns: 1fr; gap: 18px; }
.kpr-form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 16px;
}
.kpr-note { font-size: 12.5px; color: var(--ink-400); line-height: 1.5; }
input[type="range"] { accent-color: var(--gold-600); width: 100%; height: 30px; }

.kpr-result {
  background: var(--navy-900); border-radius: var(--r-lg);
  padding: 24px; color: #fff; box-shadow: var(--shadow-soft);
  position: relative; overflow: hidden;
}
.kpr-result-empty { text-align: center; padding: 30px 10px; color: #B7C2D3; }
.kpr-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: 14px; color: #C7D2E0; }
.kpr-row strong { font-family: var(--font-mono); font-weight: 600; color: #fff; font-size: 15px; }
.kpr-divider { height: 1px; background: rgba(255,255,255,0.14); margin: 8px 0; }
.kpr-row--total { padding-top: 4px; }
.kpr-row--total span { color: #fff; font-weight: 600; }
.kpr-row--total strong { color: var(--gold-500); font-size: 26px; }
.kpr-disclaimer { font-size: 12px; color: #90A0B7; line-height: 1.5; margin: 14px 0 18px; }

/* ---------- Progress ---------- */
.progress-list { display: flex; flex-direction: column; gap: 14px; }
.progress-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-card);
}
.progress-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.progress-top h3 { font-size: 15.5px; }
.progress-top span { font-size: 12.5px; color: var(--ink-400); }
.progress-pct { font-family: var(--font-mono); font-weight: 700; color: var(--gold-600); font-size: 15px; }
.progress-track { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold-500), var(--gold-600)); border-radius: 999px; transition: width .6s ease; }
.progress-updated { font-size: 12px; color: var(--ink-400); margin-top: 10px; }

/* ---------- Testimonials ---------- */
.testi-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.testi-card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px; margin: 0;
}
.testi-card blockquote { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--ink-700); }
.testi-card figcaption strong { display: block; font-size: 14px; color: var(--navy-900); }
.testi-card figcaption span { font-size: 12.5px; color: var(--ink-500); }

/* ---------- Survey Form ---------- */
.survey-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-card);
}
.survey-form { display: grid; grid-template-columns: 1fr; gap: 16px; }
.survey-success { text-align: center; padding: 30px 10px; }
.success-icon {
  width: 52px; height: 52px; border-radius: 50%; background: var(--success-bg); color: var(--success-ink);
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700;
  margin: 0 auto 14px;
}
.survey-success h3 { font-size: 18px; margin-bottom: 8px; }
.survey-success p { color: var(--ink-500); font-size: 14.5px; margin-bottom: 16px; }

/* ---------- CTA Final ---------- */
.cta-final {
  position: relative; background: var(--navy-900); overflow: hidden;
  padding: 64px 0; text-align: center;
}
.cta-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(201,151,76,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(201,151,76,0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 70% 100% at 50% 50%, black 30%, transparent 85%);
}
.cta-final-inner { position: relative; }
.cta-final h2 { color: #fff; font-size: 26px; margin-bottom: 12px; }
.cta-final p { color: #C7D2E0; font-size: 15.5px; margin-bottom: 26px; max-width: 480px; margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #C7D2E0; padding: 44px 0 0; }
.footer-inner { display: flex; flex-direction: column; gap: 28px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-mark { background: rgba(201,151,76,0.14); color: var(--gold-500); }
.footer-name { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 16px; }
.footer-tag { font-size: 12.5px; color: #90A0B7; margin-top: 2px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: #C7D2E0; }
.footer-links a:hover { color: var(--gold-500); }
.footer-contact p { font-size: 13.5px; margin-bottom: 8px; color: #A9B7CB; }
.footer-contact a { color: var(--gold-500); }
.footer-bottom { padding: 18px 0; }
.footer-bottom p { font-size: 12.5px; color: #7C8CA3; text-align: center; }

/* ---------- Floating WA ---------- */
.fab-wa {
  position: fixed; bottom: 20px; right: 20px; z-index: 70;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--wa-green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(37,211,102,0.4);
  transition: transform .15s;
}
.fab-wa:hover { transform: scale(1.06); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15,37,64,0.55);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
.modal-card {
  background: var(--surface); width: 100%; max-width: 560px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  max-height: 88vh; overflow-y: auto; position: relative;
  box-shadow: var(--shadow-pop);
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-close {
  position: sticky; top: 14px; left: 100%; margin-right: 14px;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--bg); color: var(--ink-700); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transform: translateX(0);
}
.modal-body { padding: 0 22px 26px; margin-top: -34px; }

/* ==========================================================================
   RESPONSIVE — Tablet & Desktop (mobile-first, min-width breakpoints)
   ========================================================================== */
@media (min-width: 640px) {
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .testi-grid { grid-template-columns: repeat(2, 1fr); }
  .survey-form { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 42px; }
  .modal-overlay { align-items: center; padding: 20px; }
  .modal-card { border-radius: var(--r-lg); }
}

@media (min-width: 860px) {
  .main-nav { display: flex; }
  .header-wa { display: inline-flex; }
  .nav-toggle { display: none; }
  .hero-inner { flex-direction: row; align-items: center; }
  .hero-copy { flex: 1; }
  .hero-panel { flex: 1; }
  .hero-cta { flex-direction: row; }
  .hero h1 { font-size: 48px; }
  .benefit-grid { grid-template-columns: repeat(3, 1fr); }
  .catalog-grid { grid-template-columns: repeat(3, 1fr); }
  .testi-grid { grid-template-columns: repeat(3, 1fr); }
  .kpr-panel { grid-template-columns: 1fr 1fr; align-items: start; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .section-head h2 { font-size: 32px; }
  .section { padding: 84px 0; }
}

@media (min-width: 1024px) {
  .hero { padding: 80px 0 90px; }
}
