/* ==========================================================================
   Executive Partner — custloyalty.prestisa.net
   Token-driven, mobile-first. Warna brand diambil dari properti Prestisa
   yang sudah jalan (#B52171), bukan palet baru, supaya halaman ini tidak
   terasa seperti situs pihak ketiga.
   ========================================================================== */

:root {
  /* brand */
  --brand: #B52171;
  --brand-deep: #8E1A59;
  --brand-soft: #FDF2F8;
  --brand-line: #F3D3E4;
  --gold: #96620A;          /* aksen "uang" — 5.19:1 di putih, 4.91:1 di gold-soft */
  --gold-soft: #FFF8EC;
  --wa: #0A7F72;
  --wa-deep: #086A5F;

  /* surface & teks */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #FBF7F9;
  --ink: #1B1420;
  --ink-2: #5A4F5C;
  --line: #ECE4EA;

  /* radius & elevasi */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --e-1: 0 1px 2px rgba(27, 20, 32, .06), 0 1px 3px rgba(27, 20, 32, .04);
  --e-2: 0 4px 12px rgba(27, 20, 32, .07), 0 2px 4px rgba(27, 20, 32, .04);
  --e-3: 0 12px 32px rgba(142, 26, 89, .14);

  /* spasi: kelipatan 4 */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 88px;

  /* tipografi */
  --f-head: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-body: 'Work Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --wrap: 1120px;
  --dur: 220ms;
  --ease: cubic-bezier(0.2, 0.8, 0.3, 1);

  /* z-index berjenjang */
  --z-sticky: 40;
  --z-bar: 50;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14101A;
    --surface: #1C1622;
    --surface-2: #231B2B;
    --ink: #F6F1F6;
    --ink-2: #BCAEC0;
    --line: #342B3C;
    --brand: #E86FAE;        /* dinaikkan luminansinya; #B52171 tidak terbaca di gelap */
    --brand-deep: #F49AC8;
    --brand-soft: #2A1C26;
    --brand-line: #45283A;
    --gold: #F0B34A;
    --gold-soft: #2B2317;
    --wa: #3FBFAE;
    --wa-deep: #6FD3C5;
    --e-1: 0 1px 2px rgba(0, 0, 0, .4);
    --e-2: 0 4px 14px rgba(0, 0, 0, .45);
    --e-3: 0 12px 32px rgba(0, 0, 0, .55);
  }
}

/* ---------- dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--f-head); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(30px, 7vw, 54px); font-weight: 700; }
h2 { font-size: clamp(25px, 4.6vw, 38px); font-weight: 650; }
h3 { font-size: clamp(19px, 2.6vw, 22px); font-weight: 600; }
p { margin: 0; }
strong, b { font-weight: 650; }

a { color: inherit; }
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--s-4); }
@media (min-width: 768px) { .wrap { padding-inline: var(--s-6); } }

section { padding-block: var(--s-7); }
@media (min-width: 768px) { section { padding-block: var(--s-9); } }

.lede { color: var(--ink-2); font-size: clamp(16px, 2.2vw, 19px); max-width: 60ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--f-head); font-size: 13px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  padding: 6px 14px; border-radius: var(--r-pill);
}
.eyebrow svg { width: 15px; height: 15px; }

/* ---------- tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 52px; padding: var(--s-3) var(--s-5);
  font-family: var(--f-head); font-size: 17px; font-weight: 600;
  border: 0; border-radius: var(--r-pill);
  text-decoration: none; cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--e-3); }
.btn--primary:hover { background: var(--brand-deep); }
.btn--wa { background: var(--wa); color: #fff; box-shadow: var(--e-2); }
.btn--wa:hover { background: var(--wa-deep); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line); box-shadow: none;
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn:active { transform: scale(.98); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn--primary,
  :root:not([data-theme="light"]) .btn--wa { color: #14101A; }
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--surface); color: var(--brand);
  padding: var(--s-3) var(--s-4); border-radius: 0 0 var(--r-sm) 0;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.site-head__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); min-height: 60px;
}
.brandmark {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--f-head); font-weight: 700; font-size: 17px;
  letter-spacing: -0.01em; text-decoration: none;
}
.brandmark__dot {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: linear-gradient(140deg, var(--brand), var(--brand-deep));
  display: grid; place-items: center; color: #fff;
}
.brandmark__dot svg { width: 15px; height: 15px; }
.brandmark span small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-2); letter-spacing: .04em; }
.site-head .btn { min-height: 44px; padding-inline: var(--s-4); font-size: 15px; display: none; }
@media (min-width: 720px) { .site-head .btn { display: inline-flex; } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(90% 120% at 100% 0%, var(--brand-soft) 0%, transparent 60%),
    radial-gradient(70% 90% at 0% 10%, var(--gold-soft) 0%, transparent 55%);
  padding-block: var(--s-7) var(--s-8);
}
.hero__grid { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.05fr .95fr; gap: var(--s-8); } }
.hero h1 { margin-block: var(--s-4) var(--s-4); }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero__actions .btn { flex: 1 1 auto; min-width: 200px; }
.hero__note {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4);
  margin-top: var(--s-4); font-size: 14.5px; color: var(--ink-2);
}
.hero__note span { display: inline-flex; align-items: center; gap: 6px; }
.hero__note svg { width: 16px; height: 16px; color: var(--wa); flex: none; }

/* kartu aliran fee di hero */
.flowcard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--e-2);
  padding: var(--s-5);
}
.flowcard__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3);
  padding-bottom: var(--s-3); border-bottom: 1px solid var(--line);
}
.flowcard__head h3 { font-size: 17px; }
.flowcard__head small { color: var(--ink-2); font-size: 13px; }
.flowrow {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: var(--s-3); padding-block: var(--s-3);
  border-bottom: 1px dashed var(--line);
}
.flowrow:last-of-type { border-bottom: 0; }
.flowrow__when { font-size: 14.5px; color: var(--ink-2); }
.flowrow__when b { display: block; color: var(--ink); font-size: 15.5px; font-weight: 600; }
.flowrow__fee {
  font-family: var(--f-head); font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 18px; color: var(--gold); white-space: nowrap;
}
.flowcard__total {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  margin-top: var(--s-4); padding: var(--s-4);
  background: var(--gold-soft); border-radius: var(--r-md);
}
.flowcard__total span { font-size: 14.5px; color: var(--ink-2); max-width: 20ch; }
.flowcard__total b {
  font-family: var(--f-head); font-size: clamp(22px, 5vw, 28px); font-weight: 700;
  color: var(--gold); font-variant-numeric: tabular-nums;
}

