/* Backstage Sentinel — quiet command desk.
   Tokens are the contract: near-black, ivory, one gold. IBM Plex only. */

:root {
  --bg: #08080a;
  --surface: #121214;
  --fg: #f1f0ec;
  --muted: #9a9890;
  --subtle: #6e6c66;
  --gold: #c6a15a;
  --gold-fg: #1a1408;
  --border: rgba(241, 240, 236, 0.08);
  --border-strong: rgba(241, 240, 236, 0.16);
  --header-h: 56px;
  --maxw: 72rem;
  --pad: clamp(16px, 4vw, 24px);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary { background: var(--gold); color: var(--gold-fg); }
.btn-primary:hover { background: #d4b06c; }

.btn-outline { border-color: var(--border-strong); color: var(--fg); background: transparent; }
.btn-outline:hover { border-color: rgba(241, 240, 236, 0.32); }

.btn-ghost { color: var(--muted); background: transparent; }
.btn-ghost:hover { color: var(--fg); }

/* ---------- Type ---------- */

.kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(2.35rem, 6.5vw, 3.9rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

h1 .gold, h2 .gold { color: var(--gold); }

h2 {
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 8px; }

.lead { font-size: 1.1rem; color: var(--muted); max-width: 38rem; margin: 0 0 28px; }

.section { padding-block: clamp(56px, 9vw, 96px); }

.section-head { margin-bottom: clamp(28px, 5vw, 44px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(8, 8, 10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-row {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--gold-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark svg { width: 16px; height: 16px; }

.wordmark {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.wordmark b { font-weight: 500; color: var(--gold); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.site-nav > a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav > a:hover { color: var(--fg); }

.nav-ctas { display: flex; align-items: center; gap: 8px; margin-left: 8px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: var(--fg);
  cursor: pointer;
  padding: 0;
}

.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-menu { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px var(--pad) 20px;
    background: rgba(8, 8, 10, 0.97);
    border-bottom: 1px solid var(--border);
  }
  .nav-open .site-nav { display: flex; }
  .site-nav > a { padding: 12px 4px; font-size: 15px; }
  .nav-ctas { flex-direction: column; align-items: stretch; margin: 8px 0 0; }
}

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

.hero { position: relative; overflow: hidden; }

.hero-bg { position: absolute; inset: 0; z-index: 0; }

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8, 8, 10, 0.55), rgba(8, 8, 10, 0.35) 40%, #08080a);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(56px, 10vw, 110px);
  display: grid;
  gap: clamp(36px, 6vw, 64px);
  align-items: center;
}

@media (min-width: 960px) {
  .hero-inner { grid-template-columns: 1.05fr 1fr; }
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Desk mock ---------- */

.desk-mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.mock-head .mock-word { color: var(--muted); font-weight: 500; }
.mock-head .mock-word b { color: var(--gold); font-weight: 500; }

.mock-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--subtle);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: live-pulse 2.4s ease-in-out infinite; }
  @keyframes live-pulse { 50% { opacity: 0.35; } }
}

.mock-body {
  display: grid;
  grid-template-columns: minmax(120px, 0.72fr) 1fr;
  gap: 10px;
  padding: 10px;
}

@media (max-width: 420px) {
  .mock-body { grid-template-columns: 1fr; }
}

.mock-intel {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 100%;
}

.mock-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--subtle);
}

.mock-count {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(2.2rem, 5vw, 2.9rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--gold);
}

.mock-line { font-size: 14px; font-weight: 500; }

.mock-actions { font-size: 12px; color: var(--muted); }

.mock-cams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mock-cams.cams-3col { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 640px) {
  .mock-cams.cams-3col { grid-template-columns: 1fr 1fr; }
}

.cam {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #0c0c0e;
}

.cam img { width: 100%; height: 100%; object-fit: cover; }

.cam figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 10px 6px;
  background: linear-gradient(to top, rgba(8, 8, 10, 0.85), transparent);
  border-top: 1px solid rgba(241, 240, 236, 0.06);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.cam figcaption b { color: var(--gold); font-weight: 500; margin-right: 6px; }

/* ---------- Proof strip ---------- */

.proof-strip {
  border-block: 1px solid var(--border);
  padding-block: 22px;
}

.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  justify-content: space-between;
}

.proof-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.proof-item svg { width: 18px; height: 18px; color: var(--gold); flex: none; }

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.product-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 760px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
}

