/* Navigation and hero */

/* Fixed + transparent over the hero; js adds .solid after a small scroll */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(5, 7, 13, 0);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transform: translateZ(0);
  will-change: background-color, border-color;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav.solid {
  background: rgba(5, 7, 13, 0.88);
  border-bottom-color: var(--line);
}
.nav-in { display: flex; align-items: center; height: var(--nav-h); gap: 28px; }
.brand {
  display: flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 700; font-size: 17px; letter-spacing: 0.18em; text-decoration: none;
}
.brand img { height: 36px; width: auto; }
.brand picture { display: inline-flex; align-items: center; }
.brand picture img { height: 36px; width: auto; max-width: 100%; object-fit: contain; }

.menu { display: flex; align-items: center; gap: 26px; margin-left: auto; font-size: 14.5px; }
.menu > a:not(.btn), .dd-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  color: var(--text-2); font: inherit; text-decoration: none;
  background: none; border: 0; cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
}
.dd-btn span {
  margin-left: 8px; width: 7px; height: 7px; font-size: 0; flex: none;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform var(--dur-fast) var(--ease);
}
.dd.open .dd-btn span { transform: rotate(-135deg) translateY(-2px); }
.menu > a:not(.btn):hover, .menu > a[aria-current="true"], .menu > a.active, .dd-btn[aria-current="true"], .dd-btn.active, .dd:hover .dd-btn, .dd-btn:focus-visible { color: var(--text); }
.menu > a[aria-current="true"], .menu > a.active, .dd-btn[aria-current="true"], .dd-btn.active { box-shadow: inset 0 -2px 0 var(--cyan); }

/* Products dropdown: hover/focus on mouse devices, tap-toggled .open everywhere (touch never gets reliable :hover/:focus) */
.dd { position: relative; }
.dd-panel {
  position: absolute; top: calc(100% + 12px); left: 50%; width: 400px; padding: 10px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r);
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast);
}
/* hover bridge so the pointer can cross the gap between button and panel */
.dd-panel::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
@media (hover: hover) and (pointer: fine) {
  .dd:hover .dd-panel, .dd:focus-within .dd-panel {
    opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s;
  }
}
.dd.open .dd-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.dd.shut .dd-panel { opacity: 0; visibility: hidden; }
.dd-panel a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none;
}
.dd-panel a:hover, .dd-panel a:focus-visible { background: rgba(34, 211, 238, 0.07); }
.dd-panel small { display: block; color: var(--text-3); font-size: 12px; }
.pill { font: 400 10.5px var(--mono); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.pill.live { color: var(--green); background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.25); }
.pill.soon { color: var(--amber); background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.25); }

