/* ==========================================================================
   LawNet - marketing surface stylesheet
   Brand system: brand/brand-system.md (blue #1d4ed8, near-black ground,
   Spectral / IBM Plex Sans / IBM Plex Mono, quiet + precise).
   Fonts vendored locally as woff2 (no CDN) for the confidentiality posture.
   ========================================================================== */

/* ---- vendored fonts ---------------------------------------------------- */
@font-face {
  font-family: 'Spectral';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/spectral-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Spectral';
  font-style: italic; font-weight: 400; font-display: swap;
  src: url('/fonts/spectral-regular-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Spectral';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('/fonts/spectral-semibold.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/ibm-plex-sans-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/fonts/ibm-plex-sans-medium.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('/fonts/ibm-plex-sans-semibold.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/ibm-plex-mono-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/fonts/ibm-plex-mono-medium.woff2') format('woff2');
}

/* ---- tokens ------------------------------------------------------------ */
:root {
  /* ground (near-black neutral ramp; one system, do not fork it) */
  --bg:        #05060A;   /* marketing splash ground */
  --panel:     #0A0C11;   /* card / product ground */
  --panel-2:   #0D1017;
  --line:      rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);

  /* ink */
  --text:       #E8EAF1;
  --text-muted: #9BA2B4;
  --text-faint: #656C7E;

  /* brand blue (the deliberate inversion) */
  --brand:        #1d4ed8;
  --brand-strong: #1e3a8a;
  --brand-tint:   #93b4f5;

  /* inherited state palette (the report language) */
  --verified: #3DD68C;   /* green, earned */
  --open:     #F5A524;   /* amber, flag for review */
  --working:  #6C95EB;   /* blue, swarm at work */
  --contested:#E5484D;   /* red, the finding */
  --neutral:  #6C7383;   /* gray */

  --maxw: 1120px;
  --measure: 64ch;
  --radius: 0;   /* SciNet design language: square corners everywhere, no pills */
}

/* ---- reset / base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Spectral', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--brand-tint); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

::selection { background: rgba(29, 78, 216, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand-tint);
  outline-offset: 3px;
}

/* ---- layout primitives ------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

section { position: relative; }
.section-pad { padding-block: clamp(3.25rem, 6vw, 5.25rem); }

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

/* eyebrow: mono label with a leading blue tick */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--brand);
  display: inline-block;
}

.lede { color: var(--text-muted); max-width: var(--measure); font-size: 1.08rem; }

/* ---- mark / wordmark --------------------------------------------------- */
.mark { color: var(--brand); display: block; }
.mark path { fill: none; stroke: currentColor; }
.mark circle { fill: currentColor; }

.wordmark {
  display: inline-flex; align-items: center; gap: 0.7rem;
  color: var(--text); text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.wordmark { gap: 0.55rem; }
.wordmark .mark { width: auto; height: 22px; }
.wordmark .word {
  font-family: 'Spectral', Georgia, 'Times New Roman', serif;
  font-weight: 600; font-size: 1.9rem; letter-spacing: 0; line-height: 1;
}

/* ---- header ------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.header-right { display: flex; align-items: center; gap: 1.4rem; }
.tag {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--line); border-radius: 0;
  padding: 0.34em 0.8em;
}
.header-right .nav-link { color: var(--text); font-size: 0.95rem; }
@media (max-width: 620px) { .tag { display: none; } }

/* ---- buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500; font-size: 0.98rem;
  padding: 0.72em 1.35em; border-radius: 0;
  cursor: pointer; border: 1px solid transparent;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #2559e6; text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.22); text-decoration: none; background: rgba(255,255,255,0.02); }
.btn-arrow { transition: transform 140ms ease; }
.btn:hover .btn-arrow { transform: translateX(2px); }

/* ---- hero -------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero .wrap { padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 6vw, 5rem); }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(29,78,216,0.22), transparent 70%),
    radial-gradient(40% 40% at 82% 20%, rgba(29,78,216,0.10), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 2.2rem; }
.hero-mark { width: clamp(78px, 12vw, 120px); height: auto; color: var(--brand); }
@media (prefers-reduced-motion: no-preference) {
  .hero-mark { animation: markrise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}
@keyframes markrise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.hero h1 {
  font-size: clamp(2.35rem, 5.6vw, 4.15rem);
  max-width: 20ch;
}
.hero h1 .accent { color: var(--brand-tint); }
.hero-sub {
  color: var(--text-muted); max-width: 60ch;
  font-size: clamp(1.05rem, 1.8vw, 1.22rem); line-height: 1.6;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.hero-note {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.75rem; letter-spacing: 0.06em; color: var(--text-faint);
  display: inline-flex; align-items: center; gap: 0.6em;
}
.hero-note .dot {
  width: 7px; height: 7px; border-radius: 0; background: var(--working);
  box-shadow: 0 0 0 0 rgba(108,149,235,0.6);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-note .dot { animation: pulse 2.6s ease-in-out infinite; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108,149,235,0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(108,149,235,0); }
}

/* ---- generic section head ---------------------------------------------- */
.section-head { max-width: 40ch; margin-bottom: 2.4rem; }
.section-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
.section-head .lede { margin-top: 1.1rem; }

/* ---- stakes / stat ----------------------------------------------------- */
.stakes-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 860px) { .stakes-grid { grid-template-columns: 1fr; } }
.stakes-body p + p { margin-top: 1.1rem; }
.stakes-body h2 + p { margin-top: 1.4rem; }
.stakes-body .text { color: var(--text-muted); }
.stakes-body .lead-claim { color: var(--text); font-size: 1.14rem; }

