/* ==========================================================================
   Monkhood 1-on-1 Qualifier Funnel - Minimalist Design System
   ========================================================================== */

:root {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #0f172a;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --primary-glow: rgba(15, 23, 42, 0.08);

  --accent-gold: #d97706;
  --accent-gold-light: #fef3c7;
  --accent-amber: #f59e0b;
  
  --brand-orange: #F97316;
  --brand-orange-light: #FB923C;
  --brand-orange-dark: #EA580C;
  --brand-orange-bg: #FFF7ED;
  --brand-orange-gradient: linear-gradient(135deg, #FF6B00 0%, #F97316 50%, #EA580C 100%);
  
  --success: #059669;
  --success-light: #ecfdf5;
  --error: #dc2626;
  --error-light: #fef2f2;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
  --shadow-focus: 0 0 0 3px rgba(249, 115, 22, 0.2);

  --font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Fast-tap & touch optimization for mobile (Android & iOS) */
button, input, textarea, select, a, .option-btn, .radio-tile, .submit-slot-btn, .join-cta-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Instant micro-feedback on touch/tap */
.option-btn:active,
.radio-tile:active {
  transform: scale(0.985);
  transition: transform 60ms ease;
}

/* Container Utility */
.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header Sticky Bar */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.top-nav-inner {
  max-width: 840px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-badge .brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-gold);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* Step Progress Indicator (for Form View) */
.form-progress-bar-wrap {
  width: 100%;
  height: 4px;
  background-color: var(--border-color);
  position: relative;
  overflow: hidden;
}

.form-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-amber), var(--primary));
  transition: width 0.3s ease;
}

.progress-info {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Views Management */
.view-section {
  display: none !important;
  width: 100%;
}

.view-section.active {
  display: block !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Step 1: Gateway Screen (Initial Screen) */
.gateway-view.active {
  display: flex !important;
}

.gateway-view {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
  /* Deep cinematic dark canvas */
  background: radial-gradient(circle at 50% 40%, #151d2c 0%, #0d121c 55%, #07090f 100%);
  position: relative;
  overflow: hidden;
}

/* Ambient glowing warm halo behind the square */
.gateway-view::before {
  content: "";
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.2) 0%, rgba(217, 119, 6, 0.08) 45%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: blur(50px);
}

.gateway-card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2.5rem;
  width: 100%;
  max-width: 580px;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
  /* Radiant glowing depth with multi-layered shadows and Monkhood orange aura */
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.25),
    0 30px 70px -10px rgba(0, 0, 0, 0.85),
    0 12px 30px -5px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(249, 115, 22, 0.35),
    0 0 100px rgba(249, 115, 22, 0.2),
    0 0 140px rgba(249, 115, 22, 0.1);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.gateway-card:hover {
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 35px 80px -10px rgba(0, 0, 0, 0.9),
    0 15px 35px -5px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(249, 115, 22, 0.45),
    0 0 120px rgba(249, 115, 22, 0.28),
    0 0 160px rgba(249, 115, 22, 0.15);
}

.gateway-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #FF6B00, #F97316, #EA580C);
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.9);
}

.gateway-logo-wrap {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gateway-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  display: block;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.18);
}

/* --------------------------------------------------------------------------
   EXCLUSIVE BADGE (VIBRANT & ANIMATED):
   Radiant gradient, sweeping light sheen, radar ripple, and twinkling diamond.
   -------------------------------------------------------------------------- */
.community-pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.15rem;
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 50%, #FFF7ED 100%);
  border: 1.5px solid rgba(249, 115, 22, 0.45);
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C2410C;
  margin-bottom: 1.5rem;
  box-shadow: 
    0 2px 10px rgba(249, 115, 22, 0.22),
    0 0 20px rgba(249, 115, 22, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  user-select: none;
}

/* Diagonal sweeping light reflection sheen */
.community-pill::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -150%;
  width: 70%;
  height: 200%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.85) 50%,
    transparent 100%
  );
  transform: rotate(25deg);
  animation: badge-sheen 3.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes badge-sheen {
  0% { left: -150%; }
  30% { left: 190%; }
  100% { left: 190%; }
}

