/**
 * TabMail - Landing Page Styles
 * 
 * Page-specific styles for index.html (landing page).
 * Requires: palette.css, base.css, header.css
 */

/* ============================================
   Additional Variables (landing-specific)
   ============================================ */
:root {
  --text-color-secondary: #5b5b66;
  --text-color-secondary-dark: #b1b1b3;
  --feature-bg: #f5f5f7;
  --feature-bg-dark: #1f1e26;
  --video-shadow: rgba(0, 0, 0, 0.1);
  --video-shadow-dark: rgba(0, 0, 0, 0.3);
}

/* ============================================
   Smooth Scrolling
   ============================================ */
html {
  scroll-behavior: smooth;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: calc(100vh - 300px); /* Leave room to peek at content below */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0rem 2rem 2rem;
  text-align: center;
  background: var(--page-bg);
}

@media (prefers-color-scheme: dark) {
  .hero {
    background: var(--page-bg-dark);
  }
}

.hero-logo {
  width: 300px;
  max-width: 90%;
  margin-bottom: 2rem;
}

.hero-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.3;
  max-width: 600px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  opacity: 0.9;
  margin-bottom: 0;
  max-width: 500px;
  line-height: 1.5;
}

/* ============================================
   Features Section
   ============================================ */
.features-section {
  padding: 4rem 0;
  background: var(--feature-bg);
}

@media (prefers-color-scheme: dark) {
  .features-section {
    background: var(--feature-bg-dark);
  }
}

.features-header {
  text-align: center;
  padding: 0 2rem 3rem;
}

.features-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.features-header p {
  font-size: 1.125rem;
  color: var(--text-color-secondary);
}

@media (prefers-color-scheme: dark) {
  .features-header p {
    color: var(--text-color-secondary-dark);
  }
}

#features-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.feature-item.feature-visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-video {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 75%;
}

.feature-video video {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.feature-content {
  flex-shrink: 0;
  width: 340px;
  margin-left: -80px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 1;
}

@media (prefers-color-scheme: dark) {
  .feature-content {
    background: rgba(28, 27, 34, 0.92);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  }
}

.feature-title {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
}

@media (prefers-color-scheme: dark) {
  .feature-title {
    color: var(--text-color-dark);
  }
}

.feature-description {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-color-secondary);
}

@media (prefers-color-scheme: dark) {
  .feature-description {
    color: var(--text-color-secondary-dark);
  }
}

/* Alternating layout */
.feature-item:nth-child(even) {
  flex-direction: row-reverse;
}

.feature-item:nth-child(even) .feature-content {
  margin-left: 0;
  margin-right: -80px;
}

/* Mobile/tablet responsive - stacked with bottom overlay */
@media (max-width: 900px) {
  #features-container {
    padding: 0 1rem;
  }

  .feature-item,
  .feature-item:nth-child(even) {
    flex-direction: column;
    padding: 2rem 0;
  }

  .feature-video {
    width: 100%;
    max-width: 100%;
  }

  .feature-content {
    width: calc(100% - 2rem);
    margin: -3rem 1rem 0 1rem;
  }

  .feature-item:nth-child(even) .feature-content {
    margin: -3rem 1rem 0 1rem;
  }
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  padding: 6rem 2rem;
  text-align: center;
  background: var(--page-bg);
}

@media (prefers-color-scheme: dark) {
  .cta-section {
    background: var(--page-bg-dark);
  }
}

.cta-section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.125rem;
  color: var(--text-color-secondary);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

@media (prefers-color-scheme: dark) {
  .cta-section p {
    color: var(--text-color-secondary-dark);
  }
}

.waitlist-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent-color);
  border: none;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.waitlist-btn:hover {
  background: #0050c4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.waitlist-btn:active {
  transform: translateY(0);
}

@media (prefers-color-scheme: dark) {
  .waitlist-btn {
    background: var(--accent-color-dark);
  }
  
  .waitlist-btn:hover {
    background: #1a8fff;
  }
}

/* ============================================
   Landing Footer
   ============================================ */
footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.6;
  background: var(--page-bg);
}

@media (prefers-color-scheme: dark) {
  footer {
    background: var(--page-bg-dark);
  }
}

footer a {
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
}

footer a:hover {
  opacity: 1;
  border-bottom-color: var(--text-color);
}

@media (prefers-color-scheme: dark) {
  footer a {
    color: var(--text-color-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  footer a:hover {
    border-bottom-color: var(--text-color-dark);
  }
}

/* ============================================
   Mobile Adjustments
   ============================================ */
@media (max-width: 640px) {
  .hero {
    padding: 6rem 1.5rem 2rem;
    min-height: auto;
  }

  .hero-logo {
    width: 240px;
    margin-bottom: 1.5rem;
  }

  .hero-subtitle {
    margin-bottom: 2rem;
  }

  .features-section {
    padding: 3rem 0;
  }

  .features-header {
    padding: 0 1.5rem 2rem;
  }

  #features-container {
    padding: 0 1.5rem;
  }

  .feature-item {
    padding: 2rem 0;
  }

  .cta-section {
    padding: 4rem 1.5rem;
  }

  .waitlist-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }
}
