/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS — Calm Medical Premium
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Colour System */
  --color-surface: #FFFFFF;
  --color-background: #F8FAFC;
  --color-primary: #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-primary-light: #EFF6FF;
  --color-accent: #0F9F8F;
  --color-text: #1F2937;
  --color-text-secondary: #64748B;
  --color-text-light: #94A3B8;
  --color-border: #E2E8F0;
  --color-border-focus: #93C5FD;
  --color-success: #15803D;
  --color-success-bg: #F0FDF4;
  --color-warning: #D97706;
  --color-warning-bg: #FFFBEB;
  --color-danger: #DC2626;
  --color-danger-bg: #FEF2F2;
  --color-loading: #64748B;
  --color-loading-bg: #F1F5F9;

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --content-width: 480px;
  --auth-width: 440px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.text-secondary {
  color: var(--color-text-secondary);
}

.hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   HEALTH PAGE (Batch 1 — preserved)
   ═══════════════════════════════════════════════════════════════ */

.health-page {
  width: 100%;
  max-width: var(--content-width);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0 auto;
}

.health-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-2xl);
  text-align: center;
  width: 100%;
}

.health-card h1 {
  margin-bottom: var(--space-xs);
}

.subtitle {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.status-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-background);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.status-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
}

.status-badge {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.badge-loading {
  background: var(--color-loading-bg);
  color: var(--color-loading);
}

.badge-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.retry-container {
  margin-top: var(--space-md);
}

.retry-btn {
  background: var(--color-primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-xl);
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  min-height: 44px;
  min-width: 44px;
}

.retry-btn:hover {
  background: var(--color-primary-dark);
}

.retry-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.retry-btn:active {
  transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════
   AUTH PAGES (Phase 2B)
   ═══════════════════════════════════════════════════════════════ */

.auth-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-lg);
}

.auth-container {
  width: 100%;
  max-width: var(--auth-width);
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2xl) var(--space-xl);
}