.product-card { display: flex; flex-direction: column; text-decoration: none; transition: border-color 0.15s ease; }
.product-card:hover { border-color: var(--border-strong); }

.product-media { aspect-ratio: 16 / 9; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media.sanctum img { object-position: 20% center; filter: brightness(1.1); }

.product-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-body .kicker { margin-bottom: 2px; }
.product-name { font-size: 1.35rem; font-weight: 600; margin: 0; }
.product-promise { font-weight: 500; color: var(--fg); margin: 4px 0 0; }
.product-summary { color: var(--muted); font-size: 0.95rem; margin: 4px 0 12px; }

.product-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gold);
}

.product-link svg { width: 15px; height: 15px; }

/* ---------- Numbered / feature panels ---------- */

.panel-grid { display: grid; gap: 20px; }

@media (min-width: 760px) {
  .panel-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .panel-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}

.panel { padding: 24px; }

.panel-index {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--gold);
  display: block;
  margin-bottom: 14px;
}

.panel p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- Quote ---------- */

.quote-wrap { max-width: 48rem; margin-inline: auto; }

.quote-wrap blockquote {
  margin: 0 0 20px;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.7;
  color: var(--fg);
}

.quote-mark { color: var(--gold); font-size: 2.4rem; line-height: 1; display: block; margin-bottom: 12px; font-family: "IBM Plex Mono", ui-monospace, monospace; }

.quote-attr {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.quote-attr b { color: var(--gold); font-weight: 500; }

/* ---------- Close band ---------- */

.close-band { text-align: center; border-top: 1px solid var(--border); }
.close-band .lead { margin-inline: auto; }
.close-band .hero-ctas { justify-content: center; }

/* ---------- Page hero (subpages) ---------- */

.page-hero { padding-block: clamp(48px, 8vw, 88px) clamp(32px, 6vw, 56px); }

.page-hero-grid {
  display: grid;
  gap: clamp(36px, 6vw, 64px);
  align-items: center;
}

@media (min-width: 960px) {
  .page-hero-grid { grid-template-columns: 1.05fr 1fr; }
}

/* Sanctum hero image */

.sanctum-hero { position: relative; overflow: hidden; }
.sanctum-hero .hero-bg img { object-position: 20% center; filter: brightness(1.1); }

/* ---------- Founder card ---------- */

.founder-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  max-width: 30rem;
}

.founder-initials {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 12px;
  background: var(--gold);
  color: var(--gold-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.founder-name { font-weight: 600; }
.founder-role { font-size: 13px; color: var(--muted); }

.prose { max-width: 44rem; }
.prose p { color: var(--muted); margin: 0 0 18px; }
.prose p.em { color: var(--fg); }

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

.contact-grid { display: grid; gap: 40px; }

@media (min-width: 860px) {
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
}

.contact-lines { display: flex; flex-direction: column; gap: 10px; font-size: 1.05rem; }
.contact-lines a { color: var(--gold); text-decoration: none; }
.contact-lines a:hover { text-decoration: underline; }
.contact-lines .from { color: var(--muted); font-size: 0.95rem; }

.contact-form { padding: 26px; display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.field input,
.field textarea {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  padding: 11px 14px;
  min-height: 44px;
}

.field textarea { min-height: 120px; resize: vertical; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-note { font-size: 12px; color: var(--subtle); margin: 0; }

/* ---------- Legal ---------- */

.legal-prose { max-width: 44rem; }
.legal-prose p { color: var(--muted); }

/* ---------- Console page ---------- */

.console-note {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-top: 18px;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 48px 36px;
  font-size: 14px;
  color: var(--muted);
}

.footer-grid { display: grid; gap: 32px; }

@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer-tag { margin: 14px 0 0; max-width: 26rem; }

.footer-col h4 {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--subtle);
  margin: 0 0 12px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--fg); }

.footer-legal {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--subtle);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
