/* ============================================================
   MOCR - design system
   Concept: Mission Operations Control Room.
   Dark institutional ground, telemetry motion, editorial pacing.
   ============================================================ */

:root {
  /* Ground */
  --ink:          #07090B;
  --ink-raised:   #0C0F13;
  --ink-panel:    #101419;

  /* Line work */
  --line:         rgba(255, 255, 255, 0.08);
  --line-strong:  rgba(255, 255, 255, 0.16);

  /* Text */
  --text:         #E7EAEE;
  --text-mid:     #9AA4AF;
  --text-dim:     #67717C;

  /* Signal - amber, after the CRT consoles the room was named for */
  --signal:       #E9A24C;
  --signal-soft:  rgba(233, 162, 76, 0.14);
  --signal-line:  rgba(233, 162, 76, 0.36);

  /* Type */
  --sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  /* Measure */
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --maxw: 1240px;
  --section-y: clamp(5.5rem, 12vw, 10.5rem);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

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

::selection { background: var(--signal); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--signal);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-weight: 300;
  letter-spacing: -0.022em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.4vw, 5.1rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); letter-spacing: -0.015em; line-height: 1.25; }

p { margin: 0 0 1.15em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.08rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  color: var(--text-mid);
  max-width: 58ch;
  font-weight: 300;
}

.dim { color: var(--text-mid); }
.sig { color: var(--signal); }

/* Mono eyebrow / section label - the control-room signal */
.label {
  font-family: var(--mono);
  font-size: 0.685rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.label::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--signal-line);
  flex: none;
}
.label--plain::before { display: none; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-block: 1.4rem;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(7, 9, 11, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-block: 0.95rem;
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text);
  padding-right: 0.3em; /* optical balance for the tracking */
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

/* Logo mark — the gauge and the reading it takes.
   Drawn as SVG so it stays sharp and recolours with the theme. */
.mark {
  width: 1.65rem;
  height: 1.65rem;
  flex: none;
  overflow: visible;
}
.mark-tile {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 4;
  transition: stroke 0.3s var(--ease);
}
.mark-arc {
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke 0.3s var(--ease);
}
.mark-line {
  fill: none;
  stroke: var(--signal);
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mark-node { fill: var(--signal); }

.wordmark:hover .mark-tile { stroke: var(--signal-line); }
.wordmark:hover .mark-arc { stroke: var(--text-mid); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mid);
  transition: color 0.25s var(--ease);
  position: relative;
  padding-block: 0.4rem;
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--signal);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { border-color: var(--signal); color: var(--signal); background: var(--signal-soft); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn--solid {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
  font-weight: 600;
}
.btn--solid:hover { background: #F2B063; border-color: #F2B063; color: var(--ink); }

/* Text link with rule */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--signal-line);
  transition: border-color 0.3s var(--ease);
}
.link:hover { border-bottom-color: var(--signal); }
.link .arrow { transition: transform 0.3s var(--ease); }
.link:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 7rem;
  padding-bottom: 6rem;
  overflow: hidden;
}
#telemetry {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
/* Vignette so type always holds against the motion */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 110% 75% at 22% 45%, rgba(7,9,11,0.94) 0%, rgba(7,9,11,0.55) 42%, transparent 72%),
    linear-gradient(to bottom, var(--ink) 0%, transparent 22%, transparent 74%, var(--ink) 100%);
}
.hero .wrap { position: relative; z-index: 2; width: 100%; }

.hero h1 { max-width: 17ch; margin-block: 1.9rem 2rem; }
.hero .lede { max-width: 46ch; }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem 2.2rem;
  margin-top: 3rem;
}

/* Hero footer strip - quiet credibility */
.hero-meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding-block: 1.2rem;
}
.hero-meta .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.8rem;
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 0.6rem; }
.hero-meta .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-soft);
  flex: none;
}
@media (max-width: 900px) { .hero-meta { display: none; } }

