/* Edgebox site. Concept: a bench oscilloscope that replays measured traces. See ../SITE_CHARACTER.md */
:root {
  --paper: #f4f1e6;
  --paper-2: #e9e4d3;
  --ink: #15181b;
  --muted: #4b5056;
  --rule: #b9b29c;
  --grid: #ddd6c1;
  --origin: #a3271c;   /* the slow trip: direct-to-origin traces */
  --edge: #1b44b0;     /* the short trip: answered at the edge */
  --amber: #7a5200;    /* caveats and "not built yet" */
  --focus: #1b44b0;
  --screen: #10140f;   /* the scope's glass */
  --screen-grid: #2b3527;
  --screen-text: #e8f0dc;
  --screen-origin: #ff8f7e;
  --screen-edge: #9cc2ff;
  --font-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --motion-press: 120ms;
  --motion-enter: 220ms;
  --ease-enter: cubic-bezier(0,0,.2,1);
  --measure: 68ch;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-text);
}
a { color: var(--edge); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 10; }
.skip:focus { top: 8px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.prose { max-width: var(--measure); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* Header: a bench label strip */
.top { border-bottom: 2px solid var(--ink); background: var(--paper); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; padding-block: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.15rem; }
.brand svg { flex: none; }
.top nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; font-weight: 550; border-bottom: 3px solid transparent; }
.top nav a:hover { border-bottom-color: var(--rule); }
.top nav a[aria-current="page"] { border-bottom-color: var(--edge); }
.status { font-family: var(--font-num); font-size: .8125rem; color: var(--amber); background: #fbf3dc; border-bottom: 1px solid var(--rule); }
.status .wrap { padding-block: 6px; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 96px) 0 32px; }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 5.2rem); line-height: 1; font-weight: 800; margin: 0 0 24px; max-width: 13ch; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px 48px; align-items: end; }
.bignum { margin: 0; display: grid; justify-items: end; text-align: right; line-height: .9; }
.bignum .was { font-size: clamp(2.6rem, 6vw, 5.6rem); color: var(--origin); text-decoration: line-through; text-decoration-thickness: .08em; }
.bignum .now { font-size: clamp(3.4rem, 9vw, 8.4rem); font-weight: 750; color: var(--edge); }
.bignum small { display: inline-block; font-size: .32em; margin-left: .15em; font-weight: 500; }
.bignum .cap { font: 500 .875rem/1.3 var(--font-num); color: var(--muted); margin-top: 12px; }
.hero h1 .far { color: var(--origin); }
.hero h1 .near { color: var(--edge); }
.lede { font-size: clamp(1.125rem, 1.8vw, 1.35rem); max-width: 54ch; margin: 0 0 28px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font: 650 1rem/1 var(--font-text); text-decoration: none; cursor: pointer; border-radius: 3px; }
.btn:hover { background: var(--edge); border-color: var(--edge); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink); }

