@font-face {
  font-family: "Manrope";
  src: url("assets/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --ink: #1C3657;
  --text: #3B4A5C;
  --muted: #5C6B7D;
  --line: #DCE2E9;
  --blue: #2A6A9E;
  --blue-soft: #DCE8F3;
  --orange: #B9540F;
  --on-orange: #FFFFFF;
  --band: #1C3657;
  --on-band: #F2F5F8;
  --on-band-muted: #C3CFDC;
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121B27;
    --surface: #1A2636;
    --ink: #F2F5F8;
    --text: #C9D4E0;
    --muted: #9AA8B8;
    --line: #2B3B50;
    --blue: #7AB0E0;
    --blue-soft: #22364D;
    --orange: #E8762B;
    --on-orange: #121B27;
    --band: #1A2636;
    --on-band: #F2F5F8;
    --on-band-muted: #B8C4D2;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.prose { max-width: 66ch; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 34px; height: 37px; }
.brand span { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
.nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--text); font-weight: 600; font-size: 1rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 8px; }

/* buttons */
.btn { display: inline-block; font-weight: 700; font-size: 1rem; text-decoration: none; padding: 14px 24px; border-radius: 10px; line-height: 1.2; }
.btn-primary { background: var(--orange); color: var(--on-orange); }
.btn-primary:hover { color: var(--on-orange); filter: brightness(1.08); }
.btn-quiet { color: var(--ink); border: 1.5px solid var(--line); }
.btn-quiet:hover { border-color: var(--ink); }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }

/* sections */
section { padding: 96px 0; }
section + section { border-top: 1px solid var(--line); }
.lead { font-size: 1.25rem; line-height: 1.55; color: var(--text); margin-top: 24px; max-width: 58ch; }
.section-head { max-width: 62ch; margin-bottom: 48px; }
.section-head p { margin-top: 18px; }

/* hero */
.hero { padding: 88px 0 96px; }
.hero-home .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }

/* the dialect panel: the one bold element */
.dialect { background: var(--surface); border: 1.5px solid var(--orange); border-radius: 18px; padding: 36px 36px 30px; }
.dialect .term { font-size: clamp(2.6rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.dialect .term-note { color: var(--muted); font-size: 0.95rem; margin-top: 8px; }
.dialect ul { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; }
.dialect li { display: grid; grid-template-columns: 56px 64px 1fr; align-items: center; gap: 14px; }
.sys { font-weight: 800; color: var(--blue); font-size: 1rem; letter-spacing: 0.02em; }
.link { position: relative; height: 4px; }
.link::before { content: ""; position: absolute; inset: 0; border-top: 4px dotted var(--muted); opacity: 0.6; }
.link::after { content: ""; position: absolute; inset: 0; background: var(--blue); border-radius: 2px; transform-origin: left; animation: resolve 900ms ease-out both; }
.dialect li:nth-child(2) .link::after { animation-delay: 350ms; }
.dialect li:nth-child(3) .link::after { animation-delay: 700ms; }
@keyframes resolve { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.meaning { color: var(--ink); font-size: 1rem; line-height: 1.45; }
.dialect .footnote { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
@media (prefers-reduced-motion: reduce) { .link::after { animation: none; } }

/* problem: three plain columns, not cards */
.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.columns > div { border-top: 3px solid var(--ink); padding-top: 20px; }
.columns p { margin-top: 10px; }
.stat { margin-top: 56px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.stat strong { font-size: clamp(2.6rem, 5vw, 3.6rem); color: var(--ink); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stat > span { max-width: 44ch; line-height: 1.4; }
.source { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 6px; }

/* steps: a real sequence, so numbered, joined by a line that resolves */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; counter-reset: step; position: relative; }
.steps li { counter-increment: step; position: relative; padding-top: 64px; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--surface); background: var(--ink); }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 21px; left: 56px; right: -28px; border-top: 3px dotted var(--muted); opacity: 0.7; }
.steps li:nth-child(2):not(:last-child)::after { border-top-style: dashed; }
.steps h3 { margin-bottom: 10px; }

/* deployment */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.checks li { padding-left: 34px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 9px; width: 16px; height: 16px; border: 3px solid var(--blue); border-radius: 3px; transform: rotate(45deg) scale(0.8); }
.checks strong { color: var(--ink); }

/* band */
.band { background: var(--band); color: var(--on-band-muted); border-top: 0; }
.band h2 { color: var(--on-band); }
.band p { max-width: 60ch; margin-top: 18px; font-size: 1.15rem; }
section + .band { border-top: 0; }

/* tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 1rem; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); font-weight: 700; }
td:first-child { font-weight: 700; color: var(--blue); white-space: nowrap; }

/* flow list on how-it-works */
.flow { list-style: none; padding: 0; margin: 0; counter-reset: flow; display: grid; gap: 0; }
.flow li { counter-increment: flow; display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.flow li::before { content: counter(flow); font-size: 1.6rem; font-weight: 800; color: var(--blue); line-height: 1.2; }
.flow h3 { margin-bottom: 6px; }

.people { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.people h3 { margin-bottom: 4px; }
.people .role { color: var(--muted); font-weight: 600; margin-bottom: 12px; }

.contact-mail { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; color: var(--ink); text-decoration-color: var(--orange); }

.legal h2 { font-size: 1.5rem; margin-top: 48px; margin-bottom: 12px; }
.legal p, .legal li { max-width: 70ch; }
.legal ul { padding-left: 22px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 56px; font-size: 0.95rem; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; }
.site-footer .brand span { font-size: 1.15rem; }
.site-footer .brand img { width: 26px; height: 28px; }
.site-footer p { margin-top: 12px; max-width: 46ch; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; align-content: start; }
.footer-links a { color: var(--text); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .hero-home .wrap, .split, .people { grid-template-columns: 1fr; gap: 48px; }
  .columns, .steps { grid-template-columns: 1fr; }
  .steps li:not(:last-child)::after { display: none; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  section { padding: 72px 0; }
}
@media (max-width: 520px) {
  .dialect { padding: 26px 22px; }
  .dialect li { grid-template-columns: 48px 1fr; }
  .dialect .link { display: none; }
  .nav { gap: 18px; }
}
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--on-orange); text-decoration: none; }
.wrap.prose { max-width: var(--max); }
.wrap.prose > * { max-width: 66ch; }

/* ---------- imagery ---------- */
:root { --bg-rgb: 247, 248, 250; --band-rgb: 28, 54, 87; }
@media (prefers-color-scheme: dark) { :root { --bg-rgb: 18, 27, 39; --band-rgb: 18, 27, 39; } }

/* home: the robot photo sits behind the problem section, faded from the left */
.photo-section { position: relative; overflow: hidden; }
.photo-section::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(var(--bg-rgb), 1) 28%, rgba(var(--bg-rgb), 0.82) 56%, rgba(var(--bg-rgb), 0.62) 80%, rgba(var(--bg-rgb), 0.3) 100%),
    linear-gradient(0deg, rgba(var(--bg-rgb), 0.85) 0%, rgba(var(--bg-rgb), 0) 30%),
    var(--photo, url("assets/photo-robot.jpg"));
  background-size: cover; background-position: right center;
}
@media (min-width: 900px) and (hover: hover) { .photo-section::before { background-attachment: fixed; } }
.photo-section > .wrap { position: relative; z-index: 1; }

/* band with the production-line photo under a navy tint */
.band.photo-band {
  background-image: linear-gradient(rgba(var(--band-rgb), 0.82), rgba(var(--band-rgb), 0.82)), url("assets/photo-line.jpg");
  background-size: cover; background-position: center 40%;
}

/* about: wide photo */
.photo-banner { padding: 0 0 96px; border-top: 0; }
.photo-banner img { width: 100%; height: clamp(260px, 38vw, 460px); object-fit: cover; border-radius: 18px; }

/* ---------- schematic ---------- */
.schematic-split { align-items: center; }
.schematic-wrap { max-width: 560px; width: 100%; justify-self: end; }
.schematic { width: 100%; height: auto; display: block; font-family: inherit; }
.schematic .c-dot { stroke: var(--muted); stroke-width: 2.5; stroke-dasharray: 1 6; stroke-linecap: round; opacity: 0.8; }
.schematic .c-solid { stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; }
.schematic .s-box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.schematic .s-name { fill: var(--ink); font-weight: 700; font-size: 17px; }
.schematic .s-term { fill: var(--muted); font-size: 13.5px; }
.schematic .c-box { fill: var(--ink); stroke: var(--orange); stroke-width: 2; }
.schematic .c-name { fill: var(--bg); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.schematic .c-term { fill: var(--bg); font-size: 13px; opacity: 0.85; }
.schematic .silo { cursor: pointer; outline: none; }
.schematic .silo:focus-visible .s-box { stroke: var(--orange); stroke-width: 2.5; }
.schematic .silo.active .s-box { stroke: var(--orange); stroke-width: 2.5; }
.schematic .silo.active .c-dot, .schematic .silo.active .c-solid { stroke: var(--orange); }
.schematic-caption { color: var(--muted); font-size: 0.95rem; margin-top: 18px; max-width: 46ch; }
@media (max-width: 900px) { .schematic-wrap { justify-self: start; } }

/* system dialog */
.sys-dialog { width: min(560px, calc(100vw - 32px)); border: 1.5px solid var(--orange); border-radius: 16px; padding: 0; background: var(--surface); color: var(--text); }
.sys-dialog::backdrop { background: rgba(18, 27, 39, 0.55); }
.sys-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.sys-kicker { color: var(--blue); font-weight: 800; font-size: 0.95rem; }
.sys-title { color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.sys-close { background: none; border: 1.5px solid var(--line); color: var(--ink); border-radius: 8px; width: 36px; height: 36px; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.sys-close:hover { border-color: var(--ink); }
.sys-body { padding: 18px 22px 6px; }
.m-table { width: 100%; min-width: 0; border-collapse: collapse; font-size: 0.92rem; }
.m-table th, .m-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; color: var(--text); }
.m-table th { color: var(--muted); width: 44%; }
.m-table td:first-child { font-weight: 400; color: var(--text); white-space: normal; }
.m-table tr.hit th, .m-table tr.hit td { background: var(--blue-soft); color: var(--ink); font-weight: 700; }
.m-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.85rem; }
.m-sheet th { width: 2.2em; text-align: center; background: var(--bg); }
.m-sheet tr:first-child td { background: var(--bg); color: var(--muted); text-align: center; }
.m-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--blue); color: var(--surface); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.02em; }
.m-chat { padding: 6px 0 10px; }
.m-who { color: var(--muted); font-size: 0.85rem; margin-bottom: 6px; }
.m-bubble { display: inline-block; background: var(--blue-soft); color: var(--ink); padding: 10px 14px; border-radius: 14px 14px 14px 4px; max-width: 90%; }
.sys-note { padding: 10px 22px 0; color: var(--muted); font-size: 0.92rem; }
.sys-map { margin: 14px 22px 20px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text); font-size: 0.95rem; display: flex; align-items: center; gap: 10px; }
.sys-map strong { color: var(--ink); }
.sys-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex: none; }

