/* Shared chrome: topbar, footer, lockup, tweaks panel, buttons */

.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--hairline);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; position: relative; }
.lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.lockup .mark { width: 22px; height: 22px; }

/* Animated center mark — crescent reveals into an "I" */
.center-mark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--text); pointer-events: none; }
.center-mark svg { width: 34px; height: 34px; display: block; }
@media (max-width: 720px) { .center-mark { display: none; } }
.lockup .word {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: var(--wm-weight, 700);
  letter-spacing: var(--wm-tracking, -0.03em);
}
.nav { display: flex; align-items: center; gap: 6px; }
.nav-icon {
  width: 40px; height: 40px; display: grid; place-items: center;
  color: var(--text-muted); background: transparent; border: 1px solid transparent;
  cursor: pointer; transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.nav-icon:hover { color: var(--silver); border-color: var(--hairline-2); }
.nav-icon svg { width: 18px; height: 18px; display: block; }
.nav-cta {
  margin-left: 10px; font-size: 13px; color: var(--text);
  background: transparent;
  border: 1px solid var(--hairline-2);
  padding: 9px 16px; border-radius: 1px; cursor: pointer;
  font-family: var(--font-sans);
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav-cta:hover { border-color: var(--silver); color: var(--bg); background: var(--silver); }
.nav-cta .arr { transition: transform var(--t-med) var(--ease); }
.nav-cta:hover .arr { transform: translateX(3px); }

/* Slide-in drawers */
.ith-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: color-mix(in oklab, var(--bg) 70%, black 30%);
  opacity: 0; pointer-events: none;
  backdrop-filter: blur(6px);
  transition: opacity var(--t-med) var(--ease);
}
.ith-overlay.open { opacity: 0.78; pointer-events: auto; }
.ith-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(560px, 100%);
  background: var(--bg);
  border-left: 1px solid var(--hairline);
  transform: translateX(100%);
  transition: transform 380ms cubic-bezier(0.2, 0.7, 0.2, 1);
  display: flex; flex-direction: column;
  box-shadow: -40px 0 80px -30px rgba(0,0,0,0.7);
}
.ith-drawer.open { transform: translateX(0); }
.ith-drawer--menu { width: min(640px, 100%); }
.drawer-head {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; height: 64px;
  border-bottom: 1px solid var(--hairline);
}
.drawer-head .eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--track-eye);
  text-transform: uppercase; color: var(--text-faint);
}
.drawer-close {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--hairline-2);
  color: var(--text-muted); cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.drawer-close:hover { color: var(--silver); border-color: var(--silver); }
.drawer-close svg { width: 14px; height: 14px; }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--s-7) var(--s-7); }

/* Menu drawer */
.menu-section + .menu-section { margin-top: var(--s-7); padding-top: var(--s-6); border-top: 1px solid var(--hairline); }
.menu-section h4 {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: var(--track-eye); text-transform: uppercase;
  color: var(--text-faint); margin-bottom: var(--s-5);
}
.menu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.menu-list a, .menu-list .menu-link {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-4); align-items: baseline;
  padding: var(--s-4) 0; border-bottom: 1px solid var(--hairline);
  color: var(--text); font-size: 16px;
  transition: padding var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.menu-list a:hover { color: var(--silver); padding-left: 6px; }
.menu-list .key {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--track-eye);
  text-transform: uppercase; color: var(--text-faint); min-width: 24px;
}
.menu-list .desc { color: var(--text-muted); font-size: 13px; font-family: var(--font-sans); }
.menu-list .arr { color: var(--text-faint); }
.menu-list a:hover .arr { color: var(--silver); transform: translateX(3px); }
.menu-list .arr { transition: transform var(--t-med) var(--ease), color var(--t-fast) var(--ease); }

