/* ==========================================================================
   HOMEPAGE STYLES - TWINKL-INSPIRED LAYOUT
   Professional, calm, premium education feel
   ========================================================================== */

/* ==========================================================================
   HERO SECTION - TWINKL-STYLE 2-COLUMN LAYOUT
   ========================================================================== */

.hero {
  padding: var(--space-lg) 0 var(--space-xl);
  background: #FFFFFF;
  position: relative;
  overflow: hidden;
}

/* DESKTOP: 2-column grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* LEFT COLUMN: Headline + Image Block */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hero-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', 'Helvetica Neue', system-ui, sans-serif;
  font-size: 64px;
  line-height: 1.1;
  color: #1e293b;
  margin: 0 0 16px 0;
  font-weight: 800;
  letter-spacing: -0.025em;
  max-width: 15ch;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hero-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', 'Helvetica Neue', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  color: #64748b;
  margin: 0 0 20px 0;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: left;
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

/* Organic blob shape behind image - REMOVED FOR CLEAN TWINKL STYLE */
.hero-image-wrapper::before {
  content: '';
  display: none;
}

/* Subtle math symbols decoration - REMOVED FOR CLEAN TWINKL STYLE */
.hero-image-wrapper::after {
  content: '';
  display: none;
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: 0;
  display: block;
  position: relative;
  z-index: 1;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.25);
  transform-origin: center center;
}

/* RIGHT COLUMN: Sign-In Card */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.signin-card {
  background: #f8f9fa;
  border: 2px solid #E5E7EB;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04), 0 10px 20px rgba(0, 0, 0, 0.06);
}

.signin-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 28px 0;
  text-align: center;
  letter-spacing: -0.01em;
}

.signin-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Twinkl-style form inputs */
.signin-form .form-input {
  background: #F9FAFB;
  border: 1.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 16px;
  height: 56px;
  transition: all 0.2s ease;
}

.signin-form .form-input:focus {
  background: #FFFFFF;
  border-color: #4F46E5;
  outline: none;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.signin-form .form-label {
  font-weight: 600;
  font-size: 15px;
  color: #374151;
  margin-bottom: 8px;
  display: block;
  letter-spacing: -0.005em;
}

/* Password field with eye toggle */
.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #6B7280;
  font-size: 20px;
  line-height: 1;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: #374151;
}

.signin-submit {
  width: 100%;
  margin-top: 12px;
  background: #4F46E5;
  font-weight: 800;
  height: 60px;
  border-radius: 12px;
  font-size: 17px;
  transition: all 0.15s ease;
  letter-spacing: -0.005em;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
  position: relative;
  overflow: hidden;
}

.signin-submit:hover {
  background: #4338CA;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.signin-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

/* Loading state */
.signin-submit.loading {
  pointer-events: none;
}

.signin-submit .btn-loading {
  display: none;
}

.signin-submit.loading .btn-text {
  display: none;
}

.signin-submit.loading .btn-loading {
  display: inline;
}

/* Reassurance microcopy */
.signup-reassurance {
  text-align: center;
  font-size: 13px;
  color: #6B7280;
  margin: 12px 0 0 0;
  font-weight: 400;
  letter-spacing: 0;
}

.signin-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 28px 0 20px;
  opacity: 0.7;
}

.signin-divider::before,
.signin-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #E5E7EB;
}

.signin-divider span {
  padding: 0 16px;
  color: #9CA3AF;
  font-size: 12px;
  font-weight: 400;
}

.signin-secondary {
  display: block;
  text-align: center;
  padding: 10px;
  background: transparent;
  border: 1px solid #F3F4F6;
  border-radius: 10px;
  color: #9CA3AF;
  font-weight: 400;
  font-size: 13px;
  text-decoration: none;
  transition: all var(--transition-fast);
  opacity: 0.85;
}

.signin-secondary:hover {
  background: #F9FAFB;
  border-color: #E5E7EB;
  color: #6B7280;
  opacity: 1;
}

/* ==========================================================================
   WHAT HAPPENS NEXT SECTION - PREMIUM GUIDANCE
   ========================================================================== */

.what-next-section {
  background: #FAFBFC;
  border: 1px solid #F1F3F5;
  border-radius: 16px;
  padding: 24px 20px;
  margin-top: 24px;
  text-align: center;
}

.what-next-title {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  margin: 0 0 20px 0;
  letter-spacing: -0.005em;
}

.what-next-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.what-next-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #E0E7FF 0%, #EEF2FF 100%);
  color: #4F46E5;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-text {
  font-size: 14px;
  color: #475569;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-align: left;
  line-height: 1.4;
}

/* Error/Success Messages */
.error-message {
  background-color: #FEE2E2;
  border: 1px solid #EF4444;
  color: #991B1B;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: var(--text-sm);
}

.success-message {
  background-color: #D1FAE5;
  border: 1px solid #10B981;
  color: #065F46;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: var(--text-sm);
}

/* Trust Badges */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: flex-start;
}

/* Trust badges inside signin card */
.signin-trust {
  justify-content: center;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #F3F4F6;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-md);
  background-color: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-full);
  font-size: 13px;
  color: #15803D;
  font-weight: 500;
}

/* ==========================================================================
   FAST ACCESS SECTION
   ========================================================================== */