.account-details p {
  overflow-wrap: anywhere;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-eyebrow {
  color: var(--color-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.verify-email-address {
  margin-top: var(--space-xs);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.otp-group {
  margin-top: var(--space-xl);
}

.otp-label {
  font-size: 1rem;
  font-weight: 700;
}

.otp-input {
  min-height: 64px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.45em;
  text-align: center;
  padding-left: calc(0.45em + var(--space-md));
  border-width: 2px;
}

.otp-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.resend-section {
  text-align: center;
  margin-top: var(--space-xl);
}

.resend-control {
  min-height: 44px;
  margin-top: var(--space-xs);
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.resend-control:disabled {
  color: var(--color-text-secondary);
  cursor: not-allowed;
}

.resend-control:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.verification-complete {
  text-align: center;
}

.verification-complete h1,
.verification-complete p {
  margin-bottom: var(--space-md);
}

.account-proof-page {
  min-height: 100vh;
  padding: var(--space-lg);
  background: linear-gradient(180deg, var(--color-primary-light), var(--color-background) 42%);
}

.account-proof-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.account-proof-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0 var(--space-xl);
  color: var(--color-primary-dark);
  font-weight: 700;
}

.brand-mark,
.signed-in-marker {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
}

.brand-mark {
  width: 36px;
  height: 36px;
  color: #FFFFFF;
  background: var(--color-primary);
}

.account-proof-card {
  padding: var(--space-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.account-loading,
.account-proof-content {
  text-align: center;
}

.account-spinner {
  margin: var(--space-lg) auto;
  border-color: rgba(37, 99, 235, 0.2);
  border-top-color: var(--color-primary);
}

.signed-in-marker {
  width: 52px;
  height: 52px;
  margin-bottom: var(--space-md);
  background: var(--color-success-bg);
  color: var(--color-success);
  font-size: 1.5rem;
  font-weight: 700;
}

.account-proof-content h1 {
  margin: var(--space-xs) 0 var(--space-sm);
  font-size: 1.75rem;
}

.account-proof-lead {
  font-weight: 600;
}

.account-proof-details {
  display: grid;
  gap: var(--space-sm);
  margin: var(--space-xl) 0;
  text-align: left;
}

.account-proof-details > div {
  padding: var(--space-md);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.account-proof-details dt {
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
}

.account-proof-details dd {
  margin-top: var(--space-xs);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.account-development-note {
  margin-bottom: var(--space-xl);
  padding: var(--space-md);
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  color: var(--color-primary-dark);
  font-size: 0.875rem;
}

/* ─── Auth Header ─────────────────────────────────────────────── */

.auth-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.auth-subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

/* ─── Form Layout ─────────────────────────────────────────────── */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.form-hint {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-top: var(--space-xs);
}

.form-error {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-danger);
  margin-top: var(--space-xs);
  min-height: 1.2em;
}

.form-input,
.form-select {
  width: 100%;
  height: 48px;
  padding: 0 var(--space-md);
  font-size: 1rem;
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
}

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

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-input:hover:not(:focus) {
  border-color: #CBD5E1;
}

.form-input-error {
  border-color: var(--color-danger) !important;
}

.form-input-error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.form-input-highlight {
  border-color: var(--color-warning) !important;
  background-color: var(--color-warning-bg) !important;
}

/* ─── Phone Input Group ───────────────────────────────────────── */

.phone-input-group {
  display: flex;
  gap: 0;
}

.phone-country-select {
  width: 140px;
  min-width: 120px;
  flex-shrink: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  border-right: none;
  font-size: 0.875rem;
  padding: 0 var(--space-sm);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.phone-input {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  flex: 1;
  min-width: 0;
}

/* ─── Password Input ──────────────────────────────────────────── */

.password-input-wrapper {
  position: relative;
}

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

.password-toggle {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 1.125rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: color var(--transition-fast);
}

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

.password-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

/* ─── Checkboxes / Consent ────────────────────────────────────── */

.consent-group {
  margin-bottom: var(--space-xl);
}

.consent-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.form-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.consent-label {
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.5;
  cursor: pointer;
}

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

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

.auth-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─── Buttons ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  height: 48px;
  padding: 0 var(--space-xl);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-family);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
}

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

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-dark);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--color-background);
  border-color: #CBD5E1;
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-full {
  width: 100%;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ─── Spinner ─────────────────────────────────────────────────── */

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-color: rgba(255, 255, 255, 0.6); border-top-color: #FFFFFF; }
  .btn:active:not(:disabled) { transform: none; }
  .retry-btn:active { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   DOMICARE DESIGN TOKENS — STITCH SYSTEM
   ═══════════════════════════════════════════════════════════════ */

:root {
  --stitch-primary: #004c22;
  --stitch-action: #166534;
  --stitch-soft-green: #edf6f1;
  --stitch-teal: #006a63;
  --stitch-teal-container: #99efe5;
  --stitch-navy: #264267;
  --stitch-background: #f7faf9;
  --stitch-surface: #ffffff;
  --stitch-surface-low: #f1f4f3;
  --stitch-text: #181c1c;
  --stitch-text-secondary: #404940;
  --stitch-outline: #707a6f;
  --stitch-outline-soft: #bfc9bd;
  --stitch-error: #ba1a1a;
  --stitch-error-container: #ffdad6;
  --stitch-container: 1280px;
  --stitch-shadow: 0 4px 20px rgba(30, 58, 95, 0.05);
  --landing-max: 1280px;
  --landing-px: 64px;
}

html { scroll-behavior: smooth; }
body { font-family: "Manrope", sans-serif; color: var(--stitch-text); background: var(--stitch-background); }
svg { display: block; width: 1em; height: 1em; fill: currentColor; }

/* ─── Brand Lockup ────────────────────────────────────────────── */

.brand-lockup { display: inline-flex; align-items: center; gap: 8px; color: var(--stitch-primary); font-size: 24px; font-weight: 700; line-height: 1.4; text-decoration: none; }
.brand-lockup-compact { font-size: 20px; }
.brand-mark { display: inline-flex; font-size: 32px; }
.brand-lockup-compact .brand-mark { font-size: 24px; }
.brand-lockup:focus-visible { border-radius: 6px; outline: 3px solid #8bd79b; outline-offset: 4px; }
.brand-lockup .brand-mark { width: auto; height: auto; display: inline-flex; border-radius: 0; color: var(--stitch-primary); background: transparent; }


/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE — STITCH REFERENCE REPRODUCTION
   ═══════════════════════════════════════════════════════════════ */

.landing-page {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background: var(--stitch-background);
}

.landing-container {
  width: min(100%, var(--landing-max));
  margin: 0 auto;
  padding-inline: var(--landing-px);
}

.landing-eyebrow {
  margin: 0 0 16px;
  color: var(--stitch-text-secondary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── Header / Navigation ─────────────────────────────────────── */

.landing-header {
  position: fixed;
  top: 8px;
  left: 8px;
  right: 8px;
  width: auto;
  z-index: 50;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(0, 51, 21, 0.08);
}

.landing-header-inner {
  width: min(100%, var(--landing-max));
  min-height: 64px;
  margin: 0 auto;
  padding: 16px var(--landing-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.landing-nav-link {
  color: var(--stitch-text-secondary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: default;
}

a.landing-nav-link:hover,
a.landing-nav-link:focus {
  color: var(--stitch-primary);
}

.landing-nav-inactive {
  cursor: default;
}

.landing-nav-active {
  color: var(--stitch-primary);
  position: relative;
}

.landing-nav-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--stitch-primary);
  border-radius: 1px;
}

/* ─── Mobile Drawer ────────────────────────────────────────────── */

.landing-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 320px);
  z-index: 100;
  background: var(--stitch-surface);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  padding: 0;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 250ms ease, visibility 0s linear 250ms;
  overflow-y: auto;
}

.landing-mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 250ms ease, visibility 0s;
}

.landing-mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--stitch-outline-soft);
}

.landing-mobile-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--stitch-text);
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.landing-mobile-close:hover {
  background: var(--stitch-surface-low);
}

.landing-mobile-close:focus-visible {
  outline: 2px solid var(--stitch-action);
  outline-offset: 2px;
}

.landing-mobile-nav {
  padding: 12px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.landing-mobile-link {
  display: block;
  padding: 12px 16px;
  color: var(--stitch-text-secondary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.landing-mobile-link:hover,
.landing-mobile-link:focus {
  background: var(--stitch-surface-low);
  color: var(--stitch-primary);
}

.landing-mobile-link.landing-nav-active {
  color: var(--stitch-primary);
  background: var(--stitch-soft-green);
}

.landing-mobile-link.landing-nav-active::after {
  display: none;
}

.landing-mobile-inactive {
  cursor: default;
  opacity: 0.5;
}

.landing-mobile-inactive:hover,
.landing-mobile-inactive:focus {
  background: transparent;
  color: var(--stitch-text-secondary);
}

/* Drawer Login — hidden by default, shown at narrow viewports */
.landing-mobile-login {
  display: none;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--stitch-outline-soft);
}

/* ─── Compact Auth (segmented Login | Sign Up) ──────────────── */

.landing-auth-compact {
  display: none;
  flex-shrink: 0;
  height: var(--landing-nav-control-height, 36px);
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--stitch-action);
}

.landing-auth-compact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: "Manrope", sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.landing-auth-compact-login {
  color: var(--stitch-action);
  background: transparent;
  border-right: 1px solid var(--stitch-action);
}

.landing-auth-compact-login:hover {
  background: var(--stitch-surface-low);
}

.landing-auth-compact-login:focus-visible {
  outline: 2px solid var(--stitch-action);
  outline-offset: -2px;
}

.landing-auth-compact-signup {
  color: #FFFFFF;
  background: var(--stitch-primary);
}

.landing-auth-compact-signup:hover {
  opacity: 0.9;
}

.landing-auth-compact-signup:focus-visible {
  outline: 2px solid var(--stitch-action);
  outline-offset: -2px;
}

/* ─── Backdrop ──────────────────────────────────────────────────── */

.landing-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 250ms ease, visibility 0s linear 250ms;
}

.landing-mobile-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 250ms ease, visibility 0s;
}

.landing-auth-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.landing-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--landing-nav-control-height, 36px);
  color: var(--stitch-action);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  padding: 0 16px;
  border-radius: 10px;
  border: 1.5px solid var(--stitch-action);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.landing-login:hover {
  background: var(--stitch-surface-low);
  border-color: var(--stitch-primary);
}

.landing-login:focus-visible {
  outline: 2px solid var(--stitch-action);
  outline-offset: 4px;
  border-radius: 6px;
}

.landing-signup {
  height: var(--landing-nav-control-height, 36px);
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: "Manrope", sans-serif;
  background: var(--stitch-primary);
  color: #FFFFFF;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.landing-signup:hover {
  opacity: 0.9;
}

.landing-signup:focus-visible {
  outline: 2px solid var(--stitch-action);
  outline-offset: 2px;
}

.landing-hamburger {
  display: none;
  flex-basis: var(--landing-nav-control-height, 36px);
  height: var(--landing-nav-control-height, 36px);
  min-width: 30px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid var(--stitch-action);
  color: var(--stitch-primary);
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 1;
}

.landing-hamburger:hover {
  background: var(--stitch-surface-low);
}

/* ─── Hero ────────────────────────────────────────────────────── */

/* Section scroll offset for fixed navbar */
.landing-hero,
.landing-services,
.landing-how,
.landing-why,
.landing-final-cta {
  scroll-margin-top: 80px;
}

.landing-hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 120px;
}

.landing-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Designed base for the hero photographic layer.
     The hero image is injected by the router after boot, so before it paints
     this box is empty and the page background (#f7faf9) bled through the
     overlay gradient — a washed-out, near-white hero for as long as the image
     took to load. --stitch-primary is the same deep green the hero overlay
     already uses, so the hero's first visible frame is coherent instead of
     pale. The image covers the box completely once loaded, so the finished
     hero is unchanged. */
  background-color: var(--stitch-primary);
}

.landing-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.landing-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 76, 34, 0.9) 0%, rgba(0, 76, 34, 0.6) 40%, transparent 70%);
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  text-align: left;
  margin-left: 0;
  margin-right: auto;
}

