/* ========================================================
   Residensi Madani Mawar — mobile-first funnel styles
   Breakpoints tested against: 360 / 375 / 390 / 412 / 430px
   ======================================================== */

:root {
  --navy: #0b2947;
  --navy-dark: #071d33;
  --gold: #c79a3c;
  --gold-light: #e0b856;
  --maroon: #a3122c;
  --bg: #f7f5f1;
  --card-bg: #ffffff;
  --text: #1c2530;
  --text-muted: #5b6674;
  --border: #e4e1d9;
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  padding-bottom: calc(76px + var(--safe-bottom)); /* room for sticky CTA */
}

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; margin: 0 0 .5em; }

img { max-width: 100%; display: block; }

a { color: inherit; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 24px; border-radius: 999px;
  font-weight: 600; font-size: 17px; text-decoration: none;
  border: none; cursor: pointer; touch-action: manipulation;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-dark);
  box-shadow: 0 8px 20px rgba(199,154,60,.35);
}
.btn-primary:active { transform: scale(.97); }
.btn-large { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; max-width: 1120px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-badge {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-dark); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; color: #fff; }
.brand-text strong { font-size: 14px; white-space: nowrap; }
.brand-text span { font-size: 11px; color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hamburger {
  flex: none; width: 44px; height: 44px; border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer;
}
.hamburger span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.desktop-nav { display: none; }

.mobile-nav {
  position: fixed; top: 0; right: -85%; width: 80%; max-width: 340px; height: 100%;
  background: var(--navy-dark); z-index: 80; padding: 84px 24px 24px;
  display: flex; flex-direction: column; gap: 4px;
  transition: right .25s ease;
  box-shadow: -10px 0 30px rgba(0,0,0,.3);
}
.mobile-nav.open { right: 0; }
.mobile-nav a {
  color: #e9edf3; text-decoration: none; padding: 14px 4px; font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mobile-nav .nav-cta {
  margin-top: 16px; text-align: center; background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-dark); border-radius: 999px; font-weight: 700; border-bottom: none;
}
.nav-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 70;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 55vh; max-height: 70vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,29,51,.25) 0%, rgba(7,29,51,.55) 55%, rgba(7,29,51,.92) 100%);
}
.hero-content { position: relative; z-index: 2; width: 100%; padding: 24px 18px calc(28px); color: #fff; }
.hero-eyebrow { margin: 0 0 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-light); font-weight: 600; }
.hero h1 { font-size: clamp(28px, 8vw, 40px); line-height: 1.1; margin-bottom: 10px; color: #fff; }
.hero-price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; }
.hero-price { font-size: clamp(30px, 10vw, 44px); font-weight: 800; color: var(--gold-light); font-family: 'Poppins', sans-serif; margin: 0; }
.hero-furnished-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-dark); font-weight: 700; font-size: 14px;
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(199,154,60,.4);
}
.hero-tags { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tags li { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); padding: 6px 12px; border-radius: 999px; font-size: 13px; }
.hero .btn { max-width: 420px; }

/* ---------- Sticky CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  background: var(--navy); padding: 10px 14px calc(10px + var(--safe-bottom));
  box-shadow: 0 -6px 20px rgba(0,0,0,.2);
}
.sticky-cta-price { flex: 1; min-width: 0; color: #fff; display: flex; flex-direction: column; line-height: 1.2; }
.sticky-cta-amount { font-weight: 800; font-size: 18px; color: var(--gold-light); }
.sticky-cta-label { font-size: 11px; color: var(--gold-light); font-weight: 700; }
.sticky-cta-btn { flex: none; min-height: 52px; padding: 0 22px; }
.sticky-cta.cta-hidden { display: none; }

/* ---------- Sections ---------- */
.section { padding: 40px 0; }
.section-title { font-size: clamp(26px, 7vw, 34px); color: var(--navy); text-align: center; }
.section-sub { text-align: center; color: var(--text-muted); margin: -8px 0 22px; font-size: 15px; }

