/* ExpandHealth — Trial / Self-Signup Page Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary:       #1E4D3F;
  --primary-dark:  #163D32;
  --primary-light: #2E7A64;
  --primary-bg:    #EEF5F1;
  --secondary:     #8B5CF6;
  --accent:        #F97316;
  --bg-light:      #F5F4F0;
  --bg-white:      #FFFFFF;
  --text-dark:     #1F2937;
  --text-medium:   #4B5563;
  --text-muted:    #6B7280;
  --text-light:    #9CA3AF;
  --border:        #E5E7EB;
  --border-light:  #F3F4F6;
  --success:       #10B981;
  --error:         #EF4444;
  --warning:       #F59E0B;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.10);
  --radius:        12px;
}

html, body {
  height: 100%;
  font-family: 'Plus Jakarta Sans', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
}

/* ============================================================
   LAYOUT: Two-column container
   ============================================================ */

.trial-container {
  display: flex;
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  background: var(--bg-white);
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   LEFT PANEL — Branding + features
   ============================================================ */

.trial-left {
  flex: 1.1;
  background: linear-gradient(160deg, var(--primary-bg) 0%, #EEF5F1 60%, #F5F4F0 100%);
  border-right: 1px solid var(--border-light);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* subtle decorative ring */
.trial-left::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30,77,63,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.left-inner {
  padding: 56px 56px 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  height: 100%;
}

/* Logo */
.branding {
  flex-shrink: 0;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-expand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--primary);
}

.logo-health {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-dark);
}

/* Hero copy */
.hero {
  flex-shrink: 0;
}

.hero h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-dark);
  margin-bottom: 12px;
  max-width: 400px;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-medium);
  line-height: 1.65;
  max-width: 380px;
}

/* Features */
.features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-grow: 1;
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.feature-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary);
}

.feature h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.feature p {
  font-size: 13px;
  color: var(--text-medium);
  line-height: 1.55;
}

/* Social proof badges */
.social-proof {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.proof-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-medium);
  font-weight: 500;
}

.proof-badge svg {
  stroke: var(--primary);
  flex-shrink: 0;
}

/* ============================================================
   RIGHT PANEL — Form
   ============================================================ */

.trial-right {
  flex: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  background: var(--bg-white);
  min-height: 100vh;
}

.form-container {
  width: 100%;
  max-width: 420px;
}

/* ── Step indicator ── */

.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-white);
  color: var(--text-light);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.step-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step-dot.done {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  transition: background 0.3s ease;
}

.step-connector.done {
  background: var(--success);
}

/* ── Step panels ── */

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
  animation: fadeSlideIn 0.3s ease;
}

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

/* ── Step header ── */

.step-header {
  margin-bottom: 24px;
}

.step-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.25;
}

.step-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Skip link ── */

.skip-link {
  display: inline-block;
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 20px;
  font-weight: 500;
  transition: color 0.2s;
}

.skip-link:hover {
  color: var(--primary-dark);
}

/* ── Alert ── */

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.alert.success {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #166534;
}

/* ── Form groups ── */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-group .optional {
  font-weight: 400;
  color: var(--text-light);
  font-size: 12px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-white);
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

.form-group input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0;
  flex-shrink: 0;
  appearance: auto;
  -webkit-appearance: checkbox;
  border: none;
  border-radius: 0;
  background: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,77,63,0.10);
}

.form-group input::placeholder {
  color: var(--text-light);
}

/* Password field */

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--text-medium);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

/* Password strength */

.password-strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  height: 4px;
}

.strength-segment {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  transition: background 0.25s ease;
}

.strength-segment.weak   { background: var(--error); }
.strength-segment.fair   { background: var(--warning); }
.strength-segment.good   { background: var(--primary-light); }
.strength-segment.strong { background: var(--success); }

.password-hint {
  font-size: 11.5px;
  margin-top: 4px;
  color: var(--text-muted);
  min-height: 16px;
  transition: color 0.2s;
}

.password-hint.weak   { color: var(--error); }
.password-hint.fair   { color: var(--warning); }
.password-hint.good   { color: var(--primary); }
.password-hint.strong { color: var(--success); }

/* ── Buttons ── */

.btn-primary {
  width: 100%;
  padding: 12px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(30,77,63,0.28);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

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

.spinner {
  width: 18px;
  height: 18px;
  animation: spin 0.7s linear infinite;
  stroke: white;
}

/* ── Auth link ── */

.auth-link {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 18px;
}

.auth-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-link a:hover {
  text-decoration: underline;
}

/* ============================================================
   STEP 3 — Success state
   ============================================================ */

.success-state {
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: var(--primary-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.success-icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--primary);
}

.success-state h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.success-sub {
  font-size: 14px;
  color: var(--text-medium);
  line-height: 1.65;
  margin-bottom: 24px;
}

.success-features {
  text-align: left;
  background: var(--primary-bg);
  border: 1px solid #A8D5C2;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.success-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-dark);
  font-weight: 500;
}

.success-feature-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

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

@media (max-width: 900px) {
  .trial-container {
    flex-direction: column;
    max-width: 100%;
    box-shadow: none;
  }

  .trial-left {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

  .left-inner {
    padding: 32px 24px;
    gap: 24px;
  }

  .features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .trial-right {
    min-height: unset;
    padding: 32px 24px 48px;
    align-items: flex-start;
  }

  .form-container {
    max-width: 100%;
  }
}

@media (max-width: 540px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 22px;
  }

  .left-inner {
    padding: 24px 20px;
  }

  .trial-right {
    padding: 24px 20px 40px;
  }
}