/* The scope */
.scope { background: var(--screen); color: var(--screen-text); border: 2px solid var(--ink); border-radius: 6px; padding: clamp(14px, 2.4vw, 28px); margin: 8px 0 12px; }
.scope-head { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.scope h2 { margin: 0; font-size: 1.05rem; font-weight: 650; color: var(--screen-text); }
.scope p.sub { margin: 4px 0 0; font-size: .9375rem; color: #c3cdb6; max-width: 60ch; }
.controls { display: flex; flex-wrap: wrap; gap: 16px; }
.controls fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.controls legend { font-size: .8125rem; color: #c3cdb6; padding: 0; margin-bottom: 6px; font-family: var(--font-num); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 44px; min-width: 44px; padding: 0 14px; font: 600 .9375rem/1 var(--font-num); color: var(--screen-text); background: transparent; border: 2px solid #6f7d66; border-radius: 3px; cursor: pointer; }
.seg button:hover { border-color: var(--screen-text); }
.seg button[aria-pressed="true"] { background: var(--screen-text); color: var(--screen); border-color: var(--screen-text); }
.seg button:focus-visible { outline-color: var(--screen-edge); }
.lanes { display: grid; gap: 14px; }
.lane { display: grid; grid-template-columns: 9.5rem 1fr 7.5rem; gap: 12px; align-items: center; }
.lane .who { font-size: .9375rem; line-height: 1.3; }
.lane .who b { display: block; font-weight: 650; }
.lane.origin .who b { color: var(--screen-origin); }
.lane.edge .who b { color: var(--screen-edge); }
.lane .who span { color: #c3cdb6; font-size: .8125rem; }
.glass { position: relative; height: 72px; overflow: hidden; border: 1px solid var(--screen-grid);
  background-image: linear-gradient(90deg, var(--screen-grid) 1px, transparent 1px); background-size: 10% 100%; }
.glass svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.glass .trace { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.origin .trace { stroke: var(--screen-origin); }
.edge .trace { stroke: var(--screen-edge); }
.glass .p95 { stroke: #c3cdb6; stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.shutter { position: absolute; inset: 0; background: var(--screen); transform-origin: 100% 50%; transform: scaleX(0); }
.readout { font: 650 1.35rem/1.1 var(--font-num); text-align: right; font-variant-numeric: tabular-nums; }
.origin .readout { color: var(--screen-origin); }
.edge .readout { color: var(--screen-edge); }
.readout small { display: block; font-size: .75rem; font-weight: 400; color: #c3cdb6; margin-top: 4px; }
.axis { display: grid; grid-template-columns: 9.5rem 1fr 7.5rem; gap: 12px; font: .75rem/1 var(--font-num); color: #c3cdb6; margin-top: 6px; }
.axis .ticks { display: flex; justify-content: space-between; }
.verdict { margin: 16px 0 0; font: 600 1rem/1.45 var(--font-text); min-height: 1.45em; }
.verdict .x { font-family: var(--font-num); color: var(--screen-edge); }
.scope-foot { margin: 12px 0 0; font-size: .8125rem; color: #c3cdb6; }
.fine { font-size: .875rem; color: var(--muted); }

/* Sections */
section.band { padding: 56px 0; border-top: 2px solid var(--ink); }
section.band h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.1; margin: 0 0 18px; font-weight: 780; }
h3 { font-size: 1.2rem; margin: 0 0 8px; line-height: 1.25; }
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 2px solid var(--ink); background: var(--paper); }
.steps li { padding: 22px; border-right: 1px solid var(--rule); }
.steps li:last-child { border-right: 0; }
.steps .n { font: 700 .875rem/1 var(--font-num); color: var(--edge); display: block; margin-bottom: 12px; }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.card { background: var(--paper); border: 2px solid var(--ink); padding: 22px; border-radius: 3px; }
.card.edge-rule { border-top: 8px solid var(--edge); }
.card.origin-rule { border-top: 8px solid var(--origin); }
.card.amber-rule { border-top: 8px solid var(--amber); }
.tag { display: inline-block; font: 600 .8125rem/1.2 var(--font-num); padding: 3px 8px; border: 1px solid currentColor; border-radius: 3px; margin-bottom: 10px; }
.tag.default { color: var(--edge); }
.tag.optin { color: var(--amber); }
.tag.draft { color: var(--amber); }
.h3 { font-size: 1.2rem; margin: 0 0 8px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.1em; }
.table-wrap { overflow-x: auto; margin-top: 24px; border: 2px solid var(--ink); background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 600px; }
caption { text-align: left; padding: 14px 16px; font-weight: 650; border-bottom: 1px solid var(--rule); }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody th { font-weight: 550; }
.slower { color: var(--origin); font-weight: 650; }
.faster { color: var(--edge); font-weight: 650; }
.notes { margin-top: 18px; padding-left: 1.2em; font-size: .9375rem; color: var(--muted); max-width: 80ch; }
.notes li { margin-bottom: 6px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.price { font: 750 1.9rem/1.1 var(--font-num); margin: 6px 0 4px; }
.price small { font: 400 .9375rem/1.3 var(--font-text); color: var(--muted); display: block; margin-top: 6px; }
.page-head { padding: 56px 0 28px; }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); line-height: 1.05; margin: 0 0 16px; font-weight: 800; max-width: 18ch; }
dl.plain { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 40px; margin: 0; }
dl.plain > div { border-top: 1px solid var(--rule); padding-top: 14px; }
dl.plain dt { font-weight: 650; }
dl.plain dd { margin: 4px 0 0; }
.block { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.block li { background: var(--paper); border: 1px solid var(--rule); border-left: 6px solid var(--amber); padding: 12px 16px; }

/* Waitlist form */
form.wl { display: grid; gap: 18px; max-width: 560px; margin-top: 24px; background: var(--paper); border: 2px solid var(--ink); padding: 24px; border-radius: 3px; }
.field { display: grid; gap: 6px; }
label, .lbl { font-weight: 650; }
.hint { font-size: .875rem; color: var(--muted); margin: 0; }
select, input[type="number"], textarea { font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--muted); border-radius: 3px; min-height: 48px; padding: 8px 12px; width: 100%; }
textarea { min-height: 110px; resize: vertical; }
select:focus-visible, input:focus-visible, textarea:focus-visible { border-color: var(--focus); }
.err { color: var(--origin); font-weight: 600; font-size: .9375rem; margin: 0; }
.out { border-left: 6px solid var(--edge); padding: 10px 14px; background: var(--paper-2); }

footer.foot { border-top: 2px solid var(--ink); margin-top: 40px; padding: 28px 0 40px; font-size: .9375rem; color: var(--muted); background: var(--paper); }
footer.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
footer.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 0; margin: 0; }
footer.foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--ink); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .bignum { justify-items: start; text-align: left; }
  .steps, .modes, .two, dl.plain { grid-template-columns: 1fr; }
  .steps li { border-right: 0; border-bottom: 1px solid var(--rule); }
  .steps li:last-child { border-bottom: 0; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .hero-grid { grid-template-columns: 1fr; }
  .bignum { justify-items: start; text-align: left; }
  table { min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
  tbody th, tbody td { display: block; padding: 4px 0; border: 0; text-align: left; white-space: normal; }
  tbody td { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; }
  tbody td .fine { font-weight: 400; }
  tbody th { font-weight: 700; }
  tbody td::before { content: attr(data-label); font-family: var(--font-text); font-weight: 400; color: var(--muted); }
  td.num { text-align: right; }
  .lane { grid-template-columns: 1fr auto; grid-template-areas: "who readout" "glass glass"; gap: 6px 12px; }
  .lane .who { grid-area: who; }
  .lane .readout { grid-area: readout; font-size: 1.15rem; }
  .lane .glass { grid-area: glass; height: 56px; }
  .axis { grid-template-columns: 1fr; }
  .axis > span:not(.ticks) { display: none; }
  .grid4 { grid-template-columns: 1fr; }
  .wrap { width: calc(100% - 28px); }
  .top nav a { padding: 0 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .seg button { transition-property: background-color, color, transform; transition-duration: var(--motion-press); transition-timing-function: var(--ease-enter); }
  .btn:active, .seg button:active { transform: scale(.97); }
  .top nav a { transition: border-color var(--motion-enter) var(--ease-enter); }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .seg button, .top nav a { transition: none; }
  .btn:active, .seg button:active { transform: none; }
}
