/* ==================== Variables ==================== */
:root {
  /* Colors */
  --ink:          #0F1A2B;
  --muted:        #5B6375;
  --bg:           #FAFCFF;
  --card:         #FFFFFF;
  --navy:         #0C1324;
  --blue:         #3A73A3;
  --blue-600:     #7EB6E4;
  --border:       #E8ECF3;
  --header:       #27346D;
  --ring:         rgba(46,95,255,.16);

  /* Tokens */
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    18px;
  --container-max:1200px;
  --gap:          22px;
  --shadow-sm:    0 8px 24px rgba(8,16,40,.06);
  --shadow-lg:    0 18px 60px rgba(8,16,40,.08);
  --transition:   180ms cubic-bezier(.2,.9,.2,1);
  --focus-outline:3px solid var(--blue);
  --focus-offset: 3px;

  /* Typography */
  --body-line-height: 1.65;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;

  color-scheme: light;
}

/* Dark mode tokens */
@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #E7ECFF;
    --muted:     #B7C0D9;
    --bg:        #0B1020;
    --card:      #27346D;
    --navy:      #070D1C;
    --border:    #1D2942;
    --shadow-lg: 0 18px 60px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}

/* ==================== Reset / Base ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Responsive base font sizing so rem units scale smoothly on different screens */
html {
  font-size: clamp(15px, 1.6vw, 16px);
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--ink);
  line-height: var(--body-line-height);
}

img,
picture,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

:where(a, button) {
  -webkit-tap-highlight-color: transparent;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Accessibility helpers */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Better skip link (less layout shift) */
.skip-link {
  position: absolute;
  inset: auto 0 auto 0;
  clip-path: inset(100% 0 0 0);
  background: #fff;
  color: #000;
  padding: 8px 12px;
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus {
  clip-path: none;
  left: 16px;
  top: 16px;
}

/* Focus outline for keyboard users */
:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
  border-radius: 6px;
}

/* ==================== Layout Utilities ==================== */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 24px);
}

.section { padding-block: 84px; }

.grid {
  display: grid;
  gap: var(--gap);
  grid-auto-rows: min-content;
}

/* ==================== Header / Navigation ==================== */
/* ============================================
   HEADER (Sticky + Shrinking)
============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: height .25s ease, padding .25s ease, background .25s ease;
  height: 80px;
  display: flex;
  align-items: center;
  width: 100%;
}

header.shrink {
  height: 60px;
}

/* ============================================
   NAV CONTAINER
============================================ */
.navigation-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 24px);
}

/* ============================================
   BRAND
============================================ */
.brand img {
  height: 50px;
  transition: height .25s ease;
}
header.shrink .brand img {
  height: 40px;
}

/* ============================================
   DESKTOP NAV (>880px)
============================================ */
.desktop-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.desktop-nav a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  padding: 6px 8px;
  opacity: .92;
  transition: opacity var(--transition);
}
.desktop-nav a:hover {
  opacity: 1;
}

/* Hide desktop nav on mobile */
@media (max-width: 880px) {
  .desktop-nav {
    display: none;
  }
}

/* ============================================
   MOBILE HAMBURGER ICON
============================================ */
#nav-mobile-menu-icon {
  display: none;
  cursor: pointer;
  font-size: 1.9rem;
  padding: 8px;
  z-index: 999;
  transition: transform .35s ease, color .25s ease;
}

@media (prefers-color-scheme: dark) {
  #nav-mobile-menu-icon {
    color: #e7e7e7;
  }
}

@media (max-width: 880px) {
  #nav-mobile-menu-icon {
    display: inline-block;
  }
}

/* Bars → X */
#nav-mobile-menu-icon.fa-bars-open::before {
  content: "\f00d"; /* X */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}
#nav-mobile-menu-icon.fa-bars-open {
  transform: rotate(180deg);
}

/* ============================================
   FULL-SCREEN FADE-IN DRAWER
============================================ */
.mobile-drawer {
  position: fixed;
  inset: 0;
  height: 100vh;
  width: 100%;
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;

  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 24px;
  gap: 28px;
}

.mobile-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.mobile-drawer li {
  margin: 10px 0;
}
.mobile-drawer a {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  display: block;
  padding: 14px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mobile-drawer,
  #nav-mobile-menu-icon {
    transition: none;
  }
}