.statcard {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.7rem;
}
.statcard .n {
  font-family: 'Spectral', serif; font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1; color: var(--text);
  letter-spacing: -0.02em;
}
.statcard .n .plus { color: var(--contested); }
.statcard .k {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.74rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted);
  margin-top: 0.9rem;
}
.statcard .src { margin-top: 1.2rem; font-size: 0.85rem; color: var(--text-faint); }
.statcard .src a { color: var(--text-muted); }

/* ---- the loop (numbered steps) ----------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--panel); padding: 1.7rem 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; }
.step .num {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.1em; color: var(--brand-tint);
}
.step h3 { font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; font-size: 1.06rem; letter-spacing: 0; }
.step p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.55; }
.loop-note {
  margin-top: 1.6rem; font-size: 0.95rem; color: var(--text-muted);
  border-left: 2px solid var(--brand); padding-left: 1rem; max-width: 62ch;
}
.loop-note strong { color: var(--text); font-weight: 600; }
.loop-note.muted { margin-top: 2.4rem; border-color: var(--neutral); }

/* ---- lenses grid ------------------------------------------------------- */
.lens-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
@media (max-width: 720px) { .lens-grid { grid-template-columns: 1fr; } }
.lens {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem; transition: border-color 160ms ease, transform 160ms ease;
}
.lens:hover { border-color: rgba(147,180,245,0.3); transform: translateY(-2px); }
.lens .lens-k {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-tint);
  display: flex; align-items: center; gap: 0.6em; margin-bottom: 0.9rem;
}
.lens .lens-k::before { content: ""; width: 8px; height: 8px; border-radius: 0; background: currentColor; }
.lens h3 { font-family: 'Spectral', serif; font-size: 1.35rem; margin-bottom: 0.5rem; }
.lens p { color: var(--text-muted); font-size: 0.97rem; }

/* ---- report panel (illustrative) --------------------------------------- */
.report {
  margin-top: 1rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; font-family: 'IBM Plex Mono', monospace;
}
.report-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.015);
}
.report-bar .title { font-size: 0.8rem; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; }
.report-bar .illus {
  font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-faint); border: 1px solid var(--line); border-radius: 0; padding: 0.28em 0.7em;
}
.finding { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line-soft); align-items: start; }
.finding:last-child { border-bottom: 0; }
.chip {
  font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
  padding: 0.32em 0.6em; border-radius: 0; white-space: nowrap; margin-top: 0.15rem;
}
.chip.verified { color: var(--verified); background: rgba(61,214,140,0.10); border: 1px solid rgba(61,214,140,0.25); }
.chip.contested{ color: var(--contested); background: rgba(229,72,77,0.10); border: 1px solid rgba(229,72,77,0.25); }
.chip.open     { color: var(--open); background: rgba(245,165,36,0.10); border: 1px solid rgba(245,165,36,0.25); }
.chip.neutral  { color: var(--neutral); background: rgba(108,115,131,0.10); border: 1px solid rgba(108,115,131,0.25); }
.finding .f-body { font-family: 'IBM Plex Sans', sans-serif; font-size: 0.95rem; line-height: 1.5; }
.finding .f-body .cite { font-family: 'IBM Plex Mono', monospace; color: var(--text); font-size: 0.88rem; }
.finding .f-body .note { color: var(--text-muted); display: block; margin-top: 0.2rem; font-size: 0.9rem; }