/* ---------- tiga alasan ---------- */
.reasons { background: var(--surface-2); border-block: 1px solid var(--line); }
.reasons__grid { display: grid; gap: var(--s-5); margin-top: var(--s-6); }
@media (min-width: 720px) { .reasons__grid { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); } }
.reason__icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line);
  margin-bottom: var(--s-3);
}
.reason__icon svg { width: 23px; height: 23px; }
.reason h3 { margin-bottom: var(--s-2); }
.reason p { color: var(--ink-2); font-size: 16px; }

/* ---------- kalkulator ---------- */
.calc__grid { display: grid; gap: var(--s-5); margin-top: var(--s-6); align-items: start; }
@media (min-width: 900px) { .calc__grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); } }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--e-1);
}
.field + .field { margin-top: var(--s-5); }
.field > label, .field > .field__label {
  display: block; font-family: var(--f-head); font-weight: 600; font-size: 15.5px;
  margin-bottom: var(--s-1);
}
.field__help { display: block; color: var(--ink-2); font-size: 13.5px; margin-bottom: var(--s-3); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  flex: 1 1 auto; min-width: 104px; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: var(--s-2) var(--s-4);
  font-family: var(--f-head); font-weight: 600; font-size: 15px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--r-pill);
  cursor: pointer; touch-action: manipulation;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip[aria-pressed="true"] { color: #14101A; }
}

.slider-row { display: flex; align-items: center; gap: var(--s-4); }
input[type="range"] {
  flex: 1; height: 44px; accent-color: var(--brand);
  background: transparent; cursor: pointer;
}
.slider-val {
  min-width: 68px; text-align: right;
  font-family: var(--f-head); font-weight: 700; font-size: 19px;
  font-variant-numeric: tabular-nums;
}

