/* saluting-face · brand tokens sampled from the logo sheet */
:root {
  --bg: #0E0E10;
  --bg-2: #151518;
  --line: #26262b;
  --yellow: #FFC233;
  --ink: #F6F3EC;
  --ink-dim: #8d8a84;
  --eq: #F6F3EC;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1120px;
  --pad: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; --header-h: 58px; --sec-pad: clamp(56px, 8vw, 96px); scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* JetBrains Mono ships coding ligatures (===, ->, etc.); keep every glyph literal */
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}
a { color: inherit; }
::selection { background: var(--yellow); color: var(--bg); }
.y { color: var(--yellow); }
.dim { color: var(--ink-dim); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--yellow); color: var(--bg); padding: 6px 10px; z-index: 10; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav__brand { text-decoration: none; }
.mark { font-weight: 800; color: var(--yellow); letter-spacing: -0.02em; font-size: 18px; }
.nav nav { display: flex; gap: clamp(12px, 3vw, 28px); font-size: 14px; }
.nav nav a { text-decoration: none; color: var(--ink-dim); transition: color .15s; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.nav__cta { color: var(--yellow); }

/* ---------- hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) var(--pad) clamp(56px, 9vw, 112px);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  min-height: calc(100svh - 60px);
}
.ascii {
  margin: 0;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--yellow);
  /* 37 columns reserved (salute peak reaches col 36); scale so it never wraps */
  font-size: clamp(9px, calc((100vw - 2 * var(--pad)) / 23), 22px);
  line-height: 1.15;
  letter-spacing: 0;
  white-space: pre;
  overflow: visible;
}
.ascii .eq { color: var(--eq); font-weight: 700; }
.js .ascii { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ascii:focus { outline: none; }
.ascii:focus-visible { outline: 1px dashed var(--yellow); outline-offset: 10px; }

.wordmark {
  margin: 0;
  font-weight: 700;
  font-size: min(68px, max(34px, 5.4vw), calc((100vw - 2 * var(--pad)) / 8.2));
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.wordmark .hy { color: var(--yellow); }
.pitch {
  margin: 22px 0 10px;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  max-width: 34ch;
  font-weight: 500;
}
/* typed easter-egg text wraps at the tagline's length: 47 chars + 4 = 51ch */
.prompt { margin: 0 0 32px; color: var(--ink-dim); font-size: 14px; position: relative; white-space: pre-wrap; overflow-wrap: anywhere; max-width: min(51ch, 100%); }
.hero__copy { min-width: 0; }
.typed-sink { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; margin: 0; opacity: 0; font-size: 16px; color: transparent; background: transparent; caret-color: transparent; pointer-events: none; outline: none; }
.cursor { color: var(--yellow); margin-left: 2px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block;
  padding: 12px 16px;
  font-weight: 700; font-size: 14px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--ink-dim); }
.btn--primary { background: var(--yellow); color: var(--bg); border-color: var(--yellow); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); }

