/* Sovereign Logic Systems LLC — Design system v3
   Restraint · precision · editorial hierarchy · no decorative AI patterns */

:root {
  --bg: #07090d;
  --bg-elevated: #0c1017;
  --surface: #111821;
  --line: #1a2330;
  --line-strong: #2a3548;
  --text: #eef2f6;
  --text-secondary: #9aa8b8;
  --text-tertiary: #8b9aab;
  --accent: #3b7ddd;
  --accent-hover: #5b9aef;
  --cipher-red: #c43c3c;
  --cipher-red-soft: rgba(196, 60, 60, 0.15);
  --warn: #c9922a;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 38rem;
  --max: 68rem;
  --header-h: 3.75rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --radius: 2px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 0.5rem 0.75rem; z-index: 300;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 42rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap-wide { max-width: 75rem; margin: 0 auto; padding: 0 1.25rem; }

/* ——— Header ——— */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(7, 9, 13, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 1.25rem;
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; color: var(--text); text-decoration: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 2.25rem; width: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text .co { font-size: 0.7rem; font-weight: 650; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text .tg { font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); margin-top: 0.1rem; }

.desk-nav { display: none; align-items: center; gap: 0.15rem; list-style: none; }
.desk-nav a {
  color: var(--text-secondary); font-size: 0.8125rem; font-weight: 500;
  padding: 0.45rem 0.65rem; border-radius: var(--radius);
}
.desk-nav a:hover, .desk-nav a:focus { color: var(--text); text-decoration: none; background: transparent; }
.desk-nav a.active { color: var(--text); }
.desk-nav .nav-cta {
  margin-left: 0.5rem; padding: 0.45rem 0.85rem;
  border: 1px solid var(--line-strong); color: var(--text) !important; font-weight: 600;
}
.desk-nav .nav-cta:hover { border-color: var(--accent); color: var(--accent-hover) !important; }

.hamburger {
  display: flex; background: transparent; border: 1px solid var(--line);
  width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; cursor: pointer;
  border-radius: var(--radius);
}
.hamburger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hamburger-lines { display: flex; flex-direction: column; gap: 5px; width: 1.1rem; }
.hamburger-lines span { display: block; height: 1.5px; background: var(--text); }

.nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 110; }
.nav-drawer {
  position: fixed; top: 0; right: 0; width: min(20rem, 92vw); height: 100%;
  background: var(--bg-elevated); border-left: 1px solid var(--line);
  z-index: 120; padding: 1rem; overflow-y: auto; padding-bottom: calc(1.5rem + var(--safe-b));
}
.nav-drawer[hidden], .nav-overlay[hidden] { display: none !important; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-weight: 650; font-size: 0.875rem; }
.drawer-close { background: 0; border: 0; color: var(--text); font-size: 1.75rem; width: 2.75rem; height: 2.75rem; cursor: pointer; }
.drawer-group { margin-bottom: 1.25rem; }
.drawer-label {
  font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-tertiary); font-weight: 650; margin-bottom: 0.35rem;
}
.nav-drawer a {
  display: block; padding: 0.7rem 0.5rem; color: var(--text);
  font-weight: 500; font-size: 0.9375rem; min-height: 2.75rem;
}
.nav-drawer a:hover, .nav-drawer a:focus { background: rgba(59,125,221,.08); text-decoration: none; }
.nav-drawer a.active { color: var(--accent-hover); }
.drawer-cta {
  background: var(--surface) !important; border: 1px solid var(--line-strong);
  text-align: center; font-weight: 650 !important; margin-top: 0.25rem;
}
body.nav-open { overflow: hidden; }

@media (min-width: 64rem) {
  :root { --header-h: 4rem; }
  .brand-logo { height: 2.5rem; }
  .brand-text .co { font-size: 0.75rem; }
  .desk-nav { display: flex; }
  .hamburger { display: none; }
}

