/* Benchwell home v3. Loaded after /static/scan.css (tokens, the scan, the status strip), followup.css and
   /static/site.css (header, footer, dialog, fonts). Idle: a full-height light band (header over a code-drawn
   figure, centred entry). After the start the band closes into the status strip that sticks over the real scan. */

:root { --band-h: 100vh; }
@supports (height: 1svh) { :root { --band-h: 100svh; } }
.js body:not(.is-ready) .h-hero { visibility: hidden; }

/* ---------- band: header + first screen, later header + strip ---------- */
.h-band { position: relative; z-index: 25; min-height: var(--band-h); background: var(--bg); color: var(--ink); display: flex; flex-direction: column; }
.h-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.h-bg canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; transform-origin: 50% 46%; }
/* here the shared header lies over the first screen, not sticky on its own (the band is) */
.h-band .h-hd { position: absolute; left: 0; right: 0; top: 0; z-index: 4; background: transparent; border-bottom: 0; }

/* ---------- first screen ---------- */
.h-hero { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; padding: var(--hd) var(--gut) 0; }
.h-hero-in { margin: auto; width: min(100%, 760px); padding: 32px 0 56px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.h-h1 { font-weight: 300; font-size: var(--t-display); line-height: 1.02; letter-spacing: -0.045em; max-width: 13ch; text-wrap: balance; }
.h-sub { margin-top: 24px; max-width: 44ch; font-size: clamp(17px, 1.35vw, 19.5px); line-height: 1.5; color: var(--ink-2); text-wrap: balance; }

/* the entry: one control, field and button in one frame */
.h-form { position: relative; margin-top: 40px; width: min(100%, 600px); text-align: left; }
.h-bar { display: flex; align-items: center; gap: 8px; height: 64px; padding: 6px 6px 6px 0; border: 1px solid var(--field-line); border-radius: 14px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.h-bar:hover { border-color: var(--ink-3); }
.h-bar:has(.h-field:focus) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.h-field { flex: 1; min-width: 0; height: 100%; padding: 0 20px; border: 0; background: transparent; font: 400 19px/1 var(--font); color: var(--ink); outline: none; border-radius: 13px 0 0 13px; }
.h-field::placeholder { color: var(--ink-3); }
.h-cta { flex: none; height: 50px; padding: 0 20px 0 22px; display: inline-flex; align-items: center; gap: 12px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font: var(--w-btn) 16.5px/1 var(--font); cursor: pointer; white-space: nowrap; transition: background .2s; }
.h-cta::after { content: ""; width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M1.5 7h10.5M8 3l4 4-4 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M1.5 7h10.5M8 3l4 4-4 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.h-cta:hover { background: var(--accent-2); }
.h-cta:focus-visible { outline-offset: 2px; }
.h-cta[aria-busy="true"] { cursor: progress; }
.h-cta[aria-busy="true"]::after { -webkit-mask: none; mask: none; width: 12px; height: 12px; border-radius: 50%; background: none; border: 1.6px solid currentColor; border-right-color: transparent; animation: bw-spin .9s linear infinite; }
.h-note { margin-top: 12px; padding: 0 2px; font-size: 14.5px; color: var(--ink-3); text-align: center; }
/* errors sit under the note, out of the flow: the first screen and the figure never jump */
.h-err { position: absolute; left: 0; right: 0; top: 100%; padding: 8px 2px 0; font-size: 15px; line-height: 1.45; color: var(--fail); }
.h-form.is-bad .h-bar { border-color: var(--fail); box-shadow: 0 0 0 1px var(--fail); }
.h-form.has-msg .h-err { color: var(--ink); }
.h-form.has-msg .h-err::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--fail); vertical-align: 1px; }

/* the quiet hint at the bottom: one arrow to what follows */
.h-more { align-self: center; display: grid; place-items: center; width: 44px; height: 44px; margin: 0 0 14px; color: var(--ink-3); border-radius: 10px; transition: color .2s; }
.h-more:hover { color: var(--ink); }
.h-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- status strip (content: render.js, .st-* in scan.css) ---------- */
.h-strip { position: relative; z-index: 3; height: var(--strip); margin-top: var(--hd); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-strong); background: var(--bg); display: none; }
.h-strip-in { height: 100%; }

/* after the start: the band is header + strip; the header scrolls away, the strip stays */
.is-live .h-band, .is-done .h-band { min-height: 0; position: sticky; top: calc(-1 * var(--hd)); }
.is-live .h-hero, .is-done .h-hero, .is-live .h-bg, .is-done .h-bg { display: none; }
/* on a scan the strip carries the next step; the same button in the header would be a second copy */
.is-done .h-hd .h-btn2 { display: none; }
.is-live .h-strip, .is-done .h-strip { display: block; }

