/* ============================================
   TrainO Website - Landing Page
   Premium dark theme, teal accent
   ============================================ */

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ringGlow {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(47, 143, 131, 0.3))
            drop-shadow(0 0 20px rgba(47, 143, 131, 0.08));
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(47, 143, 131, 0.5))
            drop-shadow(0 0 32px rgba(47, 143, 131, 0.15));
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}

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

/* ============================================
   Nav
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(11, 15, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-brand {
  animation: ringGlow 3s ease-in-out infinite;
}

.nav-brand .wordmark-text {
  font-size: 22px;
  letter-spacing: 2px;
}

.nav-brand .wordmark-ring {
  width: 22px;
  height: 22px;
}

.nav-brand .wordmark-ring svg {
  width: 22px;
  height: 22px;
}

.nav-brand .wordmark-system {
  font-size: 19px;
  margin-left: 6px;
  letter-spacing: 3px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-cta {
  padding: 10px 20px;
  font-size: 13px;
}

/* ============================================
   Hero
   ============================================ */

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

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 30%, rgba(47, 143, 131, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 70% 60%, rgba(47, 143, 131, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 640px;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-title-accent {
  background: linear-gradient(135deg, #5FAFA6, #2F8F83);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 18px);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  font-size: 15px;
}

.hero-cta svg {
  width: 20px;
  height: 20px;
}

/* Phone mockup placeholder */
.hero-phone {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 260px;
  height: 520px;
  border-radius: 36px;
  background: var(--color-surface);
  border: 2px solid var(--color-surface-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(47, 143, 131, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: var(--color-graphite);
  border-radius: 12px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.phone-screen .wordmark {
  transform: scale(0.8);
}

.phone-screen .wordmark-text {
  font-size: 28px;
}

.phone-screen .wordmark-ring {
  width: 28px;
  height: 28px;
}

.phone-screen .wordmark-system {
  font-size: 24px;
}

/* ============================================
   Features
   ============================================ */

.features {
  padding: 100px 32px;
  max-width: 1080px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 56px;
  letter-spacing: -0.3px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 28px 24px;
  background: linear-gradient(145deg, rgba(26, 31, 36, 0.8), rgba(18, 22, 27, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-normal) var(--ease-smooth),
              box-shadow var(--duration-normal) var(--ease-smooth),
              border-color var(--duration-normal) var(--ease-smooth);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(47, 143, 131, 0.15);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(47, 143, 131, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-core-green);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text-primary);
}

.feature-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ============================================
   How It Works
   ============================================ */

.how {
  padding: 100px 32px;
  background: var(--color-onyx);
}

.how-inner {
  max-width: 800px;
  margin: 0 auto;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(47, 143, 131, 0.12);
  border: 1.5px solid rgba(47, 143, 131, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-core-green);
}

.step-content {
  padding-top: 4px;
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
  padding: 100px 32px;
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(47, 143, 131, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-subtitle {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 40px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 13px;
  color: var(--color-text-muted);
  transition: color var(--duration-fast) var(--ease-default);
}

.footer-link:hover {
  color: var(--color-core-green);
}

.footer-copy {
  font-size: 12px;
  color: var(--color-text-disabled);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 640px) {
  .nav {
    padding: 14px 20px;
  }

  .nav-brand .wordmark-text {
    font-size: 18px;
  }

  .nav-brand .wordmark-ring {
    width: 18px;
    height: 18px;
  }

  .nav-brand .wordmark-ring svg {
    width: 18px;
    height: 18px;
  }

  .nav-brand .wordmark-system {
    font-size: 15px;
    margin-left: 4px;
    letter-spacing: 2px;
  }

  .nav-cta {
    padding: 8px 14px;
    font-size: 12px;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .features,
  .how,
  .cta-section {
    padding: 72px 20px;
  }

  .how-step {
    gap: 16px;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .phone-frame {
    width: 220px;
    height: 440px;
    border-radius: 30px;
  }

  .footer {
    padding: 32px 20px;
  }

  .footer-links {
    gap: 16px;
  }
}

@media (min-width: 1200px) {
  .hero-content {
    max-width: 700px;
  }

  .features {
    max-width: 1120px;
  }
}