/* ——— Type ——— */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-tertiary); font-weight: 500; margin-bottom: 0.75rem;
}
h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.15; font-weight: 700; letter-spacing: -0.025em;
  margin-bottom: 1rem;
}
h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 650; letter-spacing: -0.02em; line-height: 1.25;
  margin-bottom: 0.75rem;
}
h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-secondary); max-width: var(--measure);
  margin-bottom: 1.5rem; line-height: 1.55; font-weight: 400;
}
.sub { color: var(--text-secondary); max-width: var(--measure); margin-bottom: 1.5rem; font-size: 1rem; }
.tech-expand { color: var(--text-tertiary); font-size: 0.875rem; margin: -0.35rem 0 1rem; letter-spacing: 0.02em; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.15rem; font-weight: 600; font-size: 0.875rem;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  min-height: 2.75rem; border-radius: var(--radius);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-secondary); }
.btn-text { background: transparent; color: var(--text-secondary); border: 0; padding-left: 0.25rem; padding-right: 0.25rem; }
.btn-text:hover { color: var(--accent-hover); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.8125rem; min-height: 2.5rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.65rem; }

/* ——— Sections ——— */
.section { padding: var(--space-8) 0; border-bottom: 1px solid var(--line); }
.section-alt { background: var(--bg-elevated); }
.page-hero {
  padding: var(--space-7) 0 var(--space-6);
  border-bottom: 1px solid var(--line);
}
.breadcrumb { font-size: 0.8125rem; color: var(--text-tertiary); margin-bottom: 1rem; }
.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb span { color: var(--text-secondary); }

.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }

/* Cards — restrained, not "AI card soup" */
.card {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
}
.card p { color: var(--text-secondary); font-size: 0.9375rem; }
.tag {
  display: inline-block; font-family: var(--font-mono);
  font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-tertiary); font-weight: 500; margin-bottom: 0.6rem;
}
.tag-cipher { color: var(--cipher-red); }
.muted { color: var(--text-secondary); }
.disclaimer {
  margin-top: 1rem; font-size: 0.8125rem; color: var(--text-tertiary);
  border-left: 2px solid var(--line-strong); padding-left: 0.85rem; line-height: 1.5;
}

/* ——— Home hero — editorial, not template ——— */
.home-hero {
  padding: var(--space-8) 0 var(--space-7);
  border-bottom: 1px solid var(--line);
}
.home-hero .hero-logo { height: 3.25rem; width: auto; margin-bottom: 1.75rem; }
.home-hero h1 { max-width: 18ch; }
.home-hero .lead { margin-bottom: 2rem; }
.hero-rule {
  width: 3rem; height: 1px; background: var(--line-strong);
  margin: 0 0 1.75rem; border: 0;
}
.feat-block {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem; margin-top: 2.5rem; max-width: 36rem;
}
.feat-block .feat-label {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 0.5rem; display: block;
}
.feat-block h2 { font-size: clamp(1.2rem, 2.5vw, 1.45rem); margin-bottom: 0.35rem; }
.feat-block .feat-tag { font-size: 0.875rem; color: var(--text-tertiary); margin-bottom: 0.75rem; }
.feat-block p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.55; }

.cap-strip {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0; background: var(--bg);
}
.cap-strip-inner {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem;
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-tertiary); font-weight: 500;
}
.cap-dot { display: none; }

/* Pathway list — not big colored cards */
.path-list { list-style: none; border-top: 1px solid var(--line); }
.path-list li { border-bottom: 1px solid var(--line); }
.path-list a {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; padding: 1.1rem 0; color: var(--text); text-decoration: none;
}
.path-list a:hover { color: var(--accent-hover); }
.path-list .path-title { font-weight: 600; font-size: 0.95rem; }
.path-list .path-desc { color: var(--text-tertiary); font-size: 0.875rem; text-align: right; }

/* Problem as numbered list */
.problem-list { list-style: none; max-width: 36rem; }
.problem-list li {
  display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.75rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.problem-list li:first-child { border-top: 1px solid var(--line); }
.problem-n {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-tertiary);
  padding-top: 0.15rem;
}
.problem-list h3 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.problem-list p { color: var(--text-secondary); font-size: 0.875rem; margin: 0; }