/* FLIP (home.js): the strip sits at its final place (top: --hd), starts moved onto the field line with the address
   over the typed text, and glides home with the band's own curve; its bar and other words fade in on the way */
.is-going .h-band { min-height: 0; overflow: hidden; transition: height .82s var(--io) .04s; }
.is-going .h-strip { display: block; position: absolute; left: 0; right: 0; top: var(--hd); margin: 0; background: transparent; border-color: transparent; }
.is-going .h-strip .st-in > :not(.st-dom) { opacity: 0; }
.is-going.is-closing .h-strip { background: var(--bg); border-top-color: var(--line); border-bottom-color: var(--line-strong); transition: transform .82s var(--io) .04s, background .2s ease-out .12s, border-color .2s ease-out .12s; }
.is-going.is-closing .h-strip .st-dom { transition: transform .82s var(--io) .04s; }
/* the strip's other words come in as the address arrives, so it never passes over them */
.is-going.is-closing .h-strip .st-in > :not(.st-dom) { opacity: 1; transition: opacity .24s ease-out .6s; }
.is-going .h-hero-in, .is-going .h-more { transition: opacity .2s ease-out, transform .4s var(--io); }
.is-going.is-closing .h-hero-in, .is-going.is-closing .h-more { opacity: 0; transform: translateY(-12px); }
.is-going .h-bg canvas { transition: transform .76s var(--io) .04s, opacity .34s ease-out; }
.is-going.is-closing .h-bg canvas { transform: scaleY(.04); opacity: 0; }

/* ---------- the scan: real render.js ---------- */
/* it rises with the closing band from 0.3 s: the column heads and first rows come with the strip, no blank page */
.h-scan { transition: opacity .4s ease-out .3s, transform .5s var(--io) .3s; }
.h-scan.is-entering { opacity: 0; transform: translateY(12px); transition: none; }
/* a finished scan with the follow-up form: no second request (the audit block) right under it */
/* a scan on the page: the report ends with its own action; the audit pitch and the FAQ are for the first screen (round 7) */
.is-live .h-audit, .is-done .h-audit, .is-live .h-faq, .is-done .h-faq { display: none; }
.is-live .h-scan { min-height: calc(100vh - var(--strip)); }
#scan { scroll-margin-top: var(--strip); }

/* ---------- below the first screen ---------- */
.h-sec { padding-top: clamp(96px, 10vw, 152px); }
.is-done .h-audit, .is-live .h-audit { padding-top: clamp(56px, 6vw, 96px); }
.h-faq { padding-bottom: clamp(96px, 10vw, 152px); }

/* below the first screen (round 7): a report's layout — the section's title on the left, its content on the
   right, one width for both sections; the audit stands on what it can test, not on decoration */
