/* Engineering the Engineering — blueprint + redline identity */

:root {
  --bg:        #081E2D;   /* deep blueprint field */
  --panel:     #0C2A3E;   /* raised blueprint */
  --panel-2:   #0F3346;
  --line:      #CFE0E8;   /* white line-work (ink) */
  --ink:       #EAF2F6;   /* primary text */
  --muted:     #8FB0C2;   /* faded cyan */
  --faint:     #4E7589;   /* grid / hairlines */
  --redline:   #E4573D;   /* review mark */
  --redline-2: #F07A5C;
  --grid:      rgba(140, 185, 210, 0.07);
  --maxw:      1160px;
  --radius:    4px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--bg);
  /* faint engineering grid */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0; }
a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--redline); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

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

/* ---------- layout primitives ---------- */
.band {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 92px 24px;
  border-top: 1px solid rgba(140,185,210,0.14);
}
.band-head { max-width: 760px; margin-bottom: 52px; }
.band h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.band-sub { color: var(--muted); font-size: 1.12rem; margin-top: 20px; max-width: 66ch; }

.kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--redline-2);
  margin: 0 0 18px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; text-decoration: none;
  padding: 13px 22px; border-radius: var(--radius);
  border: 1px solid transparent; transition: transform .12s ease, background .18s ease, border-color .18s ease;
}
.btn-solid { background: var(--redline); color: #0b0b0b; }
.btn-solid:hover { background: var(--redline-2); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(207,224,232,0.35); color: var(--ink); }
.btn-ghost:hover { border-color: var(--line); background: rgba(207,224,232,0.06); }
.btn-lg { padding: 18px 28px; font-size: 1.1rem; font-family: "IBM Plex Mono", monospace; letter-spacing: 0.01em; max-width: 100%; overflow-wrap: anywhere; text-align: center; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
  background: rgba(8,30,45,0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(140,185,210,0.14);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; color: var(--line); flex: none; }
.brand-name { font-weight: 800; letter-spacing: -0.01em; font-size: 1.02rem; }
.topnav { display: flex; align-items: center; gap: 26px; }
.topnav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; }
.topnav a:hover { color: var(--ink); }
.topnav .btn-ghost { padding: 9px 16px; }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: 72px 24px 84px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.hero-copy, .hero-sheet { min-width: 0; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.1rem); letter-spacing: -0.035em; }
.hero .lede { color: var(--muted); font-size: 1.22rem; margin-top: 26px; max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-note { margin-top: 22px; color: var(--faint); font-size: 0.95rem; }

/* hero sheet (the single-line + findings) */
.hero-sheet {
  margin: 0;
  background: var(--panel);
  border: 1px solid rgba(140,185,210,0.22);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.sld { display: block; width: 100%; height: auto; background:
  linear-gradient(rgba(140,185,210,0.06) 1px, transparent 1px),
  linear-gradient(90deg, rgba(140,185,210,0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  padding: 10px 6px 0;
}
.sld .tag { font-family: "IBM Plex Mono", monospace; font-size: 10px; fill: var(--muted); stroke: none; letter-spacing: 0.02em; }
.sld .sym { font-family: "Archivo", sans-serif; font-size: 13px; font-weight: 600; fill: var(--line); stroke: none; }

.redline .flag-ring {
  stroke-dasharray: 170;
  stroke-dashoffset: 170;
  animation: draw 0.9s ease forwards;
  opacity: 0;
}
.redline .flag-ring:nth-child(1) { animation-delay: 0.5s; }
.redline .flag-ring:nth-child(2) { animation-delay: 0.95s; }
.redline .flag-ring:nth-child(3) { animation-delay: 1.4s; }
@keyframes draw { to { stroke-dashoffset: 0; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .redline .flag-ring { animation: none; stroke-dashoffset: 0; opacity: 1; }
}

.sheet-findings {
  border-top: 1px solid rgba(140,185,210,0.2);
  background: var(--panel-2);
  padding: 20px 22px;
}
.sheet-findings ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.sheet-findings li {
  font-size: 0.92rem; color: var(--ink);
  padding-left: 16px; position: relative;
}
.sheet-findings li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--redline);
}
.sheet-findings .code {
  font-family: "IBM Plex Mono", monospace; font-size: 0.8rem;
  color: var(--redline-2); margin-right: 6px;
}

/* ---------- problem ---------- */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(140,185,210,0.14); border: 1px solid rgba(140,185,210,0.14); border-radius: var(--radius); overflow: hidden; }
.prob { background: var(--bg); padding: 30px 26px; }
.prob h3 { font-size: 1.18rem; margin-bottom: 12px; }
.prob p { color: var(--muted); font-size: 1rem; }

/* ---------- how / steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(140,185,210,0.14); border: 1px solid rgba(140,185,210,0.14); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--bg); padding: 34px 30px; }
.step-no { font-family: "IBM Plex Mono", monospace; color: var(--redline-2); font-size: 0.95rem; display: block; margin-bottom: 16px; }
.step h3 { font-size: 1.32rem; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 1.02rem; max-width: 46ch; }

/* ---------- claude ---------- */
.claude-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: start; }
.claude-copy, .claude-split { min-width: 0; }
.claude h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-top: 6px; }
.claude-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 22px; }
.claude-list li { color: var(--muted); font-size: 1.05rem; padding-left: 22px; position: relative; border-left: 2px solid var(--redline); }
.claude-list li strong { color: var(--ink); font-weight: 600; }

