:root {
  --bg: #070c14;         /* deep navy-black, Tron-adjacent */
  --bg-deep: #04070c;
  --ink: #e6f1ee;        /* soft cream on dark */
  --ink-dim: #6b8590;
  --accent: #46d2dc;     /* cyan grid glow */

  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-sans: "General Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background:
    radial-gradient(ellipse at 50% 40%, #0c1622 0%, var(--bg) 55%, var(--bg-deep) 100%);
  color: var(--ink);
  overflow: hidden;                   /* single-viewport splash — no scroll */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: var(--font-sans);
}

/* ── Tron grid canvas ────────────────────────────── */
#grid-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* All page content sits above the grid */
.clock, .stage, .foot, .loc, .brand, .info, .coord { position: relative; z-index: 5; }

/* ── XYZ coordinate readout, top right ───────────────── */
.coord {
  position: fixed;
  top: 1.75rem;
  right: 1.5rem;
  display: flex;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-dim);
  z-index: 5;
  pointer-events: none;
}

/* On narrow viewports the top has the clock and the bottom has the
   wordmark — hide the coord readout there to keep the mark uncluttered. */
@media (max-width: 640px) {
  .coord { display: none; }
}
.coord__axis { transition: color 0.22s ease, opacity 0.22s ease; }
.coord__axis > span { color: var(--ink); margin-left: 0.35em; }
.coord.has-selection .coord__axis { opacity: 0.28; }
.coord.has-selection .coord__axis.is-active { opacity: 1; }
.coord__axis[data-axis="x"].is-active,
.coord__axis[data-axis="x"].is-active > span { color: #22b573; }
.coord__axis[data-axis="y"].is-active,
.coord__axis[data-axis="y"].is-active > span { color: #12a5a5; }
.coord__axis[data-axis="z"].is-active,
.coord__axis[data-axis="z"].is-active > span { color: #2b8fe0; }

body {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

a { color: inherit; text-decoration: none; }

/* ── Live clock, top center ─────────────────────────────── */

.clock {
  padding: 1.75rem 1.25rem 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.clock__sep {
  margin: 0 0.65em;
  color: var(--ink-dim);
}

/* ── The mark stage ─────────────────────────────────────── */

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  position: relative;
  padding: 1rem;
}

/* ── Three verticals row ────────────────────────────────── */
.verticals {
  display: flex;
  gap: clamp(1.75rem, 4vw, 3.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.verticals li { display: inline-flex; }
.verticals button {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.4em 0;
  opacity: 0.55;
  transition: opacity 220ms ease, letter-spacing 220ms ease;
}
.verticals button:hover,
.verticals button:focus-visible { opacity: 1; }
.verticals li.is-active button {
  opacity: 1;
  letter-spacing: 0.34em;
}
.verticals.has-selection button { opacity: 0.28; }
.verticals.has-selection li.is-active button { opacity: 1; }
.vert__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--dot, currentColor);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, currentColor) 12%, transparent);
  transition: box-shadow 220ms ease, transform 220ms ease;
}
.verticals li.is-active .vert__dot {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot) 22%, transparent);
  transform: scale(1.15);
}

/* Second .stage overrides removed — the original .stage rule above
   handles centering. The mark canvas is now full-viewport (see .mark). */
.mark {
  /* Full-viewport interactive layer so drag/orbit and clicks-to-return
     hit the canvas anywhere. The verticals list is a sibling that sits
     above via z-index. */
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  transition: none;
}
/* Verticals sit above the world canvas, positioned at the bottom of the
   viewport instead of centered under the mark. */
.verticals {
  position: fixed;
  left: 50%;
  bottom: 4rem;
  transform: translateX(-50%);
  z-index: 10;
}
#mark-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}
/* Focus mode — pointer becomes a return-to-home cursor over the canvas. */
body.is-focus #mark-canvas {
  cursor: pointer;
}
/* Small HOME hint pinned below the AXESS wordmark AND the mode toggle in
   focus mode. Wordmark ~1.5rem + line ~1rem + mode line ~1rem + gap. */
.home-hint {
  position: fixed;
  top: clamp(4.75rem, 7.5vw, 5.4rem);
  left: clamp(1.25rem, 3vw, 2.25rem);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  z-index: 15;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(70, 210, 220, 0.18);
  border-radius: 4px;
  background: rgba(7, 12, 20, 0.5);
  backdrop-filter: blur(6px);
}
body.is-focus .home-hint { opacity: 1; }

/* Intro-skip hint — fixed bottom center, visible only during intro. */
.intro-skip {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--ink-dim);
  z-index: 30;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(70, 210, 220, 0.14);
  border-radius: 4px;
  background: rgba(7, 12, 20, 0.55);
  backdrop-filter: blur(4px);
}
body.is-intro .intro-skip { opacity: 0.75; animation: introSkipFadeIn 0.9s 0.6s both ease-out; }
@keyframes introSkipFadeIn { from { opacity: 0; } to { opacity: 0.75; } }

