/* ==========================================================
   layout.css — nav, hero, section scaffolding, footer
   ========================================================== */

/* ---------- navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) clamp(1rem, 4vw, 3rem) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 16, 34, .72);
  backdrop-filter: blur(14px) saturate(140%);
  border-color: rgba(36, 48, 86, .7);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font: 800 var(--step-1)/1 var(--display);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  font-size: 16px;
  background: linear-gradient(135deg, var(--charge), var(--violet));
  box-shadow: 0 0 20px rgba(55, 226, 213, .45);
}

.nav-links { display: flex; gap: .25rem; }
.nav-links a {
  position: relative;
  padding: .5rem .85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: .95rem;
  transition: color .25s, background .25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.is-active {
  color: var(--text);
  background: rgba(55, 226, 213, .1);
}
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 3px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--charge);
  box-shadow: 0 0 8px var(--charge);
  transform: translateX(-50%);
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span:not(.sr-only) {
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: var(--text);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
    left: 0; right: 0;
    flex-direction: column;
    padding: 1rem clamp(1rem, 4vw, 3rem) 1.5rem;
    background: rgba(11, 16, 34, .96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    clip-path: inset(0 0 100% 0);
    transition: clip-path .45s var(--ease);
  }
  .nav-links.is-open { clip-path: inset(0 0 0 0); }
  .nav-links a { padding: .85rem 1rem; font-size: 1.05rem; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 2rem) clamp(1.25rem, 6vw, 5rem) 7rem;
  overflow: hidden;
  isolation: isolate;
  /* street-grid background that the canvas current runs along */
  background:
    linear-gradient(rgba(36, 48, 86, .35) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(36, 48, 86, .35) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--ink);
}
.hero::after {
  /* vignette fades the grid into the page */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 80% 70% at 30% 45%, transparent 30%, var(--ink) 85%);
  pointer-events: none;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.hero-glow {
  position: absolute;
  z-index: -1;
  width: 60vmax; height: 60vmax;
  right: -20vmax; top: -18vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 124, 255, .28), transparent 60%);
  filter: blur(20px);
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-inner { max-width: 1100px; width: 100%; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem .9rem .4rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 26, 54, .6);
  backdrop-filter: blur(6px);
  font-size: var(--step--1);
  color: var(--muted);
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--charge);
  box-shadow: 0 0 0 0 rgba(55, 226, 213, .7);
  animation: ping 2s infinite;
}

.hero-title {
  font-size: var(--step-5);
  font-weight: 800;
  line-height: .92;
  letter-spacing: -0.045em;
  margin: 1.5rem 0 1.75rem;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }

/* outlined second line that fills with "charge" */
.stroke-text {
  color: transparent;
  -webkit-text-stroke: 2px var(--charge);
  background: linear-gradient(90deg, var(--charge), var(--violet)) no-repeat;
  background-size: 0% 100%;
  -webkit-background-clip: text;
  background-clip: text;
}
.is-ready .stroke-text {
  animation: chargeFill 1.8s var(--ease) 1s forwards;
}

.hero-lede {
  max-width: 34em;
  font-size: var(--step-1);
  color: #C3CBE0;
  line-height: 1.5;
}
.hero-lede strong { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.25rem; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin: 3.5rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  max-width: 720px;
}
.hero-stats dt { color: var(--muted); font-size: var(--step--1); }
.hero-stats dd {
  margin: .2rem 0 0;
  font: 800 var(--step-3)/1 var(--display);
  font-variant-numeric: tabular-nums;
}

/* ---------- scroll cue (replaces the old "↑ scroll to see more") ---------- */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--step--1);
  transition: opacity .4s, transform .4s var(--ease), color .3s;
}
.scroll-cue:hover { color: var(--charge); }
.scroll-cue.is-hidden { opacity: 0; pointer-events: none; transform: translate(-50%, 12px); }

.cue-cable {
  position: relative;
  width: 2px;
  height: 56px;
  border-radius: 2px;
  background: linear-gradient(var(--line), rgba(55, 226, 213, .5));
  overflow: hidden;
}
.cue-pulse {
  position: absolute;
  left: -2px;
  width: 6px; height: 16px;
  border-radius: 6px;
  background: var(--charge);
  box-shadow: 0 0 12px var(--charge), 0 0 24px var(--charge);
  animation: cablePulse 1.8s var(--ease) infinite;
}
.cue-plug {
  color: var(--charge);
  filter: drop-shadow(0 0 6px rgba(55, 226, 213, .6));
  animation: plugBob 1.8s var(--ease) infinite;
}
.cue-text { letter-spacing: .02em; }

/* ---------- sections ---------- */
.section {
  position: relative;
  z-index: 1;
  width: min(1200px, 100% - 2.5rem);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8rem) 0 0;
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  align-items: end;
  gap: 1rem 3rem;
  margin-bottom: 2.25rem;
}
.section-head p { color: var(--muted); font-size: var(--step-0); }
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(5rem, 10vw, 8rem);
  border-top: 1px solid var(--line);
  background: var(--ink-2);
}
.footer-inner {
  width: min(1200px, 100% - 2.5rem);
  margin: 0 auto;
  padding: 2.5rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--charge); }
.footer-inner > p { flex-basis: 100%; }