.claude-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: rgba(140,185,210,0.16);
  border: 1px solid rgba(140,185,210,0.16);
  border-radius: var(--radius); overflow: hidden;
  position: sticky; top: 90px;
}
.split-col { background: var(--panel); padding: 24px 20px; }
.split-col:last-child { background: var(--panel-2); }
.split-label { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; letter-spacing: 0.06em; color: var(--redline-2); margin: 0 0 16px; }
.split-col:first-child .split-label { color: var(--muted); }
.split-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.split-col li { font-size: 0.92rem; color: var(--ink); line-height: 1.35; }

/* ---------- founder ---------- */
.founder-body { max-width: 72ch; display: grid; gap: 20px; }
.founder-body p { color: var(--muted); font-size: 1.1rem; }
.founder-body strong { color: var(--ink); font-weight: 600; }

/* ---------- access ---------- */
.access { text-align: left; }
.access-inner { max-width: 720px; }
.access h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
.access .band-sub { margin-bottom: 34px; }

/* ---------- title block footer ---------- */
.titleblock {
  max-width: var(--maxw); margin: 40px auto 48px; padding: 0 24px;
  display: grid; grid-template-columns: 2fr 2fr 1fr 1fr;
}
.tb-cell {
  min-width: 0;
  border: 1px solid rgba(140,185,210,0.22);
  border-right-width: 0;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--panel);
}
.tb-cell:last-child { border-right-width: 1px; }
.tb-label { font-family: "IBM Plex Mono", monospace; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.tb-value { font-size: 0.98rem; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.tb-value:hover { color: var(--redline-2); }
.tb-sub { font-size: 0.82rem; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 44px; }
  .claude-inner { grid-template-columns: 1fr; gap: 40px; }
  .claude-split { position: static; }
  .problem-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .topnav a:not(.btn) { display: none; }
  .titleblock { grid-template-columns: 1fr 1fr; }
  .tb-cell { border-right-width: 1px; border-bottom-width: 0; }
  .tb-cell:nth-last-child(-n+2) { border-bottom-width: 1px; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .band { padding: 64px 20px; }
  .hero { padding: 36px 20px 60px; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.6rem); }
  .hb { display: none; }
  .topnav { display: none; }
  .brand-name { font-size: 0.95rem; }
  .btn-lg { font-size: 0.82rem; padding: 16px 18px; }
}
@media (max-width: 360px) {
  .band, .hero { padding-left: 16px; padding-right: 16px; }
  .btn-lg { font-size: 0.72rem; letter-spacing: 0; padding: 15px 14px; }
  .titleblock { grid-template-columns: 1fr; }
  .tb-cell { border-right-width: 1px; border-bottom-width: 0; }
  .tb-cell:last-child { border-bottom-width: 1px; }
}
