/*
 * ModTech site styles. Dark ground, white paper for documents.
 *
 * Two typefaces, the same split the app itself uses: Helvetica Neue (a system
 * font on every Mac, so nothing is licensed or downloaded) carries headings,
 * labels and running text; IBM Plex Mono carries values a person typed — style
 * numbers, prices, specs. The Plex files are IBM's own unmodified woff2 builds
 * (assets/fonts, licence beside them); subsetting them would make a Modified
 * Version under the OFL, and "Plex" is a Reserved Font Name.
 *
 * Red has two jobs and two values: --accent-fill (#d33, the app's own line
 * colour) for shapes and large numerals only, and --accent (#ff4d4d) wherever
 * red becomes small text, because #d33 on this ground is about 4.1:1 and fails
 * WCAG AA below 24px.
 */

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexMono-SemiBold.woff2') format('woff2');
}

:root {
  --ground: #0e0e0e;
  --panel: #181818;
  --panel-2: #1f1f1f;
  --rule: #333333;
  --rule-strong: #4f4f4f;
  --ink: #f0f0f0;
  --ink-2: #b4b4b4;
  --ink-3: #8c8c8c;
  --accent: #ff4d4d;
  --accent-fill: #d33;
  --paper: #ffffff;
  --paper-ink: #0a0a0a;
  --paper-ink-2: #555555;
  --paper-rule: #cccccc;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

a { color: var(--ink); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.mono { font-family: var(--mono); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- header ------------------------------------------------------------ */

header.site { border-bottom: 1px solid var(--rule); }
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px;
}
.lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.lockup .mark { width: 24px; height: 24px; display: block; flex: none; }
.lockup b { font-size: 15px; font-weight: 700; letter-spacing: 0.05em; }
.lockup span {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.02em; white-space: nowrap;
}
header.site nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
header.site nav a {
  font-family: var(--mono); font-size: 12px; color: var(--ink-2); text-decoration: none;
  /* ~40px tall: the bare text is 15px, which clears WCAG's 24px minimum but is a
     mean target for a thumb. The padding does the work, not the font size. */
  padding: 12px 4px; display: inline-block;
}
header.site nav a:hover { color: var(--ink); text-decoration: underline; }
header.site nav a.cta {
  background: var(--ink); color: var(--ground); padding: 12px 14px;
  font-weight: 600; text-decoration: none;
}
header.site nav a.cta:hover { background: #fff; text-decoration: none; }

/* ---- hero -------------------------------------------------------------- */

main { padding-bottom: 0; }
/* Longhand, never the shorthand: `padding: 56px 0 44px` would zero .wrap's own
   side padding and leave the hero with no gutter on a phone. */
.hero { padding-top: clamp(64px, 9vw, 132px); padding-bottom: clamp(56px, 8vw, 116px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero-art { width: 100%; height: auto; display: block; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 560px; } }
.status {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 20px;
}
/* --accent, not --accent-fill: #d33 measures 4.2:1 here and fails AA at this size. */
.status .dot { color: var(--accent); font-size: 15px; }
h1 {
  font-size: clamp(34px, 7vw, 60px); line-height: 1.02; letter-spacing: -0.015em;
  margin: 0 0 18px; font-weight: 700; text-wrap: balance;
}
.lede { font-size: 17px; color: var(--ink-2); max-width: 54ch; margin: 0 0 18px; }
/* The speed claim, in his own hedged words. Mono sets it apart from the lede;
   no rule, because the call to action directly below carries the only red bar
   in this column and two of them in a row read as a stack of warnings. */
.hero-proof {
  font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--ink-3);
  max-width: 54ch; margin: 0 0 34px;
}

/* ---- bands -------------------------------------------------------------
 * One idea per band, each the full width of the window and tall enough to
 * own the screen. Bands are told apart by surface, not by hairlines, so the
 * page reads as a sequence of rooms rather than a stack of rows.
 */

.band { padding: clamp(72px, 10vw, 148px) 0; }
.band--panel { background: var(--panel); }
.band--deep { background: #0a0a0a; }
.band--tight { padding: clamp(56px, 7vw, 96px) 0; }

.sec { display: flex; align-items: baseline; gap: 12px; margin: 0 0 clamp(26px, 3.5vw, 48px); }
.sec .n { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.sec h2 {
  font-size: 14px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  margin: 0; color: var(--ink);
}
h3 { font-size: 14px; font-weight: 700; margin: 0 0 6px; }
.band-lede { font-size: clamp(19px, 2.3vw, 26px); line-height: 1.35; color: var(--ink); max-width: 20ch; margin: 0 0 18px; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
.band-sub { font-size: 15px; color: var(--ink-2); max-width: 52ch; margin: 0; }
p { margin: 0 0 14px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }

/* ---- two-column compare ------------------------------------------------ */

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); }
.col { border: 1px solid var(--rule); padding: clamp(20px, 2.6vw, 34px); background: var(--panel); }
.col.now { border-color: var(--rule-strong); background: var(--panel-2); }
.col h3 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
.col.now h3 { color: var(--accent); }
.col ul { list-style: none; margin: 16px 0 0; padding: 0; }
.col li { font-size: 15px; color: var(--ink-2); padding: 11px 0; border-top: 1px solid var(--rule); }
.col li:first-child { border-top: 0; }
.col.now li { color: var(--ink); }

/* ---- module grid ------------------------------------------------------- */

/* Five rows, not five cards. At 1180px five columns gave each module a 180px
   box and 12px type; as full-width rows the same content reads like a page of
   a manual, which is the point. */
.modules { border-top: 1px solid var(--rule); }
.module {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.7fr);
  gap: clamp(14px, 3vw, 44px); align-items: baseline;
  border-bottom: 1px solid var(--rule); padding: clamp(20px, 2.6vw, 34px) 0;
}
/* --accent, NOT --accent-fill: these numerals are 20px (15px on a phone), so they are
   normal text and need 4.5:1. #d33 on the panel band measures 3.89:1 and fails. */
.module .n { font-family: var(--mono); font-size: 20px; color: var(--accent); margin: 0; }
.module h3 { margin: 0; font-size: clamp(18px, 2vw, 23px); font-weight: 700; letter-spacing: -0.01em; }
.module p { font-size: 16px; color: var(--ink-2); margin: 0; max-width: 60ch; }

/* ---- workflow steps (manual-style diagrams, not screenshots) ----------- */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); }
.step { margin: 0; }
.step svg { width: 100%; height: auto; display: block; border: 1px solid var(--rule); background: #0a0a0a; }
.step figcaption { font-size: 13px; color: var(--ink-2); margin-top: 10px; display: flex; gap: 10px; align-items: baseline; }
.step figcaption .n { font-family: var(--mono); font-size: 12px; color: var(--accent); }

/* ---- construction study -------------------------------------------------
 * One bounded field with air around it. The drawing is editorial — a garment
 * study, never a screenshot of the app — so it gets its own surface and a
 * caption that says what it is.
 */

.study { margin: 0; }
.study svg {
  width: 100%; height: auto; display: block;
  background: #0b0b0b; border: 1px solid var(--rule);
  padding: clamp(10px, 1.6vw, 22px) 0;
}
.study figcaption {
  font-size: 14px; color: var(--ink-2); margin-top: 14px; max-width: 64ch;
}

.study:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.study .pan-hint { display: none; }

/* Below ~700px the drawing would scale to the point its labels are ~4px tall. Stop
   downscaling and let the figure pan instead, so the annotations stay legible. */
@media (max-width: 700px) {
  .study { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .study svg { width: 920px; max-width: none; }
  .study figcaption { position: sticky; left: 0; }
  .study .pan-hint { display: block; margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--accent); }
}

/* ---- key/value rows ---------------------------------------------------- */

.kvs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 72px); border-top: 1px solid var(--rule); }
.kv {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-bottom: 1px solid var(--rule); padding: 14px 0; font-size: 14px;
}
.kv b { font-weight: 700; }
.kv span { font-family: var(--mono); color: var(--ink-2); text-align: right; }

