/* ============================================================
   ORIGIN POINT LAB — style.css
   Digital Brutalism / Technical Infrastructure
   Strict: 0px radii, 0 shadows, 1px borders, 8px grid
   ============================================================ */

:root {
 /* color tokens — LIGHT (primary) */
 --bg-base: #f4f4f2;
 --bg-surface-1: #ffffff;
 --bg-surface-2: #e8e8e4;
 --text-primary: #121212;
 --text-muted: #5c5c5c;
 --accent-action: #d93a17; /* safety orange, darkened for contrast */
 --accent-logic: #0047ab; /* blueprint blue */
 --border-line: rgba(18, 18, 18, 0.15);
 --border-strong: rgba(18, 18, 18, 0.32);

 /* theme-locked overlays (derived from base) */
 --header-bg: rgba(244, 244, 242, 0.92);
 --hero-frame-bg: rgba(255, 255, 255, 0.55);
 --hover-tint: rgba(18, 18, 18, 0.06);
 --row-hover: rgba(217, 58, 23, 0.05);
 --grid-dot: rgba(18, 18, 18, 0.25);
 --terminal-bg: #ffffff;
}

[data-theme="dark"] {
 /* color tokens — DARK (toggle) */
 --bg-base: #121212;
 --bg-surface-1: #18181b;
 --bg-surface-2: #1e1e24;
 --text-primary: #f9f9f9;
 --text-muted: #a0a0a0;
 --accent-action: #ff5733; /* safety orange */
 --accent-logic: #0047ab; /* blueprint blue */
 --border-line: rgba(160, 160, 160, 0.15);
 --border-strong: rgba(160, 160, 160, 0.32);

 --header-bg: rgba(18, 18, 18, 0.92);
 --hero-frame-bg: rgba(18, 18, 18, 0.35);
 --hover-tint: rgba(249, 249, 249, 0.06);
 --row-hover: rgba(255, 87, 51, 0.04);
 --grid-dot: rgba(160, 160, 160, 0.25);
 --terminal-bg: #0c0c0c;
}

:root {
 /* type */
 --font-head: "Inter", system-ui, sans-serif;
 --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
 --font-mono: "JetBrains Mono", ui-monospace, monospace;

 /* spacing (8px rhythm) */
 --s-1: 8px;
 --s-2: 16px;
 --s-3: 24px;
 --s-4: 32px;
 --s-5: 48px;
 --s-6: 64px;

 --header-h: 64px;
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
 box-sizing: border-box;
 margin: 0;
 padding: 0;
}

html {
 scroll-behavior: smooth;
}

body {
 background: var(--bg-base);
 color: var(--text-primary);
 font-family: var(--font-body);
 font-size: 16px;
 line-height: 24px;
 -webkit-font-smoothing: antialiased;
 overflow-x: hidden;
 /* crosshair cursor on interactive zones */
}

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

/* ---------- fixed coordinate plane ---------- */
.coordinate-plane {
 position: fixed;
 inset: 0;
 z-index: 0;
 pointer-events: none;
 background-color: var(--bg-base);
 background-image:
  linear-gradient(var(--border-line) 1px, transparent 1px),
  linear-gradient(90deg, var(--border-line) 1px, transparent 1px);
 background-size: 32px 32px;
 opacity: 0.5;
}
/* crosshair center marks */
.coordinate-plane::before {
 content: "";
 position: absolute;
 inset: 0;
 background-image: radial-gradient(
  circle at center,
  var(--grid-dot) 1px,
  transparent 1.5px
 );
 background-size: 32px 32px;
}

/* ---------- crosshair cursor readout ---------- */
.cursor-readout {
 position: fixed;
 z-index: 9999;
 top: 0;
 left: 0;
 display: none;
 gap: var(--s-1);
 padding: 4px 8px;
 background: var(--bg-base);
 border: 1px solid var(--accent-action);
 font-family: var(--font-mono);
 font-size: 11px;
 letter-spacing: 0.05em;
 color: var(--accent-action);
 white-space: nowrap;
 pointer-events: none;
}
.cursor-readout.show {
 display: flex;
}