/* Get Started drawer */
.start-lead { color: var(--text-muted); font-size: 15px; line-height: var(--lh-body); margin-bottom: var(--s-6); max-width: 50ch; }
.start-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--hairline); margin-bottom: var(--s-6); }
.start-tab {
  flex: 1; padding: 12px 4px; background: transparent; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--track-eye);
  text-transform: uppercase; color: var(--text-faint);
  border: 0; border-bottom: 1px solid transparent; margin-bottom: -1px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.start-tab:hover { color: var(--text-muted); }
.start-tab.active { color: var(--silver); border-bottom-color: var(--silver); }
.start-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.start-form .full { grid-column: 1 / -1; }
.start-field { display: flex; flex-direction: column; gap: 6px; }
.start-field label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--track-eye);
  text-transform: uppercase; color: var(--text-faint);
}
.start-field label .req { color: var(--swiss-red, #DA291C); margin-left: 4px; opacity: 0.7; }
.start-field input, .start-field select, .start-field textarea {
  background: transparent; color: var(--text);
  border: 0; border-bottom: 1px solid var(--hairline-2);
  padding: 10px 0; font: inherit; font-size: 15px;
  transition: border-color var(--t-fast) var(--ease);
}
.start-field input:focus, .start-field select:focus, .start-field textarea:focus {
  outline: none; border-bottom-color: var(--silver);
}
.start-field textarea { resize: vertical; min-height: 96px; }
.start-foot {
  margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-5);
}
.start-foot .note {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--text-faint); max-width: 28ch; line-height: 1.5;
}

/* Search overlay */
.ith-search {
  position: fixed; top: 0; left: 0; right: 0; z-index: 95;
  background: var(--bg); border-bottom: 1px solid var(--hairline);
  transform: translateY(-100%);
  transition: transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ith-search.open { transform: translateY(0); }
.search-inner {
  max-width: var(--max-w); margin: 0 auto; padding: var(--s-6) clamp(20px, 4vw, 48px);
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-5); align-items: center;
}
.search-inner input {
  background: transparent; border: 0; border-bottom: 1px solid var(--hairline-2);
  color: var(--text); font: inherit; font-size: 22px;
  padding: 14px 0; outline: none; width: 100%;
  font-family: var(--font-display); letter-spacing: -0.01em;
}
.search-inner input:focus { border-bottom-color: var(--silver); }
.search-icon-static {
  width: 18px; height: 18px; color: var(--text-faint);
}
.search-suggest {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px) var(--s-6);
}
.search-suggest .eye {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--track-eye);
  text-transform: uppercase; color: var(--text-faint); margin-bottom: var(--s-4);
}
.search-suggest ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px var(--s-6); }
.search-suggest a {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-muted); font-size: 14px;
  transition: color var(--t-fast) var(--ease);
}
.search-suggest a:hover { color: var(--silver); }
.search-suggest a .arr { color: var(--text-faint); }

@media (max-width: 720px) {
  .start-form { grid-template-columns: 1fr; }
  .search-suggest ul { grid-template-columns: 1fr; }
  .nav-cta { padding: 8px 12px; font-size: 12px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; font-size: 14px;
  border: 1px solid var(--text); color: var(--bg); background: var(--text);
  border-radius: 1px;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn:hover { background: var(--silver); border-color: var(--silver); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--hairline-2); }
.btn-ghost:hover { color: var(--silver); border-color: var(--silver); background: transparent; }
.btn .arr { transition: transform var(--t-med) var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* Footer */
footer.foot { border-top: 1px solid var(--hairline); padding-block: var(--s-8) var(--s-6); }
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: var(--s-6);
  padding-bottom: var(--s-8);
}
.foot-grid h4, .foot-grid .foot-h {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: var(--track-eye); text-transform: uppercase;
  color: var(--text-muted); margin-bottom: var(--s-4);
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-grid a { color: var(--text-muted); font-size: 14px; transition: color var(--t-fast) var(--ease); }
.foot-grid a:hover { color: var(--text); }
.foot-grid .brand p { color: var(--text-muted); font-size: 14px; max-width: 42ch; margin-top: var(--s-4); line-height: var(--lh-body); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s-4);
  padding-top: var(--s-5); border-top: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-faint);
}
.lang { display: inline-flex; gap: 16px; }
.lang button {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-faint);
  transition: color var(--t-fast) var(--ease);
}
.lang button:hover { color: var(--text); }
.lang button.active { color: var(--silver); }
@media (max-width: 980px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid .brand { grid-column: 1 / -1; } }

