/* OnShift Robotics, v2 (Oxblood). Square corners, 1px hairlines, no shadows. */

@font-face {
  font-family: "Big Shoulders Display";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/big-shoulders-display-800.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
}

:root {
  --night: #0a0808;
  --glass: #110e0e;
  --mullion: #241e1e;
  --signal: #f2eeea;
  --dim: #948a86;
  --oxblood: #6b1d22;
  --tint: #b4474c;          /* oxblood on dark: blade, arrowheads, marker, email arrow, focus, mission line 5 only */
  --line: rgba(242, 238, 234, 0.14);
  --line-strong: rgba(242, 238, 234, 0.5);
  --display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter-l: clamp(40px, 4.5vw, 64px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--signal); }
body { font-family: var(--mono); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--signal); text-decoration: none; }
a:hover { color: var(--tint); }
::selection { background: var(--oxblood); color: var(--signal); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 1px solid var(--tint); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: var(--glass);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: auto;
}
.hero.is-idle { cursor: none; }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.layer--fx { pointer-events: none; }
.fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 58%;
  background: linear-gradient(to top, rgba(10, 8, 8, 0.92) 0%, rgba(10, 8, 8, 0.6) 45%, rgba(10, 8, 8, 0) 100%);
  pointer-events: none;
}

/* Everything marked .ui fades out while the mission is showing. */
.ui { transition: opacity 300ms linear, visibility 300ms linear; }
.hero.ui-out .ui { opacity: 0; visibility: hidden; }

/* ---------- top bar ---------- */
.topbar {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: var(--gutter-l);
  right: clamp(20px, 3vw, 44px);
  min-height: 44px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand:hover { color: var(--signal); }
.mark { display: block; flex: none; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: 0.06em; line-height: 1; }
.topbar__right { display: flex; align-items: center; gap: 28px; }
.coords { font-size: 11px; letter-spacing: 0.14em; color: var(--dim); white-space: nowrap; pointer-events: none; }

/* ---------- mission control (variant B) ---------- */
.ctrl {
  height: 44px;
  display: flex; align-items: stretch;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--signal);
  font: 400 11px/1 var(--mono); letter-spacing: 0.2em;
  cursor: pointer;
  transition: background-color 300ms linear, border-color 300ms linear;
}
.ctrl__glyph {
  width: 42px; display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--line-strong);
  transition: border-color 300ms linear;
}
.ctrl__glyph svg { display: block; }
.ctrl__arrow { fill: var(--tint); transition: fill 300ms linear; }
.ctrl__label { display: flex; align-items: center; padding: 0 16px; white-space: nowrap; }
.ctrl[aria-expanded="true"] { background: var(--oxblood); border-color: var(--oxblood); }
.ctrl[aria-expanded="true"] .ctrl__glyph { border-color: var(--oxblood); }
.ctrl[aria-expanded="true"] .ctrl__arrow { fill: var(--signal); }

/* Phone: CLOSE moves to a full-width bar at the bottom, in thumb reach. */
.ctrl--bar {
  position: absolute;
  left: 40px; right: 20px;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  height: 48px;
  background: var(--oxblood); border-color: var(--oxblood);
}
.ctrl--bar .ctrl__glyph { width: 46px; border-right-color: rgba(242, 238, 234, 0.3); }
.ctrl--bar .ctrl__label { flex: 1; justify-content: center; }

/* ---------- mission statement ---------- */
.mission { position: absolute; inset: 0; pointer-events: none; outline: none; }
.mission__label {
  position: absolute;
  font-size: 11px; line-height: 11px; letter-spacing: 0.14em; color: var(--dim);
  opacity: 0;
}
.mission__line {
  position: absolute;
  font-family: var(--display); font-weight: 800;
  letter-spacing: 0.01em; white-space: nowrap;
  opacity: 0;
}
.mission__line--p { color: var(--dim); }
.mission__line--a { color: var(--signal); }
.mission__line--h { color: var(--tint); }

/* ---------- headline + briefing ---------- */
.bottom {
  position: absolute;
  left: var(--gutter-l);
  right: clamp(20px, 3vw, 48px);
  bottom: calc(clamp(28px, 5vh, 52px) + env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 28px 48px;
  pointer-events: none;
}
.headline {
  margin: 0;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(58px, 7.7vw, 112px);
  line-height: 0.88; letter-spacing: 0.005em; text-transform: uppercase;
}
.headline span { display: block; }

.briefing { flex: 0 1 340px; min-width: 240px; cursor: auto; pointer-events: auto; }
.briefing__form { display: flex; align-items: stretch; border-bottom: 1px solid var(--line-strong); }
.briefing__form input[type="email"] {
  flex: 1; min-width: 0;
  background: transparent; border: 0; border-radius: 0; outline: none;
  color: var(--signal);
  font: 400 13px/1.4 var(--mono); letter-spacing: 0.04em;
  padding: 12px 0;
  cursor: text;
}
.briefing__form input[type="email"]:focus-visible { outline: none; }
.briefing__form:focus-within { border-bottom-color: var(--signal); }
.briefing__form input::placeholder { color: var(--dim); opacity: 1; }
.briefing__form input:-webkit-autofill { -webkit-text-fill-color: var(--signal); transition: background-color 9999s; }
.briefing__form button {
  background: transparent; border: 0; border-radius: 0;
  color: var(--tint);
  padding: 0 2px 0 16px;
  cursor: pointer;
  display: flex; align-items: center;
}
.briefing__form button:hover { color: var(--signal); }
.briefing__form button:disabled { color: var(--dim); cursor: default; }
.briefing__form button svg { display: block; }
.briefing__done { margin: 0; font-size: 13px; letter-spacing: 0.04em; padding: 12px 0; border-bottom: 1px solid var(--line); }
.briefing__error { margin: 8px 0 0; min-height: 1.4em; font-size: 11px; letter-spacing: 0.08em; color: var(--dim); }
.briefing__error:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.footer {
  padding: 22px var(--gutter-l) calc(22px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  font-size: 11px; letter-spacing: 0.14em; color: var(--dim);
}

/* ---------- phone ---------- */
@media (max-width: 599px) {
  .topbar__right { gap: 16px; }
  .coords { display: none; }
  .briefing { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ui, .ctrl, .ctrl__glyph, .ctrl__arrow { transition: none; }
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 100vh; min-height: 100svh;
  display: grid; align-content: space-between; gap: 48px;
  padding: 20px clamp(20px, 3vw, 44px) 40px var(--gutter-l);
  background: var(--glass);
}
.notfound .brand { min-height: 44px; }
.notfound h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(58px, 9vw, 140px); line-height: 0.88; text-transform: uppercase; }
.notfound p { margin: 16px 0 0; font-size: 11px; letter-spacing: 0.14em; color: var(--dim); }