.h-audit-in, .h-faq-in { max-width: 1040px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px clamp(40px, 6vw, 88px); align-items: start; }
.h-faq-in .h-qs { margin-top: 0; }
.h-statement { font-weight: 400; font-size: var(--t-h2); line-height: 1.15; letter-spacing: -0.025em; max-width: 14ch; text-wrap: balance; }
.h-audit-body { margin-top: 18px; font-size: var(--fs-lead); line-height: 1.45; color: var(--ink-2); max-width: 34ch; text-wrap: pretty; }
.h-acts { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.h-terms { font-size: var(--fs-small); line-height: 1.45; color: var(--ink-3); max-width: 30ch; }
.h-scope-h { font-weight: 400; font-size: var(--fs-small); line-height: 1.4; color: var(--ink-3); }
.h-dirs { margin-top: 12px; border-top: 1px solid var(--line); }
.h-dirs a { display: grid; grid-template-columns: 30px minmax(0, 1fr) 18px; gap: 4px 12px; padding: 18px 0 19px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.h-dir-n { justify-self: start; align-self: start; margin-top: 3px; padding: 4px 6px 3px; border-radius: 5px; background: var(--accent); color: var(--accent-ink); font: 400 12px/1 var(--mono); letter-spacing: .02em; } /* the same numbers as the report sections */
.h-dir-q { display: block; font-size: var(--fs-lead); line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1.5px; text-underline-offset: 5px; transition: text-decoration-color .2s; }
.h-dir-h { display: block; margin-top: 5px; font-size: var(--fs-small); line-height: 1.45; color: var(--ink-2); }
.h-dir-a { align-self: center; color: var(--ink-3); transition: transform .2s var(--ease), color .2s; }
.h-dirs a:hover .h-dir-a { color: var(--ink); transform: translateX(3px); }
.h-audit-lead { font-size: var(--fs-meta); line-height: 1.5; color: var(--ink-3); max-width: 58ch; margin-top: 18px; }
.h-more-row { margin-top: 14px; }
/* the offer starts level with the first direction, not with the small label above the list (owner, 27.10) */
@media (min-width: 861px) { .h-audit-main { padding-top: 50px; } }
@media (max-width: 860px) { .h-audit-in, .h-faq-in { grid-template-columns: minmax(0, 1fr); } }

/* ---------- narrow ---------- */
@media (max-width: 760px) {
  /* the text sits low, so the free space above it is one piece: the sphere stands there (home.js, orbit) */
  .h-hero-in { margin: auto auto 0; padding: 20px 0 28px; }
  .h-h1 { font-size: clamp(38px, 10.6vw, 48px); line-height: 1.04; max-width: 12ch; }
  .h-sub { margin-top: 18px; font-size: 17px; max-width: 30ch; }
  .h-form { margin-top: 30px; }
  .h-bar { flex-direction: column; align-items: stretch; height: auto; padding: 0; gap: 0; border: 0; background: transparent; box-shadow: none !important; }
  .h-bar:hover { border-color: transparent; }
  .h-field { flex: none; height: 56px; border: 1px solid var(--field-line); border-radius: 12px; background: var(--surface); font-size: 18px; padding: 0 16px; }
  .h-field:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
  .h-form.is-bad .h-field { border-color: var(--fail); box-shadow: 0 0 0 1px var(--fail); }
  .h-form.is-bad .h-bar { box-shadow: none; }
  .h-cta { margin-top: 10px; height: 54px; justify-content: center; border-radius: 10px; }
  .h-more { margin-bottom: max(10px, env(safe-area-inset-bottom)); }

  .h-acts .btn-ink { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .h-scan { transition: none; }
}

/* the entry again after the questions (owner, 27.10): the page ends the way it began — the first screen's
   question, the same field, a quiet echo of its orbit; the section rule of the page above it, the footer's
   line under it. Gone while a scan is on the page, like the questions. */
.h-again { padding-bottom: clamp(88px, 9vw, 136px); }
.h-again-in { position: relative; max-width: 1040px; margin-inline: auto; padding: clamp(72px, 8vw, 112px) 0 40px; display: flex; flex-direction: column; align-items: center; text-align: center; isolation: isolate; }
.h-again-fig { position: absolute; z-index: -1; left: 0; right: 0; top: 0; width: 100%; height: 100%; color: var(--ink); opacity: .085; pointer-events: none;
  /* clear behind the words, fading out at every edge: no line ends on a hard border */
  -webkit-mask-image: radial-gradient(ellipse 62% 70% at 50% 58%, transparent 34%, #000 60%, transparent 92%), linear-gradient(to bottom, transparent, #000 18%, #000 70%, transparent);
  -webkit-mask-composite: source-in; mask-image: radial-gradient(ellipse 62% 70% at 50% 58%, transparent 34%, #000 60%, transparent 92%), linear-gradient(to bottom, transparent, #000 18%, #000 70%, transparent); mask-composite: intersect; }
.h-again-h { font-weight: 300; font-size: clamp(34px, 3.8vw, 54px); line-height: 1.04; letter-spacing: -0.04em; max-width: 13ch; text-wrap: balance; }
.h-again .h-form { margin-top: 36px; }
.h-faq { padding-bottom: 0; }
.is-live .h-again, .is-done .h-again { display: none; }

/* the questions: no visible title, a large question mark in thin lines the height of the block (owner, 27.10);
   the title stays for screen readers and search (.sr) */
.h-faq-side { align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.h-faq-mark { flex: none; width: 100%; height: 480px; margin-top: 0; overflow: visible; opacity: .32; pointer-events: none; }
/* three parallel thin lines, like the orbit: rings made of an ink stroke and a paper stroke a hair thinner */
/* one column (owner, 27.10): no mark, the word «Questions» as a plain section title, like the audit's */
@media (max-width: 860px) {
  .h-faq-mark { height: 0; visibility: hidden; } /* not display: none, which would restart its drawing on a resize back to wide */
  .h-faq-side .sr { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
    font-weight: 400; font-size: var(--t-h2); line-height: 1.15; letter-spacing: -0.025em; }
}

/* ---------- phones, under the first screen (owner, 27.10: «big empty gaps») ---------- */
@media (max-width: 760px) {
  /* one rhythm: 64 px of air above each section's rule (was 96, plus the mark, plus 88 + 72 round the last entry) */
  .h-sec { padding-top: 64px; }
  .h-audit-in, .h-faq-in { row-gap: 32px; }
  .h-again { padding-bottom: 64px; }
  .h-again-in { padding: 56px 0 8px; }
  .h-again-h { font-size: clamp(32px, 9vw, 40px); }
  .h-again .h-form { margin-top: 28px; }
}
