:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #030508;
  color: #f1f5f9;
  
  --bg: #030508;
  --panel: rgba(10, 15, 26, 0.95);
  --panel-strong: #070a12;
  --border: rgba(255, 255, 255, 0.05);
  --accent: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.25);
  --accent-soft: rgba(139, 92, 246, 0.1);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --danger: #f43f5e;
  --success: #10b981;
}

* {
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  min-height: 100%;
  margin: 0;
  background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.15), transparent 45%),
              radial-gradient(circle at bottom left, rgba(244, 63, 94, 0.05), transparent 40%),
              #030508;
  background-attachment: fixed;
}

body {
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button, input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.hero-card {
  width: min(1150px, 100%);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  padding: 3.5rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(10, 15, 26, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.hero-copy h1 {
  margin: 1.5rem 0 1.2rem;
  font-size: clamp(2.3rem, 4.5vw, 3.8rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy p {
  max-width: 36rem;
  line-height: 1.75;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.button {
  min-height: 54px;
  padding: 0 2rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  box-shadow: 0 10px 35px var(--accent-glow);
}

.button-primary:hover {
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ─── Modal Backdrop ─────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  overflow-y: auto;
  animation: fadeIn 0.3s ease-out;
}

.modal-backdrop.hidden {
  display: none !important;
  pointer-events: none;
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ─── Modal Panel ────────────────────────────────────────────────────────────── */
.modal-panel {
  position: relative;
  width: min(600px, 100%);
  max-height: 90vh;
  padding: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
  -webkit-overflow-scrolling: touch;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Close Button ───────────────────────────────────────────────────────────── */
.close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ─── Modal Header ───────────────────────────────────────────────────────────── */
.modal-header {
  margin-bottom: 2rem;
}

.modal-header h2 {
  margin: 1rem 0 0.5rem;
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
}

.modal-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ─── Stepper ────────────────────────────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.85rem;
}

.step.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.step.active span {
  background: var(--accent);
  color: #fff;
}

.separator {
  width: 20px;
  height: 2px;
  background: var(--border);
}

/* ─── Status Banner ──────────────────────────────────────────────────────────── */
.notice-banner {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.5;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #86efac;
}

.notice-banner.error {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

.notice-banner.hidden {
  display: none !important;
}

/* ─── Step Content ───────────────────────────────────────────────────────────── */
.step-content {
  min-height: 300px;
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.step-content.hidden {
  display: none !important;
  pointer-events: none;
  opacity: 0;
}

.step-content p {
  margin: 1rem 0;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Form Styling ───────────────────────────────────────────────────────────── */
form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
}

input[type="email"],
input[type="text"],
input[type="password"],
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* ─── PayPal Button Container ────────────────────────────────────────────────── */
#paypal-button-container {
  width: 100%;
  min-height: 60px;
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#paypal-button-container > div {
  width: 100% !important;
  height: 100% !important;
}

#paypal-warm-container {
  visibility: visible;
  position: fixed !important;
  top: -9999px !important;
  left: -9999px !important;
  width: 300px;
  height: 150px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.01;
  z-index: -999999;
  display: block;
}

/* ─── Payment Options ────────────────────────────────────────────────────────── */
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.payment-option {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.payment-option:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
}

.payment-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.payment-option strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.payment-option span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ─── Hidden Utility ─────────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
  visibility: hidden;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* ─── Responsive Design: Tablets and smaller ───────────────────────────────── */
@media (max-width: 768px) {
  .hero-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 1.5rem;
  }

  .hero-copy h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }

  .modal-panel {
    width: 100%;
    max-height: calc(100vh - 2rem);
    padding: 2rem;
    border-radius: 16px;
  }

  .modal-header h2 {
    font-size: 1.5rem;
  }

  .close-button {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .stepper {
    gap: 0.5rem;
    padding: 1rem 0;
  }

  .step {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }

  .step span {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .separator {
    width: 12px;
  }

  .button {
    min-height: 48px;
    padding: 0 1.5rem;
    font-size: 0.95rem;
  }

  .step-content {
    min-height: 250px;
  }

  #paypal-button-container {
    min-height: 55px;
    margin: 1rem 0;
    padding: 0.75rem 0;
  }
}

/* ─── Responsive Design: Mobile phones ─────────────────────────────────────── */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .page-shell {
    padding: 1rem;
  }

  .hero-card {
    padding: 2rem 1.25rem;
    gap: 1.5rem;
    border-radius: 16px;
  }

  .hero-copy h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin: 1rem 0 0.75rem;
  }

  .hero-copy p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .button {
    width: 100%;
    min-height: 44px;
    padding: 0 1rem;
    font-size: 0.9rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .modal-backdrop {
    padding: 0.5rem;
  }

  .modal-panel {
    width: 100%;
    padding: 1.75rem 1.25rem;
    border-radius: 12px;
    max-height: calc(100vh - 1rem);
  }

  .modal-header {
    margin-bottom: 1.5rem;
  }

  .modal-header h2 {
    font-size: 1.3rem;
    margin-top: 0.75rem;
  }

  .modal-subtitle {
    font-size: 0.85rem;
  }

  .close-button {
    width: 32px;
    height: 32px;
    font-size: 18px;
    top: 0.75rem;
    right: 0.75rem;
  }

  .stepper {
    gap: 0.25rem;
    padding: 0.75rem 0;
    margin: 1rem 0 1.5rem;
  }

  .step {
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
  }

  .step span {
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
  }

  .separator {
    width: 8px;
    height: 1px;
  }

  label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }

  input[type="email"],
  input[type="text"],
  input[type="password"],
  select {
    padding: 0.65rem 0.85rem;
    font-size: 16px;
    border-radius: 6px;
  }

  form {
    gap: 1rem;
  }

  .step-content {
    min-height: auto;
  }

  .step-content p {
    margin: 0.75rem 0;
    font-size: 0.9rem;
  }

  #paypal-button-container {
    min-height: 50px;
    margin: 0.75rem 0;
    padding: 0.5rem 0;
  }

  .notice-banner {
    padding: 0.85rem;
    margin: 0.75rem 0;
    font-size: 0.85rem;
    border-radius: 6px;
  }

  .payment-options {
    gap: 0.75rem;
    margin: 1rem 0;
  }

  .payment-option {
    padding: 1rem;
    border-radius: 6px;
  }

  .payment-option strong {
    font-size: 0.95rem;
  }

  .payment-option span {
    font-size: 0.8rem;
  }
}

/* ─── Print Styles ─────────────────────────────────────────────────────────── */
@media print {
  .modal-backdrop {
    position: relative;
    background: none;
    backdrop-filter: none;
  }

  .modal-panel {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .button {
    background: none !important;
    border: 1px solid #333 !important;
    color: #000 !important;
  }
}