/* ---- pack contents ----------------------------------------------------- */

.pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 72px); border-top: 1px solid var(--rule); }
.page-row {
  display: flex; gap: 14px; align-items: baseline;
  border-bottom: 1px solid var(--rule); padding: 13px 0; font-size: 14px;
}
.page-row .n { font-family: var(--mono); color: var(--ink-3); font-size: 12px; }

/* ---- price card -------------------------------------------------------- */

.price-card { border: 1px solid var(--rule-strong); background: var(--panel); padding: clamp(22px, 3vw, 34px); max-width: 440px; }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.price-card .amount { font-family: var(--mono); font-size: 34px; font-weight: 600; margin: 8px 0 2px; }
.price-card .amount small { font-size: 14px; font-weight: 400; color: var(--ink-2); }
.price-card ul { list-style: none; margin: 14px 0 0; padding: 0; }
.price-card li { font-size: 13px; color: var(--ink-2); padding: 7px 0; border-top: 1px solid var(--rule); }

/* ---- billing cadence tiers ----------------------------------------------
 * Three ways to pay for the same plan. Price and billing period are the
 * only things that differ, so the feature list stays shared in a
 * .price-card below rather than repeating in every tier.
 */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 18px); max-width: 720px; margin: 0 0 clamp(20px, 2.6vw, 30px); }