/* Architecture flow */
.arch-flow { display: flex; flex-direction: column; align-items: stretch; max-width: 28rem; margin: 0 auto; gap: 0; }
.arch-node {
  border: 1px solid var(--line); padding: 0.9rem 1rem; background: var(--bg);
  text-align: left;
}
.arch-core { border-color: var(--line-strong); background: var(--surface); }
.arch-name { display: block; font-weight: 650; font-size: 0.875rem; }
.arch-desc { display: block; font-size: 0.75rem; color: var(--text-tertiary); margin-top: 0.15rem; }
.arch-arrow {
  font-family: var(--font-mono); color: var(--text-tertiary); font-size: 0.75rem;
  padding: 0.2rem 0 0.2rem 1rem; line-height: 1;
}
.arch-footnote { margin-top: 1.25rem; font-size: 0.8125rem; color: var(--text-tertiary); text-align: center; max-width: 32rem; margin-left: auto; margin-right: auto; }

.state-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.25rem 0; }
.state-chip {
  font-family: var(--font-mono); font-size: 0.65rem; padding: 0.4rem 0.65rem;
  border: 1px solid var(--line); color: var(--text-tertiary); letter-spacing: 0.04em;
}
.state-chip.on { border-color: var(--line-strong); color: var(--text-secondary); }

.level-tabs { display: flex; gap: 0.35rem; margin-bottom: 1rem; flex-wrap: wrap; }
.level-tabs button {
  background: transparent; border: 1px solid var(--line); color: var(--text-tertiary);
  padding: 0.55rem 0.85rem; font-weight: 600; font-size: 0.8125rem; cursor: pointer;
  min-height: 2.75rem; border-radius: var(--radius); font-family: var(--font);
}
.level-tabs button.active { border-color: var(--line-strong); color: var(--text); }
.level-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.level-panel[hidden] { display: none !important; }

/* Team */
.team-photo-wrap { width: 6.5rem; height: 6.5rem; margin-bottom: 1rem; }
.team-photo-img {
  width: 6.5rem; height: 6.5rem; border-radius: 50%; object-fit: cover;
  object-position: center 15%; border: 1px solid var(--line);
}
.team-photo-fallback {
  width: 6.5rem; height: 6.5rem; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-weight: 650; color: var(--text-tertiary); font-size: 1.25rem; font-family: var(--font-mono);
}
.team-photo-fallback[hidden] { display: none !important; }
.role { color: var(--text-secondary); font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.25rem; }
.role-sub { font-size: 0.75rem; color: var(--text-tertiary); margin-bottom: 0.75rem; }
.bio-short { color: var(--text-secondary); font-size: 0.9375rem; margin-bottom: 1rem; }
.bio-full { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.bio-full p { color: var(--text-secondary); font-size: 0.9375rem; margin-bottom: 0.75rem; }

/* Keep the full email readable on phones; wrap only at the @ boundary if needed. */
.contact-email {
  display: inline-block;
  max-width: 100%;
  font-size: clamp(0.875rem, 3.8vw, 1.05rem);
  font-weight: 600;
  margin: 0.5rem 0 1rem;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  color: var(--accent-hover);
}
/* Provide separation from the contact notice on compact screens. */
.contact-card .btn { margin-top: 0.8rem; }
.collab-cats, .rd-focus { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.collab-cats span, .rd-focus span {
  font-family: var(--font-mono); font-size: 0.65rem; padding: 0.4rem 0.7rem;
  border: 1px solid var(--line); color: var(--text-tertiary); letter-spacing: 0.04em;
}

.site-footer {
  background: var(--bg-elevated); border-top: 1px solid var(--line);
  padding: 2rem 0 calc(2rem + var(--safe-b)); font-size: 0.8125rem; color: var(--text-tertiary); text-align: center;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 1.25rem; margin-bottom: 1rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.8125rem; }
.footer-note { margin-top: 0.75rem; font-size: 0.75rem; max-width: 36rem; margin-left: auto; margin-right: auto; }

.error-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 3rem 1.25rem; }

/* Concept visualization */
.cipher-product-hero { border-bottom: 1px solid var(--line); }
.cipher-identity {
  width: min(17.5rem, 70vw); height: auto; margin: 0 auto 0.75rem;
}
@media (min-width: 45rem) {
  .cipher-identity { width: min(28rem, 42vw); }
}
.status-banner {
  display: inline-block; margin-top: 0.75rem; padding: 0.45rem 0.85rem;
  border: 1px solid var(--line-strong); font-family: var(--font-mono);
  font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary);
}
.concept-figure { margin: 0; }
.concept-expand-btn {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line);
  background: var(--bg); cursor: zoom-in; position: relative; overflow: hidden;
}
.concept-expand-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.concept-image { width: 100%; height: auto; }
.expand-hint {
  position: absolute; bottom: 0.75rem; right: 0.75rem;
  background: rgba(0,0,0,.8); color: #fff; font-size: 0.75rem; font-weight: 600;
  padding: 0.35rem 0.6rem; pointer-events: none; font-family: var(--font-mono);
}
.concept-caption { margin-top: 0.75rem; font-size: 0.8125rem; color: var(--text-tertiary); text-align: center; }
.disclaimer-card { border-left: 2px solid var(--line-strong); }
.concept-preview-link {
  display: block; text-decoration: none; border: 1px solid var(--line); overflow: hidden; background: var(--bg);
}
.concept-preview-link:hover { border-color: var(--line-strong); text-decoration: none; }
.concept-preview-img { width: 100%; height: auto; }
.concept-preview-cta {
  display: block; padding: 0.9rem 1rem; font-weight: 650; color: var(--text); font-size: 0.875rem;
  border-top: 1px solid var(--line);
}
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.94);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.lightbox[hidden] { display: none !important; }
.lightbox-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 0.75rem; right: 0.75rem; width: 3rem; height: 3rem;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
  font-size: 1.5rem; cursor: pointer;
}
.lightbox-close:hover, .lightbox-close:focus-visible { border-color: var(--text-secondary); outline: none; }
body.lightbox-open { overflow: hidden; }

