/* =========================================================
   Internet Rumah XL — template sales
   Mobile-first. Warna mengacu pada brosur promo.
   ========================================================= */

:root {
  --navy-950: #061538;
  --navy-900: #0a1f55;
  --navy-800: #0b2a6f;
  --navy-700: #163a8c;
  --navy-100: #e6ecf8;
  --cyan-400: #2fd0dd;
  --cyan-500: #10b4c6;
  --teal-700: #0b6f7d;
  --teal-50: #e7f8fa;
  --purple-700: #5b21b6;
  --purple-600: #6d28d9;
  --purple-50: #f3edff;
  --green-700: #15803d;
  --green-800: #166534;
  --gray-500: #6b7280;
  --bg: #f4f7fc;
  --surface: #ffffff;
  --text: #0f1b33;
  --muted: #4a5878;
  --line: #dbe3f0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 31, 85, .06), 0 8px 24px rgba(10, 31, 85, .07);
  --header-h: 64px;
  --bar-h: 72px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  scroll-padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px) + 12px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  /* ruang khusus untuk bar kontak di bawah layar */
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
}

img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; color: var(--navy-900); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--navy-700); }

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Penanda demo ---------- */
.demo-bar {
  background: #fff4d6;
  color: #5c4100;
  font-size: .875rem;
  text-align: center;
  padding: 8px 20px;
  border-bottom: 1px solid #f1d98a;
}
.demo-bar[hidden] { display: none; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-wa { background: var(--green-700); color: #fff; }
.btn-wa:hover { background: var(--green-800); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-outline:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; padding: 14px 26px; font-size: 1.0625rem; }
.wa-icon { width: 22px; height: 22px; fill: currentColor; flex: none; }

/* Status: nomor sales belum diatur */
.is-unset,
.is-unset:hover {
  background: #e5e9f0;
  color: #3b4660;
  border-color: #c7cfdc;
  cursor: not-allowed;
}
.btn-outline.is-unset { background: #e5e9f0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: var(--header-h);
  gap: 8px 16px;
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  min-width: 0;
}
.logo-mark {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: .02em;
  color: var(--navy-800);
  border: 2px solid var(--navy-800);
  border-radius: 8px;
  padding: 2px 8px;
}
.logo-sub { font-size: .9375rem; font-weight: 600; color: var(--teal-700); }

.menu-toggle { display: none; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--navy-900);
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}
.site-nav a:hover { background: var(--navy-100); }

/* Menu HP (hanya bila JavaScript aktif) */
@media (max-width: 899px) {
  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--navy-900);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }
  .menu-icon,
  .menu-icon::before,
  .menu-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
    transition: transform .2s, background-color .2s;
  }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -6px; }
  .menu-icon::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

  .js .site-nav {
    display: none;
    width: 100%;
    padding: 4px 0 14px;
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 2px; }
  .js .site-nav a { display: flex; width: 100%; padding: 0 12px; }

  /* tanpa JavaScript: menu tampil sebagai baris yang membungkus */
  .site-nav { width: 100%; padding-bottom: 8px; }
}

/* HP sangat sempit (mis. 360px): tombol menu hanya ikon agar logo dan tombol
   tetap satu baris. Teks "Menu"/"Tutup" tetap dibacakan pembaca layar. */
