/* a white lab-lair with a small black cortex floating over the desk. Graphite for every line, vermilion only for the live service nodes and the primary action. */
:root {
  --white: #f8f8f6; --wall: #efefec; --paper: #ffffff; --ink: #141516; --ink-2: #53565c; --rule: #d9d9d4; --rule-2: #c4c4be;
  --laser: #cf3916; --laser-deep: #a92c0f; --error: #b42318;
  --sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --morph-ease: cubic-bezier(.33, .1, .2, 1); /* matches the cortex morph curve in engine.js */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--rule-2) var(--white); }
body { margin: 0; background: var(--white); color: var(--ink); font: 17px/1.62 var(--sans); font-variation-settings: "wdth" 100; -webkit-font-smoothing: antialiased; }
::selection { background: var(--ink); color: var(--white); }
:focus-visible { outline: 2px solid var(--laser); outline-offset: 3px; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
h1, h2 { font-variation-settings: "wdth" 118; letter-spacing: -.025em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.05; }
h3 { font-size: 1.22rem; line-height: 1.25; font-weight: 600; font-variation-settings: "wdth" 108; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin: 0 auto; }
.wrap-narrow { max-width: 820px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* Header */
.site-header { position: absolute; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.3rem var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; font-size: 1.05rem; font-variation-settings: "wdth" 120; letter-spacing: -.01em; text-decoration: none; }
.brand-mark { width: 20px; height: 20px; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 2rem; font-size: .98rem; }
.nav a { text-decoration: none; color: var(--ink-2); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--ink); border: 1px solid var(--ink); padding: .45rem 1.05rem; transition: background .2s, color .2s; }
.nav .nav-cta:hover { background: var(--ink); color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 11px; cursor: pointer; color: var(--ink); }
.nav-toggle span { display: block; height: 1.5px; background: currentColor; margin: 7px 0; transition: transform .25s var(--ease); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 600 1rem var(--sans); font-variation-settings: "wdth" 108; text-decoration: none; border: 0; border-radius: 2px; padding: .95rem 1.5rem; cursor: pointer; white-space: nowrap; transition: background .2s, box-shadow .3s var(--ease), transform .2s var(--ease); }
.btn-laser { background: var(--laser); color: #fff; }
.btn-laser:hover { background: var(--laser-deep); box-shadow: 0 12px 26px -14px rgba(120, 30, 8, .55); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-wide { width: 100%; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--paper); width: 100%; border: 1px solid var(--rule-2); border-radius: 2px; padding: .85rem 1rem; caret-color: var(--laser); transition: border-color .2s, box-shadow .2s; }
input::placeholder, textarea::placeholder { color: #5f6267; }
select { appearance: none; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2353565c' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; padding-right: 2.4rem; }
textarea { resize: vertical; min-height: 130px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 21, 22, .1); }

/* Hero: the room is the ground, the cortex hangs over the desk */
.hero { position: relative; min-height: max(100svh, 680px); overflow: hidden; isolation: isolate; background: var(--wall); }
.stage { position: absolute; inset: 0; z-index: -1; }
.room img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 71% 32%; }
.stage::after { content: ""; position: absolute; inset: auto 0 0; height: 14%; background: linear-gradient(to bottom, rgba(248, 248, 246, 0), var(--white)); pointer-events: none; }
.cortex { --k: .58; position: absolute; left: 71%; top: 32%; width: min(72vh, 46vw); aspect-ratio: 1; transform: translate(-50%, -50%) scale(var(--k)); transition: left .52s var(--morph-ease), top .52s var(--morph-ease), transform .52s var(--morph-ease); will-change: transform; }
#core { position: absolute; inset: 0; width: 100%; height: 100%; animation: fadein 1.4s var(--ease) both; touch-action: manipulation; }
#hover-label { position: fixed; left: 0; top: 0; margin: 0; pointer-events: none; font-size: .88rem; font-weight: 600; color: var(--ink); background: var(--paper); padding: .35rem .7rem; white-space: nowrap; box-shadow: 0 6px 18px -8px rgba(20, 21, 22, .35); will-change: transform; z-index: 5; }
.hero.focused .cortex { --k: 1; left: 66%; top: 52%; }

.hero-copy { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-46%); width: min(560px, 44vw); transition: opacity .3s var(--ease), transform .52s var(--ease); }
.hero.focused .hero-copy { opacity: 0; pointer-events: none; transform: translateY(-44%); }
.hero h1 { font-size: clamp(2.3rem, 4.2vw, 4.1rem); line-height: 1.02; }
.hero-lead { font-size: clamp(1.08rem, 1.35vw, 1.22rem); color: var(--ink-2); max-width: 42ch; margin: 1.4rem 0 2rem; }
.start { display: grid; grid-template-columns: 1fr auto; gap: .5rem; background: var(--paper); padding: .5rem; box-shadow: 0 18px 40px -24px rgba(20, 21, 22, .35); max-width: 540px; }
.start input, .start select { border: 0; background-color: var(--wall); }
.start input { grid-column: 1 / -1; }
.explore { margin-top: 1.8rem; }
.explore p { font-size: .92rem; color: var(--ink-2); margin: 0 0 .6rem; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.legend button { font: 500 .92rem var(--sans); color: var(--ink); background: rgba(255, 255, 255, .7); border: 1px solid var(--rule-2); padding: .45rem .85rem .45rem .7rem; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; transition: background .2s, border-color .2s; }
.legend button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--laser); transition: background .2s; }
.legend button:hover, .legend button[aria-pressed="true"] { background: var(--paper); border-color: var(--ink); }
.legend button:hover::before, .legend button[aria-pressed="true"]::before { background: var(--laser); }