/* ---------- sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--sec-pad) var(--pad);
  border-top: 1px dashed var(--line);
  /* land each heading ~32px under the sticky header */
  scroll-margin-top: calc(32px - var(--sec-pad));
}
.h2 { margin: 0 0 20px; font-size: clamp(22px, 3vw, 32px); font-weight: 800; letter-spacing: -0.01em; }
.lede { margin: 0 0 40px; font-size: clamp(16px, 1.6vw, 19px); max-width: 60ch; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 24px;
  position: relative;
}
.card::before { content: "+"; position: absolute; top: -9px; left: -5px; color: var(--ink-dim); font-size: 14px; line-height: 1; }
.card::after  { content: "+"; position: absolute; bottom: -8px; right: -5px; color: var(--ink-dim); font-size: 14px; line-height: 1; }
.card h3 { margin: 0 0 10px; font-size: 18px; font-weight: 800; }
.card p { margin: 0; color: #cfccc5; font-size: 15px; }
.fit { margin: 32px 0 0; font-size: 15px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li {
  display: grid; grid-template-columns: 64px 1fr; gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.steps li:first-child { border-top: 1px solid var(--line); }
.step__n { color: var(--yellow); font-weight: 800; }
.steps h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.steps p { margin: 0; color: #cfccc5; font-size: 15px; max-width: 62ch; }

.about { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.about__mark { margin: 0; font-family: var(--mono); font-weight: 800; color: var(--yellow); font-size: clamp(44px, 8vw, 88px); line-height: 1; }
.about p { margin: 0; font-size: clamp(16px, 1.6vw, 19px); max-width: 58ch; }

/* contact + footer fill the viewport so #contact can land flush under the sticky header */
.contact { min-height: calc(100svh - var(--header-h) - 80px + var(--sec-pad) - 32px - 3 * 1.2 * clamp(13px, 1.5vw, 16px)); }
.contact__line { font-size: clamp(18px, 3vw, 30px); font-weight: 700; margin: 0; word-break: break-all; }
.contact__email { color: var(--yellow); text-decoration: none; border-bottom: 2px solid transparent; transition: border-color .15s; }
.contact__email:hover { border-color: var(--yellow); }

.footer {
  max-width: var(--max); margin: 0 auto;
  padding: 28px var(--pad) 32px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--ink-dim);
  border-top: 1px solid var(--line);
}

/* ---------- motion (opt-in; skipped for reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .ascii .l { opacity: 0; animation: reveal .45s steps(4, end) forwards; animation-delay: calc(var(--i) * 55ms + 150ms); }
  .js .ascii .eq {
    background: linear-gradient(90deg, var(--eq) 0 40%, var(--yellow) 50%, var(--eq) 60% 100%);
    background-size: 300% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    animation: shimmer 5.5s ease-in-out 1.6s infinite;
  }
  /* during the salute: solid arm, then a yellow flash when the hand hits the brow */
  .js .ascii.is-saluting .eq { animation: none; background: none; color: var(--eq); }
  .js .ascii.is-flash .eq { color: var(--yellow); text-shadow: 0 0 12px rgba(255, 194, 51, .45); }
  .cursor { animation: blink 1.1s steps(1, end) infinite; }
  @keyframes reveal { to { opacity: 1; } }
  @keyframes shimmer { 0% { background-position: 100% 0; } 45%, 100% { background-position: 0% 0; } }
  @keyframes blink { 50% { opacity: 0; } }
}

/* ---------- boot sequence: hero copy types in (JS; skipped for reduced motion / no JS) ---------- */
.boot .hero__copy > * { opacity: 0; }
.ch.pend { opacity: 0; }
.ch.at { position: relative; }
.ch.at::after {
  content: ""; position: absolute; left: 100%; top: 0.08em; bottom: 0.08em; width: 0.6em;
  background: var(--yellow); opacity: .9; pointer-events: none;
}
.typing .cursor { visibility: hidden; }
.btn.pend { opacity: 0; transform: translateY(14px); }
.btn { transition: border-color .25s, background-color .25s, color .15s, opacity .42s cubic-bezier(.2,.7,.25,1), transform .42s cubic-bezier(.2,.7,.25,1); }

/* ---------- roll call (decorative) ---------- */
/* log is bottom-anchored: it sits just above the footer rule, with dead space above it */
.contact { display: flex; flex-direction: column; padding-bottom: clamp(16px, 2vw, 24px); }
.rollcall { margin-top: auto; user-select: none; -webkit-user-select: none; }
.crewlog { --rows: 8; margin-top: auto; padding-top: clamp(48px, 9vh, 96px); font-size: 12px; line-height: 1.6; }
.crewlog__win { position: relative; height: calc(var(--rows) * 1.6em); overflow: hidden; margin-top: 8px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 45%); mask-image: linear-gradient(to bottom, transparent 0, #000 45%); }
.crewlog__lines { position: absolute; left: 0; right: 0; bottom: 0; transition: transform .38s cubic-bezier(.2,.7,.3,1); }
.crewlog__line.in { animation: logIn .38s cubic-bezier(.2,.7,.3,1) both; }
@keyframes logIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.crewlog .end { color: #55534f; }
/* timestamp | message; long messages wrap under the message column (hanging indent) */
.crewlog__line { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1.5ch; }
.crewlog__line .msg { overflow-wrap: anywhere; color: #d9d5cd; }
.crewlog .ts { color: #55534f; min-width: 8ch; }
.crewlog .who { color: #c9a24e; }
.crewlog .who.ops { color: var(--yellow); }
.crewlog .to { color: #a99060; }
.crewlog .arw { color: #6b6863; }
.crewlog .o7, .crewlog .mail, .crewlog .brand .hy { color: var(--yellow); }
.crewlog .red { background: var(--yellow); color: var(--bg); padding: 0 2px; }
.crewlog .cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--ink-dim); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 560px) { .crewlog { --rows: 6; font-size: 11.5px; } }
@media (prefers-reduced-motion: reduce) { .crewlog__lines { transition: none; } .crewlog__line.in { animation: none; } .crewlog .cur { animation: none; } }
/* bots stand on the very bottom edge of the page */
.ground { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); overflow: hidden; user-select: none; -webkit-user-select: none; }
.bots { display: flex; justify-content: space-between; height: calc(3 * 1.2em); font-size: clamp(13px, 1.5vw, 16px); line-height: 1.2; }
.bot { margin: 0; font: inherit; width: 7ch; flex: 0 0 7ch; white-space: pre; color: var(--ink); cursor: default; -webkit-tap-highlight-color: transparent;
  transform: translateY(.04em); /* sink the glyph descent below the edge so the feet sit on it (clipped by .ground) */
}
.bot b { font-weight: 700; color: var(--ink); transition: color .3s ease-out; }
.bot.flash b { color: var(--yellow); transition: none; }

/* ---------- responsive ---------- */
@media (min-width: 901px) {
  /* two-column hero: keep the wordmark inside the copy column (13 chars ≈ 7.9em) */
  .hero__copy { container-type: inline-size; }
  .wordmark { font-size: min(68px, max(34px, 5.4vw), 12.4cqi); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; justify-items: start; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav nav a:not(.nav__cta) { display: none; }
  .steps li { grid-template-columns: 44px 1fr; gap: 10px; }
  .about { grid-template-columns: 1fr; }
  .bot { transform: translateY(.13em); }
}