@media (max-width: 379px) {
  .js .menu-toggle { width: 48px; padding: 0; justify-content: center; }
  .menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- Pembuka ---------- */
.hero {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(47, 208, 221, .22) 0%, rgba(47, 208, 221, 0) 55%),
    linear-gradient(160deg, var(--navy-800) 0%, var(--navy-950) 100%);
  color: #fff;
  padding: 48px 0 56px;
}
.hero-inner { display: grid; gap: 32px; }
.hero .eyebrow { color: var(--cyan-400); }
.hero h1 {
  color: #fff;
  font-size: clamp(1.875rem, 6.5vw, 3.125rem);
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 10px 0 16px;
  text-wrap: balance;
}
.hero-lead { font-size: 1.0625rem; color: #d7e2f7; max-width: 34em; }
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.hero-card {
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .18);
}
.hero-card-title { font-size: .875rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hero-prices { margin: 12px 0 0; display: grid; gap: 10px; }
.hero-price {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border-left: 4px solid var(--cyan-500);
  background: var(--teal-50);
}
.hero-price--fiber { border-left-color: var(--purple-600); background: var(--purple-50); }
.hero-price dt { font-size: .875rem; font-weight: 600; color: var(--muted); }
.hero-price dd { margin: 2px 0 0; font-size: 1.5rem; font-weight: 800; color: var(--navy-900); }
.hero-price dd small { font-size: .875rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.hero-card-note { margin-top: 12px; font-size: .875rem; color: var(--muted); }

/* ---------- Bagian umum ---------- */
.section { padding: 56px 0; }
.section--tint { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.5rem, 5vw, 2.125rem); font-weight: 800; margin: 6px 0 10px; text-wrap: balance; }
.section-head p:not(.eyebrow) { color: var(--muted); }
.eyebrow {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal-700);
}

/* ---------- Pemilih kategori ---------- */
.tabs {
  display: none; /* hanya tampil bila JavaScript aktif */
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  max-width: 560px;
  margin-bottom: 24px;
}
.js .tabs { display: grid; }
.tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 60px;
  padding: 10px 14px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--navy-900);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tab:hover { background: var(--navy-100); }
.tab-name { font-weight: 800; font-size: 1.0625rem; }
.tab-sub { font-size: .8125rem; color: var(--muted); line-height: 1.3; }
.tab[aria-selected="true"] { background: var(--navy-800); color: #fff; }
.tab[aria-selected="true"] .tab-sub { color: #cfdcf5; }
.tab[data-category="fiber"][aria-selected="true"] { background: var(--purple-700); }
.tab[data-category="fiber"][aria-selected="true"] .tab-sub { color: #e7dcfb; }

/* ---------- Panel & kartu paket ---------- */
.panel + .panel { margin-top: 40px; }
.js .panel + .panel { margin-top: 0; }
.panel[hidden] { display: none; }
.panel:focus-visible { outline-offset: 6px; }
.panel-head { margin-bottom: 18px; }
.panel-head h3 { font-size: 1.25rem; font-weight: 800; }
.panel-head p { color: var(--muted); margin-top: 4px; }

.package-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--cyan-500);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.panel--fiber .package-card { border-top-color: var(--purple-600); }
.pkg-cat {
  align-self: flex-start;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--teal-700);
}
.panel--fiber .pkg-cat { background: var(--purple-50); color: var(--purple-700); }
.pkg-speed { margin-top: 12px; font-size: 1.125rem; font-weight: 700; color: var(--navy-900); }
.pkg-upto { display: block; font-size: .875rem; font-weight: 600; color: var(--muted); }
.pkg-num { font-size: 2.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.pkg-price {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--navy-800);
}
.pkg-price small { font-size: .9375rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.pkg-tax { font-size: .875rem; color: var(--muted); margin: 2px 0 18px; }
.package-card .btn { margin-top: auto; }

.terms {
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan-500);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.panel--fiber .terms { border-left-color: var(--purple-600); }
.terms h4 { font-size: 1rem; margin-bottom: 8px; }
.terms ul { list-style: none; display: grid; gap: 6px; }
.terms li { position: relative; padding-left: 26px; }
.terms li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .45em;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--teal-700);
  border-bottom: 2.5px solid var(--teal-700);
  transform: rotate(-45deg);
}
.panel--fiber .terms li::before { border-color: var(--purple-700); }

/* Pemberitahuan saat data paket/FAQ belum dapat dimuat */
.load-notice {
  background: #fff;
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  color: var(--muted);
}
.load-notice-title { color: var(--navy-900); font-weight: 700; margin-bottom: 4px; }
.load-notice--compact { margin-top: 12px; padding: 14px 16px; font-weight: 600; }
.load-notice[hidden],
.hero-prices[hidden],
.js .tabs[hidden] { display: none; }