.community-pill:hover {
  transform: translateY(-1.5px) scale(1.02);
  border-color: #EA580C;
  box-shadow: 
    0 4px 18px rgba(249, 115, 22, 0.35),
    0 0 25px rgba(249, 115, 22, 0.22);
}

/* Radar Pulse Ripple Dot */
.pulsing-dot-wrap {
  position: relative;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pulsing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--brand-orange);
  box-shadow: 0 0 8px var(--brand-orange);
  position: relative;
  z-index: 2;
}

.pulsing-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid var(--brand-orange);
  animation: radar-ripple 2s cubic-bezier(0.1, 0.2, 0.8, 1) infinite;
  z-index: 1;
}

@keyframes radar-ripple {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* Diamond Sparkle Icon */
.sparkle-icon {
  color: #EA580C;
  flex-shrink: 0;
  animation: sparkle-twinkle 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 3px rgba(249, 115, 22, 0.6));
}

@keyframes sparkle-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
  50% { transform: scale(1.25) rotate(45deg); opacity: 1; }
}

.pill-text {
  position: relative;
  z-index: 1;
}

.gateway-title {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 2.5rem;
  letter-spacing: -0.015em;
}

.gateway-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0;
}

.option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.2rem 1.45rem;
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.02rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.option-btn:hover {
  border-color: var(--brand-orange);
  background-color: #FFF7ED;
  color: #C2410C;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.16);
}

.option-btn:hover .btn-indicator {
  border-color: var(--brand-orange);
}

.option-btn:focus-visible {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
}

.option-btn.selected {
  border-color: var(--brand-orange);
  background-color: #FFF7ED;
  color: #C2410C;
  box-shadow: 0 0 0 2px var(--brand-orange);
  font-weight: 600;
}

.option-btn .btn-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 0.75rem;
  transition: var(--transition-fast);
}

.option-btn.selected .btn-indicator {
  border-color: var(--brand-orange);
  background-color: var(--brand-orange);
}

.option-btn.selected .btn-indicator::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ffffff;
}

/* Gateway Next Action Container */
.gateway-next-wrap {
  margin-top: 1.5rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.gateway-next-wrap.show {
  max-height: 80px;
  opacity: 1;
  transform: translateY(0);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.primary-btn:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ==========================================================================
   Step 2: Non-Member Flow Screen
   ========================================================================== */
.non-member-view.active {
  display: flex !important;
}

.non-member-view {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
  background: radial-gradient(circle at 50% 40%, #151d2c 0%, #0d121c 55%, #07090f 100%);
  position: relative;
  overflow: hidden;
}

.non-member-card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2.25rem 2.75rem 2.25rem;
  width: 100%;
  max-width: 580px;
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.25),
    0 30px 70px -10px rgba(0, 0, 0, 0.85),
    0 12px 30px -5px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(249, 115, 22, 0.35);
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.non-member-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #FF6B00, #F97316, #EA580C);
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.9);
}

.non-member-banner-wrap {
  width: 100%;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.non-member-banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.non-member-message {
  font-size: 1.12rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-weight: 450;
}

.non-member-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.join-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1.15rem 1.75rem;
  background: linear-gradient(135deg, #FF6B00 0%, #F97316 50%, #EA580C 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px; /* Curved rectangular shape */
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}

.join-cta-btn:hover {
  background: linear-gradient(135deg, #FF7714 0%, #FB923C 50%, #EA580C 100%);
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.45);
  transform: translateY(-2px);
  color: #ffffff;
}

.join-cta-btn:active {
  transform: scale(0.985);
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.3);
  transition: transform 60ms ease;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.25rem;
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.secondary-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-subtle);
}

.secondary-btn:active {
  transform: scale(0.98);
  transition: transform 60ms ease;
}

