/* ---------- Home: hero ---------- */
.hero {
  position: relative;
  height: 100svh; min-height: 640px; max-height: 1080px;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}
.hero__gl {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity 0.6s var(--ease);
  touch-action: pan-y; cursor: grab; outline: none;
}
.hero.is-live .hero__gl { opacity: 1; }
.hero.is-dragging .hero__gl { cursor: grabbing; }
.hero[data-mode="perception"] .hero__gl { cursor: crosshair; }
.hero__gl:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-2); }
.hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; display: none; }
.hero.is-nogl .hero__poster { display: block; }
/* legibility veils: bottom and left, so copy reads over any render */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--bg) 92%, transparent) 0%, transparent 38%),
    linear-gradient(to right, color-mix(in srgb, var(--bg) 70%, transparent) 0%, transparent 46%);
}
.hero__tags { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.tag {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--fg); white-space: nowrap; opacity: 0; will-change: transform, opacity;
  margin-top: -6px;
}
.tag i { width: 5px; height: 5px; border-radius: 50%; background: var(--fg); flex: none; }
.tag--kit { color: var(--accent-2); } .tag--kit i { background: var(--accent); }
.tag--warn { color: var(--signal); } .tag--warn i { background: var(--signal); }
.tag--goal { color: var(--accent-2); } .tag--goal i { background: transparent; border: 1px solid var(--accent-2); width: 7px; height: 7px; }

/* HUD, top right */
.hero__hud {
  position: absolute; z-index: 3; top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 22px); right: var(--gutter);
  display: none; grid-template-columns: auto auto; gap: 6px 18px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--fg-3);
  text-align: right;
}
.hero__hud b { font-weight: 500; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.hero__hud .hud-title { grid-column: 1 / -1; color: var(--fg-2); padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid var(--line-2); }
@media (min-width: 900px) { .hero__hud { display: grid; } }

/* copy, bottom left */
.hero__copy {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0;
  padding-bottom: clamp(28px, 5vh, 64px);
  display: grid; gap: 28px; align-items: end;
  pointer-events: none;
}
@media (min-width: 900px) { .hero__copy { grid-template-columns: 1fr auto; } }
.hero__text { display: grid; }
.hero__intro, .hero__perc { grid-area: 1 / 1; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); pointer-events: auto; }
.hero__intro h1 { max-width: 13.5ch; }
.hero__intro .t-lead { margin-top: 20px; max-width: 40ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__perc { opacity: 0; transform: translateY(14px); pointer-events: none; align-self: end; max-width: 46ch; }
.hero__perc h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); letter-spacing: -0.03em; line-height: 1.05; }
.hero__perc p { margin-top: 14px; color: var(--fg-2); font-size: 15.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.hero__suite-link { display: inline-flex; margin-top: 16px; font-size: 13px; }
.hero[data-mode="perception"] .hero__intro { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.hero[data-mode="perception"] .hero__perc { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 899px) {
  .hero__intro .t-lead { font-size: 1.02rem; }
  .hero[data-mode="perception"] .hero__perc p { display: none; }
}

/* controls, bottom right */
.hero__controls { display: grid; gap: 12px; justify-items: start; pointer-events: auto; }
@media (min-width: 900px) { .hero__controls { justify-items: end; } }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 2px; background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 3px; }
.seg button {
  height: 36px; padding: 0 16px; border: 0; border-radius: 1px; background: transparent; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-2);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.seg button:not([aria-pressed="true"]):hover { color: var(--fg); }
.hero__hint { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--fg-3); display: flex; gap: 14px; flex-wrap: wrap; }
.hero__hint .kit-key { display: inline-flex; align-items: center; gap: 7px; }
.hero__hint .kit-key i { width: 9px; height: 9px; background: var(--brand-hi); border-radius: 1px; }
.hero__hint [data-when="perception"] { display: none; }
.hero[data-mode="perception"] .hero__hint [data-when="perception"] { display: inline-flex; }
.hero[data-mode="perception"] .hero__hint [data-when="vehicle"] { display: none; }
.hero.is-nogl .hero__gl, .hero.is-nogl .hero__tags, .hero.is-nogl .hero__controls, .hero.is-nogl .hero__hud { display: none; }