.landing-hero h1 {
  margin: 0 0 24px;
  color: #FFFFFF;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.14;
  position: relative;
  top: 1px;
}

.landing-hero-content > p {
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.56;
  max-width: 512px;
}

.landing-hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.landing-hero-cta-inactive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 16px 32px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: "Manrope", sans-serif;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}

.landing-hero-cta-inactive:hover {
  opacity: 0.9;
}

.landing-hero-cta-inactive:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

.landing-hero-actions .landing-hero-cta-inactive:first-of-type {
  background: var(--stitch-primary);
  color: #FFFFFF;
  border-color: var(--stitch-primary);
}

.landing-hero-actions .landing-hero-cta-inactive:last-of-type {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #FFFFFF;
}

.landing-hero-actions .landing-hero-cta-inactive:last-of-type:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #FFFFFF;
}

.landing-cta-arrow {
  width: 18px;
  height: 18px;
}

/* ─── Hero Organic Curve ──────────────────────────────────────── */

.landing-hero-curve {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 120px;
  line-height: 0;
  z-index: 2;
  color: var(--stitch-background);
}

.landing-hero-curve svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ─── Services Section ────────────────────────────────────────── */

.landing-services {
  position: relative;
  padding: 120px 0 0;
  background: var(--stitch-background);
  z-index: 1;
}