/* ==========================================================================
   Step 3: The Member Flow (Version 1 Boxy Design with Orange Accents)
   Aesthetic: Clean, elegant cards on soft slate canvas, crisp unmasked header,
   curved rectangular inputs, bright orange highlights, and curved rectangular CTA.
   ========================================================================== */
.member-form-view.active {
  display: block !important;
}

.member-form-view {
  padding: 2.5rem 0 5rem 0;
  width: 100%;
  background-color: var(--bg-main);
}

/* --------------------------------------------------------------------------
   HEADER PHOTO:
   Crisp, sharp, and unmasked (no white patches or gradient fades).
   Framed in a clean, rounded box with subtle border and elevation.
   -------------------------------------------------------------------------- */
.form-header-container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 2rem auto;
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.form-header-aspect {
  width: 100%;
  position: relative;
  display: block;
  overflow: hidden;
}

.form-header-aspect img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   FORM INTRO CARD:
   Version 1 Boxy Card with orange accent line and metadata pills.
   -------------------------------------------------------------------------- */
.form-intro-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.form-intro-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-orange-dark));
}

.form-intro-card h1 {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.form-metadata-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.meta-pill {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
}

/* --------------------------------------------------------------------------
   QUESTION CARDS (BOXY DESIGN):
   Crisp, distinct cards with subtle borders, gentle shadows, and orange focus glow.
   -------------------------------------------------------------------------- */
.question-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.question-card:focus-within {
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.08);
}

.question-card.has-error {
  border-color: var(--error);
  background-color: #fffaf0;
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.question-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.question-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-orange);
  background-color: #FFF7ED;
  border: 1px solid rgba(249, 115, 22, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.question-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  display: block;
}

.required-mark {
  color: var(--brand-orange);
  margin-left: 0.25rem;
  font-weight: 600;
}

