/**
 * PhonoLogic Signup Page Styles
 * Layout: Split hero (value prop left, form right) + below-fold features
 * Palette: Literate Warmth (Navy, Teal, Brand, Sand, Warm)
 * REQUIRES: variables.css
 */

/* ==========================================================================
   Base
   ========================================================================== */
body.su-body {
  margin: 0;
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  background: #ffffff;
  color: var(--color-text, #1f2937);
  overflow-x: hidden;
}
*, *::before, *::after { box-sizing: border-box; }

/* Header styles now in shared public-header.css */

/* ==========================================================================
   Hero — Split Layout
   ========================================================================== */
.su-hero {
  background: var(--gradient-hero, linear-gradient(135deg, #FDF5E9 0%, #fff7f2 50%, #F0E6D8 100%));
  padding: 0;
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  margin-bottom: -1px;
}
.su-hero-inner {
  display: grid;
  grid-template-columns: 50% 50%;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  align-items: center;
  min-height: 600px;
}

/* Left Panel — Value Prop */
.su-value {
  padding: 64px 48px 64px 48px;
}
.su-value h1 {
  font-size: var(--font-size-display, 42px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--color-navy, #354B5E);
  letter-spacing: -0.02em;
}
.su-value h1 span {
  color: var(--color-brand, #dc9435);
  display: block;
  margin-top: 4px;
}
.su-value-sub {
  font-size: var(--font-size-lg, 18px);
  color: var(--color-text-muted, #6b7280);
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 460px;
}
.su-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.su-benefit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.su-benefit-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-teal, #5B8F8A);
  display: flex;
  align-items: center;
  justify-content: center;
}
.su-benefit-icon svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.su-benefit h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-navy, #354B5E);
  margin: 0 0 2px;
}
.su-benefit p {
  font-size: 14px;
  color: var(--color-text-muted, #6b7280);
  margin: 0;
  line-height: 1.45;
}
.su-trust-line {
  font-size: 14px;
  color: var(--color-text-muted, #6b7280);
  font-style: italic;
  margin: 0;
}

/* Right Panel — Form */
.su-form-panel {
  padding: 48px 48px 48px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Signup Card (preserves all existing IDs for signup.js)
   ========================================================================== */
.su-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(53, 75, 94, 0.15), 0 2px 8px rgba(0,0,0,0.06);
  padding: 36px;
  border: 1px solid rgba(53, 75, 94, 0.08);
}
/* Step indicator */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}
.step {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border, #e5e7eb);
}
.step.active { background: var(--color-brand, #dc9435); }
.step.completed { background: var(--color-success-dark, #166534); }

/* Step visibility */
#emailStep, #passwordStep { display: none; }
#emailStep.visible, #passwordStep.visible { display: block; }

/* Headings */
.su-card h2 {
  font-size: 20px;
  color: var(--color-navy, #354B5E);
  margin: 0 0 8px;
  text-align: center;
  font-weight: 700;
}
.su-card .subtitle {
  color: var(--color-text-muted, #6b7280);
  text-align: center;
  margin-bottom: 20px;
  font-size: 14px;
}

/* Form groups */
.form-group { margin-bottom: 16px; }
.su-card label {
  display: block;
  font-weight: 500;
  color: var(--color-text-secondary, #374151);
  margin-bottom: 6px;
  font-size: 14px;
}
.su-card input[type="email"],
.su-card input[type="text"],
.su-card input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #fff;
  color: var(--color-text, #1f2937);
}
.su-card input:focus {
  outline: none;
  border-color: var(--color-teal, #5B8F8A);
}

/* Password */
.password-wrapper { position: relative; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted, #6b7280);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.password-requirements {
  background: var(--color-gold-pale, #FDF5E9);
  border: 1px solid var(--color-sand-dark, #E2D4C2);
  border-radius: var(--radius-md, 8px);
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 13px;
}
.password-requirements .title {
  font-weight: 600;
  color: var(--color-navy, #354B5E);
  margin-bottom: 8px;
}
.password-requirements ul { margin: 0; padding-left: 18px; color: var(--color-text-muted, #6b7280); }
.password-requirements li { margin-bottom: 2px; }
.password-requirements li.met { color: var(--color-success-dark, #166534); }
.password-requirements li.met::marker { content: "\2713  "; }

/* Submit button */
.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--color-brand, #dc9435);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg, 10px);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(220, 148, 53, 0.3);
}
.submit-btn:hover:not(:disabled) { background: var(--color-brand-hover, #c4842f); transform: translateY(-1px); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Error + success states */
.error-message {
  background: var(--color-error-light, #fef2f2);
  color: var(--color-error, #dc2626);
  padding: 12px;
  border-radius: var(--radius-md, 8px);
  margin-bottom: 16px;
  font-size: 14px;
  display: none;
}
.error-message.visible { display: block; }

.success-state { display: none; text-align: center; padding: 20px 0; }
.success-state.visible { display: block; }
.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--color-success-light, #d1fae5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-success-dark, #059669);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.success-state h2 { color: var(--color-success-dark, #166534); margin: 0 0 8px; }
.success-state p { color: var(--color-text-muted, #6b7280); margin: 0 0 20px; font-size: 14px; line-height: 1.5; }

.verification-note {
  background: var(--color-gold-pale, #FDF5E9);
  border: 1px solid var(--color-sand-dark, #E2D4C2);
  border-radius: var(--radius-md, 8px);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--color-navy, #354B5E);
}
.verification-note p { margin: 0; color: inherit; }

.home-link {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-brand, #dc9435);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-lg, 10px);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}
.home-link:hover { background: var(--color-brand-hover, #c4842f); }

.login-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--color-text-muted, #6b7280);
}
.login-link a { color: var(--color-teal, #5B8F8A); text-decoration: none; font-weight: 600; }
.login-link a:hover { color: var(--color-navy, #354B5E); }

.back-btn {
  background: none;
  border: none;
  color: var(--color-text-muted, #6b7280);
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.back-btn:hover { color: var(--color-navy, #354B5E); }

.email-display {
  background: var(--color-gold-pale, #FDF5E9);
  padding: 10px 14px;
  border-radius: var(--radius-md, 8px);
  font-size: 14px;
  color: var(--color-navy, #354B5E);
  margin-bottom: 16px;
  border: 1px solid var(--color-sand-dark, #E2D4C2);
}

.recaptcha-notice {
  font-size: 10px;
  color: var(--color-text-placeholder, #9ca3af);
  margin-top: 16px;
  text-align: center;
}

/* Hide reCAPTCHA badge — allowed by Google when notice text is displayed */
.grecaptcha-badge { visibility: hidden !important; }

/* Age verification checkbox inline label */
.su-age-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: 400;
}
.su-age-label input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--color-teal, #5B8F8A);
  flex-shrink: 0;
}
.su-age-label span {
  font-size: 14px;
  color: var(--color-text-secondary, #374151);
  line-height: 1.4;
}

.su-mismatch {
  display: none;
  color: var(--color-error, #dc2626);
  font-size: 13px;
  margin: 6px 0 0 2px;
}

/* ==========================================================================
   Wave Dividers (reused from /try)
   ========================================================================== */
.su-divider {
  width: 100%;
  line-height: 0;
  overflow: hidden;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}
.su-divider svg { width: 100%; height: auto; display: block; }
.su-divider-hero-to-sand { background: var(--gradient-hero, linear-gradient(135deg, #FDF5E9 0%, #fff7f2 50%, #F0E6D8 100%)); }
.su-divider-hero-to-sand svg { fill: var(--color-sand, #F0E6D8); }
.su-divider-sand-to-white { background: var(--color-sand, #F0E6D8); }
.su-divider-sand-to-white svg { fill: #ffffff; }

/* ==========================================================================
   Below-Fold — What You Get (on sand)
   ========================================================================== */
.su-bg-sand { background: var(--color-sand, #F0E6D8); }
.su-section {
  padding: 72px 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.su-section h2 {
  font-size: var(--font-size-heading, 36px);
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--color-navy, #354B5E);
  letter-spacing: -0.02em;
  text-align: center;
}
.su-section-sub {
  font-size: var(--font-size-md, 16px);
  color: var(--color-text-muted, #6b7280);
  margin: 0 auto 48px;
  max-width: 560px;
  line-height: 1.6;
  text-align: center;
}
.su-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.su-feature-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(53, 75, 94, 0.08);
  border: 1px solid var(--color-sand-dark, #E2D4C2);
}
.su-feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-navy, #354B5E);
  margin: 0 0 8px;
}
.su-feature-card p {
  font-size: 14px;
  color: var(--color-text-muted, #6b7280);
  line-height: 1.55;
  margin: 0;
}
.su-feature-accent {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-brand, #dc9435);
  margin-bottom: 16px;
}

/* ==========================================================================
   Responsive — Small Desktop (1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .su-hero-inner { grid-template-columns: 45% 55%; }
  .su-value { padding: 48px 32px; }
  .su-value h1 { font-size: 36px; }
  .su-form-panel { padding: 40px 32px 40px 16px; }
  .su-section { padding: 56px 24px; }
}

/* ==========================================================================
   Responsive — Tablet (768px)
   ========================================================================== */
@media (max-width: 768px) {
  .su-hero { min-height: auto; }
  .su-hero-inner { grid-template-columns: 1fr; }
  .su-value { padding: 40px 24px 24px; text-align: center; }
  .su-value h1 { font-size: 32px; }
  .su-value-sub { margin-left: auto; margin-right: auto; }
  .su-benefits { align-items: center; max-width: 400px; margin-left: auto; margin-right: auto; }
  .su-benefit { text-align: left; }
  .su-trust-line { text-align: center; }
  .su-form-panel { padding: 0 24px 40px; }
  .su-card { max-width: 100%; }
  .su-section { padding: 48px 20px; }
  .su-section h2 { font-size: 28px; }
  .su-features { grid-template-columns: 1fr; max-width: 420px; gap: 16px; }
}

/* ==========================================================================
   Responsive — Mobile (480px)
   ========================================================================== */
@media (max-width: 480px) {
  .su-value { padding: 32px 16px 16px; }
  .su-value h1 { font-size: 26px; }
  .su-value-sub { font-size: 15px; }
  .su-benefits { gap: 12px; }
  .su-benefit-icon { width: 32px; height: 32px; border-radius: 8px; }
  .su-benefit-icon svg { width: 16px; height: 16px; }
  .su-benefit h3 { font-size: 14px; }
  .su-benefit p { font-size: 13px; }
  .su-form-panel { padding: 0 16px 32px; }
  .su-card { padding: 24px; }
  .su-section { padding: 36px 16px; }
  .su-section h2 { font-size: 24px; }
  .su-section-sub { font-size: 14px; margin-bottom: 28px; }
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */
[data-theme="dark"] body.su-body { background: var(--color-bg); color: var(--color-text); }
[data-theme="dark"] .su-hero { background: var(--gradient-hero); }
[data-theme="dark"] .su-value h1 { color: var(--color-text); }
[data-theme="dark"] .su-value-sub { color: var(--color-text-muted); }
[data-theme="dark"] .su-benefit h3 { color: var(--color-text); }
[data-theme="dark"] .su-card { background: var(--color-bg-card); border-color: var(--color-border); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
[data-theme="dark"] .su-card h2 { color: var(--color-text); }
[data-theme="dark"] .su-card input { background: var(--color-bg-subtle); border-color: var(--color-border); color: var(--color-text); }
[data-theme="dark"] .su-card label { color: var(--color-text-secondary); }
[data-theme="dark"] .email-display { background: var(--color-bg-subtle); border-color: var(--color-border); color: var(--color-text); }
[data-theme="dark"] .password-requirements { background: var(--color-bg-subtle); border-color: var(--color-border); }
[data-theme="dark"] .password-requirements .title { color: var(--color-text); }
[data-theme="dark"] .verification-note { background: var(--color-bg-subtle); border-color: var(--color-border); color: var(--color-text); }
[data-theme="dark"] .su-bg-sand { background: var(--color-sand); }
[data-theme="dark"] .su-divider-hero-to-sand { background: var(--gradient-hero); }
[data-theme="dark"] .su-divider-hero-to-sand svg { fill: var(--color-sand); }
[data-theme="dark"] .su-divider-sand-to-white { background: var(--color-sand); }
[data-theme="dark"] .su-divider-sand-to-white svg { fill: var(--color-bg); }
[data-theme="dark"] .su-feature-card { background: var(--color-bg-card); border-color: var(--color-border); }
[data-theme="dark"] .su-feature-card h3 { color: var(--color-text); }

/* ==========================================================================
   High-Contrast Color Blind Mode — Signup
   ========================================================================== */

/* Error message: red→magenta */
[data-a11y="high-contrast"] .su-body .error-message {
  background: var(--color-error-light, #fce7f3);
  color: var(--color-error, #be185d);
}

/* Success icon: green→blue */
[data-a11y="high-contrast"] .success-icon {
  background: var(--color-success-light, #dbeafe);
}
[data-a11y="high-contrast"] .success-icon svg {
  stroke: var(--color-success-dark, #1d4ed8);
}

/* Password mismatch: red→magenta */
[data-a11y="high-contrast"] .su-mismatch {
  color: var(--color-error, #be185d);
}