/* ---------- shared type ---------- */
.mono {
 font-family: var(--font-mono);
 letter-spacing: 0.05em;
}
.headline-lg {
 font-family: var(--font-head);
 font-size: clamp(40px, 7vw, 88px);
 font-weight: 800;
 line-height: 1.02;
 letter-spacing: -0.02em;
 text-transform: uppercase;
}
.headline-md {
 font-family: var(--font-head);
 font-size: clamp(26px, 4vw, 40px);
 font-weight: 700;
 line-height: 1.1;
 letter-spacing: -0.01em;
 text-transform: uppercase;
}

/* ---------- buttons ---------- */
.btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 height: 48px;
 padding: 0 var(--s-3);
 border-radius: 0;
 font-family: var(--font-mono);
 font-size: 13px;
 letter-spacing: 0.05em;
 text-transform: uppercase;
 cursor: pointer;
 transition:
  background 0.12s ease,
  color 0.12s ease,
  border-color 0.12s ease;
}
.btn-primary {
 border: 1px solid var(--accent-action);
 color: var(--accent-action);
 background: transparent;
}
.btn-primary:hover {
 background: var(--accent-action);
 color: var(--bg-base);
}
.btn-secondary {
 border: 1px solid var(--border-strong);
 color: var(--text-primary);
 background: transparent;
}
.btn-secondary:hover {
 border-color: var(--text-primary);
 background: var(--hover-tint);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 height: var(--header-h);
 z-index: 100;
 background: var(--header-bg);
 border-bottom: 1px solid var(--border-line);
}

/* ---------- theme toggle ---------- */
.theme-toggle {
 display: inline-flex;
 align-items: center;
 height: 32px;
 padding: 0 var(--s-1);
 margin-left: var(--s-2);
 border: 1px solid var(--border-strong);
 background: transparent;
 color: var(--text-muted);
 font-family: var(--font-mono);
 font-size: 11px;
 letter-spacing: 0.05em;
 cursor: pointer;
 transition:
  color 0.12s ease,
  border-color 0.12s ease,
  background 0.12s ease;
}
.theme-toggle:hover {
 color: var(--text-primary);
 border-color: var(--text-primary);
}
.theme-toggle .mode-dark {
 display: none;
}
[data-theme="dark"] .theme-toggle .mode-light {
 display: none;
}
[data-theme="dark"] .theme-toggle .mode-dark {
 display: inline;
}
.header-inner {
 max-width: 1440px;
 margin: 0 auto;
 height: 100%;
 padding: 0 var(--s-3);
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: var(--s-3);
}
.brand {
 display: flex;
 align-items: baseline;
 gap: var(--s-1);
 white-space: nowrap;
}
.brand-mark {
 color: var(--accent-action);
 font-weight: 700;
 font-size: 18px;
}
.brand-name {
 font-family: var(--font-head);
 font-weight: 700;
 letter-spacing: 0.02em;
 font-size: 15px;
}
.brand-datum {
 font-size: 11px;
 color: var(--text-muted);
 margin-left: var(--s-1);
}

.site-nav {
 display: flex;
 gap: var(--s-2);
 align-items: center;
}
.site-nav a {
 font-size: 12px;
 color: var(--text-muted);
 padding: var(--s-1) 0;
 border-bottom: 1px solid transparent;
 transition:
  color 0.12s ease,
  border-color 0.12s ease;
}
.site-nav a:hover,
.site-nav a.active {
 color: var(--text-primary);
 border-bottom-color: var(--accent-action);
}

.header-status {
 display: flex;
 align-items: center;
 gap: var(--s-1);
 font-size: 11px;
 color: var(--text-muted);
}
.header-status .dot {
 width: 8px;
 height: 8px;
 background: var(--accent-action);
 border-radius: 0;
 display: inline-block;
}

/* ============================================================
   MAIN / SECTIONS
   ============================================================ */
main {
 position: relative;
 z-index: 1;
}

section {
 max-width: 1440px;
 margin: 0 auto;
 padding: var(--s-6) var(--s-3);
}

.section-head {
 border-top: 1px solid var(--border-line);
 padding-top: var(--s-2);
 margin-bottom: var(--s-4);
}
.tag {
 display: inline-block;
 font-size: 12px;
 color: var(--accent-action);
 margin-bottom: var(--s-2);
}
.section-head .headline-md {
 max-width: 720px;
}
.section-sub {
 margin-top: var(--s-2);
 color: var(--text-muted);
 max-width: 640px;
}