.question-description {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   CURVED RECTANGULAR INPUTS (BOXY DESIGN):
   Curved rectangular inputs with smooth orange focus illumination.
   -------------------------------------------------------------------------- */
.text-input,
.select-input,
.textarea-input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.text-input:hover,
.select-input:hover,
.textarea-input:hover {
  border-color: #cbd5e1;
}

.text-input:focus,
.select-input:focus,
.textarea-input:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.text-input::placeholder,
.textarea-input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.textarea-input {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}

/* Error States on Inputs */
.has-error .text-input,
.has-error .textarea-input {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}

.field-error-msg {
  display: none;
  font-size: 0.85rem;
  color: var(--error);
  margin-top: 0.65rem;
  font-weight: 500;
}

.has-error .field-error-msg {
  display: block;
}

/* --------------------------------------------------------------------------
   MULTIPLE-CHOICE (BOXY CURVED RECTANGLES WITH ORANGE ACCENTS):
   Curved rectangular choice blocks with orange hover, active, and dot indicators.
   -------------------------------------------------------------------------- */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-tile {
  display: flex;
  align-items: center;
  position: relative;
  padding: 1rem 1.25rem;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 100%;
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
  user-select: none;
}

.radio-tile input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-tile .tile-indicator {
  display: inline-flex !important;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 0.85rem;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.radio-tile .tile-label {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.45;
  flex: 1;
  transition: color var(--transition-fast);
}

/* Hover: soft brand-orange tint */
.radio-tile:hover {
  border-color: var(--brand-orange);
  background-color: #FFF7ED;
}

.radio-tile:hover .tile-indicator {
  border-color: var(--brand-orange);
}

/* Selected: brand-orange highlight */
.radio-tile.selected,
.radio-tile:has(input[type="radio"]:checked) {
  border-color: var(--brand-orange);
  background-color: #FFF7ED;
  box-shadow: 0 0 0 1.5px var(--brand-orange);
}

.radio-tile.selected .tile-indicator,
.radio-tile:has(input[type="radio"]:checked) .tile-indicator {
  border-color: var(--brand-orange);
  background-color: var(--brand-orange);
}

.radio-tile.selected .tile-indicator::after,
.radio-tile:has(input[type="radio"]:checked) .tile-indicator::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ffffff;
}

.radio-tile.selected .tile-label,
.radio-tile:has(input[type="radio"]:checked) .tile-label {
  color: #C2410C;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   SUBMISSION CONTAINER:
   Boxy card container with curved rectangular orange button and green lock badge.
   -------------------------------------------------------------------------- */
.form-submit-container {
  margin-top: 2.5rem;
  padding: 2.5rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.submit-slot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 440px;
  padding: 1.15rem 2.25rem;
  background: linear-gradient(135deg, #FF6B00 0%, #F97316 50%, #EA580C 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 12px; /* Curved rectangular shape, NOT oval */
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}

.submit-slot-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.45);
  background: linear-gradient(135deg, #FF7714 0%, #FB923C 50%, #EA580C 100%);
}

.submit-slot-btn:active {
  transform: scale(0.985);
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.3);
  transition: transform 60ms ease;
}

.submit-slot-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Beautiful Green Lock Caption */
.submit-caption {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: #15803d; /* Beautiful emerald green */
  background-color: #f0fdf4; /* Soft green badge */
  border: 1px solid #bbf7d0; /* Subtle green border */
  padding: 0.55rem 1.15rem;
  border-radius: 8px; /* Curved rectangular matching theme */
  margin-top: 1.25rem;
  line-height: 1.45;
}

.submit-caption .lock-icon {
  color: #16a34a;
  flex-shrink: 0;
}

/* ==========================================================================
   Modals & Overlays (Redirect & Settings)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  padding: 2.25rem;
  position: relative;
  text-align: center;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.redirect-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.redirect-msg {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.redirect-countdown {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.redirect-link-btn {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: underline;
}

/* Settings Drawer / Modal */
.settings-modal-card {
  text-align: left;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.settings-field {
  margin-bottom: 1.25rem;
}

.settings-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.settings-help {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ==========================================================================
   Mobile Optimization Suite (Android & iOS)
   Ultra-fast tap response, thumb ergonomics, 16px input zoom prevention,
   curved boxy card geometry, and edge-to-edge safe area adaptation.
   ========================================================================== */

@media (max-width: 640px) {
  /* Layout & Viewports */
  .container {
    padding: 0 0.85rem;
  }

  .top-nav-inner {
    padding: 0.75rem 0.85rem;
  }

  /* Step 1: Gateway Screen */
  .gateway-view {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1.75rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gateway-card {
    padding: 2.25rem 1.25rem 2rem 1.25rem;
    border-radius: 20px;
    box-shadow: 
      0 0 0 1px rgba(255, 255, 255, 0.25),
      0 20px 45px -10px rgba(0, 0, 0, 0.8),
      0 0 35px rgba(249, 115, 22, 0.28);
  }

  .gateway-logo-wrap {
    margin-bottom: 1.15rem;
  }

  .gateway-logo {
    width: 72px;
    height: 72px;
    border-radius: 14px;
  }

  .community-pill {
    padding: 0.4rem 0.95rem;
    font-size: 0.72rem;
    margin-bottom: 1.35rem;
    gap: 0.5rem;
  }

  .gateway-title {
    font-size: 1.18rem;
    line-height: 1.42;
    margin-bottom: 1.75rem;
    letter-spacing: -0.01em;
  }

  .gateway-options {
    gap: 0.85rem;
  }

  .option-btn {
    padding: 1rem 1.15rem;
    min-height: 52px;
    font-size: 0.96rem;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
  }

  .option-btn .btn-indicator {
    width: 20px;
    height: 20px;
    margin-left: 0.6rem;
  }

  /* Step 2: Non-Member Flow */
  .non-member-view {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1.75rem 0.85rem;
  }

  .non-member-card {
    padding: 1.5rem 1.15rem 1.85rem 1.15rem;
    border-radius: 20px;
  }

  .non-member-banner-wrap {
    margin-bottom: 1.25rem;
    border-radius: 10px;
  }

  .non-member-message {
    font-size: 0.96rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
  }

  .join-cta-btn {
    width: 100%;
    min-height: 52px;
    font-size: 1.05rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
  }

  .secondary-btn {
    min-height: 46px;
    font-size: 0.88rem;
    padding: 0.75rem 1rem;
  }

  /* Step 3: Member Form Flow */
  .member-form-view {
    padding: 1rem 0 3.5rem 0;
  }

  .form-header-container {
    border-radius: 14px;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
  }

  .form-intro-card {
    padding: 1.4rem 1.15rem;
    border-radius: 16px;
    margin-bottom: 1.25rem;
  }

  .form-intro-card h1 {
    font-size: 1.35rem;
    line-height: 1.32;
    margin-bottom: 0.85rem;
  }

  .form-metadata-pills {
    gap: 0.45rem;
  }

  .meta-pill {
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
  }

  /* Question Cards (Version 1 Boxy Design) */
  .question-card {
    padding: 1.35rem 1.15rem;
    margin-bottom: 1.15rem;
    border-radius: 16px;
  }

  .question-header {
    gap: 0.75rem;
    margin-bottom: 1.15rem;
  }

  .question-number {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }

  .question-title {
    font-size: 1.02rem;
    line-height: 1.4;
  }

  .question-description {
    font-size: 0.84rem;
    line-height: 1.45;
    margin-top: 0.25rem;
  }

  /* Input Ergonomics & iOS Safari Auto-Zoom Prevention */
  .text-input,
  .select-input,
  .textarea-input {
    font-size: 16px !important; /* Critical: Stops iOS Safari automatic zoom on tap */
    min-height: 48px;
    padding: 0.75rem 0.95rem;
    border-radius: 10px;
    -webkit-appearance: none;
    appearance: none;
  }

  .textarea-input {
    min-height: 95px;
    font-size: 16px !important;
  }

  /* Radio Group & Mobile Tiles */
  .radio-group {
    gap: 0.6rem;
  }

  .radio-tile {
    min-height: 50px;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
  }

  .radio-tile .tile-indicator {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    flex-shrink: 0;
  }

  .radio-tile .tile-label {
    font-size: 0.93rem;
    line-height: 1.4;
  }

  /* Submit Container & CTA */
  .form-submit-container {
    margin-top: 1.75rem;
    padding: 1.75rem 1.15rem;
    border-radius: 16px;
  }

  .submit-slot-btn {
    width: 100%;
    max-width: 100%;
    min-height: 54px;
    font-size: 1.12rem;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    -webkit-tap-highlight-color: transparent;
  }

  .submit-caption {
    width: 100%;
    font-size: 0.82rem;
    padding: 0.65rem 0.85rem;
    text-align: center;
    justify-content: center;
    line-height: 1.4;
  }

  /* Modals on Mobile */
  .modal-overlay {
    padding: 1rem;
  }

  .modal-card {
    padding: 1.75rem 1.15rem;
    border-radius: 16px;
    max-width: 100%;
  }

  .redirect-title {
    font-size: 1.2rem;
  }

  .redirect-msg {
    font-size: 0.9rem;
  }
}

/* Extra-Compact Screen Adaptation (iPhone SE, Galaxy S compact, 320px-375px) */
@media (max-width: 380px) {
  .container {
    padding: 0 0.65rem;
  }

  .gateway-card {
    padding: 1.75rem 0.95rem;
  }

  .gateway-title {
    font-size: 1.08rem;
  }

  .option-btn {
    font-size: 0.9rem;
    padding: 0.85rem 0.9rem;
  }

  .form-intro-card {
    padding: 1.2rem 0.95rem;
  }

  .form-intro-card h1 {
    font-size: 1.18rem;
  }

  .question-card {
    padding: 1.15rem 0.95rem;
  }

  .question-title {
    font-size: 0.96rem;
  }

  .radio-tile {
    padding: 0.75rem 0.85rem;
  }

  .radio-tile .tile-label {
    font-size: 0.88rem;
  }

  .submit-slot-btn {
    font-size: 1.02rem;
    padding: 0.95rem 1rem;
  }
}