/* Interior page header (non-home) */
.page-head {
  padding-top: clamp(9rem, 16vw, 13rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-head h1 { max-width: 15ch; margin-block: 1.75rem 1.75rem; }
.page-head .lede { max-width: 52ch; }

/* ---------- Sections ---------- */

.section { padding-block: var(--section-y); position: relative; }
.section--line { border-top: 1px solid var(--line); }
.section--tight { padding-block: clamp(4rem, 8vw, 7rem); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  gap: 2rem 4rem;
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.section-head h2 { max-width: 16ch; }
.section-head .label { grid-column: 1 / -1; margin-bottom: -0.75rem; }
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; align-items: start; }
}

/* ---------- Capability grid ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.cell {
  background: var(--ink);
  padding: clamp(2rem, 3.2vw, 2.9rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 19rem;
  transition: background 0.45s var(--ease);
  position: relative;
}
.cell:hover { background: var(--ink-raised); }
.cell .idx {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.16em;
  color: var(--signal);
  margin-bottom: 0.4rem;
}
.cell h3 { margin-bottom: 0.15rem; }
.cell p { color: var(--text-mid); font-size: 0.94rem; line-height: 1.62; }
.cell .cell-foot { margin-top: auto; padding-top: 1.5rem; }

/* ---------- Two-column prose ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 5vw, 6rem);
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split .prose p { color: var(--text-mid); font-size: 1.02rem; }

/* ---------- Spec list (definition rows) ---------- */

.specs { border-top: 1px solid var(--line); margin: 0; }
.spec {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 6fr);
  gap: 1rem 3rem;
  padding-block: clamp(1.6rem, 2.6vw, 2.2rem);
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.spec dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
}
.spec dd { margin: 0; color: var(--text-mid); max-width: 62ch; }
.spec dd strong { color: var(--text); font-weight: 450; }
@media (max-width: 700px) { .spec { grid-template-columns: 1fr; gap: 0.6rem; } }

/* ---------- CTA band ---------- */

.band {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 80% 130% at 50% 100%, var(--signal-soft) 0%, transparent 62%),
    var(--ink);
  padding-block: clamp(5rem, 10vw, 8rem);
  text-align: center;
}
.band h2 { max-width: 20ch; margin-inline: auto; }
.band .lede { margin-inline: auto; margin-top: 1.5rem; text-align: center; }
.band .btn { margin-top: 2.75rem; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: 4rem 2.5rem;
  font-size: 0.88rem;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 3rem;
  padding-bottom: 3.5rem;
}
@media (max-width: 800px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; gap: 2.25rem; } }

.footer h4 {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
  font-weight: 500;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.footer ul a, .footer address a { color: var(--text-mid); transition: color 0.25s var(--ease); }
.footer ul a:hover, .footer address a:hover { color: var(--signal); }
.footer address { font-style: normal; color: var(--text-mid); line-height: 1.75; }
.footer .footer-brand .wordmark { display: inline-block; margin-bottom: 1.1rem; }
.footer .footer-brand p { color: var(--text-dim); max-width: 34ch; font-size: 0.86rem; }

.footer-base {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- Contact ---------- */

.contact-block { padding-block: 1.75rem; border-bottom: 1px solid var(--line); }
.contact-block:first-of-type { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.contact-block h4 {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
  margin: 0 0 0.8rem;
}
.contact-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--signal);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.contact-lead:hover { border-bottom-color: var(--signal-line); }
.contact-block address { font-style: normal; color: var(--text-mid); line-height: 1.8; }

/* ---------- Attribution links ---------- */

.attrib-links {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.attrib-links a {
  color: var(--text-dim);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.15rem;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.attrib-links a:hover { color: var(--signal); border-bottom-color: var(--signal-line); }
.attrib-links span { color: var(--text-dim); }

/* ---------- Form ---------- */

.form { margin-top: 1.5rem; display: grid; gap: 1.6rem; }

.field { display: grid; gap: 0.6rem; }
.field label {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.field input,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 350;
  color: var(--text);
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.9rem 1rem;
  width: 100%;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.field textarea { resize: vertical; min-height: 8rem; line-height: 1.55; }
.field input:hover,
.field textarea:hover { border-color: var(--line-strong); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--signal);
  background: var(--ink-panel);
}

.form .btn { justify-self: start; border: 0; }
.form .btn:disabled { opacity: 0.55; cursor: default; }
.form-note { font-size: 0.82rem; color: var(--text-dim); margin: 0; }

/* Honeypot — off-screen rather than display:none, which some bots skip */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0;
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: var(--ink-raised);
  color: var(--text-mid);
}
.form-status.is-ok {
  border-color: var(--signal-line);
  background: var(--signal-soft);
  color: var(--text);
}
.form-status.is-error {
  border-color: rgba(226, 118, 106, 0.45);
  background: rgba(226, 118, 106, 0.1);
  color: #E8A79F;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Mobile nav ---------- */

.nav-toggle { display: none; }
@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 0;
    padding: 0.6rem 0;
    cursor: pointer;
    width: 26px;
    position: relative;
    z-index: 2;
  }
  .nav-toggle span { display: block; height: 1px; background: var(--text); transition: transform 0.35s var(--ease), opacity 0.25s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(7, 9, 11, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 2.4rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
  }
  .nav-links a { font-size: 0.95rem; letter-spacing: 0.2em; }
  .nav-links.is-open { opacity: 1; pointer-events: auto; }
  .nav .btn { display: none; }
}