.burger {
  display: none; margin-left: auto; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer; position: relative;
}
.burger span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text);
  transition: transform var(--dur-fast) var(--ease);
}
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Hero: skyline poster, navy veil, faint grid; logo, three pillars, slogan, CTAs */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(560px, 72vh, 960px);
  min-height: clamp(560px, 72svh, 960px);
  display: flex; align-items: center; justify-content: center; text-align: center;
}
/* Background video fills the hero; its poster (same skyline image) shows until the first frame decodes. */
.hero .hero-video {
  position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%;
  object-fit: cover; background: var(--bg);
  transform: translateZ(0);
  pointer-events: none;
}
.hero .shade {
  position: absolute; inset: 0; z-index: -2;
  transform: translateZ(0);
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 40% at 50% 30%, rgba(3, 10, 28, 0.62) 0%, rgba(3, 10, 28, 0.38) 55%, transparent 100%),
    linear-gradient(rgba(6, 22, 64, 0.24), rgba(6, 22, 64, 0.24)),
    linear-gradient(180deg, rgba(5, 7, 13, 0.55) 0%, rgba(5, 7, 13, 0.35) 40%, rgba(5, 7, 13, 0.85) 85%, var(--bg) 100%);
}
.hero .gridbg { z-index: -1; transform: translateZ(0); pointer-events: none; }
.hero-in { position: relative; padding: 96px var(--gutter) 56px; max-width: 980px; }
.hero-in picture { display: block; width: fit-content; margin: 0 auto; }
.hero-logo {
  width: min(520px, 86vw); height: auto; margin: 0 auto 16px;
  /* Depth shadow separates the chrome wordmark from bright buildings; faint cyan halo echoes the beam */
  filter: drop-shadow(0 8px 22px rgba(2, 10, 36, 0.7)) drop-shadow(0 0 36px rgba(31, 163, 255, 0.22));
}
.hero-subline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px auto 16px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: rgba(224, 242, 254, 0.9);
  text-shadow: 0 0 16px rgba(34, 211, 238, 0.4);
}
.hero-subline .subline-dot {
  color: var(--cyan, #06b6d4);
  font-size: 14px;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
}
.hero-slogan {
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.6;
  max-width: 760px;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
}
.hero-slogan b, .hero-slogan strong {
  color: var(--cyan, #06b6d4);
  font-weight: 700;
  text-shadow: 0 0 14px rgba(6, 182, 212, 0.7);
}
.hero .ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 0; }

@media (max-width: 960px) {
  .burger { display: block; }
  .menu {
    display: flex; visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast);
    position: absolute; top: var(--nav-h); left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 12px max(var(--gutter), env(safe-area-inset-right)) 24px max(var(--gutter), env(safe-area-inset-left)); max-height: calc(100vh - var(--nav-h)); max-height: calc(100svh - var(--nav-h)); overflow-y: auto;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .menu.open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition-delay: 0s; }
  /* Scrim: dims the page under the drawer so hero content stops competing; a tap on it closes the drawer (see nav.js) */
  .nav:has(.menu.open)::after {
    content: ""; position: fixed; inset: var(--nav-h) 0 0 0; z-index: -1;
    background: rgba(3, 6, 14, 0.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  }
  /* without JS the burger cannot work: lay the links out in the page flow instead */
  html:not(.js) .nav { position: absolute; background: var(--bg); }
  html:not(.js) .nav-in { flex-wrap: wrap; height: auto; min-height: var(--nav-h); }
  html:not(.js) .burger { display: none; }
  html:not(.js) .menu { display: flex; position: static; flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; gap: 4px 20px; padding: 0 0 14px; max-height: none; background: none; border: 0; visibility: visible; opacity: 1; transform: none; pointer-events: auto; }
  html:not(.js) .menu > a:not(.btn), html:not(.js) .dd-btn { width: auto; border: 0; font-size: 14.5px; }
  html:not(.js) .dd-panel { display: none; }
  .menu > a:not(.btn), .dd-btn { border-bottom: 1px solid var(--line); font-size: 16px; width: 100%; }
  .dd-btn { justify-content: space-between; }
  .menu > a:not(.btn), .dd-btn { -webkit-tap-highlight-color: transparent; transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
  .menu > a:not(.btn):active, .dd-btn:active { background: rgba(34, 211, 238, 0.08); color: var(--text); }
  .dd-panel small { font-size: 13px; }
  /* The CTA stays reachable on short screens: it sticks to the drawer bottom; the halo masks rows scrolling under it */
  html.js .menu .btn { margin-top: 16px; position: sticky; bottom: calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 0 0 12px var(--bg-2), 0 28px 0 12px var(--bg-2); }
  /* Products group is collapsed until tapped so the CTA is visible without scrolling */
  .dd-panel { display: none; position: static; left: auto; width: auto; margin: 6px 0 10px; opacity: 1; visibility: visible; transform: none; }
  /* .dd.open outranks the plain rule above, so the desktop centering transform must be reset here too */
  .dd.open .dd-panel { display: block; transform: none; }
  .dd-panel::before { display: none; }
  /* Opened drawer owns the scroll; the page behind stays put */
  html.menu-open { overflow: hidden; }
  @media (prefers-reduced-motion: reduce) { .menu { transition: none; transform: none; } }
  html { scrollbar-gutter: stable; }
  .menu { overscroll-behavior: contain; }
  /* keep the bar opaque while the menu is open so links never sit on the skyline */
  .nav:has(.menu.open) { background: var(--bg); border-bottom-color: var(--line); }
}

@media (max-width: 680px) {
  .hero {
    min-height: auto;
    padding: calc(var(--nav-h) + 16px) 0 36px;
  }
  .hero-in {
    padding: 8px var(--gutter, 16px) 16px;
    max-width: 100%;
  }
  .hero-logo {
    width: min(290px, 76vw);
    height: auto;
    margin: 0 auto 8px;
  }
  .hero-subline {
    font-size: 10px;
    gap: 6px;
    letter-spacing: 0.08em;
    margin: 6px auto 14px;
    line-height: 1.4;
  }
  .hero-subline .subline-dot {
    font-size: 10px;
  }
  .hero-slogan {
    font-size: 14.5px;
    line-height: 1.5;
    margin: 0 auto 20px;
    padding: 0 4px;
  }
  .hero .ctas {
    gap: 10px;
    margin-top: 0;
  }
  .hero .ctas .btn {
    flex: 1 1 135px;
    max-width: 175px;
    padding: 10px 14px;
    font-size: 13.5px;
    min-height: 42px;
  }
}

/* Short landscape phones: the hero hugs its content instead of forcing a tall block */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: 0; }
  .hero-in { padding-top: calc(var(--nav-h) + 16px); }
  .hero-logo { width: min(300px, 46vw); }
}