.landing-section-heading {
  margin-bottom: 48px;
  text-align: center;
}

.landing-section-heading h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--stitch-primary);
}

.landing-services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 0;
}

.landing-service-card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: var(--stitch-surface);
  border: 1px solid #e0e3e2;
  border-radius: 16px;
  transition: box-shadow var(--transition-normal);
}

.landing-service-card:hover {
  box-shadow: 0 10px 30px rgba(0, 76, 34, 0.05);
}

.landing-service-card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d1e7dd;
  color: var(--stitch-primary);
}

.landing-service-card h3 {
  margin: 0 0 12px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--stitch-primary);
}

.landing-service-card p {
  margin: 0 0 24px;
  color: var(--stitch-text-secondary);
  font-size: 16px;
  line-height: 1.5;
  flex: 1;
}

.landing-service-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--stitch-action);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
}

.landing-service-action:hover {
  opacity: 0.8;
}

.landing-service-action:focus-visible {
  outline: 2px solid var(--stitch-action);
  outline-offset: 2px;
  border-radius: 4px;
}

.landing-service-action svg {
  width: 16px;
  height: 16px;
}

/* ─── Value Band ──────────────────────────────────────────────── */

.landing-value-band {
  position: relative;
  padding: 48px 0;
  background: var(--stitch-primary);
  margin-top: 48px;
  overflow: hidden;
}

.landing-value-curve-top {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 40px;
  line-height: 0;
  color: var(--stitch-background);
}

.landing-value-curve-bottom {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 40px;
  line-height: 0;
  color: var(--stitch-background);
}

.landing-value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
  z-index: 1;
}

.landing-value-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.landing-value-icon {
  color: #d1e7dd;
}

.landing-value-icon svg {
  width: 32px;
  height: 32px;
}

.landing-value-label {
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ─── How DomiCare Works ──────────────────────────────────────── */

.landing-how {
  position: relative;
  padding: 120px 0;
  background: var(--stitch-background);
}

.landing-steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.landing-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

.landing-step-icon {
  width: 96px;
  height: 96px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--stitch-surface);
  border: 1px solid #c0c9be;
  color: var(--stitch-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.landing-step-icon svg {
  width: 40px;
  height: 40px;
}

.landing-step-badge {
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--stitch-action);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
}

.landing-step h3 {
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--stitch-primary);
}

.landing-step p {
  margin: 0;
  color: var(--stitch-text-secondary);
  font-size: 14px;
  line-height: 1.5;
  max-width: 220px;
}

/* ─── Why DomiCare ────────────────────────────────────────────── */

.landing-why {
  position: relative;
  padding: 120px 0;
  background: var(--stitch-background);
}

.landing-why-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.landing-why-copy h2 {
  margin: 0 0 24px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--stitch-primary);
}

.landing-why-intro {
  margin: 0 0 40px;
  color: var(--stitch-text-secondary);
  font-size: 18px;
  line-height: 1.56;
}

