/* ===== Warna bersama: avatar & titik ===== */
.avatar--maroon,
.dot--maroon,
.step-dot--maroon { --c: var(--brand-maroon); }
.avatar--red,
.dot--red { --c: var(--brand-red); }
.step-dot--red { --c: var(--action); }          /* teks putih di atasnya butuh 4.5:1 */
.avatar--orange,
.dot--orange,
.step-dot--orange { --c: var(--brand-orange); }
.avatar--amber,
.dot--amber,
.step-dot--amber { --c: var(--brand-amber); }
.step-dot--deep { --c: var(--brand-maroon-deep); }

.dot {
  width: 8px; height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--c);
}

/* ===== HERO ===== */
.hero { padding: 12px 12px 0; }

.hero-card {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: min(780px, 94vh);    /* fallback tanpa dukungan svh */
  min-height: min(780px, 94svh);
  padding: calc(var(--header-h) + 4.5rem) var(--gutter) 5.5rem;
  border-radius: var(--radius-xl);
  background: var(--hero-shader-fallback);
  overflow: hidden;
}

/* Latar cadangan bergerak pelan — terlihat bila shader tidak bisa berjalan (GPU software / browser lama) */
.hero-card::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(35% 40% at 30% 40%, rgb(232 33 41 / 0.55), transparent 70%),
    radial-gradient(30% 35% at 70% 60%, rgb(174 31 38 / 0.6), transparent 70%),
    radial-gradient(25% 30% at 55% 30%, rgb(255 107 102 / 0.25), transparent 70%);
  animation: hero-drift 18s ease-in-out infinite alternate;
  will-change: transform;
}
.hero-card:has(.hero-canvas.is-ready)::before { animation: none; opacity: 0; }
/* Hemat CPU/baterai: berhenti hanya saat hero di luar layar (tidak terlihat pengunjung) */
.hero.is-offscreen .hero-card::before { animation-play-state: paused; }
@keyframes hero-drift {
  0% { transform: translate3d(-6%, -4%, 0) scale(1); }
  50% { transform: translate3d(5%, 3%, 0) scale(1.12) rotate(4deg); }
  100% { transform: translate3d(-3%, 6%, 0) scale(1.05) rotate(-3deg); }
}

/* Latar shader WebGL (assets/js/hero-shader.js) — muncul perlahan setelah siap */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-canvas.is-ready { opacity: 1; }

/* Gradasi atas (untuk header) + vignet tengah (untuk teks) agar kontras aman di atas cahaya bergerak */
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgb(10 3 4 / 0.5), transparent 24%),
    radial-gradient(75% 65% at 50% 52%, rgb(10 3 4 / 0.6), rgb(10 3 4 / 0.3) 65%, transparent 90%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: min(920px, 100%);
  text-align: center;
}
.hero-title {
  font-size: var(--text-hero);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--white);
  overflow-wrap: break-word;
  text-shadow: 0 2px 30px rgb(10 3 4 / 0.45);
}
.hero-sub {
  max-width: 40rem;
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  font-weight: 500;
  line-height: 1.55;
  color: rgb(255 255 255 / 0.92);
  text-shadow: 0 1px 14px rgb(10 3 4 / 0.85);
}
.hero-sub strong { font-weight: 700; color: var(--white); }

/* Pemilih peran — gaya segmented control */
.role-switch {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  margin-top: 2.25rem;
  padding: 5px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.08);
  box-shadow: 0 20px 40px -18px rgb(0 0 0 / 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.role-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap-min);
  padding: 0.6rem 1.15rem;
  border: 0;
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--white);
  font-size: var(--text-base);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease;
}
.role-switch button:hover { background: rgb(255 255 255 / 0.08); }
.role-switch button[aria-pressed="true"] {
  background: var(--white);
  color: var(--gray-900);
  box-shadow: var(--shadow-xs);
}
.role-switch button[aria-pressed="true"] .icon { color: var(--action); }
.role-switch .icon { width: 18px; height: 18px; }

.role-hint {
  max-width: 34rem;
  min-height: 3.1em;
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgb(255 255 255 / 0.9);
  text-shadow: 0 1px 12px rgb(10 3 4 / 0.85);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ===== Marquee chip ===== */
.proof { padding: 1.75rem 0 3rem; }
.proof-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding-inline: var(--gutter);
  color: var(--gray-500);
}
.proof-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem 0.2rem 0.3rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-900);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}
.proof-brand img { width: 34px; border-radius: 3px; }

.marquee {
  margin-top: 1.25rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  padding-block: 8px;
  animation: marquee 50s linear infinite;
}
@keyframes marquee { to { transform: translateX(calc(-50% - 0.5rem)); } }

.chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.15rem 0.55rem 0.55rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-chip);
}
.chip strong { display: block; font-size: 0.9375rem; font-weight: 700; line-height: 1.25; }
.chip small { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--action); }
.chip-avatar {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--tint-100);                                /* fallback tanpa color-mix */
  background: color-mix(in srgb, var(--c) 13%, white);
  color: var(--c);
}
.chip-avatar .icon { width: 18px; height: 18px; }

/* ===== Angka ===== */
.stats-section { padding-top: var(--space-section); background: var(--white); border-top: 1px solid var(--gray-200); }
.stats-title { max-width: 20ch; margin: 0 auto 3.5rem; text-align: center; }
.stats-band { border-block: 1px solid var(--gray-200); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { position: relative; padding: 2.25rem 1.5rem 2.25rem 0; }
.stat::before,
.stat::after {
  content: "";
  position: absolute;
  left: -1rem;
  width: 75%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-orange), var(--brand-red), transparent);
  opacity: 0;
  transition: opacity var(--duration-slow) ease;
}
.stat::before { top: -1px; }
.stat::after { bottom: -1px; }
.stat.is-active::before,
.stat.is-active::after { opacity: 1; }
.stat-num {
  font-size: clamp(2.5rem, 2rem + 1.6vw, 3rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gray-450);
  transition: color var(--duration-slow) ease;
}
.stat-label {
  margin-top: 0.6rem;
  font-size: 0.9375rem;
  color: var(--gray-500);
  text-wrap: balance;
  transition: color var(--duration-slow) ease;
}
.stat.is-active .stat-num { color: var(--gray-900); }
.stat.is-active .stat-label { color: var(--gray-800); }

/* ===== Logo titik dengan pendaran ===== */
.dots-band {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: center;
  padding: 3rem var(--gutter) 0;
  background: var(--white);
  overflow: hidden;
}
.dots-band::before {
  content: "";
  position: absolute;
  inset: 10% -10% 0;
  z-index: -1;
  background:
    radial-gradient(45% 70% at 50% 100%, rgb(232 33 41 / 0.6), transparent 70%),
    radial-gradient(70% 90% at 50% 100%, rgb(244 118 34 / 0.45), transparent 75%),
    radial-gradient(100% 100% at 50% 100%, rgb(248 170 28 / 0.18), transparent 80%);
}
.dots-band img {
  width: min(880px, 100%);
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent);
  mask-image: radial-gradient(closest-side, #000 62%, transparent);
}

/* ===== Bergabung ===== */
.join { background: var(--white); }
.join-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 1rem + 5vw, 5.5rem);
  align-items: center;
}
.join-motto {
  margin-top: 2rem;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  text-wrap: balance;
}

.join-form {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-widget), var(--shadow-glow);
}
.form-note { font-size: var(--text-sm); color: var(--gray-500); }
.role-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.role-group legend { margin-bottom: 0.65rem; padding: 0; font-size: 0.9375rem; font-weight: 600; }
.role-group .field-error { grid-column: 1 / -1; }
.role-chip { position: relative; }
.role-chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.role-chip > span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  min-height: var(--tap-min);
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-btn);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: border-color var(--duration-fast) ease, background-color var(--duration-fast) ease;
}
.role-chip:hover > span { border-color: var(--gray-600); }
.role-chip input:checked + span { border-color: var(--action); background: var(--tint-50); color: var(--action); }
.role-chip input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 2px; }
.role-group:has([aria-invalid="true"]) .role-chip > span { border-color: var(--brand-red); }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; min-width: 0; }
.field label { font-size: var(--text-sm); font-weight: 600; color: var(--gray-700); }
.optional { font-weight: 400; color: var(--gray-500); }
.field input,
.field textarea {
  width: 100%;
  min-height: var(--tap-min);
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-btn);
  background: var(--white);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.field textarea { resize: vertical; min-height: 112px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--action);
  box-shadow: 0 0 0 4px rgb(217 30 38 / 0.15);
}
.field [aria-invalid="true"] { border-color: var(--brand-red); }
.field-error { margin: 0; font-size: 0.8125rem; font-weight: 600; color: var(--action); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.join-submit { width: 100%; }
.join-submit[disabled] { opacity: 0.6; cursor: progress; }
.form-status { font-size: var(--text-sm); font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-success { padding: 0.9rem 1rem; border-radius: var(--radius-btn); background: #ecfdf3; color: #166534; }
.form-status.is-error { padding: 0.9rem 1rem; border-radius: var(--radius-btn); background: var(--tint-50); color: var(--brand-maroon-deep); }

/* ===== FAQ ===== */
.faq { background: var(--white); overflow: hidden; isolation: isolate; }
.faq::before {
  content: "";
  position: absolute;
  top: 0; right: -10%;
  z-index: -1;
  width: 55%;
  height: 80%;
  background: radial-gradient(closest-side, rgb(255 217 196 / 0.55), transparent);
}
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 1rem + 5vw, 6rem);
  align-items: start;
}
.faq-aside .title-lg { max-width: 14ch; }

.ask-card {
  max-width: 380px;
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background:
    repeating-linear-gradient(120deg, rgb(255 255 255 / 0.07) 0 1px, transparent 1px 8px),
    linear-gradient(135deg, var(--brand-maroon) 0%, var(--action) 55%, var(--brand-orange) 130%);
  color: var(--white);
  box-shadow: 0 24px 50px -24px rgb(174 31 38 / 0.8);
}
.ask-title { font-size: var(--text-md); font-weight: 700; }
.ask-text { margin: 0.4rem 0 1.1rem; font-size: 0.9375rem; color: var(--white); }

.faq-item { border-top: 1px solid var(--gray-200); }
.faq-item:last-child { border-bottom: 1px solid var(--gray-200); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--tap-min);
  padding: 1.25rem 0;
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
  list-style: none;
  cursor: pointer;
  transition: color var(--duration-fast) ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--action); }