@media (min-width: 45rem) {
  .section { padding: 5rem 0; }
  .page-hero { padding: 3.5rem 0 2.5rem; }
  .home-hero { padding: 5rem 0 4rem; }
}

.home-hero-grid {
  display: grid; gap: 2.5rem; align-items: start;
}
@media (min-width: 56rem) {
  .home-hero-grid { grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
}
.eng-diagram { width: 100%; height: auto; max-width: 26rem; }
.home-hero-viz { border: 1px solid var(--line); padding: 0.5rem; background: var(--bg-elevated); }
.status-table { border-top: 1px solid var(--line); max-width: 40rem; margin-top: 1rem; }
.status-row {
  display: grid; grid-template-columns: 10rem 1fr; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem;
}
.status-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); padding-top: 0.15rem; }
.status-value { color: var(--text-secondary); }
@media (max-width: 36rem) {
  .status-row { grid-template-columns: 1fr; gap: 0.25rem; }
}
.ed-section { max-width: 42rem; }
.ed-section + .ed-section { margin-top: 2.5rem; }
.compare-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.compare-row h3 { font-size: 0.9rem; margin-bottom: 0.35rem; }
.compare-row p { font-size: 0.875rem; color: var(--text-secondary); margin: 0; }
@media (max-width: 36rem) { .compare-row { grid-template-columns: 1fr; } }

/* Mobile conceptual sequence (readable) */
.eng-steps-mobile {
  display: none; list-style: none; margin: 0; padding: 0.75rem 0 0;
  font-size: 0.9375rem; line-height: 1.45;
}
.eng-steps-mobile li {
  display: flex; gap: 0.75rem; padding: 0.65rem 0;
  border-bottom: 1px solid var(--line); color: var(--text-secondary);
}
.eng-steps-mobile .n {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-tertiary);
  min-width: 1.25rem; padding-top: 0.15rem;
}
.eng-mobile-note {
  display: none; font-size: 0.8125rem; color: var(--text-tertiary);
  margin-top: 0.75rem; font-family: var(--font-mono);
}
@media (max-width: 47.99rem) {
  .eng-diagram-desktop { display: none; }
  .eng-steps-mobile, .eng-mobile-note { display: block; }
}
@media (min-width: 48rem) {
  .eng-steps-mobile, .eng-mobile-note { display: none !important; }
  .eng-diagram-desktop { display: block; }
}
