/* ============================================================
   PAGES - PETIR Web App
   Style khusus halaman pembuka & step
   ============================================================ */

/* ============================================================
   1. WELCOME SCREEN (step1) — MODERN HERO
   ============================================================ */

/* ---------- HERO SECTION ---------- */
.hero {
  position: relative;
  margin: calc(var(--sp-5) * -1) calc(var(--container-pad) * -1) 0;
  padding: var(--sp-10) var(--container-pad) var(--sp-12);
  background: linear-gradient(160deg,
    var(--color-primary) 0%,
    var(--color-primary-dark) 50%,
    #5a0000 100%);
  color: #fff;
  overflow: hidden;
  border-radius: 0 0 32px 32px;
  box-shadow: 0 8px 32px rgba(198, 40, 40, 0.25);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.hero-glow-1 {
  width: 200px;
  height: 200px;
  background: rgba(249, 168, 37, 0.35);
  top: -50px;
  right: -50px;
  animation: pulseGlow 4s ease-in-out infinite;
}

.hero-glow-2 {
  width: 180px;
  height: 180px;
  background: rgba(255, 95, 82, 0.4);
  bottom: -60px;
  left: -40px;
  animation: pulseGlow 5s ease-in-out infinite 1s;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.15); opacity: 0.9; }
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 1;
}

/* ---------- LOGO DENGAN RING ---------- */
.hero-logo-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  animation: ringPulse 3s ease-in-out infinite;
}

.hero-logo-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(249, 168, 37, 0.5);
  animation: ringPulse 3s ease-in-out infinite 1s;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.05); opacity: 0.7; }
}

.hero-logo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

/* ---------- EYEBROW ---------- */
.hero-eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-4);
  backdrop-filter: blur(8px);
}

/* ---------- TITLE ---------- */
.hero-title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 4px;
  line-height: 1;
  margin: 0 0 var(--sp-3);
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  line-height: 1.4;
  letter-spacing: 0.5px;
}

/* ---------- DIVIDER DENGAN BINTANG ---------- */
.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  color: var(--color-secondary);
}

.hero-divider span {
  flex: 0 0 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(249, 168, 37, 0.6), transparent);
}

.hero-divider svg {
  animation: starRotate 8s linear infinite;
}

@keyframes starRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ============================================================
   KARTU KETUA UMUM — MODERN
   ============================================================ */

.ketua-section {
  margin-top: calc(var(--sp-8) * -1);
  padding: 0 var(--container-pad);
  position: relative;
  z-index: 2;
}

.ketua-card-modern {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: var(--sp-8) var(--sp-5) var(--sp-6);
  text-align: center;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  border: 1px solid rgba(198, 40, 40, 0.08);
}

/* Badge kecil di atas */
.ketua-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
  white-space: nowrap;
}

.ketua-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-secondary);
  animation: dotBlink 1.5s ease-in-out infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* Foto dengan ring emas */
.ketua-photo-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto var(--sp-5);
}

.ketua-photo-modern {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 1;
}

.ketua-photo-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--color-primary),
    var(--color-secondary),
    var(--color-primary),
    var(--color-secondary),
    var(--color-primary)
  );
  animation: ringRotate 6s linear infinite;
  z-index: 0;
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.ketua-photo-placeholder-modern {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg,
    var(--color-primary-soft),
    var(--color-secondary-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: var(--color-primary);
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 1;
}

/* Nama & jabatan */
.ketua-name-modern {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 4px;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.ketua-role-modern {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 var(--sp-5);
  letter-spacing: 0.5px;
}

/* Quote */
.ketua-quote {
  font-style: italic;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  margin: 0;
  padding: var(--sp-4);
  background: linear-gradient(135deg,
    rgba(198, 40, 40, 0.04),
    rgba(249, 168, 37, 0.04));
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-secondary);
  text-align: left;
  position: relative;
}

.ketua-quote::before {
  content: '"';
  position: absolute;
  top: -8px;
  left: 10px;
  font-size: 48px;
  color: var(--color-secondary);
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
}

/* ============================================================
   KARTU PENDIRI & PENGURUS
   ============================================================ */

.pendiri-section {
  margin-top: var(--sp-4);
  padding: 0 var(--container-pad);
}

.pendiri-card-modern {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: var(--sp-5);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(198, 40, 40, 0.08);
}

/* Header dengan garis kiri-kanan */
.pendiri-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.pendiri-header-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(198, 40, 40, 0.2),
    transparent);
}

