/* =============================================
   SeaWise — Landing Page
   Dark maritime command bridge aesthetic
   ============================================= */

:root {
  --bg-primary: #0a192f;
  --bg-secondary: #0d2137;
  --bg-card: #112a45;
  --bg-card-hover: #153352;
  --border: #1e3a5f;
  --border-glow: #38bdf8;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #38bdf8;
  --accent-teal: #2dd4bf;
  --accent-green: #10b981;
  --accent-purple: #a78bfa;
  --accent-amber: #fbbf24;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 16px;
  --radius-sm: 8px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- ANIMATIONS --- */

.animate-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children */
.features-grid .animate-in:nth-child(2) { transition-delay: 0.1s; }
.features-grid .animate-in:nth-child(3) { transition-delay: 0.2s; }
.features-grid .animate-in:nth-child(4) { transition-delay: 0.3s; }
.testimonials-grid .animate-in:nth-child(2) { transition-delay: 0.1s; }
.testimonials-grid .animate-in:nth-child(3) { transition-delay: 0.2s; }

/* --- NAV --- */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  background: rgba(10, 25, 47, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  padding: 12px 0;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo {
  height: 40px;
  width: auto;
}

.nav-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  color: var(--text-primary);
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* --- BUTTONS --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

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

.btn-lg {
  font-size: 1rem;
  padding: 14px 32px;
}

.btn-green {
  background: var(--accent-green);
  color: #fff;
}

.btn-green:hover {
  background: #0ea572;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* --- HERO --- */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Smoke backgrounds for alternating sections */
.has-smoke {
  position: relative;
}

.has-smoke > .smoke-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0.5;
}

.has-smoke > .container,
.has-smoke > .screenshots-track {
  position: relative;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 40px rgba(45, 212, 191, 0.3));
  animation: float 6s ease-in-out infinite;
}

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

#hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

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

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* --- SECTIONS SHARED --- */

section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-teal);
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.2);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

/* --- FEATURES --- */

#features {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(56, 189, 248, 0.08);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon-cyan { background: rgba(56, 189, 248, 0.12); color: var(--accent-cyan); }
.feature-icon-green { background: rgba(16, 185, 129, 0.12); color: var(--accent-green); }
.feature-icon-purple { background: rgba(167, 139, 250, 0.12); color: var(--accent-purple); }
.feature-icon-amber { background: rgba(251, 191, 36, 0.12); color: var(--accent-amber); }

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

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

/* --- SCREENSHOTS --- */

#screenshots {
  overflow: hidden;
}

.screenshots-track {
  display: flex;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1200px) / 2));
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.screenshots-track::-webkit-scrollbar {
  display: none;
}

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

.screenshot-frame {
  width: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.3s;
}

.screenshot-frame:hover {
  border-color: var(--accent-cyan);
}

.screenshot-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-placeholder {
  aspect-ratio: 9 / 16;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.screenshot-caption {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* --- PRICING --- */

#pricing {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pricing-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  position: relative;
  transition: all 0.35s;
}

.pricing-card:hover {
  border-color: var(--accent-green);
  box-shadow: 0 0 60px rgba(16, 185, 129, 0.1);
}

.pricing-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.pricing-amount {
  margin-bottom: 32px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.pricing-currency {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pricing-value {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pricing-period {
  font-size: 1rem;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 36px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(30, 58, 95, 0.5);
}

.pricing-features li:last-child {
  border-bottom: none;
}

/* --- TESTIMONIALS --- */

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

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.testimonial-stars {
  color: var(--accent-amber);
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.testimonial-card blockquote {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent-teal);
  flex-shrink: 0;
}

.testimonial-author strong {
  display: block;
  font-size: 0.9rem;
}

.testimonial-author span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- FAQ --- */

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 20px 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.2s;
}

.faq-item summary:hover {
  color: var(--accent-cyan);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 0 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.faq-answer a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.faq-answer a:hover {
  text-decoration: underline;
}

/* --- CTA BANNER --- */

#cta {
  padding: 80px 0;
}

.cta-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(45, 212, 191, 0.06), transparent 70%);
  pointer-events: none;
}

.cta-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
}

.cta-card p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  position: relative;
}

.cta-card .btn {
  position: relative;
}

/* --- FOOTER --- */

#footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

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

.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-logo {
  width: 40px;
  height: 40px;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.footer-company {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent-cyan);
}

.store-badge {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem !important;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- RESPONSIVE --- */

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 200;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    font-size: 1.1rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  #hero {
    min-height: auto;
    padding: 140px 24px 60px;
  }
  .hero-stats {
    gap: 20px;
  }
  .hero-stat-divider {
    display: none;
  }
  .hero-logo {
    width: 90px;
    height: 90px;
  }
  section {
    padding: 64px 0;
  }
  .pricing-card {
    padding: 36px 28px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .screenshot-frame {
    width: 240px;
  }
}
