/* ═══════════════════════════════════════════════
   DC Metro Widget — Landing Page
   Transit-futuristic dark theme
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── Tokens ── */
:root {
  --bg: #050505;
  --bg-card: #0f0f0f;
  --bg-card-hover: #141414;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text: #e8e8e8;
  --text-muted: #888;
  --text-dim: #555;

  /* WMATA line colors */
  --red: #BF0D3E;
  --orange: #ED8B00;
  --blue: #009CDE;
  --green: #00B140;
  --yellow: #FFD100;
  --silver: #A2A4A1;

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
}

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

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── Layout ── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(5,5,5,0.8);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

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

.nav-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.2s;
  font-weight: 500;
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: white;
  color: #000;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-display);
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255,255,255,0.15);
}

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

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 156, 222, 0.08) 0%,
    rgba(191, 13, 62, 0.06) 30%,
    rgba(237, 139, 0, 0.04) 50%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

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

.hero-content {
  max-width: 520px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  font-weight: 500;
}

.hero-badge img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--blue), var(--red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-appstore {
  display: inline-block;
  transition: transform 0.2s, opacity 0.2s;
}

.btn-appstore img {
  height: 52px;
}

.btn-appstore:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-screenshot {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
}

.hero-phone {
  position: absolute;
  width: 240px;
}

.hero-phone img {
  width: 100%;
  border-radius: 28px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 20px 60px rgba(0,0,0,0.6),
    0 0 120px rgba(0,156,222,0.1);
}

.hero-phone-back {
  transform: translateX(-45%) rotate(-8deg);
  z-index: 1;
}

.hero-phone-front {
  transform: translateX(35%) rotate(5deg);
  z-index: 2;
}

.hero-screenshot::after {
  content: '';
  position: absolute;
  inset: -40px;
  background: radial-gradient(
    ellipse at center,
    rgba(0,156,222,0.08) 0%,
    transparent 70%
  );
  z-index: 0;
  pointer-events: none;
}

/* ── Section Headers ── */
.section-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.6;
}

/* ── Features ── */
.features {
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 16px;
  margin-top: 56px;
}

.feature-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-card:hover::before {
  opacity: 1;
}

/* Line-colored top accents */
.feature-card:nth-child(1)::before { background: var(--red); }
.feature-card:nth-child(2)::before { background: var(--blue); }
.feature-card:nth-child(3)::before { background: var(--green); }
.feature-card:nth-child(4)::before { background: var(--orange); }
.feature-card:nth-child(5)::before { background: var(--yellow); }
.feature-card:nth-child(6)::before { background: var(--silver); }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Screenshots ── */
.screenshots {
  position: relative;
  overflow: hidden;
}

.screenshots .section-header {
  padding: 0 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.screenshot-gallery {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 56px 24px 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.screenshot-gallery::-webkit-scrollbar {
  display: none;
}

.screenshot-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  position: relative;
}

.screenshot-item:first-child {
  margin-left: max(24px, calc((100vw - 1120px) / 2));
}

.screenshot-item:last-child {
  margin-right: max(24px, calc((100vw - 1120px) / 2));
}

.phone-frame {
  position: relative;
  width: 220px;
  border-radius: 24px;
  overflow: hidden;
  background: #111;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 12px 40px rgba(0,0,0,0.5);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
}

.phone-frame:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.1),
    0 24px 60px rgba(0,0,0,0.6),
    0 0 80px rgba(0,156,222,0.06);
}

.phone-frame img {
  width: 100%;
  display: block;
}

/* ── How To ── */
.howto {
  position: relative;
}

.howto-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.howto-step {
  text-align: center;
  padding: 40px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--blue), var(--red));
  color: white;
}

.howto-step h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.howto-step p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Connector line between steps */
.howto-connector {
  display: none;
}

@media (min-width: 768px) {
  .howto-connector {
    display: block;
    position: absolute;
    top: 64px;
    left: calc(33.33% + 12px);
    right: calc(33.33% + 12px);
    height: 1px;
    background: linear-gradient(90deg, var(--blue), var(--red));
    opacity: 0.3;
    z-index: 0;
  }
}

/* ── Pricing ── */
.pricing {
  position: relative;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 56px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  position: relative;
  transition: border-color 0.3s;
}

.pricing-card:hover {
  border-color: var(--border-hover);
}

.pricing-card.featured {
  border-color: rgba(0,156,222,0.3);
  background: linear-gradient(
    180deg,
    rgba(0,156,222,0.04) 0%,
    var(--bg-card) 60%
  );
}

.pricing-card.featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 0 0 2px 2px;
}

.pricing-tier {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pricing-featured-label {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(0,156,222,0.12);
  color: var(--blue);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.pricing-price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.pricing-price .period {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-alt {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.pricing-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.pricing-card.featured .pricing-features li::before {
  color: var(--blue);
}

.pricing-trial {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 8px 16px;
  background: rgba(0,156,222,0.08);
  border: 1px solid rgba(0,156,222,0.15);
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--blue);
  font-weight: 600;
}

/* ── Privacy Banner ── */
.privacy-banner {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.privacy-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.privacy-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.privacy-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

/* ── Footer ── */
.footer {
  padding: 48px 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

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

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 8px;
}

/* ── Metro line strip decoration ── */
.metro-strip {
  display: flex;
  height: 3px;
  width: 100%;
  margin: 0;
}

.metro-strip span {
  flex: 1;
}

.metro-strip span:nth-child(1) { background: var(--red); }
.metro-strip span:nth-child(2) { background: var(--orange); }
.metro-strip span:nth-child(3) { background: var(--blue); }
.metro-strip span:nth-child(4) { background: var(--green); }
.metro-strip span:nth-child(5) { background: var(--yellow); }
.metro-strip span:nth-child(6) { background: var(--silver); }

/* ── Scroll Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0.0s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.24s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.32s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.4s; }
.stagger.visible > *:nth-child(7) { transition-delay: 0.48s; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  section {
    padding: 72px 0;
  }

  .nav-links {
    display: none;
  }

  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-tagline {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-meta {
    justify-content: center;
  }

  .hero-screenshot {
    min-height: 400px;
  }

  .hero-phone {
    width: 180px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .howto-steps {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .screenshot-item:first-child {
    margin-left: 24px;
  }

  .screenshot-item:last-child {
    margin-right: 24px;
  }

  .phone-frame {
    width: 180px;
  }

  .privacy-inner {
    flex-direction: column;
    gap: 20px;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .phone-frame {
    width: 160px;
  }

  .hero-screenshot {
    min-height: 340px;
  }

  .hero-phone {
    width: 155px;
  }
}