/* During intro, dim/hide the overlays so the scene is the star. */
body.is-intro .clock,
body.is-intro .verticals,
body.is-intro .coord,
body.is-intro .foot,
body.is-intro .blurb,
body.is-intro .home-hint,
body.is-intro .loc,
body.is-intro .legal,
body.is-intro .mode,
body.is-intro .ambient,
body.is-intro .brand {
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Dim the verticals + coord readout during focus so the blurb is the
   primary focus. Keep them interactive (verticals let you switch;
   clicking the active one returns home). */
body.is-focus .verticals { opacity: 0.55; }
body.is-focus .coord     { opacity: 0.35; }
body.is-focus .foot      { opacity: 0.45; }
.verticals, .coord, .foot { transition: opacity 0.5s ease; }

#mark-canvas.is-grabbing { cursor: grabbing; }
#mark-canvas.is-z-drag  { cursor: ns-resize; }

/* ── Wordmark + INFO, bottom center ─────────────────────── */

/* Brand wordmark, top left (opposite the XYZ coord readout) */
.brand {
  position: fixed;
  left: clamp(1.25rem, 3vw, 2.25rem);
  top: clamp(1.5rem, 3vw, 1.9rem);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--ink);
  z-index: 10;
  pointer-events: none;
}
.brand__tm {
  font-family: var(--font-sans);
  font-size: 0.55em;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-left: 0.35em;
  vertical-align: super;
  opacity: 0.5;
  line-height: 0;
}

/* ── Autonomous-mode pill, top left ─────────────────────────
   Single tappable pill under the AXESS wordmark. Off = user-driven
   (implicit STANDBY). On = agent walks the verticals. The pill shape
   itself is the affordance — no LED, no split segments. When engaged,
   the pill frame + label glow in the current vertical’s colour and the
   ambient perimeter lights up in sync. */
.mode {
  position: fixed;
  left: clamp(1.25rem, 3vw, 2.25rem);
  top: calc(clamp(1.5rem, 3vw, 1.9rem) + 1.6rem);
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 999px;
  padding: 0.5em 0.9em 0.45em;
  margin: 0;
  background: rgba(7, 12, 20, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  z-index: 10;
  user-select: none;
  transition: color 260ms ease-out, border-color 260ms ease-out,
              background-color 260ms ease-out, box-shadow 260ms ease-out,
              text-shadow 260ms ease-out;
}
.mode:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 45%, transparent);
  background: rgba(15, 22, 32, 0.65);
}
.mode:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--ink) 55%, transparent);
  outline-offset: 3px;
}
.mode:active { transform: translateY(0.5px); }

/* Engaged state — pill frame and label pick up the current vertical’s
   colour, with a soft breathing glow so it reads as "live". */