/* ---------- HERO ---------- */
.hero {
 min-height: calc(100vh - var(--header-h));
 display: flex;
 flex-direction: column;
 justify-content: center;
 position: relative;
 padding-top: calc(var(--header-h) + var(--s-4));
}
.hero-frame {
 position: relative;
 border: 1px solid var(--border-line);
 padding: var(--s-5);
 background: var(--hero-frame-bg);
}
/* corner registration marks */
.corner {
 position: absolute;
 width: 16px;
 height: 16px;
}
.corner::before,
.corner::after {
 content: "";
 position: absolute;
 background: var(--accent-action);
}
.corner::before {
 width: 16px;
 height: 2px;
 top: 0;
 left: 0;
}
.corner::after {
 width: 2px;
 height: 16px;
 top: 0;
 left: 0;
}
.corner.tl {
 top: -1px;
 left: -1px;
}
.corner.tr {
 top: -1px;
 right: -1px;
 transform: scaleX(-1);
}
.corner.bl {
 bottom: -1px;
 left: -1px;
 transform: scaleY(-1);
}
.corner.br {
 bottom: -1px;
 right: -1px;
 transform: scale(-1, -1);
}

.hero-coord {
 font-size: 12px;
 color: var(--text-muted);
 margin-bottom: var(--s-3);
}
.hero-quote {
 margin-top: var(--s-4);
 max-width: 760px;
 font-size: 18px;
 line-height: 28px;
 color: var(--text-primary);
 border-left: 2px solid var(--accent-action);
 padding-left: var(--s-3);
}
.hero-actions {
 margin-top: var(--s-4);
 display: flex;
 gap: var(--s-2);
 flex-wrap: wrap;
}
.hero-meta {
 margin-top: var(--s-5);
 font-size: 12px;
 color: var(--text-muted);
 display: flex;
 gap: var(--s-2);
 flex-wrap: wrap;
}
.hero-meta .sep {
 color: var(--border-strong);
}

.scroll-cue {
 position: absolute;
 bottom: var(--s-3);
 right: var(--s-3);
 font-size: 11px;
 color: var(--text-muted);
}

/* ---------- FRONTIER SPLIT ---------- */
.split {
 display: grid;
 grid-template-columns: 1fr 1fr;
 border: 1px solid var(--border-line);
}
.wire-panel,
.project-panel {
 padding: var(--s-4);
}
.wire-panel {
 border-right: 1px solid var(--border-line);
 display: flex;
 flex-direction: column;
 justify-content: space-between;
 background: var(--bg-surface-1);
}
.wire-panel svg {
 width: 100%;
 height: auto;
}
.wire-panel figcaption {
 margin-top: var(--s-2);
 font-size: 11px;
 color: var(--text-muted);
}

/* wireframe strokes */
.wire .axis {
 stroke: var(--border-strong);
}
.wire .edge {
 stroke: var(--text-primary);
}
.wire .zone {
 stroke: var(--accent-logic);
 fill: rgba(0, 71, 171, 0.1);
}
.wire .depth {
 stroke: var(--text-muted);
 stroke-dasharray: 4 4;
}
.wire .ticks line {
 stroke: var(--border-strong);
}
.wire-label text {
 fill: var(--text-muted);
 font-family: var(--font-mono);
 font-size: 12px;
}

.project-panel .kicker {
 color: var(--accent-action);
 font-size: 12px;
 margin-bottom: var(--s-1);
}
.project-panel h3 {
 margin-bottom: var(--s-2);
}
.project-panel .lede {
 color: var(--text-primary);
 font-size: 18px;
 line-height: 28px;
 max-width: 460px;
}

.spec-list {
 list-style: none;
 margin: var(--s-3) 0;
 border-top: 1px solid var(--border-line);
}
.spec-list li {
 display: grid;
 grid-template-columns: 120px 1fr;
 gap: var(--s-2);
 padding: var(--s-2) 0;
 border-bottom: 1px solid var(--border-line);
 font-size: 12px;
}
.spec-list li span {
 color: var(--accent-logic);
}