.tier { border: 1px solid var(--rule-strong); background: var(--panel); padding: clamp(16px, 2vw, 22px); }
.tier--best { border-color: var(--accent-fill); background: var(--panel-2); }
.tier-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.tier-badge { font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: none; color: var(--ground); background: var(--accent); padding: 2px 6px; }
.tier-amount { font-family: var(--mono); font-size: 24px; font-weight: 600; margin: 0 0 6px; }
.tier-amount small { font-size: 12px; font-weight: 400; color: var(--ink-2); }
.tier-note { font-size: 12px; color: var(--ink-2); margin: 0; line-height: 1.5; }
@media (max-width: 560px) {
  .tiers { grid-template-columns: 1fr; max-width: 440px; }
}

/* ---- waitlist form ----------------------------------------------------- */

.wl { max-width: 520px; }
.wl .row { display: flex; gap: 8px; flex-wrap: wrap; }
.wl label { display: block; font-size: 12px; color: var(--ink-2); margin: 0 0 6px; }
.wl input[type="email"], .wl input[type="text"] {
  font: 400 14px/1.4 var(--mono); color: var(--ink); background: #0a0a0a;
  /* The fill is all but invisible against the page, so this border IS the field's
     boundary and owes WCAG 1.4.11 3:1. #595959 managed 2.5-2.8:1; --ink-3 clears 5:1
     on all three surfaces a form sits on. */
  border: 1px solid var(--ink-3); padding: 12px; flex: 1 1 220px; min-width: 0;
}
.wl input::placeholder { color: var(--ink-3); }
.wl input:focus { background: #121212; border-color: var(--accent); }
.wl .field { flex: 1 1 220px; min-width: 0; }
.wl .field label { font-size: 11px; color: var(--ink-3); }
.wl .field input { width: 100%; }
.wl button, .btn {
  font: 700 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--ink); color: var(--ground); border: 1px solid var(--ink);
  padding: 12px 18px; cursor: pointer;
}
.wl button:hover:not(:disabled), .btn:hover:not(:disabled) { background: #fff; }
.wl button:disabled, .btn:disabled { opacity: 0.45; cursor: default; }
.wl .optional { margin-top: 8px; }
.wl .consent { font-size: 12px; color: var(--ink-3); margin: 10px 0 0; }
.wl .consent a { color: var(--ink-2); }
.wl .status-msg { font-family: var(--mono); font-size: 13px; margin: 12px 0 0; min-height: 1.4em; }
.wl .status-msg.ok { color: var(--ink); }
.wl .status-msg.err { color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Replaces the form entirely while there is no endpoint — see waitlist.js. */
.wl-fallback {
  font-size: 15px; color: var(--ink-2); max-width: 52ch; margin: 0;
  border-left: 2px solid var(--accent-fill); padding-left: 14px;
}
.wl-fallback a { color: var(--ink); }

/* ---- faq --------------------------------------------------------------- */

.faq { border-top: 1px solid var(--rule); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 0; }
.faq summary {
  cursor: pointer; padding: 20px 28px 20px 0; font-size: 16px; font-weight: 700;
  display: flex; gap: 12px; align-items: baseline; list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
/* A visible affordance: without it the rows read as seven inert headings. */
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 19px;
  font-family: var(--mono); font-size: 16px; line-height: 1; color: var(--ink-3);
}
.faq details[open] summary::after { content: "\2212"; color: var(--accent); }
.faq summary .n { font-family: var(--mono); font-size: 12px; color: var(--ink-3); font-weight: 400; }
.faq details[open] summary .n { color: var(--accent); }
.faq .a { font-size: 15px; color: var(--ink-2); padding: 0 0 22px 34px; max-width: 70ch; }

/* ---- quote ------------------------------------------------------------- */

blockquote {
  margin: 0; padding: 0 0 0 clamp(16px, 2.5vw, 28px); border-left: 2px solid var(--accent-fill);
  color: var(--ink); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; max-width: 62ch;
}
blockquote p { margin: 0 0 18px; }
blockquote cite { display: block; margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); font-style: normal; letter-spacing: 0.04em; }

/* ---- pricing sections: same rhythm as the homepage bands, and a readable measure ---- */
main > .wrap > section + section { margin-top: clamp(48px, 6vw, 88px); }
main > .wrap > section:last-child { margin-bottom: clamp(56px, 7vw, 96px); }
#before li, #billing p, #guarantee p, #setup p, #setup li { max-width: 60ch; }
#plan > .note { margin-bottom: 24px; max-width: 60ch; }

/* ---- note -------------------------------------------------------------- */

.note {
  font-size: 13px; color: var(--ink-2); max-width: 68ch;
  border-left: 2px solid var(--rule-strong); padding-left: 12px; margin: 24px 0 0;
}
.note a { color: var(--ink); }

/* ---- footer ------------------------------------------------------------ */

footer.site { border-top: 1px solid var(--rule); padding: 24px 0 48px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
footer.site .legal { font-family: var(--mono); font-size: 11px; color: var(--ink-3); line-height: 1.7; }
footer.site .legal b { font-family: var(--sans); font-size: 13px; color: var(--ink); }
footer.site nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
footer.site nav a { font-family: var(--mono); font-size: 12px; color: var(--ink-2); padding: 10px 0; display: inline-block; }

/* ---- paper (legal documents) ------------------------------------------- */

body.doc { background: var(--ground); }
.paper {
  background: var(--paper); color: var(--paper-ink);
  max-width: 820px; margin: 28px auto 56px; padding: 44px 48px 56px;
}
.paper .bar {
  background: #1a1a1a; color: #fff; margin: -44px -48px 26px; padding: 9px 48px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  display: flex; justify-content: space-between; gap: 16px;
}
.paper .bar span { font-family: var(--mono); font-weight: 400; letter-spacing: 0.04em; color: #9a9a9a; text-transform: none; }
.paper h1 { font-size: 26px; letter-spacing: -0.01em; margin: 0 0 6px; }
.paper .lede { font-family: var(--mono); font-size: 12px; color: var(--paper-ink-2); margin: 0 0 26px; }
.paper h2 {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  margin: 30px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--paper-rule);
}
.paper p, .paper li { font-size: 14px; color: #1d1d1d; max-width: 72ch; }
.paper a { color: var(--paper-ink); }
.paper ul { padding-left: 20px; }
.paper li { margin-bottom: 8px; }
.paper strong { font-weight: 700; }

/* ---- responsive -------------------------------------------------------- */

@media (max-width: 900px) {
  .pages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  /* Two columns: the number in a gutter, name and text stacked beside it. Each
     child is placed explicitly — .n is itself a <p>, so auto-placement (or a
     bare `.module p` rule) drops the number and the description in one cell. */
  .module { grid-template-columns: 34px minmax(0, 1fr); column-gap: 14px; row-gap: 6px; }
  .module .n { grid-column: 1; grid-row: 1; font-size: 15px; }
  .module h3 { grid-column: 2; grid-row: 1; }
  .module p { grid-column: 2; grid-row: 2; font-size: 15px; }
}
@media (max-width: 640px) {
  .cols { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .kvs { grid-template-columns: 1fr; }
  .pages { grid-template-columns: 1fr; }
  .lockup span { display: none; }
  .paper { padding: 28px 22px 40px; margin: 16px auto 40px; }
  .paper .bar { margin: -28px -22px 22px; padding: 9px 22px; }
}
@media (max-width: 460px) {
  .wl .row { flex-direction: column; align-items: stretch; }
  /* flex-basis is along the MAIN axis: once the row stacks, `flex: 1 1 220px` means a
     220px-tall input, not a 220px-wide one. Reset the basis, keep the button full width. */
  .wl .row > input, .wl .row > .field { flex-basis: auto; }
  .wl button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  body { background: #fff; color: #000; }
  header.site, footer.site { display: none; }
  .paper { margin: 0; padding: 0; max-width: none; }
  .paper .bar { background: none; color: #000; margin: 0 0 20px; padding: 0 0 8px; border-bottom: 2px solid #000; }
  .paper .bar span { color: #000; }
  .paper a { text-decoration: underline; }
}
