/* ============================================
   Contrail — Landing Page Styles
   ============================================ */

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

:root {
  --navy: #0F2847;
  --navy-light: #162d50;
  --navy-dark: #0a1c33;
  --sky-blue: #4A90D9;
  --sky-blue-hover: #5a9de3;
  --slate: #8E9AAF;
  --white: #ffffff;
  --bg: #060e1a;
  --card-bg: rgba(15, 40, 71, 0.7);
  --card-border: rgba(74, 144, 217, 0.25);
  --text-primary: #f0f3f8;
  --text-secondary: #a8b4c8;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
  --max-width: 1120px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--sky-blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--sky-blue-hover);
}

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

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

.container-narrow {
  max-width: 720px;
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.35s; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--sky-blue);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background: var(--sky-blue-hover);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(74, 144, 217, 0.3);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 17px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sky-blue);
  font-weight: 500;
  font-size: 15px;
}

.link-arrow::after {
  content: '\2192';
  transition: transform var(--transition);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

.link-arrow-back::after {
  content: none;
}

.link-arrow-back::before {
  content: '\2190';
  transition: transform var(--transition);
}

.link-arrow-back:hover::before {
  transform: translateX(-4px);
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(6, 14, 26, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(74, 144, 217, 0.08);
  transition: background 0.3s ease;
}

.nav-solid {
  background: rgba(6, 14, 26, 0.9);
}

.nav.scrolled {
  background: rgba(6, 14, 26, 0.92);
  border-bottom-color: rgba(74, 144, 217, 0.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--white);
}

.nav-logo-icon {
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  border-top: 1px solid rgba(74, 144, 217, 0.1);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 0;
}

.nav-mobile a:hover {
  color: var(--white);
}

.nav-mobile .btn {
  margin-top: 8px;
  text-align: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 144, 217, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 144, 217, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(74, 144, 217, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(74, 144, 217, 0.15);
  border: 1px solid rgba(74, 144, 217, 0.25);
  border-radius: 100px;
  color: var(--sky-blue);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--white);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-actions {
  margin-bottom: 40px;
}

.app-store-badge svg {
  border-radius: 10px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.app-store-badge:hover svg {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.15);
}

.hero-stats {
  display: flex;
  gap: 36px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Phone mockup */
.hero-visual {
  display: flex;
  justify-content: center;
}

.phone-frame {
  position: relative;
  width: 280px;
  height: 580px;
  background: #1a1a1a;
  border-radius: 44px;
  padding: 10px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 25px 80px rgba(0, 0, 0, 0.5),
    0 0 120px rgba(74, 144, 217, 0.08);
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  background: #000;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--sky-blue), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-actions {
    display: flex;
    justify-content: center;
  }
  .phone-frame {
    width: 240px;
    height: 500px;
    border-radius: 38px;
  }
  .phone-screen {
    border-radius: 30px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 80px 0 40px;
  }
  .hero-stats {
    gap: 24px;
  }
}

/* ============================================
   Features
   ============================================ */
.features {
  padding: 120px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 64px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--white);
}

.section-header p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(74, 144, 217, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 144, 217, 0.1);
  border-radius: 14px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--white);
}

.feature-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .features {
    padding: 80px 0;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Screenshots
   ============================================ */
.screenshots {
  padding: 40px 0 120px;
}

.screenshots-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  overflow-x: auto;
  padding: 20px 0;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.screenshot-phone {
  flex-shrink: 0;
  text-align: center;
  scroll-snap-align: center;
}

.phone-frame-sm {
  width: 220px;
  height: 460px;
  border-radius: 36px;
}

.phone-frame-sm .phone-screen {
  border-radius: 28px;
}

.screenshot-label {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

@media (max-width: 768px) {
  .screenshots-row {
    justify-content: flex-start;
    gap: 24px;
    padding: 20px 24px;
    margin: 0 -24px;
  }

  .phone-frame-sm {
    width: 200px;
    height: 420px;
    border-radius: 32px;
  }

  .phone-frame-sm .phone-screen {
    border-radius: 24px;
  }
}

/* ============================================
   How It Works
   ============================================ */
.how-it-works {
  padding: 80px 0 120px;
}

.steps-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  flex: 1;
  max-width: 300px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.step-card:hover {
  border-color: rgba(74, 144, 217, 0.25);
  transform: translateY(-2px);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(74, 144, 217, 0.12);
  border: 1px solid rgba(74, 144, 217, 0.25);
  border-radius: 50%;
  color: var(--sky-blue);
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 20px;
}

.step-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--white);
}