.pendiri-header-text {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--color-primary);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Item orang */
.pendiri-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
}

.pendiri-item:not(:last-child) {
  border-bottom: 1px solid var(--color-border-light);
}

/* Foto kecil di kiri */
.pendiri-photo-wrap {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
}

.pendiri-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.1),
    0 0 0 2px rgba(198, 40, 40, 0.15);
}

.pendiri-photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg,
    var(--color-primary-soft),
    var(--color-secondary-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--color-primary);
  border: 2px solid #fff;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.1),
    0 0 0 2px rgba(198, 40, 40, 0.15);
}

/* Info nama & jabatan */
.pendiri-info {
  flex: 1;
  min-width: 0;
}

.pendiri-name {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 2px;
  word-wrap: break-word;
}

.pendiri-role {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.3px;
}

/* Responsive HP kecil */
@media (max-width: 380px) {
  .pendiri-photo-wrap {
    width: 48px;
    height: 48px;
  }

  .pendiri-name {
    font-size: var(--fs-xs);
  }

  .pendiri-role {
    font-size: 10px;
  }
}

/* ============================================================
   STATISTIK ROW
   ============================================================ */

.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: var(--sp-5) var(--sp-4);
  margin: var(--sp-6) 0;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--color-border-light);
}

/* ============================================================
   INVITE SECTION (Ajak Bergabung)
   ============================================================ */

.invite-section {
  text-align: center;
  padding: var(--sp-6) 0 var(--sp-4);
}

.invite-title {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 var(--sp-3);
  letter-spacing: -0.5px;
}

.invite-text {
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  margin: 0 0 var(--sp-6);
  padding: 0 var(--sp-2);
}

/* Daftar Manfaat */
.benefit-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  text-align: left;
  margin-bottom: var(--sp-6);
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: transform var(--tr-fast), box-shadow var(--tr-fast);
}

.benefit-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.benefit-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg,
    var(--color-primary-soft),
    rgba(249, 168, 37, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.benefit-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.benefit-text strong {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.benefit-text span {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ============================================================
   CTA NOTE
   ============================================================ */

.cta-note {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--color-info-soft);
  color: var(--color-info);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  margin: var(--sp-4) auto 0;
  justify-content: center;
  width: fit-content;
}

.cta-note-icon {
  font-size: 14px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 380px) {
  .hero-title {
    font-size: 40px;
    letter-spacing: 2px;
  }

  .hero {
    padding: var(--sp-8) var(--container-pad) var(--sp-10);
  }

  .ketua-photo-wrap {
    width: 120px;
    height: 120px;
  }

  .ketua-card-modern {
    padding: var(--sp-6) var(--sp-4) var(--sp-5);
  }

  .stat-value {
    font-size: var(--fs-lg);
  }

  .benefit-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

@media (min-width: 481px) {
  .hero {
    border-radius: 0 0 40px 40px;
  }

  .hero-title {
    font-size: 56px;
  }

  .benefit-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--sp-3);
  }

  .benefit-item {
    flex-direction: column;
    text-align: center;
    padding: var(--sp-5) var(--sp-4);
  }
}

    /* ---------- LINK LOGIN ANGGOTA ---------- */
    .login-link {
      text-align: center;
      margin: var(--sp-5) 0 var(--sp-3);
      padding: var(--sp-4);
      background: linear-gradient(135deg,
        rgba(198, 40, 40, 0.04),
        rgba(249, 168, 37, 0.04));
      border-radius: var(--radius-md);
      border: 1px dashed rgba(198, 40, 40, 0.2);
    }

    .login-link p {
      font-size: var(--fs-sm);
      color: var(--color-text-secondary);
      margin: 0;
      line-height: 1.6;
    }

    .login-link a {
      color: var(--color-primary);
      font-weight: 600;
      text-decoration: none;
      transition: all var(--tr-fast);
      border-bottom: 2px solid transparent;
      padding-bottom: 1px;
    }

    .login-link a:hover {
      color: var(--color-primary-dark);
      border-bottom-color: var(--color-primary-dark);
    }
/* ============================================================
   2. TENTANG PENDAFTARAN (step2)
   ============================================================ */

.intro-text {
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
  margin-bottom: var(--sp-6);
  padding: var(--sp-4);
  background: var(--color-primary-soft);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
}

.point-card {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--sp-3);
  transition: transform var(--tr-fast), box-shadow var(--tr-fast);
}