/* ---------- PILLARS GRID ---------- */
.grid-3 {
 display: grid;
 grid-template-columns: repeat(3, 1fr);
 border: 1px solid var(--border-line);
 border-bottom: none;
}
.card {
 padding: var(--s-4);
 border-right: 1px solid var(--border-line);
 border-bottom: 1px solid var(--border-line);
 background: var(--bg-surface-1);
}
.card:last-child {
 border-right: none;
}
.card-num {
 color: var(--accent-action);
 font-size: 13px;
 margin-bottom: var(--s-2);
}
.card-title {
 font-family: var(--font-head);
 font-weight: 700;
 text-transform: uppercase;
 letter-spacing: -0.01em;
 font-size: 18px;
 margin-bottom: var(--s-2);
}
.card-body {
 color: var(--text-muted);
 font-size: 15px;
 line-height: 24px;
}

/* ---------- PIPELINE TABLE ---------- */
.sys-table {
 width: 100%;
 border-collapse: collapse;
 border: 1px solid var(--border-line);
}
.sys-table th,
.sys-table td {
 text-align: left;
 padding: var(--s-3) var(--s-2);
 border-bottom: 1px solid var(--border-line);
 vertical-align: top;
}
.sys-table thead th {
 font-size: 11px;
 color: var(--text-muted);
 background: var(--bg-surface-1);
 letter-spacing: 0.08em;
}
.sys-table tbody tr:last-child td {
 border-bottom: none;
}
.sys-table tbody tr:hover {
 background: var(--row-hover);
}
.mod {
 color: var(--text-primary);
 font-weight: 500;
 font-size: 13px;
}
.status {
 font-size: 11px;
 padding: 4px 8px;
 border: 1px solid currentColor;
}
.status-live {
 color: var(--accent-action);
}
.status-dev {
 color: var(--text-muted);
}

/* ---------- MANIFESTO ---------- */
.manifesto-quote {
 font-family: var(--font-head);
 font-weight: 600;
 font-size: clamp(20px, 3vw, 30px);
 line-height: 1.4;
 letter-spacing: -0.01em;
 border-left: 2px solid var(--accent-action);
 padding-left: var(--s-3);
 max-width: 960px;
 margin-bottom: var(--s-5);
}
.tenets {
 display: grid;
 grid-template-columns: 1fr 1fr;
 border: 1px solid var(--border-line);
 border-bottom: none;
}
.tenet {
 padding: var(--s-4);
 border-right: 1px solid var(--border-line);
 border-bottom: 1px solid var(--border-line);
}
.tenet:nth-child(2n) {
 border-right: none;
}
.tenet .mono {
 color: var(--accent-action);
 font-size: 12px;
 display: block;
 margin-bottom: var(--s-2);
}
.tenet p {
 color: var(--text-muted);
 font-size: 15px;
 line-height: 24px;
}

.signoff {
 margin-top: var(--s-4);
 padding-top: var(--s-3);
 border-top: 1px solid var(--border-line);
 font-size: 11px;
 color: var(--text-muted);
 word-break: break-word;
}

/* ============================================================
   FOOTER (TITLE BLOCK)
   ============================================================ */
.site-footer {
 position: relative;
 z-index: 1;
 border-top: 1px solid var(--border-line);
 background: var(--header-bg);
}
.footer-grid {
 max-width: 1440px;
 margin: 0 auto;
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 1px;
 background: var(--border-line);
}
.f-cell {
 background: var(--bg-base);
 padding: var(--s-3) var(--s-2);
 font-size: 12px;
 color: var(--text-primary);
 display: flex;
 gap: var(--s-2);
 align-items: baseline;
}
.f-label {
 color: var(--accent-action);
 font-size: 11px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
 .site-nav {
  display: none;
 }
 .split {
  grid-template-columns: 1fr;
 }
 .wire-panel {
  border-right: none;
  border-bottom: 1px solid var(--border-line);
 }
 .grid-3 {
  grid-template-columns: 1fr;
 }
 .card {
  border-right: none;
 }
 .tenets {
  grid-template-columns: 1fr;
 }
 .tenet {
  border-right: none;
 }
 .footer-grid {
  grid-template-columns: 1fr 1fr;
 }
}
@media (max-width: 560px) {
 :root {
  --header-h: 56px;
 }
 section {
  padding: var(--s-4) var(--s-2);
 }
 .hero-frame {
  padding: var(--s-3);
 }
 .spec-list li {
  grid-template-columns: 1fr;
  gap: 4px;
 }
 .footer-grid {
  grid-template-columns: 1fr;
 }
}