body[data-mode="autonomous"] .mode {
  color: var(--ambient-color, #dfeef5);
  border-color: color-mix(in srgb, var(--ambient-color, #7be1ff) 65%, transparent);
  background: color-mix(in srgb, var(--ambient-color, #7be1ff) 8%, rgba(7, 12, 20, 0.65));
  box-shadow:
    0 0 12px color-mix(in srgb, var(--ambient-color, #7be1ff) 28%, transparent),
    inset 0 0 8px color-mix(in srgb, var(--ambient-color, #7be1ff) 12%, transparent);
  animation: modePillPulse 3.2s ease-in-out infinite;
}
@keyframes modePillPulse {
  0%, 100% {
    text-shadow: 0 0 4px color-mix(in srgb, var(--ambient-color, #7be1ff) 30%, transparent);
    box-shadow:
      0 0 8px  color-mix(in srgb, var(--ambient-color, #7be1ff) 18%, transparent),
      inset 0 0 6px color-mix(in srgb, var(--ambient-color, #7be1ff) 10%, transparent);
  }
  50% {
    text-shadow: 0 0 10px color-mix(in srgb, var(--ambient-color, #7be1ff) 70%, transparent);
    box-shadow:
      0 0 16px color-mix(in srgb, var(--ambient-color, #7be1ff) 40%, transparent),
      inset 0 0 10px color-mix(in srgb, var(--ambient-color, #7be1ff) 16%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  body[data-mode="autonomous"] .mode { animation: none; }
}
@media (max-width: 640px) {
  /* Slightly larger visible pill on phones — keeps the pill quiet but
     legible at small sizes. */
  .mode {
    font-size: 9px;
    letter-spacing: 0.2em;
    padding: 0.7em 1em 0.65em;
  }
}

/* Invisible touch-halo on any device with coarse (touch) primary input.
   Extends the effective hit-area to 44×44+ without changing appearance.
   Applies to phones AND tablets — both benefit. Not applied on pointer
   devices (mouse/trackpad) where a tighter target is fine and preferred. */
@media (pointer: coarse) {
  .mode {
    position: fixed; /* re-declare for stacking context of ::before */
  }
  .mode::before {
    content: '';
    position: absolute;
    inset: -12px -14px;
    border-radius: 999px;
  }
}

/* ── Ambient perimeter frame ────────────────────────────────
   Four thin edges pinned to the viewport that light up while AUTONOMOUS
   is engaged — the Tesla "Service Mode blue border" trick. Colour tracks
   the current agent-vertical via --ambient-color set on <body>. */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
}
.ambient__edge {
  position: absolute;
  background: var(--ambient-color, #7be1ff);
  opacity: 0;
  transition: opacity 500ms ease-out, box-shadow 500ms ease-out,
              background-color 500ms ease-out;
}
.ambient__edge--top,
.ambient__edge--bottom {
  left: 0; right: 0; height: 1px;
}
.ambient__edge--top    { top: 0; }
.ambient__edge--bottom { bottom: 0; }
.ambient__edge--left,
.ambient__edge--right {
  top: 0; bottom: 0; width: 1px;
}
.ambient__edge--left  { left: 0; }
.ambient__edge--right { right: 0; }
body[data-mode="autonomous"] .ambient__edge {
  opacity: 0.55;
  box-shadow:
    0 0 12px 1px color-mix(in srgb, var(--ambient-color, #7be1ff) 60%, transparent),
    0 0 28px 3px color-mix(in srgb, var(--ambient-color, #7be1ff) 25%, transparent);
  animation: ambientPulse 3.2s ease-in-out infinite;
}
@keyframes ambientPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.75; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-mode="autonomous"] .ambient__edge { animation: none; opacity: 0.5; }
}

.foot {
  padding: 0 1.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}
.foot__link {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.foot__link:hover { color: var(--accent); }

/* ── INFO overlay ───────────────────────────────────────── */

/* Scrim — catches backdrop clicks; the real content lives in .info__panel */
.info {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(4, 7, 12, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.24s ease;
}
.info[hidden] { display: none; }
.info.is-visible { opacity: 1; }

/* ── Structure blurb panel ───────────────────────────────────────────── */

.blurb {
  position: fixed;
  /* Default position — JS overrides once camera settles on a cluster. */
  right: 2rem;
  bottom: 6rem;
  width: min(360px, calc(100vw - 4rem));
  padding: 0;
  border-radius: 8px;
  background: rgba(10, 18, 28, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(70, 210, 220, 0.14);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.03);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1),
              left 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
              top 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 20;
  color: var(--ink);
  overflow: hidden;
}
.blurb.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* While dragging, disable the position transitions so motion tracks the
   pointer exactly. */
.blurb.is-dragging {
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  cursor: grabbing;
  user-select: none;
}
/* Once JS has positioned the panel with left/top, cancel the default
   right/bottom so left/top take precedence. */
.blurb.is-positioned {
  right: auto;
  bottom: auto;
}

/* ── Titlebar (drag handle + close X) ────────────── */
.blurb__titlebar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem 0.6rem 1rem;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.045) 0%,
    rgba(255, 255, 255, 0.015) 100%);
  border-bottom: 1px solid rgba(70, 210, 220, 0.09);
  cursor: grab;
}
.blurb__titlebar:active { cursor: grabbing; }
.blurb__titlebar .blurb__eyebrow {
  margin: 0;
  flex: 1;
  justify-content: flex-start;
}

/* Close X — top-right of the titlebar. */
.blurb__x {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.blurb__x:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.09);
}
.blurb__x:focus-visible {
  outline: none;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Content wrap absorbs the padding the panel used to own. */
.blurb__body-wrap {
  padding: 1.15rem 1.4rem 1.35rem;
}
.blurb__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.9rem;
}
.blurb__dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent),
              0 0 8px 0 color-mix(in srgb, currentColor 65%, transparent);
  animation: blurbDotPulse 2.4s ease-in-out infinite;
  will-change: box-shadow, transform;
}
@keyframes blurbDotPulse {
  0%, 100% {
    box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 14%, transparent),
                0 0 6px 0 color-mix(in srgb, currentColor 55%, transparent);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 22%, transparent),
                0 0 14px 2px color-mix(in srgb, currentColor 85%, transparent);
    transform: scale(1.08);
  }
}
@media (prefers-reduced-motion: reduce) {
  .blurb__dot { animation: none; }
}
/* Eyebrow dot + vertical label take the active color */
.blurb[data-vert="compute"]  .blurb__eyebrow { color: #22b573; }
.blurb[data-vert="compute"]  .blurb__vertical::before { content: "Compute"; }
.blurb[data-vert="energy"]   .blurb__eyebrow { color: #12a5a5; }
.blurb[data-vert="energy"]   .blurb__vertical::before { content: "Energy"; }
.blurb[data-vert="mobility"] .blurb__eyebrow { color: #2b8fe0; }
.blurb[data-vert="mobility"] .blurb__vertical::before { content: "Mobility"; }
.blurb__vertical { color: var(--ink-dim); }
/* Hide the placeholder "Vertical" text — real label comes from ::before above */
.blurb__vertical { font-size: 0; }
.blurb__vertical::before { font-size: 10.5px; letter-spacing: 0.22em; }

.blurb__title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.005em;
  margin: 0 0 0.65rem;
  color: var(--ink);
}
.blurb__body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--ink) 82%, transparent);
  margin: 0 0 1.2rem;
}
/* Links row — holds the primary CTA and (optionally) a secondary link.
   Wraps on very narrow widths so the secondary link drops below cleanly. */
.blurb__links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1.15rem;
  row-gap: 0.5rem;
  margin: 0 0 0.25rem;
}
.blurb__link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.blurb__link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
/* Secondary link — muted, no underline until hover.
   Signals "related but not the primary destination". */
.blurb__link--secondary {
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  border-bottom-color: transparent;
}
.blurb__link--secondary:hover {
  color: color-mix(in srgb, var(--accent) 85%, var(--ink));
  border-bottom-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
/* Legacy RETURN button — the titlebar's red close dot handles this now.
   Keep the element in the DOM for keyboard/AT users (accessible name) but
   hide it visually so it doesn't overlap the titlebar. */
.blurb__close {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Legacy mobile blurb positioning removed — handled in the unified
   mobile media query lower in the file. */
/* Windowed panel — mirrors the .blurb window language */
.info__panel {
  width: min(520px, calc(100vw - 3rem));
  max-height: calc(100vh - 4rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: rgba(10, 18, 28, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(70, 210, 220, 0.16);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.75),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: translateY(12px) scale(0.985);
  opacity: 0;
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.info.is-visible .info__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Titlebar */
.info__titlebar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem 0.6rem 1rem;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.045) 0%,
    rgba(255, 255, 255, 0.015) 100%);
  border-bottom: 1px solid rgba(70, 210, 220, 0.09);
  flex-shrink: 0;
}
.info__eyebrow {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0;
}
.info__eyebrow sup { font-size: 0.7em; letter-spacing: 0; }
.info__dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: #46d2dc;
  box-shadow: 0 0 0 3px rgba(70, 210, 220, 0.18),
              0 0 8px 0 rgba(70, 210, 220, 0.65);
  animation: blurbDotPulse 2.4s ease-in-out infinite;
  color: #46d2dc;
}

/* Close X — top-right of titlebar */
.info__x {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.info__x:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.09);
}
.info__x:focus-visible {
  outline: none;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Body — scrolls when content overflows.
   Cyan scrollbar with a visible track so the thumb reads on gradient backgrounds. */
.info__body {
  padding: 1.15rem 1.4rem 1.15rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 220, 230, 0.45) rgba(0, 0, 0, 0.25);
}
.info__body::-webkit-scrollbar { width: 8px; height: 8px; }
.info__body::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.25); border-radius: 999px; }
.info__body::-webkit-scrollbar-thumb {
  background: rgba(140, 220, 230, 0.45);
  border-radius: 999px;
  transition: background 0.2s ease;
}
.info__body::-webkit-scrollbar-thumb:hover { background: rgba(140, 220, 230, 0.70); }

.info__sec {
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid rgba(70, 210, 220, 0.08);
}
.info__sec:last-of-type {
  border-bottom: none;
  padding-bottom: 0.4rem;
  margin-bottom: 0.6rem;
}
.info__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 0.7rem;
  font-weight: 500;
}
.info__desc {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--ink) 88%, transparent);
  margin: 0;
}

/* Lists — ventures + contact share the row primitive */
.info__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.info__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.35rem;
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  border-bottom: 1px solid rgba(70, 210, 220, 0.06);
}
.info__list li:last-child .info__row { border-bottom: none; }
.info__row:hover:not(.info__row--soon) {
  background: rgba(70, 210, 220, 0.05);
}
.info__row:hover:not(.info__row--soon) .info__row-arrow {
  transform: translate(2px, -2px);
}
.info__row--soon {
  cursor: default;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
}
.info__list--contact .info__row {
  grid-template-columns: 90px 1fr;
}
.info__row-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent),
              0 0 8px 0 color-mix(in srgb, currentColor 55%, transparent);
}
.info__row-name {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
}
.info__row-name sup { font-size: 0.6em; letter-spacing: 0; font-weight: 400; }
.info__row-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  text-align: right;
}
.info__list--contact .info__row-meta { text-align: left; }
.info__row-arrow {
  display: inline-block;
  margin-left: 0.15rem;
  transition: transform 0.2s ease;
  color: color-mix(in srgb, var(--ink) 40%, transparent);
}

/* Footer — legal + trademark */
.info__foot {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(70, 210, 220, 0.08);
  margin-top: 0.4rem;
}
.info__legal {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: color-mix(in srgb, var(--ink) 42%, transparent);
  line-height: 1.5;
}
.info__legal sup { font-size: 0.7em; letter-spacing: 0; }
.info__legal--tm {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--ink) 32%, transparent);
}

/* Mobile — near-fullscreen sheet, sized to the dynamic viewport.
   Mirrors the web-window mobile treatment: 8px inset on all sides,
   dvh-based height so Safari's URL bar hide/reveal doesn't jump the
   panel, and safe-area insets to clear the notch and home indicator. */
@media (max-width: 560px) {
  .info {
    /* The scrim uses inset:0; we shrink its padding so the panel can breathe
       to nearly full viewport width. */
    padding: 0;
    align-items: stretch;
    justify-items: stretch;
  }
  .info__panel {
    /* Fixed sheet anchored to the visible viewport. Using inset lets safe-area
       insets keep the sheet clear of the notch/status bar and home indicator. */
    position: fixed;
    top:    calc(env(safe-area-inset-top, 0px) + 8px);
    right:  calc(env(safe-area-inset-right, 0px) + 8px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    left:   calc(env(safe-area-inset-left, 0px) + 8px);
    width: auto;
    max-width: none;
    max-height: none;    /* height is bounded by top/bottom insets */
    border-radius: 12px;
  }
  .info__body { padding: 1rem 1.15rem 1.25rem; }
  .info__row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    row-gap: 0.15rem;
  }
  .info__row-meta {
    grid-column: 1 / -1;
    text-align: left;
    padding-left: 1.35rem;
  }
  .info__list--contact .info__row {
    grid-template-columns: 90px 1fr;
    grid-template-rows: auto;
  }
  .info__list--contact .info__row-meta {
    grid-column: auto;
    padding-left: 0;
  }
}

/* ── Location tag ──────────────────────────────────────── */
.loc {
  position: fixed;
  left: clamp(1.25rem, 3vw, 2.25rem);
  bottom: clamp(1.25rem, 3vw, 2rem);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  z-index: 10;
  pointer-events: none;
}
/* Live-status word — glows softly and rotates through operational states.
   The colour tracks the current vertical when the user has focused one. */
/* Live-status word — default is muted off-white (matches wordmark, coord,
   copyright). Vertical-focus swaps `data-tone` on the element to switch to
   a vertical-tinted colour; JS drives that. Soft, slow glow. */
.loc__status {
  display: inline-block;
  color: var(--ink);
  transition: opacity 200ms ease-out, color 400ms ease-out, text-shadow 400ms ease-out;
  animation: locStatusPulse 4s ease-in-out infinite;
  will-change: opacity, text-shadow;
}
.loc__status.is-swapping { opacity: 0; }
.loc__status[data-tone="compute"]  { color: #22b573; }
.loc__status[data-tone="energy"]   { color: #12a5a5; }
.loc__status[data-tone="mobility"] { color: #2b8fe0; }
@keyframes locStatusPulse {
  0%, 100% { text-shadow: 0 0 2px rgba(230, 240, 245, 0.18); }
  50%      { text-shadow: 0 0 5px rgba(230, 240, 245, 0.32); }
}
@media (prefers-reduced-motion: reduce) {
  .loc__status { animation: none; }
}
.loc__sep {
  margin: 0 0.55em;
  opacity: 0.7;
}

/* Copyright, bottom right (mirrors .loc) */
.legal {
  position: fixed;
  right: clamp(1.25rem, 3vw, 2.25rem);
  bottom: clamp(1.25rem, 3vw, 2rem);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  z-index: 10;
  pointer-events: none;
  white-space: nowrap;
}
.legal__sep {
  margin: 0 0.55em;
  opacity: 0.7;
}

/* ── Motion & responsive ────────────────────────────────── */

@media (max-width: 640px) {
  /* Tighten and collision-proof the corner HUD on phones */
  .brand {
    font-size: 10.5px;
    letter-spacing: 0.28em;
    left: 1rem;
    top: 1.1rem;
  }
  .clock {
    padding: 1rem 0 0;
    font-size: 10px;
    letter-spacing: 0.12em;
  }
  /* Coord readout adds noise on a small screen — hide it */
  .coord { display: none; }

  /* Bottom chrome: keep verticals + INFO centered on their own row.
     HQ + copyright stack on the very bottom as one small line. */
  .foot { padding: 0 0.75rem 3.1rem; gap: 0.4rem; }
  .foot__link { font-size: 10px; letter-spacing: 0.18em; }
  .verticals { gap: 1.15rem; font-size: 9.5px; letter-spacing: 0.16em; }
  .loc {
    left: 1rem;
    bottom: 1rem;
    font-size: 9px;
    letter-spacing: 0.18em;
  }
  .legal {
    right: 1rem;
    bottom: 1rem;
    font-size: 8.5px;
    letter-spacing: 0.16em;
  }
  /* Truncate the copyright on very narrow widths (mirrors what real
     brand sites do: the wordmark carries the notice; the footer just
     shows the year). */
  .legal .legal__sep,
  .legal .legal__long { display: none; }

  /* HOME hint on mobile: pill sits just below the AXESS wordmark */
  .home-hint {
    font-size: 9.5px;
    letter-spacing: 0.18em;
    padding: 0.3rem 0.5rem;
  }

  /* Blurb sheet: docked to bottom, sized to leave the verticals+INFO
     row visible above it. Uses safe-area for iPhone home indicator.
     Dragging is disabled on mobile so the sheet stays anchored. */
  .blurb {
    right: 0.75rem !important;
    left: 0.75rem !important;
    bottom: 5.5rem !important;
    top: auto !important;
    max-width: none !important;
    width: auto !important;
    padding: 0 !important;
    z-index: 12 !important;
  }
  .blurb__titlebar { cursor: default; }
  .blurb__body-wrap { padding: 0.85rem 1.05rem 0.95rem; }
  .blurb__body { font-size: 12.5px; }
  .blurb__title { font-size: 18px; }
  /* Hide the bottom-corner meta while focused so it doesn't crowd
     the blurb sheet on small screens */
  body.is-focus .loc,
  body.is-focus .legal { opacity: 0; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  /* mark.js reads the reduce-motion preference and freezes the scene */
}

/* ── ASCII easter egg ─────────────────────────────────────── */
.ascii-overlay {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: 0;
  white-space: pre;
  color: var(--accent);
  text-shadow: 0 0 6px rgba(70, 210, 220, 0.45);
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
body.is-ascii .ascii-overlay {
  display: flex;
  opacity: 1;
}
/* Hide the raw WebGL canvas visually but keep it drawing so we can sample it. */
body.is-ascii #mark-canvas {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ── Matrix easter egg ────────────────────────────── */
/* Full-viewport overlay canvas that renders the falling code. Sits above
   the 3D mark and grid canvases (z 5–6) but below chrome (HUD z 10+ and
   the shortcuts legend z 40). */
.matrix-overlay {
  position: fixed;
  inset: 0;
  z-index: 7;
  display: none;
  pointer-events: none;
  background: #000;
  opacity: 0;
  transition: opacity 0.45s ease;
}
body.is-matrix .matrix-overlay {
  display: block;
  opacity: 1;
}
/* Fade the scene canvases far down so only the falling code carves the
   silhouette. The mark + grid still render so we can sample them. */
body.is-matrix #mark-canvas,
body.is-matrix #grid-canvas {
  opacity: 0.08;
  transition: opacity 0.4s ease;
}
/* Tint the HUD chrome green while Matrix mode is on — same site,
   viewed through the code. Also lift each element above the matrix
   overlay (z 7) so the chrome stays legible through the rain. */
body.is-matrix .brand,
body.is-matrix .clock,
body.is-matrix .coord,
body.is-matrix .vertical-nav,
body.is-matrix .meta,
body.is-matrix .home-hint,
body.is-matrix .shortcuts-hint,
body.is-matrix .info-toggle,
body.is-matrix .info {
  color: #00ff41;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.35);
  transition: color 0.4s ease, text-shadow 0.4s ease;
  z-index: 20;
}
body.is-matrix .brand__tm {
  color: #00ff41;
}

/* ── Shortcuts legend ─────────────────────────────────────────────── */
/* Full-screen overlay, blueprint aesthetic — matches INFO panel treatment. */
.shortcuts-legend {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(7, 12, 20, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
  color: var(--ink);
}
.shortcuts-legend.is-visible { opacity: 1; }
.shortcuts-legend[hidden] { display: none; }

.shortcuts-legend__inner {
  width: min(420px, 100%);
  padding: 1.5rem 1.75rem 1.4rem;
  border: 1px solid rgba(70, 210, 220, 0.18);
  border-radius: 8px;
  background: rgba(10, 18, 28, 0.72);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.shortcuts-legend__title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.shortcuts-legend__list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.shortcuts-legend__row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed rgba(70, 210, 220, 0.08);
}
.shortcuts-legend__row:last-child { border-bottom: 0; padding-bottom: 0; }

.shortcuts-legend__row dt {
  margin: 0;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.shortcuts-legend__row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.shortcuts-legend kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  background: rgba(70, 210, 220, 0.06);
  border: 1px solid rgba(70, 210, 220, 0.22);
  border-radius: 3px;
  line-height: 1;
}

.shortcuts-legend__hint {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

/* Small "?" affordance — sits just above the copyright line in the
   bottom-right, using the same right margin so it aligns vertically
   with © 2026 AXESS but doesn't overlap it. */
.shortcuts-hint {
  position: fixed;
  right: 1.5rem;
  bottom: 3.75rem;
  z-index: 15;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0.7;
}
.shortcuts-hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-right: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink);
  background: rgba(70, 210, 220, 0.06);
  border: 1px solid rgba(70, 210, 220, 0.22);
  border-radius: 3px;
  line-height: 1;
}
/* Hide the hint on very narrow screens where the copyright already crowds this corner */
@media (max-width: 640px) {
  .shortcuts-hint { display: none; }
}

/* ── Boot overlay (?boot=full) ───────────────────────────────── */
body.is-booting {
  /* While the boot log runs, freeze the underlying scene visually.
     mark.js pauses its intro until axess:boot-complete fires. */
}
.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #05070a;
  color: #7cffb0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  overflow: hidden;
  animation: bootIn 0.35s ease-out both;
}
.boot-overlay.is-leaving {
  animation: bootOut 0.42s ease-in forwards;
}
@keyframes bootIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes bootOut { from { opacity: 1; } to { opacity: 0; } }
.boot-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 3.5rem 2rem 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.boot-banner {
  padding-bottom: 0.9rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid rgba(124, 255, 176, 0.14);
}
.boot-banner__title {
  font-size: 14px;
  letter-spacing: 0.14em;
  color: #b6ffcf;
  animation: bootBannerIn 0.35s ease-out both;
}
.boot-banner__sub {
  margin-top: 0.35rem;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: rgba(124, 255, 176, 0.55);
  animation: bootBannerIn 0.35s 0.1s ease-out both;
}
@keyframes bootBannerIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.boot-log {
  flex: 1;
  overflow: hidden;
  padding-right: 0.5rem;
}
.boot-line {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  white-space: pre;
  animation: bootLineIn 0.18s ease-out both;
}
@keyframes bootLineIn {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 0.92; transform: translateX(0); }
}
.boot-line__chevron {
  color: rgba(124, 255, 176, 0.75);
  flex-shrink: 0;
}
.boot-line__text {
  color: rgba(230, 255, 240, 0.94);
}
.boot-line__dots {
  color: rgba(124, 255, 176, 0.28);
  letter-spacing: 0.08em;
  flex: 1;
  overflow: hidden;
  white-space: pre;
}
.boot-line__status {
  color: #7cffb0;
  letter-spacing: 0.12em;
  flex-shrink: 0;
}
.boot-line--pending .boot-line__text::after {
  content: "_";
  display: inline-block;
  margin-left: 0.35rem;
  color: #7cffb0;
  animation: bootCaret 0.9s steps(2, end) infinite;
}
@keyframes bootCaret { 50% { opacity: 0; } }
.boot-hello {
  margin-top: 1.4rem;
  white-space: pre;
  font-size: 15px;
  color: #d9ffe6;
  letter-spacing: 0.03em;
}
.boot-hello::after {
  content: "_";
  display: inline-block;
  margin-left: 0.2rem;
  color: #7cffb0;
  animation: bootCaret 0.85s steps(2, end) infinite;
}
.boot-skip {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: rgba(124, 255, 176, 0.45);
  animation: bootBannerIn 0.5s 1.6s ease-out both;
}

@media (max-width: 640px) {
  .boot-inner { padding: 2rem 1rem 1rem; }
  .boot-overlay { font-size: 12px; }
  .boot-banner__title { font-size: 12px; letter-spacing: 0.1em; }
  .boot-banner__sub   { font-size: 9.5px;  letter-spacing: 0.16em; }
  .boot-line__dots    { display: none; }
  .boot-line__status  { font-size: 10.5px; }
  .boot-skip { right: 1rem; }
}

/* ── Embedded web window ─────────────────────────────────────────────
   Draggable browser-style window that opens on the desktop when a
   vertical link resolves to an external site. Mirrors the blurb-window
   aesthetic but larger, with mac-style traffic-light chrome and an
   iframe body. On mobile it becomes a near-fullscreen sheet. */

.web-window {
  position: fixed;
  /* Default centered position — JS sets left/top on open. */
  left: 50%;
  top: 50%;
  width: min(860px, calc(100vw - 4rem));
  height: min(600px, calc(100vh - 8rem));
  transform: translate(-50%, calc(-50% + 12px));
  border-radius: 10px;
  background: rgba(10, 18, 28, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(70, 210, 220, 0.18);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75),
              0 0 0 1px rgba(70, 210, 220, 0.04),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease,
              transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 30;              /* above blurb (20) so it lands on top */
  color: var(--ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.web-window.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.web-window.is-positioned {
  /* Once JS sets left/top explicitly, drop the translate offset used for
     the centered default. */
  transform: none;
}
.web-window.is-visible.is-positioned {
  transform: none;
}
.web-window.is-dragging {
  transition: opacity 0.45s ease;
  cursor: grabbing;
  user-select: none;
}

/* Titlebar — drag handle. Mirrors the blurb window: eyebrow (pulsing
   colored dot + label) on the left, URL chip in the middle, close ×
   on the right. */
.web-window__titlebar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.65rem 0.75rem 0.6rem 1rem;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.045) 0%,
    rgba(255, 255, 255, 0.015) 100%);
  border-bottom: 1px solid rgba(70, 210, 220, 0.09);
  cursor: grab;
  flex-shrink: 0;
}
.web-window__titlebar:active { cursor: grabbing; }

/* Eyebrow — pulsing dot + label, same visual language as .blurb__eyebrow */
.web-window__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  pointer-events: none;    /* clicks pass through to titlebar for drag */
}
.web-window__dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent),
              0 0 8px 0 color-mix(in srgb, currentColor 65%, transparent);
  animation: blurbDotPulse 2.4s ease-in-out infinite;
  will-change: box-shadow, transform;
}
@media (prefers-reduced-motion: reduce) {
  .web-window__dot { animation: none; }
}
.web-window__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Vertical-tinted dot + label, matching the mobility/compute/energy palette */
.web-window[data-vert="compute"]  .web-window__eyebrow { color: #22b573; }
.web-window[data-vert="energy"]   .web-window__eyebrow { color: #12a5a5; }
.web-window[data-vert="mobility"] .web-window__eyebrow { color: #2b8fe0; }

/* URL chip — opens real site in a new tab. Sits between eyebrow and ×. */
.web-window__url {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.35em 0.7em 0.3em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: color-mix(in srgb, var(--ink) 65%, transparent);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.web-window__url:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}
.web-window__url-arrow {
  font-size: 11px;
  letter-spacing: 0;
  opacity: 0.75;
}

/* Close × — mirrors the blurb window's close button */
.web-window__x {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.web-window__x:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.09);
}
.web-window__x:focus-visible {
  outline: none;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Body holds the iframe + loading state */
.web-window__body {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #ffffff;   /* white behind iframe so nothing shows through */
}
.web-window__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #ffffff;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.web-window.is-loaded .web-window__frame { opacity: 1; }

/* Loading overlay — sits on top of the iframe until it fires load */
.web-window__loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(10, 18, 28, 0.96);
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.web-window.is-loaded .web-window__loader {
  opacity: 0;
}
.web-window__loader-bar {
  width: 140px;
  height: 2px;
  border-radius: 2px;
  background: rgba(70, 210, 220, 0.1);
  position: relative;
  overflow: hidden;
}
.web-window__loader-bar::before {
  content: "";
  position: absolute;
  left: -30%;
  top: 0;
  bottom: 0;
  width: 30%;
  background: linear-gradient(90deg,
    rgba(70, 210, 220, 0),
    rgba(70, 210, 220, 0.9),
    rgba(70, 210, 220, 0));
  animation: webWindowLoad 1.4s ease-in-out infinite;
}
@keyframes webWindowLoad {
  0%   { left: -30%; }
  100% { left: 100%; }
}
.web-window__loader-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
@media (prefers-reduced-motion: reduce) {
  .web-window__loader-bar::before { animation: none; }
}

/* Mobile: near-fullscreen sheet, no drag */
@media (max-width: 640px) {
  .web-window {
    /* Anchor to the visible viewport with safe-area padding so the sheet
       stays clear of the iOS notch and home indicator. Height tracks the
       dynamic viewport (dvh) so the URL bar hide/reveal doesn't clip. */
    left:   calc(env(safe-area-inset-left, 0px) + 8px);
    top:    calc(env(safe-area-inset-top, 0px) + 8px);
    width:  calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 16px);
    height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px);
    transform: translateY(12px);
    border-radius: 12px;
  }
  .web-window.is-visible {
    transform: translateY(0);
  }
  .web-window__titlebar {
    padding: 0.7rem 0.75rem 0.65rem 0.9rem;
    cursor: default;
    gap: 0.65rem;
  }
  .web-window__eyebrow { font-size: 9.5px; letter-spacing: 0.18em; }
  .web-window__url     { font-size: 9.5px; padding: 0.35em 0.6em 0.3em; }
  /* On very narrow screens, hide the URL chip — label + × keep priority */
}
@media (max-width: 420px) {
  .web-window__url { display: none; }
}

/* ──────────────────────────────────────────────────────────
   MOBILE SWIPE-TO-REVEAL HINT
   Fixed bottom-center handle that responds to touch. Only shown on
   coarse pointers (added via JS which also guards for max-width: 768px).
   The `--swipe-progress` custom property (0–1) is set by JS during a
   drag; CSS reads it to translate the caret + fade the label up.
   ────────────────────────────────────────────────────────── */
/* iOS Safari fix: declare intent to own vertical touch gestures on the touch
   surface. `touch-action: pan-y` + `overscroll-behavior: none` on html/body
   prevents the browser from stealing the drag for its own edge gestures
   (URL bar reveal, page dismiss). When actively tracking a swipe we go
   further and lock all touch actions so preventDefault() can't be raced. */
@media (pointer: coarse), (max-width: 768px) {
  html, body {
    overscroll-behavior-y: none;
    touch-action: pan-y;
  }
  body.is-swiping {
    touch-action: none;
    overflow: hidden;
  }
}

/* Hide the hint while the intro/boot is on screen or the panel is open */
body.is-booting .swipe-hint,
body.is-intro .swipe-hint,
body:has(#info.is-visible) .swipe-hint { display: none !important; }

/* Once the user has swiped once, drop the text label — keep the bar */
.swipe-hint.is-known .swipe-hint__label,
.swipe-hint.is-known .swipe-hint__caret { display: none; }

.swipe-hint {
  /* iOS-style grabber pinned to the viewport bottom.
     Uses env(safe-area-inset-bottom) to sit just above the home indicator
     on modern iPhones, and dvh-derived positioning to survive Safari's URL
     bar hide/reveal without jumping. */
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;             /* enlarged touch/visual halo around the pill */
  z-index: 45;
  pointer-events: none;           /* touch events are captured on window */
  --swipe-progress: 0;
}

.swipe-hint__bar {
  /* iOS HIG grabber proportions: ~36×5, fully rounded, high-contrast fill. */
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: rgba(230, 241, 238, 0.42);
  transition: background 0.2s ease, width 0.2s ease, transform 0.2s ease;
}

/* While actively dragging, widen + brighten to signal engagement. */
.swipe-hint.is-tracking .swipe-hint__bar {
  background: rgba(140, 220, 230, calc(0.55 + var(--swipe-progress) * 0.35));
  width: calc(36px + var(--swipe-progress) * 24px);
  transform: translateY(calc(var(--swipe-progress) * -6px));
}

/* Once discovered, dim slightly — present but not attention-grabbing. */
.swipe-hint.is-known .swipe-hint__bar {
  background: rgba(230, 241, 238, 0.28);
}

/* Never show the grabber on wider viewports even if JS added it. */
@media (min-width: 769px) {
  .swipe-hint { display: none !important; }
}

/* Gentle idle breathing — the bar itself pulses very softly. */
@media (pointer: coarse) {
  .swipe-hint:not(.is-tracking):not(.is-known) .swipe-hint__bar {
    animation: grabberPulse 2.6s ease-in-out infinite;
  }
  @keyframes grabberPulse {
    0%, 100% { opacity: 0.75; transform: translateY(0); }
    50%      { opacity: 1;    transform: translateY(-2px); }
  }
}