.promo-note {
  margin-top: 24px;
  font-size: .9375rem;
  color: var(--muted);
  max-width: 720px;
}

/* ---------- Perbedaan ---------- */
.compare { display: grid; gap: 14px; }
.compare-card {
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.compare-card h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.compare-card h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--cyan-500); }
.compare-card--fiber h3::before { background: var(--purple-600); }
.compare-card p + p { margin-top: 10px; }
.compare-fit { color: var(--muted); font-size: .9375rem; }
.compare-note { margin-top: 20px; color: var(--muted); }

/* ---------- Area ---------- */
.area-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  justify-items: start;
}
.area-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.area-list[hidden], .area-empty[hidden] { display: none; }
.area-list li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--navy-100);
  color: var(--navy-900);
  font-weight: 600;
}
.area-empty {
  padding: 14px 16px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 600;
  width: 100%;
}

/* ---------- Tahapan ---------- */
.steps { list-style: none; display: grid; gap: 14px; counter-reset: none; }
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
}
.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy-800);
  color: #fff;
  font-weight: 800;
}
.step h3 { font-size: 1.125rem; margin-bottom: 4px; }
.step p { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--navy-900);
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--navy-700);
  border-bottom: 2.5px solid var(--navy-700);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details p { padding: 0 18px 16px; color: var(--muted); }

/* ---------- Kontak / sales ---------- */
.section--dark {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-950));
  color: #fff;
}
.contact-inner { display: grid; gap: 28px; align-items: center; }
.sales-card { display: flex; gap: 16px; align-items: center; min-width: 0; }
.sales-info { min-width: 0; }
.sales-info h2 { color: #fff; font-size: 1.5rem; overflow-wrap: anywhere; }
.sales-role { color: var(--cyan-400); font-weight: 600; }
.sales-note { color: #d7e2f7; margin-top: 6px; }
.sales-note[hidden] { display: none; }
.contact-cta p { color: #d7e2f7; margin-bottom: 14px; }
.contact-cta .btn { width: 100%; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: #b9c6e0;
  font-size: .875rem;
  padding: 28px 0;
}
.footer-inner { display: grid; gap: 8px; }
.footer-brand { color: #fff; font-weight: 700; }
.footer-copy { color: #8d9cbc; }

/* ---------- Bar kontak bawah ----------
   Bar menempel di bawah layar. Tingginya --bar-h, dan body diberi
   padding-bottom yang sama sehingga konten terakhir selalu bisa digulir
   ke atas bar. scroll-padding-bottom membuat fokus keyboard dan lompatan
   menu tidak berhenti di belakang bar. */
.contact-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(10, 31, 85, .08);
}
.contact-bar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}
.contact-bar-text {
  display: none;
  color: var(--navy-900);
  font-weight: 600;
  min-width: 0;
}
.contact-bar-btn { width: 100%; }

@media (min-width: 560px) {
  .contact-bar-inner { justify-content: space-between; }
  .contact-bar-text { display: block; }
  .contact-bar-btn { width: auto; flex: none; }
}

/* ---------- Notifikasi ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 60;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--navy-950);
  color: #fff;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.toast[hidden] { display: none; }

/* =========================================================
   Layar lebih lebar
   ========================================================= */
@media (min-width: 560px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-cta .btn { width: auto; }
}

@media (min-width: 768px) {
  .section { padding: 72px 0; }
  .compare { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-inner { grid-template-columns: 1.2fr 1fr; }
  .contact-cta { justify-self: end; }
}

@media (min-width: 900px) {
  .header-inner { flex-wrap: nowrap; }
  .site-nav { width: auto; padding: 0; }
  .hero { padding: 80px 0 88px; }
  .hero-inner { grid-template-columns: 1.35fr 1fr; align-items: center; gap: 56px; }
  .package-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panel--fwa .package-grid { grid-template-columns: minmax(0, 360px); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .step { flex-direction: column; }
  .area-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .area-inner .section-head { margin-bottom: 0; }
}
