/* ================================================
   LIFE ESTATE CO - Institutional Design System
   Mobile-First | Navy/Slate/White | Clinical Aesthetic
   ================================================ */

:root {
  --navy: #0a1628;
  --navy-mid: #162036;
  --slate: #475569;
  --slate-light: #64748b;
  --white: #ffffff;
  --off-white: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --accent: #1e40af;
  --accent-hover: #1e3a8a;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --error: #dc2626;
  --error-bg: #fef2f2;
}

/* Status Message */
.status-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  text-align: center;
}

.status-message.error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--white);
  color: var(--slate);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy);
  line-height: 1.25;
  font-weight: 600;
}

h1 {
  font-size: clamp(1.875rem, 4.5vw, 2.75rem);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.125rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ================================================
   HEADER
   ================================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.header-cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.header-cta:hover {
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero {
  background: linear-gradient(135deg, #0a1628 0%, #1a365d 50%, #0a1628 100%);
  padding: 5rem 0 6rem;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

/* Subtle geometric pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 40%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.25rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-lead {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  margin-bottom: 1.25rem;
}

.hero .btn-primary {
  background: var(--white);
  color: var(--navy);
  padding: 1rem 2rem;
  font-weight: 600;
}

.hero .btn-primary:hover {
  background: var(--off-white);
}

.hero-note {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0;
}

/* ================================================
   VALUE PROPOSITION SECTION
   ================================================ */
.value-section {
  background: var(--white);
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.value-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 8px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(10, 22, 40, 0.12);
}

.value-card h3 {
  margin-bottom: 0.75rem;
  color: var(--navy);
  transition: color 0.2s ease;
}

.value-card:hover h3 {
  color: var(--accent);
}

.value-card p {
  color: var(--slate);
  font-size: 0.9375rem;
  margin-bottom: 0;
  line-height: 1.6;
}

/* ================================================
   PROCESS SECTION
   ================================================ */
.process-section {
  background: var(--navy);
  padding: 4rem 0;
  color: var(--white);
}

.process-section .section-header h2 {
  color: var(--white);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step {
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--white);
  color: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  margin: 0 auto 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step:hover .step-number {
  transform: scale(1.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.step h3 {
  margin-bottom: 0.5rem;
  color: var(--white);
  font-family: 'Inter', sans-serif;
}

.step p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* ================================================
   INTAKE FORM SECTION
   ================================================ */
.intake-section {
  background: var(--white);
  padding: 4rem 0;
}

.intake-form {
  max-width: 520px;
  margin: 0 auto;
  background: var(--off-white);
  padding: 2.5rem;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}

.intake-form h2 {
  text-align: center;
  margin-bottom: 0.25rem;
  font-size: 1.5rem;
}

.intake-form .form-subtitle {
  text-align: center;
  color: var(--slate-light);
  margin-bottom: 2rem;
  font-size: 0.9375rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--navy);
  font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

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

/* Radio options - inline aligned */
.radio-group {
  display: inline-flex;
  gap: 2rem;
  align-items: center;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
}

.radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.875rem 1.75rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9375rem;
  font-family: inherit;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: center;
}

.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
}

.form-legal {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--slate-light);
  margin-top: 1rem;
  margin-bottom: 0;
}

.form-legal a {
  color: var(--slate);
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  background: var(--navy);
  color: var(--white);
  padding: 2.5rem 0 2rem;
}

.footer-content {
  text-align: center;
}

.footer-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.footer-links {
  margin-bottom: 1.25rem;
}

.footer-links a {
  color: var(--white);
  text-decoration: underline;
  margin: 0 0.75rem;
  font-size: 0.8125rem;
  opacity: 0.8;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-disclaimer {
  font-size: 0.75rem;
  opacity: 0.6;
  max-width: 500px;
  margin: 0 auto 0.75rem;
  line-height: 1.5;
}

.footer-copyright {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-bottom: 0;
}

/* ================================================
   MOBILE RESPONSIVE
   ================================================ */
@media (max-width: 900px) {

  .value-grid,
  .process-steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .value-card {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 0 4rem;
  }

  .value-section,
  .process-section,
  .intake-section {
    padding: 3rem 0;
  }

  .intake-form {
    padding: 2rem 1.5rem;
    margin: 0 0.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .header-brand {
    font-size: 1rem;
  }

  .header-cta {
    font-size: 0.8125rem;
    padding: 0.4rem 0.75rem;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .intake-form {
    padding: 1.5rem 1.25rem;
  }
}

/* ================================================
   SCROLL ANIMATIONS
   ================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for cards */
.value-card:nth-child(1) {
  transition-delay: 0s;
}

.value-card:nth-child(2) {
  transition-delay: 0.1s;
}

.value-card:nth-child(3) {
  transition-delay: 0.2s;
}

.step:nth-child(1) {
  transition-delay: 0s;
}

.step:nth-child(2) {
  transition-delay: 0.15s;
}

.step:nth-child(3) {
  transition-delay: 0.3s;
}

/* ================================================
   FORM VALIDATION STATES
   ================================================ */
.form-group.error input,
.form-group.error select {
  border-color: #dc2626;
  background: #fef2f2;
}

.form-group.error label {
  color: #dc2626;
}

.form-group.error .error-message {
  display: block;
  color: #dc2626;
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

.error-message {
  display: none;
}

/* Shake animation for invalid fields */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-4px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(4px);
  }
}

.form-group.shake {
  animation: shake 0.5s ease;
}

/* Radio group error state */
.form-group.error .radio-group {
  padding: 0.5rem;
  border-radius: 4px;
  background: #fef2f2;
  border: 1px solid #dc2626;
}

/* Enhanced focus states */
.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
  outline: none;
}

/* ================================================
   LOADING SPINNER
   ================================================ */
.btn-primary.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Success state */
.btn-primary.success {
  background: #059669;
}

/* ================================================
   KNOCKOUT MESSAGE
   ================================================ */
.knockout-message {
  display: none;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  margin-top: 1rem;
}

.knockout-message.visible {
  display: block;
}

.knockout-message p {
  color: #92400e;
  margin-bottom: 0;
  font-size: 0.9375rem;
}

/* ================================================
   MULTI-STEP FORM (TYPEFORM STYLE)
   ================================================ */
.multistep-form {
  background: var(--white);
  padding: 2.5rem 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 540px;
  margin: 0 auto;
}

.multistep-form h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.multistep-form .form-subtitle {
  text-align: center;
  color: var(--slate-light);
  margin-bottom: 1.5rem;
}

/* Progress Bar */
.progress-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.step-indicator {
  text-align: center;
  font-size: 0.75rem;
  color: var(--slate-light);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Form Steps */
.form-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-content {
  margin-bottom: 2rem;
}

.step-label {
  display: block;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.multistep-form input[type="text"],
.multistep-form input[type="email"],
.multistep-form input[type="tel"],
.multistep-form input[type="number"],
.multistep-form select {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 0.75rem;
}

.multistep-form input:focus,
.multistep-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

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

/* Radio Cards */
.radio-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-card {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-card:hover {
  border-color: var(--accent);
  background: var(--off-white);
}

.radio-card input {
  margin-right: 0.75rem;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.radio-card input:checked+span {
  color: var(--navy);
  font-weight: 500;
}

.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(30, 64, 175, 0.05);
}

/* Buttons */
.step-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-next,
.btn-submit {
  flex: 1;
  padding: 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-next:hover,
.btn-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

.btn-back {
  padding: 1rem;
  background: transparent;
  color: var(--slate);
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 100px;
}

.btn-back:hover {
  border-color: var(--slate);
  background: var(--gray-100);
}

/* Success State */
.success-content {
  text-align: center;
  padding: 2rem 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #059669;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
}

.success-content h3 {
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.success-content p {
  color: var(--slate);
}

/* Knockout State */
.knockout-content {
  text-align: center;
  padding: 2rem 0;
  background: #fef3c7;
  border-radius: 8px;
  padding: 2rem;
}

.knockout-content h3 {
  color: #92400e;
  margin-bottom: 0.75rem;
}

.knockout-content p {
  color: #92400e;
  margin-bottom: 0;
}

/* Form Legal */
.multistep-form .form-legal {
  text-align: center;
  font-size: 0.75rem;
  color: var(--slate-light);
  margin-top: 1.5rem;
}

.multistep-form .form-legal a {
  color: var(--slate);
}