/* Detail panel: a white spec sheet */
.detail { position: absolute; top: 6rem; left: var(--gutter); width: min(440px, 100% - 2 * var(--gutter)); max-height: calc(100% - 9rem); overflow: auto; background: var(--paper); padding: 2rem; box-shadow: 0 30px 60px -30px rgba(20, 21, 22, .35); opacity: 0; transform: translateX(-18px); transition: opacity .52s var(--ease), transform .52s var(--ease); z-index: 10; }
.detail.open { opacity: 1; transform: none; }
.detail-close { position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 1px solid var(--rule-2); color: var(--ink); cursor: pointer; }
.detail-close svg { width: 14px; height: 14px; }
.detail-close:hover { border-color: var(--ink); }
.detail h2 { font-size: 1.7rem; font-variation-settings: "wdth" 118; letter-spacing: -.02em; margin: 0 3rem .8rem 0; }
.detail p { color: var(--ink-2); }
.detail ul { margin: 0 0 1.6rem; padding-left: 1.1em; }
.detail li { margin: .35rem 0; }
.detail li::marker { color: var(--ink-2); }
.detail .btn { width: 100%; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* Reading sections: lab documentation */
section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 4rem; align-items: end; padding-bottom: 2rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); border-bottom: 1px solid var(--ink); }
.section-head p { color: var(--ink-2); font-size: 1.1rem; max-width: 46ch; margin: 0; }

