@font-face { font-family: "General Sans"; src: url("fonts/GeneralSans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/GeneralSans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/GeneralSans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --bg: #0a0909;
  --panel: #0f0d0d;
  --ink: #f2f1ef;
  --muted: #a39f9a;
  --line: #2a2525;
  --grid: #1e1a1a;
  --red: #e10600;
  --red-down: #b80500;
  --focus: #ffffff;

  --font: "General Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step-small: 0.8125rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.05rem + 1vw, 1.875rem);
  --step-head: clamp(2.25rem, 1.2rem + 3.6vw, 4.5rem);
  --step-display: clamp(min(3.25rem, 13.4vw), 9.6vw, 9.5rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(1rem, 1.7vw, 1.5rem);
  --gap: clamp(4.5rem, 8vw, 7.5rem);
  --head-h: 4.25rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: dark; background: var(--bg); }
body { position: relative; margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.5; font-kerning: normal; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; hyphens: none; }
p { text-wrap: pretty; }
:target { scroll-margin-top: 5rem; }
::selection { background: var(--red); color: #ffffff; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.nb { white-space: nowrap; }
.wrap { padding-inline: var(--margin); }

.skip { position: absolute; left: var(--margin); top: 0.5rem; z-index: 100; padding: 0.75rem 1rem; background: var(--ink); color: var(--bg); font-weight: 500; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* the column grid the page hangs from, drawn as hairlines */
.cols { position: absolute; inset: 0; z-index: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-inline: var(--margin); pointer-events: none; }
.cols i { border-left: 1px solid var(--grid); }
.cols i:last-child { border-right: 1px solid var(--grid); }
main, .foot { position: relative; z-index: 1; }

/* buttons: one shape, square, flat */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.5rem; background: var(--red); color: #ffffff; font-weight: 500; text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--red-down); }
}

/* ---------- header: black, one hairline ---------- */
.head { position: fixed; inset: 0 0 auto 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.25rem); min-height: var(--head-h); padding: 0.625rem var(--margin); }
.wordmark { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; text-decoration: none; white-space: nowrap; }
.head-nav { display: flex; gap: clamp(0.5rem, 1.4vw, 1.25rem); margin-left: auto; }
.head-nav a, .menu-word { display: inline-flex; white-space: nowrap; align-items: center; min-height: 2.75rem; padding-inline: 0.5rem; text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .head-nav a:hover, .menu-word:hover { text-decoration-color: currentColor; }
}
.head-button { min-height: 2.75rem; }
.menu-word { display: none; margin-left: auto; }

.menu-sheet { position: fixed; inset: 0; z-index: 60; display: none; flex-direction: column; gap: 2rem; padding: 1.25rem var(--margin) 2rem; background: var(--bg); color: var(--ink); }
.menu-sheet:target, .menu-sheet.is-open { display: flex; }
.menu-close { align-self: flex-end; min-height: 2.75rem; display: inline-flex; align-items: center; }
.menu-sheet nav { display: flex; flex-direction: column; gap: 0.75rem; }
.menu-sheet nav a { font-size: var(--step-head); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; text-decoration: none; }

/* ---------- sections: hairline on top, headings on the margin ---------- */
main > section + section { border-top: 1px solid var(--line); }
.sec-title { font-size: var(--step-head); line-height: 1; letter-spacing: -0.025em; }
.group-name { font-size: var(--step-small); font-weight: 400; color: var(--muted); }

/* ---------- hero ---------- */
.hero { padding-block: calc(var(--head-h) + clamp(2rem, 7vh, 4.5rem)) clamp(3rem, 8vh, 5rem); }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.hero-kicker { grid-column: 1 / 10; grid-row: 1; font-size: 0.875rem; color: var(--muted); }
.hero-title { grid-column: 1 / -1; grid-row: 2; margin-top: clamp(1.25rem, 3vh, 2rem); font-size: var(--step-display); line-height: 0.92; letter-spacing: -0.025em; text-wrap: initial; }
.hero-rule { grid-column: 1 / -1; grid-row: 3; height: 3px; margin-top: clamp(1.5rem, 3.5vh, 2.25rem); background: var(--red); transform-origin: left center; }
.hero-sub { grid-column: 1 / 10; grid-row: 4; max-width: 40ch; margin-top: clamp(1.25rem, 3vh, 1.75rem); font-size: var(--step-lead); font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.hero-index { grid-column: 1 / -1; grid-row: 5; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gutter); margin-top: clamp(1.5rem, 3.5vh, 2.25rem); }
.hero-index li { display: flex; flex-direction: column; gap: 0.25rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.hero-index a { width: fit-content; font-size: 1.25rem; font-weight: 500; line-height: 1.3; text-decoration-color: rgba(242, 241, 239, 0.35); }
@media (hover: hover) and (pointer: fine) {
  .hero-index a:hover { text-decoration-color: currentColor; }
}
.hero-index span { max-width: 32ch; font-size: 0.9375rem; line-height: 1.45; color: var(--muted); }
.hero-cta { grid-column: 1 / 10; grid-row: 6; margin-top: clamp(1.75rem, 4vh, 2.5rem); }

/* the address as text, with a copy button */
.addr-line { margin-top: 1rem; font-size: 0.9375rem; color: var(--muted); }
.addr { color: var(--ink); overflow-wrap: anywhere; }
.copy { min-height: 2.75rem; margin-left: 0.25rem; padding: 0 0.75rem; border: 1px solid var(--line); font-size: 0.875rem; color: var(--ink); transition: border-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .copy:hover { border-color: var(--ink); }
}
.copy-status { margin-left: 0.5rem; font-size: 0.875rem; color: var(--ink); }
.copy-field { width: min(100%, 28ch); min-height: 2.75rem; padding: 0 0.5rem; border: 1px solid var(--ink); background: var(--bg); color: var(--ink); font: inherit; }

.statement { max-width: 30em; margin-top: 1.5rem; font-size: var(--step-lead); font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }

/* ---------- offers: text and panel on one two-column grid ---------- */
.offers { padding-block: var(--gap); }
.offers .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.offers .sec-title { grid-column: 1 / -1; }
.row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: start; margin-top: clamp(3rem, 5vw, 4.5rem); padding-top: 1.5rem; border-top: 1px solid var(--line); }
.row-text { grid-column: 1 / 5; }
.row-title { font-size: var(--step-lead); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
.row-text p { max-width: 38ch; margin-top: 0.9rem; }
.get { margin-top: 1.5rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.get-label { font-size: var(--step-small); color: var(--muted); }
.get li { max-width: 40ch; padding-block: 0.6rem; border-bottom: 1px solid var(--line); }

/* examples: the artefact in mono, a note in sans beside each line */
.ex { grid-column: 6 / -1; }
.ex-label { margin-bottom: 0.75rem; font-size: var(--step-small); color: var(--muted); }
.ex-line { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: var(--gutter); }
.ex-art { padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-top: 0; font-family: var(--mono); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.ex-line:first-of-type .ex-art { border-top: 1px solid var(--line); }
.ex-k { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.ex-art p + .ex-k { margin-top: 12px; }
.ex-art mark { padding-bottom: 3px; background: linear-gradient(var(--red), var(--red)) 0 100% / 100% 2px no-repeat; color: var(--ink); }
.ex-note { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); align-self: center; font-size: 0.9375rem; line-height: 1.45; color: var(--muted); }
.ex-note::before { content: ""; width: 0.75rem; height: 2px; margin-top: 0.65em; background: var(--red); }
.ex-out { max-width: 44ch; margin-top: 1rem; font-weight: 500; }
.ex-steps { margin-bottom: 1rem; border-top: 1px solid var(--line); }
.ex-steps li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); column-gap: var(--gutter); padding-block: 0.75rem; border-bottom: 1px solid var(--line); }
.ex-steps li.ex-step-now { border-bottom: 2px solid var(--red); }
.ex-step { padding-top: 0.2em; font-size: var(--step-small); color: var(--muted); }
.ex-steps p { font-size: 0.9375rem; line-height: 1.45; }

/* ---------- method: three stages on the grid ---------- */
.method { padding-block: var(--gap); }
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 1rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.stage { grid-row: span 3; display: grid; grid-template-rows: subgrid; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.stage-mid { border-top: 2px solid var(--red); padding-top: calc(1.25rem - 1px); }
.stage-name { font-size: var(--step-lead); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
.stage p:not(.stage-get) { max-width: 36ch; }
.stage-get { max-width: none; margin-top: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.stage-get .mono { display: block; margin-bottom: 0.375rem; font-size: var(--step-small); color: var(--muted); }

/* ---------- principles: two labelled groups ---------- */
.principles { padding-block: var(--gap); }
.rule-groups { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 3rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.rule-group { grid-column: span 6; }
.rules { margin-top: 0.75rem; border-top: 1px solid var(--line); }
.rules li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: var(--gutter); padding-block: 0.875rem; border-bottom: 1px solid var(--line); }
.r-label { padding-top: 0.2em; font-size: var(--step-small); color: var(--muted); }

/* ---------- engineering ---------- */
.eng { padding-block: var(--gap); }
.eng-text { max-width: 34em; margin-top: clamp(2rem, 4vw, 3rem); font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.005em; }
.eng-list { max-width: 52rem; margin-top: clamp(2rem, 4vw, 3rem); }
.eng-list li { grid-template-columns: 9.5rem minmax(0, 1fr); }

/* ---------- close ---------- */
.close { padding-block: calc(var(--gap) * 2.5) var(--gap); border-top: 1px solid var(--line); }
.close-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 2.5rem; }
.close-title { grid-column: 1 / -1; font-size: var(--step-head); line-height: 1; letter-spacing: -0.025em; }
.close-line { grid-column: 1 / -1; max-width: 34ch; font-size: var(--step-lead); line-height: 1.3; }
.close-ask { grid-column: 1 / 7; }
.close-next { grid-column: 8 / -1; }

/* email starter: one chip per request, the email it opens shown below */
.starter, .chip-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.starter { grid-column: 1 / -1; }
.starter > legend { padding: 0; max-width: 60ch; color: var(--muted); }
.chip-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin-top: 1.25rem; }
.chip-group legend { padding: 0 0 0.5rem; }
.chip-group { display: flex; flex-direction: column; gap: 0.5rem; }
.chip { position: relative; display: flex; align-items: center; min-height: 3.25rem; padding: 0.625rem 1rem; border: 1px solid var(--line); background: var(--bg); font-weight: 500; line-height: 1.25; cursor: pointer; transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease; }
.chip-else { width: fit-content; min-height: 0; margin-top: var(--gutter); padding: 0; border: 0; background: none; font-weight: 400; color: var(--muted); }
.chip-else span { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--line); }
.chip-radio { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .chip:hover { border-color: var(--ink); }
}
.chip:has(.chip-radio:checked) { background: var(--red); border-color: var(--red); color: #ffffff; }
.chip:has(.chip-radio:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.chip-else:has(.chip-radio:checked) { background: none; border: 0; color: var(--ink); }
.chip-else:has(.chip-radio:checked) span { text-decoration-color: var(--red); }
.mail { scroll-margin-top: calc(var(--head-h) + 1rem); }
.mails { display: flex; flex-direction: column; gap: 2.5rem; }
.mail-art { padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.mail-head { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.mail-k { font-size: 13px; line-height: 1.75; color: var(--muted); }
.mail-body { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.mail-ask { margin-top: 1rem; max-width: 52ch; }
.mail-ask .mono { display: block; margin-bottom: 0.25rem; font-size: var(--step-small); color: var(--muted); }
.mail .button { margin-top: 1.5rem; }
.next { margin-top: 0.75rem; border-top: 1px solid var(--line); }
.next li { padding-block: 0.875rem; border-bottom: 1px solid var(--line); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--bg); overflow: hidden; }
.foot-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 2rem; padding-block: 2rem; font-size: var(--step-small); color: var(--muted); }
.foot-row a { color: var(--ink); overflow-wrap: anywhere; }

/* ---------- tablet ---------- */
@media (max-width: 1099px) {
  .head-row { gap: 0.75rem; }
  .head-nav { gap: 0; }
  .row-text { grid-column: 1 / -1; }
  .row-text p { max-width: 52ch; }
  .get li { max-width: 52ch; }
  .ex { grid-column: 1 / -1; margin-top: 2rem; }
  .stages { grid-template-columns: 1fr; row-gap: 2.5rem; }
  .stage { grid-row: auto; display: flex; flex-direction: column; gap: 1rem; }
  .stage p:not(.stage-get) { max-width: 52ch; }
  .rule-group { grid-column: 1 / -1; }
  .close-ask, .close-next { grid-column: 1 / -1; }
  .cols i:nth-child(even) { border-left: 0; }
}

@media (min-width: 600px) and (max-width: 1099px) {
  :root { --step-display: 10.8vw; }
}

/* ---------- phone ---------- */
@media (max-width: 767px) {
  :root { --head-h: 3.75rem; }
  .head-nav { display: none; }
  .menu-word { display: inline-flex; }
  .head-row { gap: 0.75rem; }
  .head-button { padding: 0 1rem; }
  .hero-kicker, .hero-title, .hero-rule, .hero-sub, .hero-cta { grid-column: 1 / -1; }
  .hero-index { grid-template-columns: minmax(0, 1fr); row-gap: 0.5rem; }
  .hero-index li { padding-top: 0.5rem; }
  .hero-index span { display: none; }
  .hero-cta .button { width: 100%; }
  .ex-line { grid-template-columns: minmax(0, 1fr); }
  .ex-art, .ex-line:first-of-type .ex-art { border-top: 1px solid var(--line); }
  .ex-note { padding: 0.5rem 0 0.875rem; }
  .ex-steps li { grid-template-columns: minmax(0, 1fr); row-gap: 0.25rem; }
  .chip-groups { grid-template-columns: minmax(0, 1fr); }
  .chip-else { width: auto; }
  .rules li { grid-template-columns: minmax(0, 1fr); row-gap: 0.25rem; }
  .mail .button { width: 100%; }
  .cols i { border-left: 0; }
  .cols i:nth-child(3n+1) { border-left: 1px solid var(--grid); }
}
@media (max-width: 420px) {
  .ex-art, .mail-art { padding-inline: 12px; }
  .mail-head { grid-template-columns: minmax(0, 1fr); }
  .chip { padding-inline: 0.75rem; }
}
@media (max-width: 359px) {
  .head-row { gap: 0.5rem; }
  .wordmark { font-size: 1rem; white-space: normal; }
  .head-button { padding: 0 0.75rem; }
}

/* ---------- motion: hidden starting states only where motion is welcome and script runs ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero [data-load] { animation: rise 450ms var(--ease-out) both; animation-delay: calc(var(--d, 0) * 90ms + 60ms); }
  .js .hero-rule { animation: draw 450ms var(--ease-out) 200ms both; }
  .js [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .ex[data-reveal] { transform: none; }
  .js .ex .ex-note { opacity: 0; transition: opacity 400ms var(--ease-out); }
  .js .ex.is-in .ex-note { opacity: 1; }
  .js .ex.is-in .ex-line:nth-of-type(1) .ex-note { transition-delay: 300ms; }
  .js .ex.is-in .ex-line:nth-of-type(2) .ex-note { transition-delay: 500ms; }
  .js .ex.is-in .ex-line:nth-of-type(3) .ex-note { transition-delay: 700ms; }
  .js .ex.is-in .ex-line:nth-of-type(4) .ex-note { transition-delay: 900ms; }
  .js .ex mark { background-size: 0% 2px; transition: background-size 600ms var(--ease-out) 650ms; }
  .js .ex.is-in mark { background-size: 100% 2px; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: none; } }

/* email starter: only the chosen email is shown */
@supports selector(:has(*)) {
  .mails .mail { display: none; }
  .close:has(#st-executives:checked) #mail-executives,
  .close:has(#st-check:checked) #mail-check,
  .close:has(#st-data:checked) #mail-data,
  .close:has(#st-test:checked) #mail-test,
  .close:has(#st-complaints:checked) #mail-complaints,
  .close:has(#st-contracts:checked) #mail-contracts,
  .close:has(#st-else:checked) #mail-else { display: block; }
}