/* Tweaks panel */
.tweaks {
  position: fixed; bottom: 16px; right: 16px; width: 296px;
  background: var(--surface); border: 1px solid var(--hairline-2);
  padding: 18px; z-index: 100; display: none;
  box-shadow: 0 24px 64px -16px rgba(0,0,0,0.6); font-family: var(--font-sans);
}
.tweaks.active { display: block; }
.tweaks .tw-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--track-eye);
  text-transform: uppercase; color: var(--silver);
  padding-bottom: 14px; border-bottom: 1px solid var(--hairline);
}
.tweaks .tw-close { color: var(--text-faint); cursor: pointer; }
.tweaks .tw-close:hover { color: var(--text); }
.tweaks .tw-row { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.tweaks .tw-row:last-child { border-bottom: 0; padding-bottom: 0; }
.tweaks .tw-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--track-eye);
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px;
}
.tweaks .tw-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.tweaks .tw-opt {
  flex: 1; min-width: 0; padding: 8px 10px; font-size: 12px;
  background: var(--bg-elevated); color: var(--text-muted);
  border: 1px solid var(--hairline-2); border-radius: 1px;
  cursor: pointer; text-align: center; white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
}
.tweaks .tw-opt:hover { color: var(--text); border-color: var(--text-muted); }
.tweaks .tw-opt.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tweaks .tw-mark { display: flex; gap: 6px; }
.tweaks .tw-mark button {
  flex: 1; aspect-ratio: 1; background: var(--bg-elevated);
  border: 1px solid var(--hairline-2); display: grid; place-items: center;
  color: var(--text-muted); cursor: pointer; transition: all var(--t-fast) var(--ease);
}
.tweaks .tw-mark button:hover { color: var(--text); border-color: var(--text-muted); }
.tweaks .tw-mark button.active { color: var(--silver); border-color: var(--silver); }
.tweaks .tw-mark svg { width: 28px; height: 28px; }

/* Section primitives */
.section { padding-block: var(--s-10); border-top: 1px solid var(--hairline); }
.section-tight { padding-block: var(--s-9); border-top: 1px solid var(--hairline); }
@media (max-width: 720px) {
  .section { padding-block: var(--s-9); }
  .section-tight { padding-block: var(--s-8); }
}
.section-head {
  display: grid; grid-template-columns: 1fr 2fr; gap: var(--s-7);
  padding-bottom: var(--s-7); align-items: end;
}
.section-head h2 {
  font-size: clamp(28px, 3.2vw, 44px); font-weight: 500;
  letter-spacing: -0.022em; line-height: 1.05; text-wrap: balance;
}
.section-head .lede { color: var(--text-muted); max-width: 56ch; font-size: var(--t-body-lg); }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; gap: var(--s-5); } }

.dot { display: inline-block; width: 6px; height: 6px; background: var(--moonlight);
  border-radius: 50%; box-shadow: 0 0 8px var(--moonlight); vertical-align: middle;
  margin-right: 8px; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity:0.4 } 50% { opacity:1 } }

:focus-visible { outline: 1px solid var(--silver); outline-offset: 3px; }

/* ============================================================
   Hero camera-wall background
   ============================================================ */