/* ==================== Buttons / CTAs ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5ch;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
  border: 0;
  font-size: clamp(0.95rem, 1.4vw, 1rem);
}

/* Filled CTA */
.btn-dark {
  background: var(--shadow-lg);
  border: 1px solid var(--ink);
  color: #fff;
  box-shadow: var(--shadow-lg);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}
.btn-dark:hover {
  background: rgba(0,0,0,0.55);
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

/* Outline CTA */
.btn-outline {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}
.btn-outline:hover {
  background: rgba(0,0,0,0.80);
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
  .btn-outline {
    border-color: #E7ECFF;
    color: #E7ECFF;
  }
}

/* Contrast mode tweaks */
@media (prefers-contrast: more) {
  .btn-dark { box-shadow: none; }
  nav a { text-decoration: underline; }
}

/* ==================== Hero ==================== */
.hero {
  padding-block: 140px 120px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F6F8FD 40%, #EEF2FA 100%);
}
@media (prefers-color-scheme: dark) {
  .hero {
    background: linear-gradient(180deg, #0B1020 0%, #0E1530 100%);
  }
}

.hero-ctas {
  display: inline-flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap; /* keep two buttons on one line */
}

/* Stack and center on smaller screens */
@media (max-width: 880px) {
  .hero-ctas {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  /* Make each button full-width (constrained) when stacked */
  .hero-ctas .btn {
    width: 100%;
    max-width: 420px;
    justify-content: center; /* center content inside the button */
  }
}

.hero-grid {
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 5vw, 60px);
  align-items: center;
}
@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding-block: 40px;
  }
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 2.6rem);
  line-height: 1.05;
  margin: 0 0 16px;
  font-weight: 900;
}
.hero p {
  font-size: clamp(0.95rem, 1.6vw, 1.125rem);
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 58ch;
}

/* ==================== Cards & Panels ==================== */
.card,
.route-card,
.cta-band {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  transition: box-shadow var(--transition), transform var(--transition);
  will-change: transform;
}
.card:where(:hover, :focus-within) {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Grid helpers */
.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
}

/* Routes / Route cards */
.routes {
  background: linear-gradient(100deg, #3A73A3, #212f65);
  color: #fff;
}
.stats-grid, .routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 14px;
}
.route-header { font-weight: 900; margin-bottom: 10px; }
.route-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.route-stat-number {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 900;
  color: var(--blue);
}

/* CTA band */
.cta-band {
  text-align: center;
  padding-block: 28px;
  border-radius: 22px;
}

/* ==================== Promo Card ==================== */
.promo-card {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.06);
  margin-top: 18px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.promo-card:hover,
.promo-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.cta-card-content {
  flex: 1 1 320px;
  margin: 0;
  color: var(--ink);
  line-height: 1.4;
  min-width: 0; /* allow truncation in flex containers */
}
.cta-card-content p {
  margin: 0;
}

.cta-card-cta {
  display: inline-flex;
  align-items: center;
  gap: .5ch;
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.cta-card-cta:hover {
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
}
.cta-card-cta:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
  border-radius: 8px;
}

.cta-note {
  display: block;
  width: 100%;
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.95rem;
}

/* Dark-mode tweaks for better contrast */
@media (prefers-color-scheme: dark) {
  .promo-card {
    background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border-color: rgba(231,236,255,0.06);
  }
  .cta-card-cta {
    border-color: rgba(231,236,255,0.12);
    color: var(--ink);
  }
  .cta-note { color: var(--muted); }
}

/* Reduced-motion: avoid transform animations */
@media (prefers-reduced-motion: reduce) {
  .promo-card,
  .cta-card-cta {
    transition: none;
    transform: none !important;
  }
}

/* ==================== Footer ==================== */
footer {
  color: #DDE6F9;
  padding-block: 54px;
  margin-block-start: 64px;
  font-size: clamp(0.95rem, 1.4vw, 1rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
footer h4 { margin: 0 0 10px; color: #fff; font-size: clamp(1rem, 1.6vw, 1.05rem); }
footer a {
  display: block;
  color: #C9D2E3;
  text-decoration: none;
  margin: 4px 0;
  transition: color var(--transition);
  font-size: clamp(0.9rem, 1.2vw, 1rem);
}
footer a:hover,
footer a:focus { color: #fff; }

.social-row { display: flex; gap: 10px; margin-top: 10px; }
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Responsive tweaks */
@media (max-width: 560px) {
  .nav { height: 64px; }
  .brand .word { font-size: clamp(0.95rem, 2.4vw, 1.05rem); }
  .hero { padding-block: 40px 40px; }
}

/* End of stylesheet */