.step-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.step-connector {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .steps-grid {
    flex-direction: column;
    gap: 20px;
  }

  .step-card {
    max-width: 100%;
    width: 100%;
  }

  .step-connector {
    transform: rotate(90deg);
  }
}

/* ============================================
   Privacy Highlight
   ============================================ */
.privacy-highlight {
  padding: 60px 0 120px;
}

.privacy-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.privacy-badge {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(74, 144, 217, 0.1);
  border: 1px solid rgba(74, 144, 217, 0.2);
  border-radius: 100px;
  color: var(--sky-blue);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.privacy-content h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--white);
}

.privacy-content > p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.privacy-content em {
  color: var(--sky-blue);
  font-style: italic;
}

.privacy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.privacy-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-primary);
}

.privacy-list svg {
  flex-shrink: 0;
}

.privacy-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield {
  opacity: 0.6;
  animation: shield-float 4s ease-in-out infinite;
}

@keyframes shield-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 768px) {
  .privacy-card {
    grid-template-columns: 1fr;
    padding: 36px 28px;
    text-align: center;
  }
  .privacy-list {
    align-items: center;
  }
  .privacy-visual {
    order: -1;
  }
}

/* ============================================
   CTA
   ============================================ */
.cta {
  padding: 80px 0 120px;
}

.cta-content {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.cta h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--white);
}

.cta p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid rgba(74, 144, 217, 0.08);
  padding: 56px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 12px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

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

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(74, 144, 217, 0.06);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-credit {
  font-style: italic;
}

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

.footer-legal-links a {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-legal-links a:hover {
  color: var(--white);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Legal Pages (Privacy, Terms)
   ============================================ */
.legal-page {
  padding: 120px 0 80px;
  min-height: 80vh;
}

.legal-header {
  margin-bottom: 48px;
}

.legal-header h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--white);
}

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

.legal-subtitle {
  color: var(--text-secondary);
  font-size: 17px;
}

.legal-content h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--white);
}

.legal-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
  color: var(--sky-blue);
}

.legal-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.legal-content ul {
  list-style: none;
  margin-bottom: 16px;
  padding-left: 0;
}

.legal-content ul li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.legal-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sky-blue);
  opacity: 0.6;
}

.legal-content a {
  color: var(--sky-blue);
}

.legal-content strong {
  color: var(--text-primary);
}

/* ============================================
   Support Page
   ============================================ */
.support-contact {
  margin-bottom: 56px;
}

.support-contact-inner {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}

.support-contact h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--white);
}

.support-contact p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ */
.faq-section {
  margin-bottom: 48px;
}

.faq-section > h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--white);
}

.faq-item {
  border-bottom: 1px solid rgba(74, 144, 217, 0.08);
}

.faq-item:first-of-type {
  border-top: 1px solid rgba(74, 144, 217, 0.08);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--sky-blue);
}

.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--text-secondary);
}

.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-answer.open {
  max-height: 500px;
  padding-bottom: 20px;
}

.faq-answer p,
.faq-answer ul {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.faq-answer ul {
  list-style: none;
  padding: 0;
  margin-top: 8px;
}

.faq-answer ul li {
  padding: 4px 0;
}

.support-back {
  padding-top: 8px;
}

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

/* Focus styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--sky-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Selection */
::selection {
  background: rgba(74, 144, 217, 0.3);
  color: var(--white);
}
