/* =========================================================
   CunRoutes — main.css
   ========================================================= */

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

:root {
  --bg:           #0c0a08;
  --bg-card:      #161210;
  --border:       #2a2420;
  --accent:       #E8553E;
  --accent-glow:  rgba(232, 85, 62, 0.12);
  --text:         #a89080;
  --muted:        #5c4f44;
  --white:        #f5ede6;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Subtle map-grid background */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

main, nav, footer { position: relative; z-index: 1; }

/* ── Navigation ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 10, 8, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo .icon-wrap {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-logo .icon-wrap img {
  width: 30px;
  height: 30px;
  object-fit: cover;
}

/* Language toggle pill */
.lang-toggle {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

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

/* ── Hero — split layout ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 48px 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow);
  border: 1px solid rgba(232, 85, 62, 0.3);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

.hero h1 {
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 440px;
}

.cta-group {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 24px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(232, 85, 62, 0.3);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.download-btn:hover {
  background: #ff6a52;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(232, 85, 62, 0.4);
}

.download-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.stat-pair {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Hero visual — two stacked phones */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 560px;
}

.phone-frame {
  border-radius: 28px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 0 32px 72px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
  position: absolute;
  width: 240px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.phone-frame:first-child {
  top: 0;
  left: 10%;
  z-index: 2;
  transform: rotate(-2deg);
}

.phone-frame-back {
  top: 40px;
  left: 40%;
  z-index: 1;
  transform: rotate(3deg);
  opacity: 0.75;
}

.phone-frame:hover, .phone-frame-back:hover {
  transform: rotate(0deg) translateY(-8px) !important;
  opacity: 1;
  z-index: 3;
  box-shadow: 0 40px 80px rgba(0,0,0,0.75), 0 0 0 1px rgba(232,85,62,0.2);
}

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

/* ── Route colors band ── */
.routes-band {
  display: flex;
  width: 100%;
  height: 6px;
  margin: 0 0 80px;
  overflow: hidden;
}

.route-line {
  flex: 1;
  height: 100%;
  transition: transform 0.2s ease;
}

.routes-band:hover .route-line {
  transform: scaleY(2.5);
}

/* ── Features ── */
.features {
  padding: 0 48px 88px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-eyebrow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-heading {
  text-align: center;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 52px;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(232, 85, 62, 0.35);
  transform: translateY(-3px);
}

.feat-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-glow);
  border: 1px solid rgba(232, 85, 62, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 20px;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── My Route section — left image, right text ── */
.myroute-section {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 72px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto 100px;
  padding: 0 48px;
}

.myroute-section .phone-frame {
  position: static;
  width: 220px;
  transform: none;
  flex-shrink: 0;
}

.myroute-section .phone-frame:hover {
  transform: translateY(-6px) !important;
}

.myroute-content .section-eyebrow { text-align: left; }

.myroute-content h2 {
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  margin-top: 8px;
}

.myroute-content p {
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
  max-width: 420px;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.footer-icon img { width: 32px; height: 32px; object-fit: cover; }

.footer-app-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 3px;
}

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

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

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

/* ── Scroll-reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal-stagger.visible > *:nth-child(1) { opacity:1; transform:none; transition-delay:0.05s; }
.reveal-stagger.visible > *:nth-child(2) { opacity:1; transform:none; transition-delay:0.12s; }
.reveal-stagger.visible > *:nth-child(3) { opacity:1; transform:none; transition-delay:0.19s; }
.reveal-stagger.visible > *:nth-child(4) { opacity:1; transform:none; transition-delay:0.26s; }

/* Hero entrance */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge  { animation: fadeUp 0.5s ease 0.1s both; }
.hero h1     { animation: fadeUp 0.55s ease 0.2s both; }
.hero-content > p { animation: fadeUp 0.55s ease 0.3s both; }
.cta-group   { animation: fadeUp 0.55s ease 0.4s both; }

/* ── Responsive ── */
@media (max-width: 860px) {
  nav { padding: 14px 20px; }

  .hero {
    grid-template-columns: 1fr;
    padding: 64px 20px 40px;
    gap: 56px;
  }

  .hero-visual {
    height: 400px;
  }

  .phone-frame { width: 180px; }
  .phone-frame:first-child { left: 5%; }
  .phone-frame-back { left: 35%; }

  .features { padding: 0 20px 72px; }

  .myroute-section {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 20px;
    margin-bottom: 72px;
  }

  .myroute-section .phone-frame {
    width: 200px;
    margin: 0 auto;
  }

  .myroute-content .section-eyebrow { text-align: center; }
  .myroute-content h2, .myroute-content p { text-align: center; margin-left: auto; margin-right: auto; }

  footer { padding: 24px 20px; flex-direction: column; align-items: flex-start; }
}
