/* ===== CSS Variables ===== */
:root {
  /* Accents / Background Tones */
  --soft-pink: #F6A6C9;
  --lavender-pink: #E6B3E8;
  --soft-purple: #B48AE6;
  
  /* Text */
  --text-headline: #3A214D;
  --text-body: #5E4A6E;
  --text-secondary: #8A7C96;
  
  /* CTA */
  --button-bg: #FFC66D;
  --button-text: #4A2A00;
  --focus-accent: #D86BAA;
  
  /* Surfaces */
  --page-bg: #FFFFFF;
  --soft-section-bg: #FFF7FB;
  --border-divider: #EDE3F3;
  --input-bg: #FFF9FC;
  
  /* Spacing */
  --container-max: 1140px;
  --section-padding: 80px;
  --section-padding-mobile: 48px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  /* Shadows */
  --shadow-soft: 0 4px 24px rgba(58, 33, 77, 0.08);
  --shadow-medium: 0 8px 32px rgba(58, 33, 77, 0.12);
  --shadow-phone: 0 24px 64px rgba(58, 33, 77, 0.2);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background-color: var(--page-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Typography ===== */
h1, h2, h3 {
  color: var(--text-headline);
  font-weight: 700;
  line-height: 1.2;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('header_background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.6) 100%
  );
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-top: 48px;
  padding-bottom: 48px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.brand-icon {
  width: 36px;
  height: 36px;
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-headline);
}

/* Hero Text */
.hero-headline {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-subhead {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-body);
  max-width: 480px;
  margin-bottom: 32px;
}

/* Signup Form */
.signup-form {
  width: 100%;
  max-width: 440px;
  margin-bottom: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.email-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  font-family: inherit;
  border: 2px solid var(--border-divider);
  border-radius: var(--radius-md);
  background-color: var(--input-bg);
  color: var(--text-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.email-input:focus {
  outline: none;
  border-color: var(--focus-accent);
  box-shadow: 0 0 0 4px rgba(216, 107, 170, 0.15);
}

.cta-button {
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: var(--button-text);
  background-color: var(--button-bg);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cta-button:hover {
  background-color: #ffbe52;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.cta-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
}

.cta-button:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(216, 107, 170, 0.3);
}

/* Form Message */
.form-message {
  font-size: 14px;
  margin-top: 12px;
  min-height: 20px;
}

.form-message--success {
  color: #38a169;
}

.form-message--error {
  color: #e53e3e;
}

/* Microcopy */
.microcopy {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Button disabled state */
.cta-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.email-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Hero Image */
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  max-width: 340px;
  transform: rotate(2deg);
}

/* ===== Value Props Section ===== */
.value-props {
  padding: var(--section-padding-mobile) 0;
  background-color: var(--page-bg);
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.card {
  background-color: var(--soft-section-bg);
  padding: 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-divider);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--soft-purple);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.card-text {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ===== How It Works Section ===== */
.how-it-works {
  padding: var(--section-padding-mobile) 0;
  background-color: var(--soft-section-bg);
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  text-align: center;
  margin-bottom: 48px;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.step {
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--page-bg);
  background: linear-gradient(135deg, var(--soft-pink) 0%, var(--soft-purple) 100%);
  border-radius: 50%;
}

.step-title {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.step-text {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ===== Trust Section ===== */
.trust {
  padding: var(--section-padding-mobile) 0;
  background-color: var(--soft-section-bg);
}

.trust-list {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 15px;
  color: var(--text-body);
}

.trust-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--soft-purple);
}

/* ===== Final CTA Section ===== */
.final-cta {
  padding: var(--section-padding-mobile) 0;
  background: linear-gradient(135deg, var(--lavender-pink) 0%, var(--soft-purple) 100%);
  text-align: center;
}

.cta-headline {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--page-bg);
  margin-bottom: 32px;
}

.signup-form--centered {
  margin: 0 auto;
}

.final-cta .email-input {
  background-color: var(--page-bg);
  border-color: rgba(255, 255, 255, 0.3);
}

.final-cta .email-input:focus {
  border-color: var(--page-bg);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.final-cta .form-message--success {
  color: #fff;
}

.final-cta .form-message--error {
  color: #ffd6d6;
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  background-color: var(--page-bg);
  border-top: 1px solid var(--border-divider);
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.copyright {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--focus-accent);
}

/* ===== Responsive: Tablet and Up ===== */
@media (min-width: 640px) {
  .input-group {
    flex-direction: row;
  }
  
  .email-input {
    flex: 1;
  }
  
  .cta-button {
    white-space: nowrap;
  }
  
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ===== Responsive: Desktop ===== */
@media (min-width: 1024px) {
  .hero {
    min-height: 100vh;
  }
  
  .hero-container {
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    gap: 48px;
    padding-top: 80px;
    padding-bottom: 80px;
  }
  
  .hero-content {
    align-items: flex-start;
    text-align: left;
    max-width: 480px;
  }
  
  .hero-subhead {
    max-width: 420px;
  }
  
  .signup-form {
    max-width: 420px;
  }
  
  .phone-mockup {
    max-width: 400px;
  }
  
  .value-props,
  .how-it-works,
  .trust,
  .final-cta {
    padding: var(--section-padding) 0;
  }
  
  .card {
    padding: 40px 32px;
  }
  
  .fit-card {
    padding: 40px;
  }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--focus-accent);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
  outline: none;
}