.landing-why-features {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.landing-why-feature {
  display: flex;
  gap: 16px;
}

.landing-why-feature-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d1e7dd;
  color: var(--stitch-primary);
}

.landing-why-feature-icon svg {
  width: 24px;
  height: 24px;
}

.landing-why-feature h4 {
  margin: 0 0 6px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--stitch-primary);
}

.landing-why-feature p {
  margin: 0;
  color: var(--stitch-text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

/* Why Visual — Photo + Glass Panel */

.landing-why-visual {
  display: flex;
  justify-content: flex-end;
}

.landing-why-photo {
  position: relative;
  width: 100%;
  height: 600px;
  border-radius: 24px;
  overflow: hidden;
}

.landing-why-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.landing-why-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 76, 34, 0.6) 0%, transparent 50%);
}

.landing-why-glass-panel {
  position: absolute;
  bottom: 32px;
  left: 32px;
  right: 32px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
}

.landing-why-glass-panel h4 {
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--stitch-primary);
}

.landing-why-glass-panel p {
  margin: 0;
  color: var(--stitch-text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

/* ─── Final CTA ───────────────────────────────────────────────── */

.landing-final-cta {
  position: relative;
  padding: 120px 0;
  background: var(--stitch-primary);
  color: #FFFFFF;
  text-align: center;
  overflow: hidden;
}

.landing-cta-curve {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 60px;
  line-height: 0;
  color: var(--stitch-background);
  z-index: 1;
}

.landing-cta-glow {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background: radial-gradient(circle at center, #adf3b8, transparent 70%);
}

.landing-final-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}

.landing-final-cta h2 {
  margin: 0 0 24px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  color: #FFFFFF;
}

.landing-final-cta p {
  margin: 0 0 40px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.56;
}

.landing-final-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.landing-final-cta-actions .landing-hero-cta-inactive {
  min-height: 48px;
  padding: 16px 32px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: "Manrope", sans-serif;
}

.landing-final-cta-actions .landing-hero-cta-inactive:first-of-type {
  background: var(--stitch-action);
  color: #FFFFFF;
  border-color: var(--stitch-action);
}

.landing-final-cta-create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 16px 32px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: "Manrope", sans-serif;
  background: var(--stitch-surface);
  color: var(--stitch-primary);
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.landing-final-cta-create:hover {
  opacity: 0.9;
}

/* ─── Footer ──────────────────────────────────────────────────── */

.landing-footer {
  padding: 48px 0 0;
  background: var(--stitch-background);
  border-top: 1px solid #c0c9be;
}

.landing-footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
}

.landing-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing-footer-brand p {
  max-width: 320px;
  margin: 0;
  color: var(--stitch-text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.landing-footer-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-footer-column h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--stitch-primary);
}

.landing-footer-column a,
.landing-footer-column span {
  color: var(--stitch-text-secondary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}

.landing-footer-column a:hover {
  color: var(--stitch-action);
  text-decoration: underline;
}

.landing-footer-bottom {
  border-top: 1px solid var(--stitch-outline-soft);
  padding: 20px 0;
}

.landing-footer-bottom .landing-container {
  display: flex;
  justify-content: center;
}

.landing-footer-bottom p {
  margin: 0;
  color: var(--stitch-text-secondary);
  font-size: 13px;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   AUTH PAGE — STITCH SYSTEM (preserved)
   ═══════════════════════════════════════════════════════════════ */

.auth-page.stitch-auth-page { min-height: 100vh; padding: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; background: var(--stitch-background); }
.auth-page-header { min-height: 72px; padding: 12px 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border: 0; background: var(--stitch-background); box-shadow: none; }
.auth-page-title { grid-column: 2; color: var(--stitch-text); font-family: "Manrope", sans-serif; font-size: 22px; font-weight: 700; line-height: 1.3; text-align: center; }
.auth-back-control { width: 48px; height: 48px; display: grid; place-items: center; justify-self: start; border-radius: 50%; color: var(--stitch-primary); font-size: 24px; text-decoration: none; }
.auth-back-control:hover { background: var(--stitch-soft-green); }
.auth-back-control:focus-visible { outline: 3px solid #8bd79b; outline-offset: 2px; }
.auth-workspace { width: 60%; max-width: 864px; min-width: 320px; min-height: 620px; margin: 0 auto; padding: 40px 40px 64px; display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.auth-workspace-signup { align-items: flex-start; }
.auth-content { width: min(100%, 540px); margin: 0 auto; }
.auth-content-wide { width: min(100%, 600px); }
.stitch-auth-card { width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.auth-content:not(.auth-content-wide) .stitch-auth-card > form,
.auth-content:not(.auth-content-wide) .stitch-auth-card > .auth-card-footer,
.auth-content:not(.auth-content-wide) .stitch-auth-card > .auth-header,
.auth-content:not(.auth-content-wide) .stitch-auth-card > .alert { width: min(100%, 540px); margin-left: auto; margin-right: auto; }
.stitch-auth-card .auth-header { margin: 0 0 32px; text-align: center; }
.stitch-auth-card .auth-header h1 { margin: 0 0 8px; color: var(--stitch-primary); font-family: "Manrope", sans-serif; font-size: 32px; font-weight: 700; line-height: 1.25; letter-spacing: normal; }
.stitch-auth-card .auth-subtitle { margin: 0; color: var(--stitch-text-secondary); font-size: 16px; line-height: 1.6; }
.stitch-auth-card form { display: flex; flex-direction: column; gap: 24px; }
.stitch-auth-card .form-row { gap: 16px; }
.stitch-auth-card .form-group { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.stitch-auth-card .form-label { color: var(--stitch-text-secondary); font-size: 12px; font-weight: 600; line-height: 1.2; letter-spacing: .05em; }
.stitch-auth-card .form-input, .stitch-auth-card .form-select { min-height: 50px; border: 1px solid var(--stitch-outline-soft); border-radius: 8px; background: var(--stitch-surface); color: var(--stitch-text); font: inherit; }
.stitch-auth-card .form-input::placeholder { color: #707a6f; opacity: 1; }
.stitch-auth-card .form-input:focus, .stitch-auth-card .form-select:focus { border-color: var(--stitch-action); outline: none; box-shadow: 0 0 0 3px var(--stitch-soft-green); }
.stitch-auth-card .form-input-error { border-color: var(--stitch-error); }
.stitch-auth-card .form-hint { color: var(--stitch-text-secondary); font-size: 14px; line-height: 1.5; }
.stitch-auth-card .form-error { min-height: 0; color: var(--stitch-error); }
.stitch-auth-card .btn { min-height: 48px; padding: 16px 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 24px; font-family: "Manrope", sans-serif; font-size: 16px; font-weight: 600; line-height: 1; text-decoration: none; }
.stitch-auth-card .btn-primary { border-color: var(--stitch-action); background: var(--stitch-action); color: #fff; }
.stitch-auth-card .btn-primary:hover:not(:disabled) { border-color: var(--stitch-primary); background: var(--stitch-primary); }
.stitch-auth-card .btn-secondary { border: 1px solid var(--stitch-outline-soft); background: transparent; color: var(--stitch-primary); }
.stitch-auth-card .auth-link { color: var(--stitch-action); font-weight: 600; }
.auth-card-footer { margin-top: 40px; text-align: center; color: var(--stitch-text-secondary); }
.auth-card-footer p { margin: 0; }
.auth-account-action { padding-top: 32px; border-top: 1px solid var(--stitch-outline-soft); }
.auth-account-action p { margin-bottom: 16px; }
.login-recovery { margin-top: 20px; text-align: center; }
.auth-inline-prompt { margin-top: 24px; text-align: center; color: var(--stitch-text-secondary); font-size: 15px; line-height: 1.6; }
.google-auth-section { margin-bottom: 24px; }
/* "Continue with Google" host.
   The ONLY Google control is the official button produced by
   google.accounts.id.renderButton(...). This element is a plain layout
   container that CENTRES that button in the existing auth section: it adds no
   border, background, radius or sizing of its own, so it can never read as — or
   behave like — a second or fake button, and it never overlays or resizes the
   official component. */
.google-button-host { min-height: 44px; display: flex; align-items: center; justify-content: center; }
.google-auth-status { margin: 0; color: var(--stitch-text-secondary); font-size: 14px; line-height: 1.5; }
.auth-divider { margin: 24px 0; display: flex; align-items: center; gap: 16px; color: var(--stitch-text-secondary); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--stitch-outline-soft); }
.auth-legal-footer { min-height: 72px; padding: 24px 16px; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--stitch-outline-soft); color: var(--stitch-text-secondary); text-align: center; }
.auth-legal-footer p { margin: 0; font-size: 14px; }
.auth-title-outside { margin-bottom: 32px; text-align: center; }
.auth-title-outside h1 { margin: 0 0 8px; color: var(--stitch-primary); font-family: "Manrope", sans-serif; font-size: 32px; font-weight: 700; line-height: 1.25; }
.auth-title-outside p { margin: 0; color: var(--stitch-text-secondary); font-size: 18px; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.success-state { display: flex; flex-direction: column; align-items: center; text-align: center; }
.success-visual, .auth-icon { width: 80px; height: 80px; margin-bottom: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--stitch-action); background: var(--stitch-soft-green); font-size: 42px; }
.auth-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 12px; background: transparent; }
.success-state h1 { margin: 0 0 16px; font-family: "Manrope", sans-serif; font-size: 32px; font-weight: 700; line-height: 1.25; }
.success-state p { max-width: 420px; margin: 0 0 32px; color: var(--stitch-text-secondary); font-size: 16px; line-height: 1.6; }
.success-state .btn { width: 100%; }
.otp-field { font-size: 28px; font-weight: 600; text-align: center; }
.otp-field:placeholder-shown { letter-spacing: normal; text-indent: 0; }
.otp-field:not(:placeholder-shown) { letter-spacing: .65em; text-indent: .65em; }
.resend-panel { text-align: center; }
.resend-panel p { margin: 0 0 8px; color: var(--stitch-text-secondary); }
.resend-button { min-height: 44px; border: 0; color: var(--stitch-action); background: transparent; font: inherit; font-weight: 600; }
.password-requirements { padding: 16px; border-radius: 8px; background: var(--stitch-surface-low); }
.password-requirements p { margin: 0 0 8px; font-weight: 600; }
.password-requirements ul { margin: 0; padding: 0; display: grid; gap: 6px; list-style: none; color: var(--stitch-text-secondary); }
.password-requirements li::before { content: "○"; margin-right: 10px; color: var(--stitch-outline); }

/* Auth error/success overrides (stitch) */
.stitch-auth-page .alert-error { border: 1px solid rgba(186, 26, 26, .35); background: var(--stitch-error-container); color: #93000a; }
.stitch-auth-page .alert-success { border: 1px solid #8bd79b; background: var(--stitch-soft-green); color: var(--stitch-primary); }
.stitch-auth-page .resend-section { text-align: center; }
.stitch-auth-page .resend-control { color: var(--stitch-action); }
.stitch-auth-page .resend-control:disabled { color: var(--stitch-text-secondary); }
.auth-page.stitch-auth-page { width: 100%; overflow-x: hidden; }
.stitch-auth-page .auth-workspace, .stitch-auth-page .auth-legal-footer { min-width: 0; max-width: 100%; }
.stitch-auth-page .phone-input-group { gap: 8px; }
.stitch-auth-page .phone-country-select { border-radius: 8px; background-color: var(--stitch-surface); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%234b6354' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px; }
.stitch-auth-page .phone-input { border-radius: 8px; }

/* ─── Auth Footer ─────────────────────────────────────────────── */

.auth-footer {
  text-align: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.auth-footer p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.auth-info-notice {
  text-align: center;
  margin-top: var(--space-lg);
}

.auth-info-notice p {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

/* ─── Alert / Global Error ────────────────────────────────────── */

.alert {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: 0.9375rem;
}

.alert-error {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* ─── Success State (original) ────────────────────────────────── */

.auth-card-success {
  text-align: center;
}

.auth-card-success h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.success-icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
}

.verify-email-address {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  word-break: break-all;
}

.success-message {
  margin-bottom: var(--space-xl);
}

.success-message p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — AUTH TABLET
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
  .account-proof-page { padding: var(--space-xl); }
  .account-proof-card { padding: var(--space-2xl); }
  .account-proof-details { grid-template-columns: 1fr 1fr; }
  .account-proof-details > div:last-child { grid-column: 1 / -1; }
  .health-card { padding: var(--space-2xl) 3rem; }
  .health-card h1 { font-size: 1.375rem; }
  .auth-card { padding: var(--space-2xl) 2.5rem; }
  .auth-header h1 { font-size: 1.75rem; }
  .phone-country-select { width: 160px; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — AUTH DESKTOP
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
  .health-card { padding: 3rem 4rem; }
  .auth-page { padding: var(--space-2xl); }
  .auth-container { max-width: 500px; }
  .auth-card { padding: 3rem; }
}

/* ─── Full-navbar three-zone layout (desktop/tablet) ────────── */

@media (min-width: 861px) {
  .landing-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .landing-nav {
    justify-content: center;
    min-width: 0;
  }

  .landing-auth-actions {
    margin-left: 0;
  }

  .landing-hero-content {
    top: 39px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — LANDING
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  :root { --landing-px: 40px; }

  .landing-nav { gap: 24px; }

  .landing-services-grid { grid-template-columns: repeat(2, 1fr); }

  .landing-value-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }

  .landing-steps { flex-wrap: wrap; gap: 32px; justify-content: center; }

  .landing-step { flex: 0 0 calc(50% - 16px); max-width: none; }

  .landing-why-inner { grid-template-columns: 1fr; gap: 48px; }

  .landing-why-visual { order: -1; }

  .landing-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  :root { --landing-px: 24px; }

  .landing-nav { display: none; }

  .landing-hamburger { display: flex; }

  .landing-header-inner { min-height: 60px; }
}

@media (max-width: 768px) {
  .landing-hero { min-height: 85vh; padding-top: 80px; padding-bottom: 100px; }

  .landing-hero h1 { font-size: 36px; line-height: 1.22; }

  .landing-hero-content > p { font-size: 16px; }

  .landing-hero-actions { flex-direction: column; width: 100%; }

  .landing-hero-actions .landing-hero-cta-inactive { width: 100%; }

  .landing-hero-curve { height: 80px; }

  .landing-services { padding: 80px 0 0; }

  .landing-services-grid { grid-template-columns: 1fr; }

  .landing-value-grid { grid-template-columns: 1fr 1fr; }

  .landing-how { padding: 80px 0; }

  .landing-steps { flex-direction: column; align-items: center; gap: 48px; }

  .landing-step { flex: none; max-width: 280px; }

  .landing-why { padding: 80px 0; }

  .landing-why-photo { height: 400px; }

  .landing-final-cta { padding: 80px 0; }

  .landing-final-cta h2 { font-size: 32px; }

  .landing-footer-inner { grid-template-columns: 1fr; gap: 24px; }

  .landing-final-cta-actions { flex-direction: column; }

  .landing-final-cta-actions .landing-hero-cta-inactive,
  .landing-final-cta-create { width: 100%; }
}

@media (max-width: 480px) {
  :root { --landing-px: 16px; --landing-nav-control-height: 34px; }

  .landing-header { top: 6px; left: 6px; right: 6px; }

  .landing-header-inner { gap: 10px; }

  /* Standard auth hides, compact auth shows */
  .landing-auth-actions { display: none; }
  .landing-auth-compact { display: flex; }

  .brand-lockup span:last-child { font-size: 18px; }

  .landing-hero h1 { font-size: 30px; }

  .landing-value-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

  .landing-services { padding: 64px 0 0; }

  .landing-how { padding: 64px 0; }

  .landing-why { padding: 64px 0; }

  .landing-why-photo { height: 320px; }

  .landing-final-cta { padding: 64px 0; }

  .landing-final-cta h2 { font-size: 28px; }
}

@media (max-width: 380px) {
  :root { --landing-px: 12px; --landing-nav-control-height: 30px; }

  .landing-header { top: 4px; left: 4px; right: 4px; }

  .landing-header-inner { gap: 8px; padding: 10px 12px; }

  .landing-auth-compact a { padding: 0 10px; font-size: 12px; }

  .brand-lockup span:last-child { font-size: 16px; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — AUTH SMALL MOBILE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .auth-page-header { min-height: 64px; padding: 8px 16px; }
  .auth-page-title { font-size: 20px; }
  .auth-workspace, .auth-workspace-signup { width: 100%; max-width: 100%; min-height: auto; padding: 24px 16px 40px; align-items: flex-start; }
  .stitch-auth-card { padding: 0; }
  .stitch-auth-card .auth-header h1, .auth-title-outside h1, .success-state h1 { font-family: "Manrope", sans-serif; font-size: 24px; }
  .stitch-auth-card .form-row { grid-template-columns: 1fr; }
  .auth-legal-footer { min-height: 60px; }
  .otp-field { font-size: 24px; }
  .otp-field:not(:placeholder-shown) { letter-spacing: .45em; text-indent: .45em; }
  .auth-content, .auth-content-wide { width: 100%; max-width: 100%; }
}

/* Service card hover micro-interaction */

.landing-service-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.landing-service-card:hover {
  box-shadow: 0 10px 30px rgba(0, 76, 34, 0.08);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════
   LANDING MOTION SYSTEM
   ═══════════════════════════════════════════════════════════════ */

body.landing-motion-ready [data-landing-anim] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body.landing-motion-ready [data-landing-anim].landing-anim-active {
  opacity: 1;
  transform: translateY(0);
}

body.landing-motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body.landing-motion-ready [data-reveal].landing-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .retry-btn { transition: none; }
  .btn { transition: none; }
  .form-input, .form-select { transition: none; }
  .landing-service-card { transition: none; transform: none !important; }
  .landing-signup { transition: none; }
  .landing-final-cta-create { transition: none; }
  .landing-mobile-drawer { transition: none; }
  .landing-mobile-backdrop { transition: none; }
  body.landing-motion-ready [data-landing-anim] { opacity: 1 !important; transform: none !important; }
  body.landing-motion-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
}

.landing-hamburger:focus-visible {
  outline: 2px solid var(--stitch-action);
  outline-offset: 2px;
}