/* load choreography for the copy (starts visible if animations are off) */
@media (prefers-reduced-motion: no-preference) {
  .hero__intro > * { animation: rise 0.9s var(--ease) both; }
  .hero__intro > :nth-child(2) { animation-delay: 0.12s; }
  .hero__intro > :nth-child(3) { animation-delay: 0.22s; }
  .hero__controls { animation: fade 1.2s 0.9s var(--ease) both; }
  .hero__hud { animation: fade 1.2s 1.2s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Home: thesis statement ---------- */
.statement { padding-block: clamp(80px, 10vw, 136px) clamp(68px, 8vw, 104px); }
.statement__line { font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.06; letter-spacing: -0.034em; font-weight: 600; max-width: 21ch; }
.statement__line span { color: var(--fg-3); }
.statement__foot { margin-top: clamp(32px, 4vw, 48px); display: grid; gap: 24px; }
@media (min-width: 900px) { .statement__foot { grid-template-columns: 1fr auto; align-items: end; } }
.statement__foot p { color: var(--fg-2); max-width: 58ch; font-size: 1.08rem; }

/* ---------- Home: index of the site, big type ---------- */
.index { border-top: 1px solid var(--line); }
.index__row {
  position: relative; display: grid; gap: 6px 32px; align-items: center;
  padding: clamp(20px, 2.5vw, 30px) var(--gutter);
  border-bottom: 1px solid var(--line);
  isolation: isolate; overflow: hidden;
}
@media (min-width: 900px) { .index__row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); } }
.index__row::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg-1);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.index__row:hover::before, .index__row:focus-visible::before { opacity: 1; }
.index__name { font-size: clamp(2.25rem, 5.2vw, 4.7rem); line-height: 1; letter-spacing: -0.04em; font-weight: 600; transition: color 0.3s; }
.index__row:hover .index__name { color: var(--accent-2); }
.index__desc { color: var(--fg-2); max-width: 36ch; }
.index__meta { display: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--fg-3); }
@media (min-width: 900px) { .index__meta { display: block; } }
.index__arr { font-size: 22px; color: var(--fg-3); transition: transform 0.45s var(--ease), color 0.3s; }
.index__row:hover .index__arr { transform: translateX(6px); color: var(--fg); }

/* ---------- Home: status sign ---------- */
.status { padding-block: clamp(68px, 8vw, 108px); }
.status__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 22px; }
.status__sign {
  --bg: #100e13; --bg-1: #17131a; --line: #312a35; --line-2: #514657;
  --fg: #f3f1f5; --fg-2: #b6b0bd; --fg-3: #98909e; --accent-2: #ecd4e7;
  position: relative; overflow: hidden;
  padding: clamp(24px, 3vw, 38px);
  background: radial-gradient(circle at 96% 0%, rgba(116,31,106,0.18), transparent 44%), #100e13;
  border: 1px solid #514657; border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  color: var(--fg);
}
.status__sign-header {
  display: flex; align-items: center; gap: 11px;
  color: var(--fg-2); font: 500 11px/1.3 var(--font-mono);
  letter-spacing: 0.12em;
}
.status__sign-indicator {
  width: 7px; height: 7px; flex: none; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 0 4px rgba(217,166,208,0.13);
}
.status__sign-content {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: clamp(20px, 4vw, 56px);
  margin-top: clamp(22px, 3vw, 32px);
}
.status__sign-label {
  display: block; margin-bottom: 9px;
  color: var(--accent-2); font: 500 11px/1.4 var(--font-mono);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.status__sign-item strong {
  display: block; color: var(--fg);
  font-size: clamp(1.35rem, 2.3vw, 2rem); font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.18;
}
.status__sign-item--upcoming strong { color: var(--accent-2); }
.status__sign-arrow { color: var(--fg-3); font-size: 28px; line-height: 1; }
@media (max-width: 620px) {
  .status__sign-content { grid-template-columns: 1fr; gap: 18px; }
  .status__sign-arrow { display: none; }
  .status__sign-item--upcoming { padding-top: 18px; border-top: 1px solid var(--line-2); }
}
.status__grid { margin-top: 28px; display: grid; gap: 18px 40px; }
@media (min-width: 820px) { .status__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.status__grid div { border-top: 1px solid var(--line); padding-top: 14px; }
.status__grid .label { display: block; margin-bottom: 6px; }
.status__grid p { color: var(--fg-2); font-size: 15.5px; }