.point-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.point-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}

.point-icon-primary {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.point-icon-success {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.point-icon-warning {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.point-body { flex: 1; }

.point-title {
  font-family: var(--font-heading);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--sp-1);
  line-height: 1.3;
}

.point-desc {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-normal);
  margin: 0;
}

/* ============================================================
   3. CARA MENGISI (step3)
   ============================================================ */

.howto-list {
  position: relative;
  padding-left: 12px;
}

.howto-item {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  position: relative;
}

.howto-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 56px;
  bottom: -8px;
  width: 2px;
  background: var(--color-border-light);
}

.howto-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-base);
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--color-bg);
}

.howto-num.is-last {
  background: var(--color-success);
}

.howto-body {
  flex: 1;
  padding-top: 6px;
}

.howto-text {
  font-family: var(--font-heading);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
  line-height: 1.3;
}

.howto-sub {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin: 0;
}

/* Alert khusus di step3 */
.step-note {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--color-info-soft);
  border-left: 4px solid var(--color-info);
  border-radius: var(--radius-md);
  margin-top: var(--sp-6);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: #0D47A1;
}

.step-note-icon {
  flex-shrink: 0;
  font-size: 22px;
  line-height: 1;
}
/* ============================================================
   4. UPLOAD FOTO (step10)
   ============================================================ */

.photo-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.photo-buttons .btn {
  width: 100%;
  cursor: pointer;
}

.photo-preview-wrap {
  position: relative;
  margin: var(--sp-4) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg);
  box-shadow: var(--shadow-md);
}

.photo-preview {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.photo-preview-landscape {
  aspect-ratio: 16 / 10;
}

.photo-change {
  position: absolute;
  bottom: var(--sp-3);
  right: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background var(--tr-fast);
}

.photo-change:hover {
  background: rgba(0, 0, 0, 0.85);
}

/* Panduan area KTP */
.ktp-guide {
  margin-top: var(--sp-4);
}

.ktp-guide-frame {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--sp-8) var(--sp-4);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  background: var(--color-bg);
  position: relative;
}

.ktp-guide-frame::before {
  content: '';
  position: absolute;
  top: 8px;    left: 8px;
  right: 8px;  bottom: 8px;
  border: 1px dashed var(--color-primary-light);
  border-radius: calc(var(--radius-md) - 4px);
  opacity: 0.4;
}
/* ============================================================
   5. AUTOSAVE INDIKATOR
   ============================================================ */

.autosave-indicator {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  transition: opacity 300ms ease;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.autosave-saving {
  background: var(--color-text);
  color: #fff;
}

.autosave-saved {
  background: var(--color-success);
  color: #fff;
}

.autosave-offline {
  background: var(--color-warning);
  color: #fff;
}

.autosave-error {
  background: var(--color-error);
  color: #fff;
}

/* Banner offline */
body.is-offline::before {
  content: '📴 Koneksi terputus — data tetap aman di perangkat Anda';
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-warning);
  color: #fff;
  text-align: center;
  padding: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  z-index: 999;
}
/* ============================================================
   PERBAIKAN TOMBOL STEP1 (single button — center)
   ============================================================ */

/* Kalau btn-group hanya punya 1 tombol aktif + 1 span kosong */
.btn-group:has(> span:empty) {
  display: flex !important;
  grid-template-columns: none !important;
  justify-content: center !important;
  align-items: center !important;
}

/* Sembunyikan span kosong */
.btn-group > span:empty {
  display: none !important;
}

/* Tombolnya jadi full-width center, max 400px */
.btn-group:has(> span:empty) > .btn {
  width: 100% !important;
  max-width: 400px !important;
  margin: 0 auto !important;
}