/* ---------- review screen mock ---------- */
.review { background: var(--surface); border: 1.5px solid var(--orange); border-radius: 16px; overflow: hidden; font-size: 0.95rem; }
.review-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); color: var(--muted); }
.review-bar strong { color: var(--ink); }
.review-body { padding: 20px; display: grid; gap: 18px; }
.records { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.record { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.record .src { color: var(--muted); font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.record .nm { color: var(--ink); font-weight: 700; }
.record .diff { background: var(--blue-soft); border-radius: 3px; box-shadow: 0 0 0 2px var(--blue-soft); }
.evidence { display: grid; gap: 8px; }
.evidence p { padding-left: 22px; position: relative; }
.evidence p::before { content: ""; position: absolute; left: 2px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.evidence p.flag::before { background: var(--orange); }
.conf { display: flex; align-items: center; gap: 12px; }
.conf-track { flex: 1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.conf-fill { height: 100%; width: 96%; background: var(--blue); }
.conf strong { color: var(--ink); }
.review-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.review-actions span { padding: 9px 16px; border-radius: 8px; font-weight: 700; font-size: 0.9rem; border: 1.5px solid var(--line); color: var(--ink); }
.review-actions .yes { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 640px) { .records { grid-template-columns: 1fr; } }

.photo-section.press { --photo: url("assets/photo-press.jpg"); }
.photo-section.press .wrap { min-height: 360px; display: flex; flex-direction: column; justify-content: center; }
.portrait { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; margin-bottom: 22px; }