.hero-cams {
  position: absolute; inset: 0; z-index: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-auto-rows: 1fr;
  gap: 6px;
  padding: 24px;
  pointer-events: none;
  mask-image:
    radial-gradient(120% 80% at 50% 40%, transparent 18%, #000 55%, transparent 100%);
  -webkit-mask-image:
    radial-gradient(120% 80% at 50% 40%, transparent 18%, #000 55%, transparent 100%);
  opacity: 0.55;
}
@media (max-width: 900px) {
  .hero-cams { grid-template-columns: repeat(5, 1fr); padding: 12px; gap: 4px; }
}
@media (max-width: 560px) {
  .hero-cams { grid-template-columns: repeat(3, 1fr); }
}
.cam {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid color-mix(in oklab, var(--hairline) 80%, transparent);
  background:
    /* fake-pavement gradient */
    linear-gradient(180deg, color-mix(in oklab, var(--surface) 92%, transparent), color-mix(in oklab, var(--bg) 95%, transparent)),
    /* scanlines */
    repeating-linear-gradient(0deg, transparent 0 3px, color-mix(in oklab, #ffffff 4%, transparent) 3px 4px);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  isolation: isolate;
}
.cam::before {
  /* moving sweep / vehicle blob */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(40% 24% at var(--sx,30%) var(--sy,60%), color-mix(in oklab, #ffffff 12%, transparent), transparent 70%);
  animation: cam-pan var(--pan, 14s) linear infinite;
  animation-delay: var(--delay, 0s);
  filter: blur(1px);
}
.cam::after {
  /* tracking bbox */
  content: ""; position: absolute;
  left: var(--bx, 30%); top: var(--by, 38%);
  width: 22%; aspect-ratio: 1;
  border: 1px solid color-mix(in oklab, var(--moonlight) 45%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, #000 50%, transparent);
  animation: cam-bbox var(--bb, 7.5s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0.55;
}
.cam .hdr {
  position: absolute; top: 4px; left: 6px; right: 6px;
  display: flex; justify-content: space-between; align-items: center;
  pointer-events: none;
  color: color-mix(in oklab, var(--text-muted) 90%, transparent);
}
.cam .hdr .rec {
  display: inline-flex; align-items: center; gap: 4px;
}
.cam .hdr .rec::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: color-mix(in oklab, var(--moonlight) 90%, white);
  box-shadow: 0 0 6px var(--moonlight);
  animation: pulse 2s var(--ease) infinite;
}
.cam .ftr {
  position: absolute; bottom: 4px; left: 6px; right: 6px;
  display: flex; justify-content: space-between;
  pointer-events: none;
  color: color-mix(in oklab, var(--text-muted) 75%, transparent);
}
.cam .corner {
  position: absolute; width: 10px; height: 10px;
  border-color: color-mix(in oklab, var(--silver) 55%, transparent);
}
.cam .c-tl { top: 2px;    left: 2px;    border-top: 1px solid; border-left: 1px solid; }
.cam .c-tr { top: 2px;    right: 2px;   border-top: 1px solid; border-right: 1px solid; }
.cam .c-bl { bottom: 2px; left: 2px;    border-bottom: 1px solid; border-left: 1px solid; }
.cam .c-br { bottom: 2px; right: 2px;   border-bottom: 1px solid; border-right: 1px solid; }

@keyframes cam-pan {
  0%   { background-position: 0%   50%; transform: translateX(-6%); }
  50%  { background-position: 100% 50%; transform: translateX(6%);  }
  100% { background-position: 0%   50%; transform: translateX(-6%); }
}
@keyframes cam-bbox {
  0%, 100% { transform: translate(0, 0)       scale(1);    opacity: 0.45; }
  35%      { transform: translate(20%, -10%)  scale(1.08); opacity: 0.7;  }
  70%      { transform: translate(-15%, 12%)  scale(0.92); opacity: 0.55; }
}

/* hero content should sit above the cam wall */
.hero > .container,
.hero > .hero-content,
.hero-content { position: relative; z-index: 2; }
.hero-grid { z-index: 0; }

/* Real-feed image fits inside the tile */
.cam-real .cam-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%) brightness(0.7) contrast(1.1);
  opacity: 0.7;
  z-index: 0;
}
.cam-real::before { display: none; }