/* hasil kalkulator */
.result {
  position: relative; overflow: hidden;
  background: linear-gradient(155deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff; border-radius: var(--r-lg); padding: var(--s-6) var(--s-5);
  box-shadow: var(--e-3);
}
.result__label { font-size: 15px; opacity: .88; }
.result__big {
  font-family: var(--f-head); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(38px, 10vw, 60px); line-height: 1.05; margin-block: var(--s-2);
  font-variant-numeric: tabular-nums;
}
.result__sub { font-size: 15.5px; opacity: .92; }
.result__split {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3);
  margin-top: var(--s-5); padding-top: var(--s-5);
  border-top: 1px solid rgba(255, 255, 255, .28);
}
.result__split div span { display: block; font-size: 13.5px; opacity: .85; }
.result__split div b {
  font-family: var(--f-head); font-size: 20px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.result__foot { margin-top: var(--s-4); font-size: 13px; opacity: .8; line-height: 1.5; }
.result .btn { width: 100%; margin-top: var(--s-5); background: #fff; color: var(--brand-deep); }
.result .btn:hover { background: var(--gold-soft); }

/* ---------- tabel fee ---------- */
.rates { background: var(--surface-2); border-block: 1px solid var(--line); }
.rates__cards { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
@media (min-width: 860px) { .rates__cards { grid-template-columns: repeat(3, 1fr); } }
.rate {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s-5); box-shadow: var(--e-1);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.rate--hero { border-color: var(--brand); box-shadow: var(--e-2); }
.rate__tag {
  align-self: flex-start; font-family: var(--f-head); font-size: 12.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft);
  border: 1px solid var(--brand-line); border-radius: var(--r-pill); padding: 4px 11px;
}
.rate h3 { font-size: 18px; }
.rate__rows { display: grid; gap: var(--s-2); margin-top: auto; }
.rate__row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3); background: var(--surface-2);
  border-radius: var(--r-sm); font-size: 14.5px;
}
.rate__row span { color: var(--ink-2); }
.rate__row b {
  font-family: var(--f-head); font-size: 17px; font-weight: 700; color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.rate__note { font-size: 13.5px; color: var(--ink-2); }

/* ---------- langkah ---------- */
.steps { display: grid; gap: var(--s-5); margin-top: var(--s-6); counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-6); } }
.step { position: relative; padding-left: 62px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-head); font-weight: 700; font-size: 19px;
  background: var(--brand); color: #fff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .step::before { color: #14101A; }
}
.step h3 { margin-bottom: var(--s-2); padding-top: 8px; }
.step p { color: var(--ink-2); font-size: 16px; }

/* ---------- payout ---------- */
.payout {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3);
  margin-top: var(--s-5);
}
.wallet {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-4); min-height: 48px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); font-weight: 600; font-size: 15px;
  box-shadow: var(--e-1);
}
.wallet svg { width: 18px; height: 18px; color: var(--wa); }

/* ---------- syarat (details) ---------- */
.terms { max-width: 760px; margin-top: var(--s-6); }
.terms details {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); margin-bottom: var(--s-3); overflow: hidden;
}
.terms summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: 56px; padding: var(--s-3) var(--s-4);
  font-family: var(--f-head); font-weight: 600; font-size: 16.5px;
  cursor: pointer; list-style: none; touch-action: manipulation;
}
.terms summary::-webkit-details-marker { display: none; }
.terms summary::after {
  content: ""; flex: none; width: 11px; height: 11px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg) translateY(-3px);
  transition: transform var(--dur) var(--ease);
}
.terms details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.terms details > div { padding: 0 var(--s-4) var(--s-4); color: var(--ink-2); font-size: 15.5px; }
.terms details > div ul { margin: 0; padding-left: 20px; }
.terms details > div li + li { margin-top: var(--s-2); }

/* ---------- penutup ---------- */
.final {
  text-align: center;
  background:
    radial-gradient(80% 120% at 50% 0%, var(--brand-soft) 0%, transparent 65%);
}
.final h2 { max-width: 20ch; margin-inline: auto; }
.final .lede { margin: var(--s-4) auto 0; }
.final .btn { margin-top: var(--s-6); }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line); background: var(--surface-2);
  padding-block: var(--s-6);
  padding-bottom: calc(var(--s-6) + 84px);   /* ruang untuk bilah CTA mobile */
  color: var(--ink-2); font-size: 14px;
}
@media (min-width: 720px) { .site-foot { padding-bottom: var(--s-6); } }
.site-foot p + p { margin-top: var(--s-2); }

/* ---------- bilah CTA mobile ---------- */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-bar);
  padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom));
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 260ms var(--ease);
}
.cta-bar.is-visible { transform: translateY(0); }
.cta-bar .btn { width: 100%; }
@media (min-width: 720px) { .cta-bar { display: none; } }

/* ---------- animasi masuk ---------- */
/* Disembunyikan HANYA kalau JS hidup (kelas .js dipasang inline di <head>).
   Tanpa penjaga ini, satu error JS = separuh halaman kosong. */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.is-in,
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .js .reveal, .reveal.is-in { opacity: 1; transform: none; }
}