.faq-icon {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  flex: none;
  border-radius: 7px;
  background: var(--white);
  color: var(--action);
  box-shadow: var(--shadow-chip);
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease;
}
.faq-icon .icon { width: 16px; height: 16px; transition: transform var(--duration-normal) var(--ease-out-expo); }
.faq-item[open] summary { color: var(--action); }
.faq-item[open] .faq-icon { background: var(--action); color: var(--white); }
.faq-item[open] .faq-icon .icon { transform: rotate(45deg); }
.faq-item p {
  max-width: 62ch;
  margin: -0.25rem 0 1.6rem;
  padding-left: 1rem;
  border-left: 2px solid var(--action);
  color: var(--gray-600);
  line-height: 1.65;
}

/* ===== CTA akhir ===== */
.final-cta {
  position: relative;
  isolation: isolate;
  padding-block: clamp(5rem, 3.5rem + 5vw, 8.5rem);
  background: var(--gray-50);
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(115deg, rgb(244 118 34 / 0.22) 0 1px, transparent 1px 9px);
  -webkit-mask-image: radial-gradient(70% 90% at 75% 40%, #000, transparent 70%);
  mask-image: radial-gradient(70% 90% at 75% 40%, #000, transparent 70%);
}
.final-cta::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 70%;
  background: radial-gradient(40% 80% at 50% 100%, rgb(244 118 34 / 0.55), rgb(248 170 28 / 0.15) 55%, transparent 80%);
}
.final-cta-inner { text-align: center; }
.final-title { font-size: clamp(2.2rem, 1.4rem + 3.2vw, 3.6rem); }
.final-sub {
  max-width: 38rem;
  margin: 1.25rem auto 0;
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--gray-600);
}
.final-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2rem; }

/* ===== Responsif ===== */
@media (min-width: 120em) {
  .hero-card { min-height: min(900px, 88vh); min-height: min(900px, 88svh); }
}

@media (max-width: 60em) {
  .join-grid,
  .faq-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--gray-200); }
  .faq::before { opacity: 0.35; }
}

@media (max-width: 40em) {
  .hero { padding: 8px 8px 0; }
  .hero-card { border-radius: 28px; padding-top: calc(var(--header-h) + 3rem); padding-bottom: 3.5rem; }
  .role-switch { width: 100%; flex-wrap: nowrap; }
  .role-switch button { flex: 1; padding: 0.6rem 0.4rem; font-size: var(--text-sm); }
  .role-switch .icon { display: none; }
  .hero-actions { width: 100%; flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .stat { padding: 1.6rem 1rem 1.6rem 0; }
  .field-row { grid-template-columns: 1fr; }
}

/* Ponsel pendek (mis. iPhone SE): naikkan CTA ke atas lipatan */
@media (max-width: 40em) and (max-height: 700px) {
  .hero-card { padding-top: calc(var(--header-h) + 1.75rem); }
  .hero-sub { margin-top: 1rem; }
  .role-switch { margin-top: 1.5rem; }
  .role-hint { min-height: 0; }
}

@media (max-width: 30em) {
  .role-group { grid-template-columns: 1fr; }
  .final-actions .btn { width: 100%; }
}

@media (max-width: 22.5em) {
  .role-switch button { padding-inline: 0.3rem; font-size: 0.8125rem; }
}

/* Ponsel landscape: hero ringkas agar judul, pilihan peran, dan CTA muat */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-card { min-height: auto; padding-top: calc(var(--header-h) + 1.5rem); padding-bottom: 2rem; }
  .hero-title { font-size: clamp(2rem, 9vh, 3rem); }
  .hero-sub { margin-top: 0.75rem; }
  .role-switch { margin-top: 1.25rem; }
  .role-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .marquee-track {
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    padding-inline: var(--gutter);
    animation: none;
  }
}
