/* BUS real – Prototype-specific styles (nav, hero, etc.) */

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  /* light fade — top edge slightly tinted, fades to transparent */
  background: linear-gradient(180deg,
    hsl(220 40% 7% / 0.45) 0%,
    hsl(220 40% 7% / 0.18) 100%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: hsl(220 40% 7% / 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: hsl(var(--br-border-soft) / 0.5);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 88px;
  transition: height .25s ease;
}
.nav.is-scrolled .nav-inner { height: 72px; }

.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img {
  height: 44px;
  width: auto;
  display: block;
  opacity: 1;
  transition: height .25s ease;
}
.nav.is-scrolled .nav-logo img {
  height: 36px;
}

.nav-right {
  display: none;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 4px;
  align-items: center;
}
.nav-list li a {
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
  color: hsl(var(--br-fg) / 0.85);
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color .18s ease;
}
.nav-list li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  border-radius: 2px;
  background: hsl(var(--br-fg));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .28s cubic-bezier(.2, .6, .2, 1), background .18s ease, width .2s ease;
}
.nav-list li a:hover {
  color: hsl(var(--br-fg));
}
.nav-list li a:hover::after {
  transform: scaleX(1);
}
.nav-list li a.is-active {
  color: hsl(var(--br-navy-pale));
}
.nav-list li a.is-active::after {
  transform: scaleX(1);
  background: hsl(var(--br-navy-pale));
}

.nav-cta {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid hsl(var(--br-border));
  background: transparent;
  color: hsl(var(--br-fg));
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.nav-burger:hover { border-color: hsl(var(--br-fg) / 0.4); }

@media (max-width: 1023px) {
  .nav-list { display: none; }
  .nav-cta { display: none; }
}
@media (min-width: 1024px) {
  .nav-right { display: flex; }
  .nav-burger { display: none; }
}

/* Mobile overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: hsl(var(--br-bg-deep) / 0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 100px 32px 48px;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.nav-overlay.is-open {
  transform: translateY(0);
  pointer-events: auto;
}
.nav-overlay ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 4px;
}
.nav-overlay ul li a {
  display: block;
  padding: 14px 0;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 26px;
  color: hsl(var(--br-fg));
  text-decoration: none;
  border-bottom: 1px solid hsl(var(--br-border-soft));
}
.nav-overlay ul li a:hover { color: hsl(var(--br-navy-pale)); }


/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: hsl(var(--br-bg-deep));
  padding-top: 96px; /* nav clearance — desktop nav is 88px tall + small breath */
  padding-bottom: clamp(56px, 9vh, 112px);
}
@media (min-width: 1024px) {
  .hero { min-height: 88vh; }
}
@media (max-width: 600px) {
  /* Mobile hero: full viewport height (dvh accounts for mobile chrome bars),
     photo-based (no video), stronger bottom darkening so the white H1 reads
     cleanly. */
  .hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 84px;
    padding-bottom: 56px;
  }
  img.hero-bg,
  video.hero-bg {
    object-position: center 38%;
  }
  /* Two-stop dark gradient: subtle at top (nav legibility), strong at bottom
     where H1/sub/CTAs live. */
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(180deg,
      hsl(220 40% 7% / 0.15) 0%,
      hsl(220 40% 7% / 0.2) 30%,
      hsl(220 40% 7% / 0.85) 100%);
  }
}
.hero-bg {
  position: absolute;
  top: -8%; left: 0; right: 0;
  height: 116%;
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  will-change: transform;
  z-index: 0;
}
video.hero-bg,
img.hero-bg {
  width: 100%;
  object-fit: cover;
  object-position: center 35%;
  background-color: hsl(var(--br-bg-deep));
  pointer-events: none;
}
/* Mobile photo crop — center on the buses, not the empty pavement */
img.hero-photo-mobile {
  object-position: center 40%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Background rail dot motif */
.hero-rail-dots {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 50%, hsl(var(--br-fg) / 0.05) 1px, transparent 1.5px);
  background-size: 28px 28px;
  background-position: 0 0;
  mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 5;
  width: 100%;
}
.hero-content-left {
  text-align: left;
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 768px) {
  .hero-content-left {
    margin-left: 48px;
    margin-right: 0;
  }
}
@media (min-width: 1280px) {
  .hero-content-left {
    /* container max-width 1280, padding 48 → align with container left */
    margin-left: max(48px, calc((100vw - 1280px) / 2 + 48px));
  }
}