/* ---- honesty rows ------------------------------------------------------ */
.honesty { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.hrow { background: var(--panel); padding: 1.5rem 1.6rem; display: grid; grid-template-columns: 150px 1fr; gap: 1.4rem; align-items: baseline; }
@media (max-width: 640px) { .hrow { grid-template-columns: 1fr; gap: 0.5rem; } }
.hrow .h-key { font-family: 'IBM Plex Mono', monospace; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 0.55em; }
.hrow .h-key::before { content: ""; width: 9px; height: 9px; border-radius: 0; background: currentColor; }
.hrow.k-verified .h-key { color: var(--verified); }
.hrow.k-open     .h-key { color: var(--open); }
.hrow.k-never    .h-key { color: var(--contested); }
.hrow .h-text { color: var(--text-muted); }
.hrow .h-text strong { color: var(--text); font-weight: 600; }

/* ---- independence pull -------------------------------------------------- */
.pull {
  font-family: 'Spectral', serif; font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  line-height: 1.28; color: var(--text); max-width: 22ch; font-weight: 600;
}
.independence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 820px) { .independence-grid { grid-template-columns: 1fr; } }
.independence-body p { color: var(--text-muted); }
.independence-body p + p { margin-top: 1.1rem; }

/* ---- lineage / SciNet strip -------------------------------------------- */
.lineage-section { padding-block: clamp(2.75rem, 5vw, 4rem); }
.lineage {
  max-width: 660px; margin-inline: auto; text-align: center;
  display: grid; gap: 1.05rem; justify-items: center;
}
.scinet-lockup { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.scinet-lockup:hover { text-decoration: none; }
.scinet-lockup:hover .scinet-word { opacity: 0.85; }
.scinet-mark { width: auto; height: 30px; display: block; }
.scinet-word {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500; font-size: 1.15rem; letter-spacing: 0.2em; padding-left: 0.05em;
  transition: opacity 140ms ease;
}
.scinet-word .s-sci { color: var(--text); }
.scinet-word .s-net { color: #FF2E2E; }
.lineage-text { color: var(--text-muted); max-width: 58ch; font-size: 1.02rem; line-height: 1.6; }
.lineage-text strong { color: var(--text); font-weight: 600; }
.lineage-link {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-tint);
}

/* ---- CTA / early access ------------------------------------------------- */
.cta { position: relative; overflow: hidden; border-top: 1px solid var(--line-soft); }
.cta-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(50% 70% at 50% 120%, rgba(29,78,216,0.18), transparent 70%); }
.cta .wrap { position: relative; z-index: 1; }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; } }
.cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.cta .lede { margin-top: 1.2rem; }
.cta ul { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.cta li { display: flex; gap: 0.7em; color: var(--text-muted); font-size: 0.97rem; }
.cta li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 0.55em; background: var(--brand); }

/* form */
.form { display: grid; gap: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.field { display: grid; gap: 0.4rem; }
.field label {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted);
}
.field input, .field textarea, .field select {
  font-family: 'IBM Plex Sans', sans-serif; font-size: 0.98rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 0;
  padding: 0.7em 0.85em; width: 100%;
}
.field textarea { resize: vertical; min-height: 92px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29,78,216,0.18); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.form .btn-primary { justify-content: center; margin-top: 0.3rem; }
.form-fine { font-size: 0.8rem; color: var(--text-faint); line-height: 1.5; }
.hp { position: absolute; left: -9999px; opacity: 0; }

/* ---- footer ------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line-soft); padding-block: 3rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: start; }
.footer-tag { color: var(--text-muted); font-size: 0.95rem; max-width: 42ch; margin-top: 0.9rem; }
.footer-legal { max-width: 46ch; }
.footer-legal p {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; line-height: 1.7;
  color: var(--text-faint); letter-spacing: 0.02em;
}
.footer-legal p + p { margin-top: 0.8rem; }
.footer-copy { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; color: var(--text-faint); letter-spacing: 0.06em; margin-top: 2.2rem; }

/* ---- success page ------------------------------------------------------ */
.centered { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.centered .box { max-width: 46ch; display: grid; gap: 1.4rem; justify-items: center; padding: 24px; }
.centered .mark { width: 66px; }
.centered h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.centered p { color: var(--text-muted); }