/* ============================================================
   SPANDREL PRODUCT PAGE
   ============================================================ */
.hero-product {
 min-height: calc(100vh - var(--header-h));
}
.product-sub {
 font-family: var(--font-head);
 font-weight: 700;
 text-transform: uppercase;
 letter-spacing: -0.01em;
 font-size: clamp(22px, 4vw, 40px);
 line-height: 1.1;
 color: var(--accent-action);
 margin-top: var(--s-1);
}
.hero-product .tag {
 margin-bottom: var(--s-3);
}

.arch-grid .card {
 display: flex;
 flex-direction: column;
}
.arch-grid .spec-list {
 margin-top: auto;
}

/* ---------- agent wire-ups ---------- */
.wire-grid {
 display: grid;
 grid-template-columns: minmax(360px, 42%) 1fr;
 border: 1px solid var(--border-line);
 margin-bottom: var(--s-3);
}
.wire-grid .wire-panel {
 border-right: 1px solid var(--border-line);
 background: var(--bg-surface-1);
}
.wire-panel .screenshot {
 width: 100%;
 height: auto;
 display: block;
 border: 1px solid var(--border-line);
}
.wire-grid-rev {
 direction: rtl;
}
.wire-grid-rev > * {
 direction: ltr;
}
.agent-body {
 padding: var(--s-4);
 display: flex;
 flex-direction: column;
 justify-content: center;
}
.agent-body .kicker {
 color: var(--accent-action);
 font-size: 12px;
 margin-bottom: var(--s-1);
}
.agent-body .card-title {
 margin-bottom: var(--s-2);
}

/* ---------- capabilities matrix ---------- */
.matrix-table td:nth-child(3) {
 color: var(--text-primary);
}
.matrix-table td:nth-child(2) {
 color: var(--text-muted);
}

/* ---------- terminal ---------- */
.terminal {
 border: 1px solid var(--border-line);
 background: var(--terminal-bg);
}
.term-bar {
 display: flex;
 align-items: center;
 gap: var(--s-1);
 padding: var(--s-2) var(--s-3);
 border-bottom: 1px solid var(--border-line);
 background: var(--bg-surface-1);
 font-size: 11px;
 color: var(--text-muted);
}
.term-dot {
 width: 8px;
 height: 8px;
 border: 1px solid var(--border-strong);
 border-radius: 0;
 display: inline-block;
}
.term-title {
 margin-left: var(--s-2);
}
.term-body {
 padding: var(--s-3);
 font-size: 13px;
 line-height: 22px;
 color: var(--text-primary);
 white-space: pre-wrap;
 min-height: 264px;
}
.term-body .t-sys {
 color: var(--accent-logic);
}
.term-body .t-thought {
 color: var(--text-muted);
}
.term-body .t-action {
 color: var(--accent-action);
}
.term-body .t-result {
 color: var(--text-primary);
}
.term-body .t-status {
 color: var(--accent-action);
}
.term-caret {
 display: inline-block;
 width: 8px;
 height: 15px;
 background: var(--accent-action);
 vertical-align: text-bottom;
}

.deploy-cta {
 margin-top: var(--s-4);
 display: flex;
 align-items: center;
 gap: var(--s-3);
 flex-wrap: wrap;
}
.deploy-note {
 font-size: 12px;
 color: var(--text-muted);
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
 html {
  scroll-behavior: auto;
 }
 * {
  transition: none !important;
 }
}

/* responsive additions for product page */
@media (max-width: 900px) {
 .wire-grid,
 .wire-grid-rev {
  grid-template-columns: 1fr;
  direction: ltr;
 }
 .wire-grid .wire-panel {
  border-right: none;
  border-bottom: 1px solid var(--border-line);
 }
}