.hero-eyebrow {
  margin-bottom: 20px;
  animation: fadeUp .8s cubic-bezier(.2,.6,.2,1) backwards;
}
@media (max-width: 480px) {
  .hero-eyebrow {
    font-size: 11px;
    letter-spacing: 0.12em;
  }
  .hero-h1 { font-size: clamp(28px, 8vw, 40px) !important; }
  .hero-sub { font-size: 16px; margin-bottom: 28px; }
  .hero-cta .btn { padding: 12px 18px; font-size: 14px; }
}

.hero-h1 {
  color: hsl(var(--br-fg));
  text-wrap: balance;
  margin-bottom: 28px;
  animation: fadeUp .9s cubic-bezier(.2,.6,.2,1) backwards;
}
.hero-accent {
  color: hsl(var(--br-navy-pale));
  font-weight: 700;
}

.hero-sub {
  color: hsl(var(--br-fg-dim));
  margin: 0 0 36px;
  text-wrap: pretty;
  animation: fadeUp .9s cubic-bezier(.2,.6,.2,1) backwards;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: fadeUp .9s cubic-bezier(.2,.6,.2,1) backwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scroll hint – two stacked chevrons with a wave animation */
.hero-scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 8px 14px;
  border-radius: 999px;
  color: hsl(var(--br-fg) / 0.85);
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}
.hero-scroll-hint:hover {
  color: hsl(var(--br-fg));
  transform: translateX(-50%) translateY(2px);
}
.hero-scroll-chev {
  display: block;
  width: 28px;
  height: 14px;
  margin-top: -4px;
  will-change: opacity, transform;
}
.hero-scroll-chev.chev-1 {
  animation: scrollChev 1.6s ease-in-out infinite;
}
.hero-scroll-chev.chev-2 {
  animation: scrollChev 1.6s ease-in-out infinite;
  animation-delay: 0.18s;
}
@keyframes scrollChev {
  0%   { opacity: 0;    transform: translateY(-4px); }
  35%  { opacity: 0.85; transform: translateY(0); }
  65%  { opacity: 0.85; transform: translateY(0); }
  100% { opacity: 0;    transform: translateY(4px); }
}
@media (max-width: 600px) {
  .hero-scroll-hint { bottom: 16px; }
  .hero-scroll-chev { width: 24px; height: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-chev,
  .hero-scroll-chev.chev-1,
  .hero-scroll-chev.chev-2 {
    animation: none !important;
    opacity: 0.7;
    transform: none;
  }
}

/* ============================================================
   Departures-board variant
   ============================================================ */
.hero-h1-dep {
  display: block;
}
.dep-line {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.28em;
  vertical-align: top;
}
.dep-word {
  display: inline-block;
  transform: translateX(-32px);
  opacity: 0;
  transition: transform .55s cubic-bezier(.2,.7,.2,1), opacity .55s ease;
  will-change: transform, opacity;
}
.dep-word.dep-in {
  animation: depRollIn .65s cubic-bezier(.2,.7,.2,1) forwards;
}
.dep-word.dep-hold {
  transform: translateX(0);
  opacity: 1;
}
.dep-word.dep-out {
  animation: depRollOut .55s cubic-bezier(.6,0,.8,.3) forwards;
}
@keyframes depRollIn {
  0%   { transform: translateX(-32px); opacity: 0; filter: blur(2px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { transform: translateX(0);     opacity: 1; }
}
@keyframes depRollOut {
  0%   { transform: translateX(0);    opacity: 1; }
  100% { transform: translateX(48px); opacity: 0; filter: blur(2px); }
}
/* Hide sticky CTA on desktop where header CTA is enough */
@media (min-width: 1024px) {
  .sticky-mobile-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dep-word { transform: none !important; opacity: 1 !important; animation: none !important; filter: none !important; }
  .hero-bg { transform: none !important; }
}


