/* ═══════════════════════════════════════════════════════
   subscription.css — Unified with index.css design system
   Parenting Insight — Dark cosmic theme
═══════════════════════════════════════════════════════ */

:root {
  --primary: #6366f1;
  --accent: #22d3ee;
  --dark: #0f172a;
  --gradient1: #6366f1;
  --gradient2: #a855f7;
  --gradient3: #ec4899;

  /* Semantic aliases (used throughout this page) */
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-hi: #334155;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.5);
  --error-bg: rgba(236, 72, 153, 0.1);
  --error-border: rgba(236, 72, 153, 0.3);
  --error-text: #ec4899;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── BASE ── */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated Background (mirrors index.css) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  z-index: -2;
}

/* Subtle orb glow in background */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse 55% 40% at 5% 15%,
      rgba(99, 102, 241, 0.18) 0%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 45% 55% at 95% 85%,
      rgba(168, 85, 247, 0.12) 0%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 40% 35% at 50% 50%,
      rgba(236, 72, 153, 0.08) 0%,
      transparent 60%
    );
  pointer-events: none;
  z-index: -1;
}

/* ── PAGE WRAPPER ── */
.page {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 20px 80px;
  animation: fadeInUp 0.8s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── MASTHEAD ── */
.masthead {
  text-align: center;
  margin-bottom: 52px;
}

.masthead-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.masthead-rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.6;
}

.masthead-icon {
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(99, 102, 241, 0.5);
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.masthead h1 {
  font-size: clamp(36px, 7vw, 58px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, var(--gradient2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 6px;
}

.masthead h1 em {
  font-style: italic;
  /* accent through the same gradient — inherits naturally */
}

.masthead-sub {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.masthead-tagline {
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
}

/* ── PROGRESS BAR ── */
.progress-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 44px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.progress-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.progress-step.active .progress-dot {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--gradient1), var(--gradient2));
  color: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.progress-step.done .progress-dot {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent);
}

.progress-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.progress-step.active .progress-label {
  color: var(--primary);
}

.progress-step.done .progress-label {
  color: var(--accent);
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 40px;
  max-width: 90px;
  margin-bottom: 20px;
  transition: background 0.3s ease;
}

.progress-line.done {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.section-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient1), var(--gradient2));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ── CARD  ── */
.card {
  background: linear-gradient(
    135deg,
    var(--surface) 0%,
    var(--surface-hi) 100%
  );
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: 0 20px 60px var(--shadow);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

/* Top accent line matching the orb palette */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--gradient1),
    var(--gradient2),
    transparent 80%
  );
  opacity: 0.7;
}

/* ── INPUTS ── */
.field-group {
  margin-bottom: 16px;
}

.field-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  display: block;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
  appearance: none;
  -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: #475569;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* dark option styling */
select option {
  background: var(--surface-hi);
  color: #fff;
}

textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── PLAN CARDS ── */
.plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.plan-label {
  cursor: pointer;
  display: block;
}

.plan-label input[type="radio"] {
  display: none;
}

.plan-card {
  padding: 22px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.plan-card::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  transition: all 0.25s ease;
}

.plan-label:hover .plan-card {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

.plan-label input:checked + .plan-card {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.25);
}

.plan-label input:checked + .plan-card::after {
  display: none;
}

.plan-label input:checked + .plan-card::before {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient1), var(--gradient2));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 18px;
  text-align: center;
  z-index: 1;
}

.plan-type {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.plan-duration {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.plan-issues {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.plan-price {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--gradient2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.plan-price sup {
  font-size: 14px;
  font-weight: 600;
  vertical-align: super;
}

.plan-saving {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
}

/* ── PERKS ── */
.perks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.perk {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.25s ease;
}

.perk:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

.perk::before {
  content: "✦";
  color: var(--accent);
  font-size: 9px;
}

/* ── INSTRUCTIONS ── */
.instruction-list {
  list-style: none;
  padding: 0;
}

.instruction-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.instruction-list li:last-child {
  border-bottom: none;
}

.step-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.1);
  border: 1.5px solid rgba(34, 211, 238, 0.3);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── PAYMENT BOX ── */
.payment-box {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 26px;
  margin-bottom: 20px;
}

.payment-box .bank-name {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
}

.bank-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.bank-detail:last-child {
  border-bottom: none;
}

.bank-detail .key {
  color: var(--muted);
  font-size: 12px;
}

.bank-detail .val {
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
}

/* ── QR ── */
.qr-wrap {
  text-align: center;
  margin: 22px 0 10px;
}

.qr-wrap .qr-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.qr-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
  border: 1px dashed rgba(99, 102, 241, 0.4);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
}

.qr-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* ── BUTTONS ── */
.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* Primary — mirrors index.css .cta-btn + .submit-btn */
.submit-btn {
  flex: 1;
  position: relative;
  background: linear-gradient(135deg, var(--gradient1), var(--gradient2));
  color: #fff;
  border: none;
  padding: 17px 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.35s ease;
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.2px;
}

.submit-btn span,
.submit-btn .arrow {
  position: relative;
  z-index: 1;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(99, 102, 241, 0.5);
  color: #fff;
}

.submit-btn:hover::before {
  opacity: 1;
}

/* Back button — ghost style */
.back-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 17px 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(10px);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
  transform: translateY(-2px);
}

.arrow {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.submit-btn:hover .arrow {
  transform: translateX(4px);
}

/* ── ERROR ── */
.error-msg {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.error-msg.show {
  display: block;
}

/* ── FOOTER NOTE ── */
.footer-note {
  text-align: center;
  margin-top: 40px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-note a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-note a:hover {
  color: var(--accent);
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .row,
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .page {
    padding: 32px 16px 60px;
  }

  .masthead h1 {
    font-size: 36px;
  }

  .progress-label {
    display: none;
  }

  .progress-line {
    min-width: 20px;
  }

  .btn-row {
    flex-direction: column-reverse;
  }

  .submit-btn,
  .back-btn {
    width: 100%;
  }
}
