/**
 * 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;
  --text-color-tertiary: #7a7a85;
  --text-color-tertiary-dark: #8e8e96;
  --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(1.125rem, 3vw, 1.5rem);
  font-weight: 400;
  opacity: 0.9;
  margin-bottom: 0.75rem;
  max-width: 550px;
  line-height: 1.5;
}

.hero-subtitle:last-of-type {
  margin-bottom: 0;
}

/* ============================================
   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.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
}

@media (prefers-color-scheme: dark) {
  .feature-content {
    background: rgba(40, 38, 50, 0.95);
    box-shadow:
      0 4px 24px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

.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);
}

.feature-description .sep,
.feature-note .sep {
  display: block;
  height: 0.4em;
}

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

.feature-note {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--text-color-tertiary);
  margin-top: 0.75rem;
}

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

/* ============================================
   Feature with Phone Mockup (video overlay)
   ============================================ */
.feature-with-phone .feature-video {
  position: relative;
}

.feature-with-phone .feature-phone-mockup {
  position: absolute;
  left: 3%;
  top: 50%;
  transform: translateY(-50%);
  height: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-frame {
  background: #000;
  border-radius: 1em;
  padding: 0.15em;
  height: 100%;
  width: auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
  .phone-frame {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
  }
}

.phone-frame img {
  display: block;
  height: 100%;
  width: auto;
  border-radius: 0.85em;
}

.phone-caption {
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
  text-align: center;
  width: max-content;
  max-width: 10rem;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  line-height: 1.3;
}

@media (prefers-color-scheme: dark) {
  .phone-caption {
    color: var(--text-color-dark);
    background: rgba(28, 27, 34, 0.8);
  }
}

/* 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-item .feature-video {
    width: 100%;
    max-width: 100%;
  }

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

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

/* ============================================
   Thunderbird Section
   ============================================ */
.thunderbird-section {
  padding: 5rem 2rem;
  text-align: center;
  background: var(--page-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  .thunderbird-section {
    background: var(--page-bg-dark);
    border-top-color: rgba(255, 255, 255, 0.06);
  }
}

.thunderbird-content {
  max-width: 900px;
  margin: 0 auto;
}

.thunderbird-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-color);
  background: rgba(0, 96, 223, 0.1);
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  .thunderbird-badge {
    color: var(--accent-color-dark);
    background: rgba(0, 144, 237, 0.15);
  }
}

.thunderbird-section h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 600;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

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

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

.thunderbird-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.thunderbird-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.thunderbird-link svg {
  flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
  .thunderbird-link {
    color: var(--accent-color-dark);
  }
}

.thunderbird-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.thunderbird-disclaimer {
  font-size: 0.8125rem;
  color: var(--text-color-secondary);
  opacity: 0.7;
  margin-top: 2rem;
  margin-bottom: 0;
}

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

@media (max-width: 640px) {
  .thunderbird-section {
    padding: 3rem 1.5rem;
  }
}

/* ============================================
   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;
  }
}