.fast-access-section {
  padding: var(--space-2xl) 0 var(--space-4xl);
  background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
}

.fast-access-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.fast-access-card {
  background: white;
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  display: block;
}

.fast-access-card:hover {
  border-color: #4F46E5;
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.15);
}

.fast-access-card-highlight {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border-color: #4F46E5;
  border-width: 3px;
}

.fast-access-card-highlight:hover {
  background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.25);
}

.fast-access-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  line-height: 1;
}

.fast-access-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: var(--space-sm);
}

.fast-access-text {
  color: #6b7280;
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ==========================================================================
   FEATURES SECTION
   ========================================================================== */

.section {
  padding: var(--space-4xl) 0;
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #1a1a1a;
  margin-bottom: var(--space-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.feature-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  border: 2px solid #E5E7EB;
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: #4F46E5;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  line-height: 1;
}

.feature-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: var(--space-md);
}

.feature-text {
  color: #6b7280;
  line-height: 1.7;
  margin-bottom: 0;
  font-size: var(--text-base);
}

/* ==========================================================================
   PRICING PREVIEW
   ========================================================================== */

.pricing-preview {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  padding: var(--space-4xl) 0;
  text-align: center;
}

.pricing-preview .section-title {
  color: white;
}

.pricing-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  background-color: white;
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.pricing-card.featured {
  border: 3px solid var(--color-accent);
}

.pricing-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #1a1a1a;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

.pricing-title {
  font-size: var(--text-2xl);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.pricing-price {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.pricing-period {
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  margin-bottom: var(--space-lg);
}

.pricing-savings {
  display: inline-block;
  background-color: var(--color-success);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-lg);
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--space-xl);
  text-align: left;
}

.pricing-features li {
  padding: var(--space-sm) 0;
  color: var(--color-text-secondary);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.pricing-features li::before {
  content: '✓';
  color: var(--color-success);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

/* ==========================================================================
   CTA SECTION
   ========================================================================== */

.cta-section {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  padding: var(--space-5xl) 0;
  text-align: center;
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-lg);
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

.cta-text {
  font-size: var(--text-xl);
  color: #4b5563;
  margin-bottom: var(--space-2xl);
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cta-buttons .btn-primary {
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.4);
}

.cta-buttons .btn-primary:hover {
  background: linear-gradient(135deg, #FF5722 0%, #F57C00 100%);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.5);
  transform: translateY(-1px);
}

.cta-buttons .btn-primary:active {
  transform: scale(0.98);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.4);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background-color: var(--color-text-primary);
  color: white;
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.footer-brand .logo-icon {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
}

.footer-logo-text {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.01em;
  line-height: 1;
  display: block;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.footer-section-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  color: white;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: white;
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--text-sm);
}

/* ==========================================================================
   RESPONSIVE - TABLET & DESKTOP (TWINKL LAYOUT)
   ========================================================================== */

/* MOBILE: Stack vertically - Headline, Image, Sign-in Card */
@media (max-width: 767px) {
  /* Ensure hero starts below sticky header */
  .hero {
    padding: var(--space-lg) 0 var(--space-lg);
    margin-top: 0;
  }
  
  .hero-grid {
    gap: var(--space-xl);
  }
  
  .hero-title {
    font-size: 44px;
    line-height: 1.1;
    max-width: 100%;
    font-weight: 800;
    margin-bottom: 20px;
  }
  
  .hero-subtitle {
    font-size: 16px;
    margin-bottom: 28px;
  }
  
  .hero-image-wrapper {
    max-width: 100%;
    overflow: hidden;
  }
  
  .hero-image {
    transform: scale(1.15);
  }
  
  .hero-trust {
    justify-content: flex-start;
  }
  
  .signin-card {
    padding: 28px 24px;
  }
  
  .signin-trust {
    margin-bottom: 24px;
    padding-bottom: 24px;
  }
}

/* TABLET & DESKTOP: 2-column layout like Twinkl */
@media (min-width: 768px) {
  .hero {
    padding: var(--space-xl) 0 var(--space-2xl);
  }
  
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
  }
  
  /* Raise the signup card to align with headline */
  .hero-right {
    margin-top: -8px;
  }
  
  .hero-title {
    font-size: 64px;
    line-height: 1.15;
  }
  
  .hero-image {
    min-height: 400px;
    object-fit: cover;
  }
  
  /* What Happens Next - Horizontal on Desktop */
  .what-next-steps {
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
  }
  
  .what-next-step {
    flex-direction: column;
    flex: 1;
    gap: 8px;
    text-align: center;
  }
  
  .step-text {
    text-align: center;
  }
  
  .fast-access-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .pricing-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cta-buttons {
    flex-direction: row;
    justify-content: center;
  }
  
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-4xl);
  }
  
  /* Further adjust signup card position for larger headline */
  .hero-right {
    margin-top: -12px;
  }
  
  .hero-title {
    font-size: 72px;
    max-width: 13ch;
    line-height: 1.08;
  }
  
  .hero-image {
    min-height: 480px;
  }
  
  .fast-access-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* LARGE DESKTOP: Constrain max width for optimal reading */
@media (min-width: 1280px) {
  .hero-title {
    font-size: 72px;
    max-width: 13ch;
    line-height: 1.08;
  }
  
  .hero-grid {
    grid-template-columns: 1.5fr 1fr;
  }
}