/* ---------- Info cards ---------- */
.info-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.info-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 4px;
}
.info-card-value { font-size: 20px; font-weight: 700; color: var(--navy); }
.info-card-label { font-size: 13px; color: var(--text-muted); }
.info-card-price { grid-column: 1 / -1; background: linear-gradient(135deg, var(--navy), var(--navy-dark)); border: none; }
.info-card-price .info-card-value { color: var(--gold-light); font-size: 32px; }
.info-card-price .info-card-label { color: #cbd5e1; }
.info-note { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 16px; }

/* ---------- Highlights ---------- */
.highlights-section { background: #fff; }
.highlight-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.highlight-item {
  display: flex; align-items: center; gap: 10px; background: var(--bg);
  border-radius: var(--radius); padding: 14px; font-size: 14px; font-weight: 500;
}
.highlight-icon { font-size: 22px; flex: none; }

/* ---------- Kelayakan ---------- */
.kelayakan-section { background: var(--navy); color: #fff; }
.kelayakan-section .section-title { color: #fff; }
.kelayakan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.kelayakan-list li {
  position: relative; padding-left: 32px; font-size: 15px; color: #dbe3ee;
}
.kelayakan-list li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--gold);
  color: var(--navy-dark); font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.kelayakan-list strong { color: #fff; }

/* ---------- Floor plan ---------- */
.floorplan-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.floorplan-card {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: #fff; padding: 0; cursor: pointer; width: 100%; text-align: left; display: block;
}
.floorplan-card img { width: 100%; height: auto; object-fit: contain; background: #f1efe9; }
.floorplan-tag { display: block; padding: 12px 14px; font-weight: 600; font-size: 14px; color: var(--navy); }
.site-plan-card { margin-top: 20px; }

/* ---------- Furnish accordion ---------- */
.furnish-section { background: #fff; }
.accordion { display: flex; flex-direction: column; gap: 10px; }
.accordion-item {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 16px; background: var(--bg);
}
.accordion-item summary {
  padding: 14px 4px; font-weight: 600; font-size: 16px; color: var(--navy); cursor: pointer;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after { content: "+"; font-size: 22px; color: var(--gold); font-weight: 700; }
.accordion-item[open] summary::after { content: "\2212"; }
.accordion-item ul { margin: 0; padding: 0 4px 16px 20px; color: var(--text-muted); font-size: 15px; }
.accordion-item li { margin-bottom: 4px; }

/* ---------- Amenities ---------- */
.amenity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.amenity-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
}
.amenity-icon { font-size: 26px; }

/* ---------- Lead form ---------- */
.form-section { background: var(--navy); color: #fff; }
.form-section .section-title { color: #fff; }
.lead-form { display: flex; flex-direction: column; gap: 16px; max-width: 520px; margin: 0 auto; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label, .form-field legend { font-size: 14px; font-weight: 600; color: #e9edf3; padding: 0; }
.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"],
.form-field select {
  min-height: 48px; border-radius: 10px; border: 1px solid #2c4363; background: #0f3358;
  color: #fff; padding: 0 14px; font-size: 16px; width: 100%; font-family: inherit;
}
.form-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) center, calc(100% - 14px) center; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.form-field input::placeholder { color: #8ea1bb; }
.form-field input:focus, .form-field select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.radio-field { border: none; margin: 0; padding: 0; }
.radio-row { display: flex; gap: 10px; }
.radio-pill {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; border: 1px solid #2c4363; border-radius: 10px; background: #0f3358;
  font-size: 15px; cursor: pointer;
}
.radio-pill input { accent-color: var(--gold); width: 18px; height: 18px; }
.radio-pill:has(input:checked) { border-color: var(--gold); background: rgba(199,154,60,.15); }
.field-hint { margin: 2px 0 0; font-size: 12px; color: #9fb0c4; font-weight: 400; }

.checkbox-field { flex-direction: row; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: #dbe3ee; cursor: pointer; }
.checkbox-row input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--gold); }

.form-submit { margin-top: 8px; }

.form-success { max-width: 520px; margin: 24px auto 0; text-align: center; background: #0f3358; border-radius: var(--radius); padding: 24px; }
.form-success p { color: #e9edf3; margin: 0 0 14px; }
.form-success .btn { margin-top: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #9fb0c4; padding: 30px 0 40px; font-size: 12px; }
.footer-project { color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.footer-disclaimer { margin-top: 12px; line-height: 1.6; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(4,12,22,.95); z-index: 200;
  display: none; flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox-toolbar { display: flex; justify-content: flex-end; gap: 8px; padding: 12px; }
.lightbox-toolbar button {
  width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.12);
  color: #fff; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lightbox-viewport { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; touch-action: pan-x pan-y pinch-zoom; -webkit-overflow-scrolling: touch; }
.lightbox-viewport img { max-width: none; width: 100%; transition: width .15s ease; touch-action: pan-x pan-y pinch-zoom; }

/* =========================================================
   TABLET  (>= 600px)
   ========================================================= */
@media (min-width: 600px) {
  .info-cards { grid-template-columns: repeat(3, 1fr); }
  .highlight-grid { grid-template-columns: repeat(3, 1fr); }
  .amenity-grid { grid-template-columns: repeat(4, 1fr); }
  .floorplan-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 56px 0; }
}

/* =========================================================
   DESKTOP  (>= 1024px)
   ========================================================= */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .sticky-cta { display: none; }
  .hamburger { display: none; }
  .desktop-nav { display: flex; align-items: center; gap: 26px; }
  .desktop-nav a { text-decoration: none; color: #e9edf3; font-size: 14px; font-weight: 500; }
  .desktop-nav .nav-cta {
    background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--navy-dark);
    padding: 10px 20px; border-radius: 999px; font-weight: 700;
  }
  .hero { min-height: 620px; max-height: 780px; }
  .hero-content { max-width: 1120px; margin: 0 auto; padding: 40px 40px 64px; }
  .hero .btn { width: auto; }
  .info-cards { grid-template-columns: repeat(6, 1fr); }
  .info-card-price { grid-column: span 2; }
  .highlight-grid { grid-template-columns: repeat(6, 1fr); }
  .amenity-grid { grid-template-columns: repeat(4, 1fr); }
  .floorplan-grid { grid-template-columns: repeat(3, 1fr); }
  .kelayakan-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 32px; }
}