.lead-offer { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem 4rem; padding: clamp(1.8rem, 4vw, 3rem); background: var(--paper); box-shadow: 0 30px 60px -44px rgba(20, 21, 22, .4); margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.lead-offer h3 { font-size: clamp(1.7rem, 2.6vw, 2.15rem); font-weight: 500; font-variation-settings: "wdth" 120; letter-spacing: -.03em; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.tag { font: 600 .82rem var(--sans); letter-spacing: 0; color: var(--ink); border: 1px solid var(--ink); padding: .25rem .6rem; }
.lead-main p { color: var(--ink-2); font-size: 1.1rem; max-width: 52ch; margin-bottom: 1.8rem; }
.ticks { list-style: none; margin: 0; padding: 0; align-self: center; }
.ticks li { padding: 1rem 0 1rem 1.8rem; border-top: 1px solid var(--rule); position: relative; }
.ticks li:last-child { border-bottom: 1px solid var(--rule); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1.62rem; width: 10px; height: 1.5px; background: var(--ink); }
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 3rem; }
.offers article { border-top: 1px solid var(--rule-2); padding-top: 1.4rem; }
.offers h3 { margin-bottom: .6rem; }
.offers p { color: var(--ink-2); }
.offers ul { margin: 0; padding-left: 1.1em; }
.offers li { margin: .35rem 0; }
.offers li::marker { color: var(--ink-2); }

.audit, .enquire { background: radial-gradient(90% 55% at 50% 0%, #ffffff, var(--wall) 75%); }
.report, .form { position: relative; }
.report::before, .form::before { content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px; background: linear-gradient(90deg, rgba(20, 21, 22, 0), rgba(20, 21, 22, .22), rgba(20, 21, 22, 0)); }
.report { background: var(--paper); padding: clamp(1rem, 3vw, 2rem) clamp(1.2rem, 3vw, 2.4rem); box-shadow: 0 30px 60px -44px rgba(20, 21, 22, .4); }
.report-row { display: grid; grid-template-columns: 1.5fr .7fr 1.7fr .6fr; gap: 1.5rem; align-items: baseline; padding: 1.1rem 0; border-top: 1px solid var(--rule); opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.report-headings { border-top: 0; padding-top: .4rem; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.report.in .report-row { opacity: 1; transform: none; }
.report.in .report-row:nth-child(3) { transition-delay: .1s; }
.report.in .report-row:nth-child(4) { transition-delay: .2s; }
.report.in .report-row:nth-child(5) { transition-delay: .3s; }
.report.in .report-row:nth-child(6) { transition-delay: .4s; }
.r-task { font-weight: 600; }
.r-num { font: 500 .95rem var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.r-fix { color: var(--ink-2); }
.report-total { border-top: 1.5px solid var(--ink); }
.report-total .r-task, .report-total .r-num { font-weight: 700; color: var(--ink); }
.note { margin: 1rem 0 0; color: var(--ink-2); font-size: .9rem; }

.proof { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4rem; }
.proof article { padding: 1.6rem 0; border-top: 1px solid var(--rule); }
.proof h3 { margin-bottom: .5rem; }
.proof p { color: var(--ink-2); margin: 0; }
.ph { display: inline-block; font-size: .9rem; color: var(--ink-2); border: 1px dashed var(--rule-2); padding: .05rem .5rem; background: var(--paper); }
.quote { margin: 2.5rem 0 0; padding-top: 2.4rem; border-top: 1px solid var(--ink); }
.quote blockquote { margin: 0 0 .8rem; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.25; font-variation-settings: "wdth" 112; letter-spacing: -.02em; }
.quote figcaption { color: var(--ink-2); }

.process { background: var(--paper); }
.process h2 { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; counter-reset: s; }
.steps li { counter-increment: s; border-top: 1px solid var(--ink); padding-top: 1.2rem; }
.steps li::before { content: counter(s); display: block; font: 500 1.6rem/1 var(--sans); font-variation-settings: "wdth" 120; color: var(--ink-2); margin-bottom: 1rem; }
.steps h3 { margin-bottom: .6rem; }
.steps p { color: var(--ink-2); margin: 0; }

.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2rem 5rem; align-items: start; }
.about p { color: var(--ink-2); max-width: 64ch; }
.about .rule { color: var(--ink); font-weight: 600; font-size: 1.12rem; }


.enquire-lead { color: var(--ink-2); font-size: 1.12rem; margin: 1rem 0 2.5rem; }
.form { display: grid; gap: 1.2rem; background: var(--paper); padding: clamp(1.4rem, 4vw, 2.6rem); box-shadow: 0 30px 60px -40px rgba(20, 21, 22, .4); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: grid; gap: .4rem; }
label { font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--ink-2); margin-left: .3em; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.error { color: var(--error); font-size: .9rem; margin: 0; min-height: 1.2em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { color: var(--ink-2); font-size: .92rem; margin: 0; }
.form-status { margin: 0; color: var(--error); min-height: 1.2em; }
.thanks { background: var(--paper); padding: 2.4rem; box-shadow: 0 30px 60px -40px rgba(20, 21, 22, .4); }
.thanks h3 { font-size: 1.8rem; margin-bottom: .6rem; }
.thanks p { color: var(--ink-2); margin: 0; }

.site-footer { border-top: 1px solid var(--rule); color: var(--ink-2); padding: 2rem 0; font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; }
.site-footer p { margin: 0; }
.site-footer a:hover { color: var(--ink); }

/* Secondary pages (privacy, 404) */
.page .site-header { position: static; border-bottom: 1px solid var(--rule); }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-variation-settings: "wdth" 118; letter-spacing: -.025em; line-height: 1.05; margin-bottom: 1rem; }
.legal h2 { font-size: 1.35rem; margin: 2.2rem 0 .6rem; }
.legal p { color: var(--ink-2); max-width: 68ch; }
.legal .section-lead { color: var(--ink-2); margin-bottom: 2rem; }

@media (max-width: 1020px) {
  .section-head, .lead-offer, .about-grid { grid-template-columns: 1fr; }
  .offers, .steps { grid-template-columns: 1fr; gap: 2rem; }
  .report-row { grid-template-columns: 1fr auto; gap: .3rem 1rem; }
  .r-fix { grid-column: 1 / -1; }
  .report-row .r-num:last-child { grid-column: 1 / -1; color: var(--ink-2); }
  .report-headings { display: none; }
  .proof { grid-template-columns: 1fr; }
  .hero-copy { width: min(520px, 50vw); }
}
/* Phones: copy and the action first, then the room as its own band with the cortex over the desk */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .page .nav { display: flex; position: static; flex-direction: row; background: none; box-shadow: none; padding: 0; }
  .page .nav a { border: 0; padding: 0; }
  .nav { display: none; position: absolute; top: 100%; left: var(--gutter); right: var(--gutter); flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); padding: .5rem 1.1rem 1rem; box-shadow: 0 30px 60px -30px rgba(20, 21, 22, .4); }
  .nav.open { display: flex; }
  .nav a { padding: .85rem 0; border-bottom: 1px solid var(--rule); }
  .nav .nav-cta { margin-top: .8rem; text-align: center; }
  .hero { min-height: 0; display: flex; flex-direction: column; background: var(--white); padding-top: 5.5rem; }
  .hero-copy { display: contents; }
  .hero h1, .hero-lead, .start, .explore { margin-left: var(--gutter); margin-right: var(--gutter); }
  .hero h1 { order: 1; } .hero-lead { order: 2; margin-top: 1.1rem; margin-bottom: 1.6rem; } .start { order: 3; } .explore { order: 5; margin-top: .4rem; margin-bottom: 1rem; }
  .hero.focused .hero-copy { opacity: 1; transform: none; pointer-events: auto; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.6rem); }
  .start { grid-template-columns: 1fr; }
  .stage { position: relative; inset: auto; order: 4; z-index: 0; aspect-ratio: 1; margin-top: .5rem; }
  /* plain white overlays at the band's edges: no per-frame mask over the animated cortex */
  .stage::before, .stage::after { content: ""; position: absolute; left: 0; right: 0; height: 12%; z-index: 1; pointer-events: none; }
  .stage::before { top: 0; bottom: auto; background: linear-gradient(var(--white), rgba(248, 248, 246, 0)); }
  .stage::after { top: auto; bottom: 0; background: linear-gradient(rgba(248, 248, 246, 0), var(--white)); }
  .cortex { z-index: 2; }
  .room img { object-position: 50% 70%; }
  .cortex { --k: .6; left: 50%; top: 38%; width: 76%; }
  .hero.focused .cortex { --k: 1; left: 50%; top: 50%; }
  .detail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 72svh; transform: translateY(20px); box-shadow: 0 -20px 50px -20px rgba(20, 21, 22, .4); z-index: 40; }
  .field-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #core { animation: none; }
  .cortex, .hero-copy, .detail, .report-row, .btn { transition: none; }
  .report-row { opacity: 1; transform: none; }
}
