/* Hallmark · genre: modern-minimal · macrostructure: Split Studio · theme: custom (Boka Glass brand, bokaglass.com) · enrichment: none (real photography) · nav: N9 edge-aligned minimal · footer: Ft2 inline single line
 * tone: quiet, architectural, premium · anchor hue: sage · display + body: Geist (single family, brand)
 * Lower sections follow the bokaglass.com homepage: tight two-tone headlines, hairline rules,
 * large light numerals, round FAQ toggles. The quote card follows its hero quote form.
 * Hallmark · pre-emit critique: P4 H5 E4 S5 R5 V4
 */

/* Geist, self-hosted (latin subset, variable 400–700) so text doesn't wait on Google Fonts. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Tokens ── */
:root {
  /* Brand palette, same values as bokaglass.com (src/app/globals.css). */
  --color-charcoal: #231f20;
  --color-forest: #29332a;
  --color-sage: #6c7663;
  --color-sage-deep: #52674d;
  --color-sage-pale: #cdd6c6;
  --color-gray: #d9d9d9;
  --color-white: #ffffff;
  --color-surface-soft: #f4f4f4;  /* gray 30% on white */
  --color-surface-muted: #e4e4e4; /* gray 72% on white */
  --color-ink-muted: #615e5e;     /* charcoal 72% on white */

  /* Roles */
  --color-paper: var(--color-white);
  --color-paper-2: var(--color-surface-soft);
  --color-ink: var(--color-charcoal);
  --color-ink-2: var(--color-ink-muted);
  --color-ink-3: var(--color-sage);
  --color-rule: var(--color-gray);
  --color-accent: var(--color-sage-deep);
  --color-action: var(--color-forest);
  --color-dark: var(--color-charcoal);
  --color-on-dark: var(--color-white);
  --color-on-dark-2: rgb(255 255 255 / 0.82);
  --color-on-dark-3: rgb(255 255 255 / 0.6);
  --color-on-dark-rule: rgb(255 255 255 / 0.18);
  --color-shade-top: rgb(35 31 32 / 0.56);
  --color-shade-mid: rgb(35 31 32 / 0.8);
  --color-shade-desk-1: rgb(35 31 32 / 0.84);
  --color-shade-desk-2: rgb(35 31 32 / 0.5);
  --color-shade-desk-3: rgb(35 31 32 / 0.18);
  --color-shade-desk-4: rgb(35 31 32 / 0.42);
  --color-shade-clear: rgb(35 31 32 / 0);
  --color-bar: #b9b4af;
  --color-alert: #b42318;
  --color-alert-2: #cf4436;
  --color-error-ink: #66271e;
  --color-error-line: #8d4236;
  --color-sticky: rgb(255 255 255 / 0.88);

  /* The glass quote card (values from the homepage's HeroQuoteForm). */
  --glass-top: rgb(244 244 244 / 0.74);
  --glass-bottom: rgb(217 217 217 / 0.74);
  --glass-edge: rgb(255 255 255 / 0.5);
  --glass-line: rgb(255 255 255 / 0.55);
  --glass-line-strong: rgb(255 255 255 / 0.76);
  --glass-fill: rgb(255 255 255 / 0.16);
  --glass-fill-2: rgb(255 255 255 / 0.35);
  --glass-fill-3: rgb(255 255 255 / 0.45);
  --glass-fill-4: rgb(255 255 255 / 0.65);
  --glass-highlight: rgb(255 255 255 / 0.65);
  --glass-lowlight: rgb(255 255 255 / 0.15);
  --glass-shadow: rgb(35 31 32 / 0.15);
  --glass-selected: rgb(108 118 99 / 0.15);
  --control-line: rgb(35 31 32 / 0.35);
  --numeral-line: rgb(35 31 32 / 0.4);

  --font-sans: 'Geist', 'Helvetica Neue', Arial, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-display: clamp(1.875rem, 5.4vw + 0.5rem, 5rem);
  --text-headline: clamp(2.125rem, 3.6vw + 1.1rem, 4rem);
  --text-headline-m: clamp(1.875rem, 2.6vw + 1rem, 3.25rem);
  --text-figure: clamp(3.25rem, 6vw + 1.6rem, 5.5rem);
  --text-numeral: clamp(2.25rem, 1.6vw + 1.6rem, 3rem);
  --track-display: -0.045em;
  --track-headline: -0.05em;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-28: 112px;
  --gutter: var(--space-4);
  --header-h: 64px;

  --radius-pill: 999px;
  --radius-card: 16px;
  --radius-photo: 10px;
  --radius-field: 8px;
  --radius-option: 9px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur-med: 200ms;
  --dur-slow: 300ms;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  caret-color: var(--color-accent);
  accent-color: var(--color-action);
}

/* The parts the browser draws still belong to the page: selection and the
   default focus ring come from the palette, not the browser's blue. */
::selection {
  background: var(--color-sage-pale);
  color: var(--color-ink);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.hero :focus-visible,
.footer :focus-visible {
  outline-color: var(--color-on-dark);
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

.nowrap {
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Top bar: just the wordmark, sitting on the hero photo ── */
.topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  color: var(--color-on-dark);
}

.topbar-inner {
  display: flex;
  align-items: center;
  min-height: var(--header-h);
}

.logo svg {
  width: 104px;
  height: auto;
}

/* ── Hero ── */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--color-dark);
  color: var(--color-on-dark);
}

.hero-grid {
  display: grid;
  grid-template-areas:
    "copy"
    "card"
    "proof";
}

.hero-copy {
  grid-area: copy;
  position: relative;
  margin-inline: calc(var(--gutter) * -1);
  padding: calc(var(--header-h) + var(--space-4)) var(--gutter) 104px;
  overflow: hidden;
}

.hero-photo,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-photo {
  object-fit: cover;
  object-position: 38% 30%;
  z-index: -2;
}

.hero-shade {
  z-index: -1;
  background: linear-gradient(180deg, var(--color-shade-top) 0%, var(--color-shade-mid) 70%, var(--color-dark) 100%);
}

.eyebrow {
  font-size: var(--text-md);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-on-dark);
}

.hero h1 {
  margin-top: var(--space-3);
  font-size: var(--text-display);
  line-height: 1;
  letter-spacing: var(--track-display);
  font-weight: 700;
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
}

.hero-sub {
  margin-top: var(--space-4);
  max-width: 34rem;
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--color-on-dark-2);
}

/* ── Quote card ──
   Styled like the quote form on the bokaglass.com homepage: a frosted glass
   card over the dark hero, light outlined options, labels that sit inside the
   fields, and a dark pill button. */
.quote-card {
  grid-area: card;
  position: relative;
  margin-top: -76px;
  padding: 26px 22px;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-card);
  background: var(--color-surface-soft);
  box-shadow: 0 20px 64px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight), inset 0 -1px 0 var(--glass-lowlight);
  color: var(--color-ink);
  scroll-margin-top: 12px;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .quote-card {
    background: linear-gradient(135deg, var(--glass-top), var(--glass-bottom));
    -webkit-backdrop-filter: blur(24px) saturate(0.8);
    backdrop-filter: blur(24px) saturate(0.8);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .quote-card {
    background: var(--color-surface-soft);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.card-eyebrow {
  margin-bottom: 9px;
  font-size: var(--text-xs);
  font-weight: 500;
}

.card-title {
  font-size: 1.6875rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.card-sub {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.progress-track {
  margin-top: 18px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--glass-line);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 20%;
  border-radius: inherit;
  background: var(--color-action);
  transition: width var(--dur-slow) var(--ease-out);
}

.step {
  border: 0;
  min-width: 0;
  margin-top: var(--space-5);
}

/* The spam trap sits off screen rather than display: none, which bots skip. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.step-title {
  float: left;
  width: 100%;
  margin-bottom: 14px;
  font-size: var(--text-base);
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -0.02em;
  outline: none;
}

.step-title + * {
  clear: both;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--space-2);
}

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-option);
  background: var(--glass-fill);
  line-height: 1.45;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.option:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.option:hover {
  background: var(--glass-fill-2);
}

.option:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--glass-selected);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

.option:has(input[aria-invalid="true"]) {
  border-color: var(--color-error-line);
}

.option:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Answers move on when tapped, so they skip the radio dot: the outline and
   fill show the pick. The radio stays in the page, unseen, for keyboards and
   screen readers, and the focus ring goes on the whole answer. */
.option input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

/* The call agreement is a switch: the text on the left, a pill on the right
   whose knob slides over and turns forest when it's on. It's still a checkbox
   underneath, so the form and screen readers treat it as one. */
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 50px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-option);
  background: var(--glass-fill);
  line-height: 1.45;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.switch:has(input[aria-invalid="true"]) {
  border-color: var(--color-error-line);
}

.switch:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.switch input {
  appearance: none;
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  margin: 0;
  border: 1px solid var(--control-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
  cursor: pointer;
  transition: background-color var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}

.switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-paper);
  box-shadow: 0 1px 2px var(--glass-shadow);
  transition: transform var(--dur-med) var(--ease-out);
}

.switch input:checked {
  border-color: var(--color-action);
  background: var(--color-action);
}

.switch input:checked::after {
  transform: translateX(18px);
}

@media (forced-colors: active) {
  .switch input {
    appearance: auto;
    width: auto;
    height: auto;
  }

  .switch input::after {
    content: none;
  }

  /* Forced colours drop the fill that marks a pick, so the radios come back. */
  .option input[type="radio"] {
    position: static;
    width: auto;
    height: auto;
    opacity: 1;
    pointer-events: auto;
  }
}

.fields {
  display: grid;
  gap: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

/* The label sits inside the field and shrinks to the top edge once the field
   has focus or a value. This needs placeholder=" " on every input. */
.field {
  position: relative;
  min-width: 0;
}

.field label {
  position: absolute;
  z-index: 1;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-base);
  line-height: 16px;
  cursor: text;
  transition: top 0.16s ease-out, transform 0.16s ease-out, font-size 0.16s ease-out;
}

.field:has(input:focus) label,
.field:has(input:not(:placeholder-shown)) label {
  top: 5px;
  transform: none;
  font-size: 0.625rem;
}

.field:has(input:-webkit-autofill) label {
  top: 5px;
  transform: none;
  font-size: 0.625rem;
}

.field input {
  width: 100%;
  height: 52px;
  padding: 20px 12px 4px;
  border: 2px solid var(--glass-line);
  border-radius: var(--radius-field);
  background: var(--glass-fill-2);
  font: inherit;
  font-size: var(--text-base);
  color: var(--color-ink);
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.field input:hover {
  background: var(--glass-fill-3);
  border-color: var(--glass-line-strong);
}

.field input:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--glass-fill-4);
}

.field input[aria-invalid="true"] {
  border-color: var(--color-error-line);
}

@media (forced-colors: active) {
  .field input:focus {
    border-color: Highlight;
  }
}

.step-help {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* The callback promise under the contact step's question. The question is
   floated, so it gives up its own bottom margin instead. */
.step-title:has(+ .step-lead) {
  margin-bottom: var(--space-1);
}

.step-lead {
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.step-error {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-error-ink);
}

.form-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.form-nav:has(.btn-back:not([hidden])) {
  grid-template-columns: auto minmax(0, 1fr);
}

/* Step 1 has no Back and, until answered, no Next: drop the empty row. */
.form-nav:not(:has(button:not([hidden]))) {
  display: none;
}

.btn-next {
  min-height: 50px;
  padding: 15px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-action);
  color: var(--color-on-dark);
  font: inherit;
  font-size: var(--text-base);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}

.btn-next:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

.btn-next:active {
  transform: translateY(0);
}

.btn-next:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.btn-back {
  min-height: 48px;
  padding: 12px 10px 12px 0;
  border: 0;
  background: none;
  color: var(--color-ink);
  font: inherit;
  font-size: var(--text-base);
  text-underline-offset: 4px;
  cursor: pointer;
}

.btn-back:hover {
  text-decoration: underline;
}

.btn-next:focus-visible,
.btn-back:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 4px;
}

.btn-back:focus-visible {
  border-radius: 2px;
}

.form-legal {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  line-height: 1.6;
  text-align: center;
}

/* ── Thank-you panels (inside the glass card) ── */
.thanks {
  padding: var(--space-6) var(--space-1) var(--space-3);
  text-align: center;
  outline: none;
}

.thanks-check {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  background: var(--color-action);
}

.thanks-check svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--color-on-dark);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thanks-check .icon-fill {
  width: 24px;
  height: 24px;
  fill: var(--color-on-dark);
  stroke: none;
}

.thanks h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.thanks p {
  margin-top: var(--space-2);
}

.thanks .call-number {
  display: block;
  margin: var(--space-1) 0 var(--space-5);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.thanks .btn-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 var(--space-8);
  white-space: nowrap;
  border-radius: var(--radius-pill);
  background: var(--color-action);
  color: var(--color-on-dark);
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}

.thanks .btn-save:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

.thanks .btn-save:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 4px;
}

.btn-save svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thanks .call-note {
  margin-top: var(--space-3);
  font-size: 0.8125rem;
}

/* ── Proof under the hero copy ── */
.hero-proof {
  grid-area: proof;
  padding: var(--space-8) 0 var(--space-12);
}

/* Plain checks, no badges, in the homepage's hero-trust voice. Four points as an
   even two-by-two under a hairline at every width, so a wrap never strands one on
   its own row. */
.trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-5);
  max-width: 30rem;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-on-dark-rule);
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-on-dark-2);
}

.trust li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.35;
}

.trust li::before {
  flex: none;
  margin-top: 1px;
}

.trust li::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='black' stroke-width='2' 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 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── Shared section type ── */
.label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink-2);
}

.headline {
  font-size: var(--text-headline);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: var(--track-headline);
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
}

.headline--m {
  font-size: var(--text-headline-m);
  line-height: 1.06;
}

/* The homepage's two-tone headline: the answer sits in sage. */
.headline-answer {
  color: var(--color-ink-3);
}

.label + .headline {
  margin-top: var(--space-4);
}

/* Pill buttons, same voice as the homepage's solid button. */
.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 var(--space-8);
  border-radius: var(--radius-pill);
  background: var(--color-action);
  color: var(--color-on-dark);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}

.btn-cta:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

.btn-cta:active {
  transform: translateY(0);
}

.btn-cta:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 4px;
}

/* ── Receipt: Trent's two quotes, to scale ── */
.receipt {
  padding-block: var(--space-20) var(--space-16);
}

.receipt-grid {
  display: grid;
  grid-template-areas:
    "copy"
    "chart"
    "cta";
  row-gap: var(--space-10);
}

.receipt-copy {
  grid-area: copy;
}

.quotes {
  grid-area: chart;
  display: grid;
  gap: var(--space-6);
}

.receipt .btn-cta {
  grid-area: cta;
}

/* The per-ad pages make their argument as three plain points where the home
   page has Trent's chart. Same voice as the "Who you're hiring" facts. */
.points {
  grid-area: chart;
  display: grid;
  gap: var(--space-6);
  align-content: start;
  list-style: none;
}

.points li {
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-rule);
}

.points strong {
  display: block;
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.points span {
  display: block;
  margin-top: var(--space-2);
  line-height: 1.7;
  color: var(--color-ink-2);
}

.quotes-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink-2);
}

/* Two real quotes as paper slips drawn to scale: a slip is as tall as its
   price (--k is the height of $1k), so the door-to-door one runs more than
   twice as long. Its striped part starts exactly where the Boka slip ends:
   that is what was charged on top for the same windows. */
.slips {
  --k: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  align-items: start;
}

.slip {
  position: relative;
  padding: var(--space-4) var(--space-4) 0;
  border-radius: var(--radius-photo) var(--radius-photo) 0 0;
  /* A torn, zig-zag bottom edge, like a till receipt. */
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
}

.slip--door {
  height: calc(32 * var(--k));
  background: var(--color-paper-2);
}

.slip--boka {
  height: calc(15 * var(--k));
  background: var(--color-action);
  color: var(--color-on-dark);
}

.slip-who {
  font-size: var(--text-sm);
  line-height: 1.3;
  color: var(--color-ink-2);
}

.slip--boka .slip-who {
  color: var(--color-on-dark-2);
}

.slip-total {
  margin-top: var(--space-2);
  font-size: clamp(2.5rem, 11vw, 4rem);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.slip-total small {
  display: block;
  margin-bottom: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* Starts at the 15k mark and fills the rest of the door-to-door slip. */
.slip-extra {
  position: absolute;
  inset: calc(15 * var(--k)) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-3) var(--space-5);
  background: repeating-linear-gradient(-45deg, var(--color-alert) 0 7px, var(--color-alert-2) 7px 14px);
}

.slip-extra span {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--color-paper);
  color: var(--color-alert);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

@media (min-width: 960px) {
  .slips {
    --k: 12px;
    gap: var(--space-5);
  }

  .slip {
    padding: var(--space-5) var(--space-5) 0;
  }
}

.quotes-note {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-ink-2);
}

/* ── Voices: the two reviews, set as type rather than cards ── */
.voices {
  padding-block: var(--space-20) var(--space-16);
  background: var(--color-paper-2);
}

.voices-grid {
  display: grid;
  row-gap: var(--space-10);
}

.voices-note {
  max-width: 28rem;
  margin-top: var(--space-4);
  line-height: 1.7;
  color: var(--color-ink-2);
}

/* While the page is one column the heading, its note and the video are centred
   together; on desktop they sit left-aligned in the left column. */
.voices-head {
  text-align: center;
}

.voices-head .voices-note {
  margin-inline: auto;
}

.voice-video {
  max-width: 340px;
  margin: var(--space-6) auto 0;
}

@media (min-width: 960px) {
  .voices-head {
    text-align: left;
  }

  .voices-head .voices-note,
  .voice-video {
    margin-inline: 0;
  }
}

.voice-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-photo);
  background: var(--color-dark);
}

.voice-video figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}

.voices-list {
  display: grid;
  gap: var(--space-10);
}

.voice {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-rule);
}

/* Five stars from one star shape, repeated as a mask so it takes the ink colour. */
.voice-stars {
  width: 88px;
  height: 16px;
  margin-bottom: var(--space-4);
  background: var(--color-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 20'%3E%3Cpath d='M10 1.2l2.7 5.5 6 .9-4.35 4.25 1.03 6L10 15l-5.38 2.85 1.03-6L1.3 7.6l6-.9z'/%3E%3C/svg%3E") 0 0 / auto 16px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 20'%3E%3Cpath d='M10 1.2l2.7 5.5 6 .9-4.35 4.25 1.03 6L10 15l-5.38 2.85 1.03-6L1.3 7.6l6-.9z'/%3E%3C/svg%3E") 0 0 / auto 16px repeat-x;
}

@media (forced-colors: active) {
  .voice-stars {
    background: CanvasText;
  }
}

.voice blockquote {
  font-size: var(--text-lg);
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.voice figcaption {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}

.voice figcaption strong {
  margin-right: var(--space-2);
  font-weight: 600;
  color: var(--color-ink);
}

/* ── Work: one real job ── */
.work {
  padding-block: var(--space-20) var(--space-16);
}

.work-note {
  max-width: 28rem;
  margin-top: var(--space-4);
  line-height: 1.7;
  color: var(--color-ink-2);
}

.work-note strong {
  display: block;
  font-weight: 600;
  color: var(--color-ink);
}

.work-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.work-shot {
  position: relative;
}

.work-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-photo);
  background: var(--color-paper-2);
}

/* "Before" / "After" sit on the photo, so the pair reads at a glance. */
.work-shot span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgb(35 31 32 / 0.78);
  color: var(--color-on-dark);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.work-lead {
  margin-top: var(--space-8);
}

.work-lead img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-photo);
  background: var(--color-paper-2);
}

.work-lead figcaption,
.work-job figcaption {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-ink-2);
}

.work-job figcaption strong {
  font-weight: 600;
  color: var(--color-ink);
}

.work-jobs {
  display: grid;
  gap: var(--space-8);
  margin-top: var(--space-8);
}

/* ── Owner: who you're hiring, with the founder's family photo ── */
.owner {
  padding-block: var(--space-20) var(--space-16);
  background: var(--color-paper-2);
}

.owner-grid {
  display: grid;
  row-gap: var(--space-10);
}

.owner-facts {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-8);
  list-style: none;
}

.owner-facts li {
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-rule);
}

.owner-facts strong {
  display: block;
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.owner-facts span {
  display: block;
  margin-top: var(--space-2);
  line-height: 1.7;
  color: var(--color-ink-2);
}

/* Phones see the faces first; on desktop the photo moves to the right. */
.owner-photo {
  order: -1;
}

.owner-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 15%;
  border-radius: var(--radius-photo);
  background: var(--color-surface-muted);
}

.owner-photo figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}

/* ── Steps: the homepage's large light numerals over hairlines ── */
.steps {
  padding-block: var(--space-20);
}

.how {
  display: grid;
  gap: var(--space-8);
  margin-top: var(--space-10);
  list-style: none;
  counter-reset: how;
}

.how li {
  counter-increment: how;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-rule);
}

.how li::before {
  content: counter(how, decimal-leading-zero);
  grid-row: span 2;
  font-size: var(--text-numeral);
  line-height: 0.9;
  font-weight: 400;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--color-ink-3);
}

.how strong {
  display: block;
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.how span {
  display: block;
  margin-top: var(--space-2);
  line-height: 1.7;
  color: var(--color-ink-2);
}

/* ── FAQ ── */
.faq {
  padding-block: var(--space-20) var(--space-24);
  background: var(--color-paper-2);
}

.faq-grid {
  display: grid;
  grid-template-areas:
    "head"
    "list"
    "cta";
  row-gap: var(--space-8);
}

.faq-title {
  grid-area: head;
}

.faq-list {
  grid-area: list;
}

.faq .btn-cta {
  grid-area: cta;
}

.faq-list details {
  border-top: 1px solid var(--color-rule);
}

.faq-list details:last-child {
  border-bottom: 1px solid var(--color-rule);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-5) 0;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
  transition: color var(--dur-med) var(--ease-out);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary:hover {
  color: var(--color-ink-3);
}

.faq-list summary:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 4px;
  border-radius: 2px;
}

.faq-list summary::after {
  content: "+";
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  height: 30px;
  border: 1px solid var(--color-rule);
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  color: var(--color-ink-3);
  transition: transform var(--dur-med) var(--ease-out), background-color var(--dur-med) var(--ease-out);
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
  background: var(--color-surface-muted);
}

.faq-list details p {
  max-width: 40rem;
  padding: 0 var(--space-12) var(--space-6) 0;
  line-height: 1.7;
  color: var(--color-ink-2);
}

/* ── Sticky bar (phones) ── */
.sticky-cta {
  position: fixed;
  inset: auto 0 0;
  z-index: 10;
  display: flex;
  padding: var(--space-3) var(--gutter) calc(var(--space-3) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-rule);
  background: var(--color-sticky);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
}

.sticky-cta.is-visible {
  transform: none;
  visibility: visible;
  transition: transform 0.25s var(--ease-out);
}

.sticky-cta .btn-cta {
  flex: 1;
}

/* ── Closer: the last ask, with its reason, over a finished job ── */
.closer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--space-24);
  background: var(--color-dark);
  color: var(--color-on-dark);
}

.closer-photo,
.closer-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.closer-photo {
  z-index: -2;
  object-fit: cover;
  object-position: 50% 45%;
}

.closer-shade {
  z-index: -1;
  background: linear-gradient(90deg, rgb(35 31 32 / 0.9) 0%, rgb(35 31 32 / 0.72) 55%, rgb(35 31 32 / 0.45) 100%);
}

.closer-inner {
  display: grid;
  gap: var(--space-5);
}

.closer .headline,
.closer-sub {
  max-width: 42rem;
}

.closer-sub {
  line-height: 1.7;
  color: var(--color-on-dark-2);
}

.closer .btn-cta {
  margin-top: var(--space-3);
  background: var(--color-white);
  color: var(--color-ink);
}

.closer .btn-cta:hover {
  background: var(--color-paper-2);
}

.closer .btn-cta:focus-visible {
  outline-color: var(--color-white);
}

/* ── Footer ── */
.footer {
  /* No room is reserved for the sticky bar: it steps aside while the FAQ's
     button is on screen, which it always is at the bottom of the page. */
  padding: var(--space-8) 0 calc(var(--space-8) + env(safe-area-inset-bottom));
  background: var(--color-dark);
  font-size: 0.8125rem;
  color: var(--color-on-dark-3);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
}

.footer nav {
  display: flex;
  gap: var(--space-5);
}

.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-on-dark-2);
  text-underline-offset: 3px;
  transition: color var(--dur-med) var(--ease-out);
}

.footer a:hover {
  color: var(--color-on-dark);
}

.footer a:focus-visible {
  outline: 2px solid var(--color-on-dark);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Larger screens ── */
@media (min-width: 640px) {
  :root {
    --gutter: 28px;
  }

  .quote-card {
    border-radius: 20px;
  }

  .btn-cta {
    display: inline-flex;
    justify-self: start;
  }

  .sticky-cta .btn-cta {
    display: flex;
  }

  .voices-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-8);
  }

  .work-pair {
    gap: var(--space-3);
  }

  .how {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-8);
  }

  .how li {
    display: block;
  }

  .how li::before {
    display: block;
    margin-bottom: var(--space-8);
  }
}

@media (min-width: 960px) {
  :root {
    --gutter: 40px;
  }

  .topbar-inner {
    min-height: 76px;
  }

  .logo svg {
    width: 116px;
  }

  /* The two columns sit in the vertical middle of the hero, and the card is
     centred against the copy. */
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 440px;
    grid-template-rows: auto auto;
    grid-template-areas:
      "copy card"
      "proof card";
    align-content: center;
    column-gap: 72px;
    min-height: min(100svh, 880px);
    /* Equal space above and below, so "middle" is the true middle of the photo.
       On short laptop screens the bottom space gives way first, so the whole
       block still fits above the fold. */
    padding-block: calc(76px + var(--space-12)) clamp(72px, calc(100svh - 630px), calc(76px + var(--space-12)));
  }

  /* The photo and shade escape the copy column and cover the whole hero. */
  .hero-copy {
    position: static;
    margin: 0;
    padding: 0;
    align-self: end;
    overflow: visible;
  }

  .hero-photo {
    object-position: 40% 35%;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, var(--color-shade-desk-1) 0%, var(--color-shade-desk-2) 48%, var(--color-shade-desk-3) 100%),
      linear-gradient(0deg, var(--color-shade-desk-4) 0%, var(--color-shade-clear) 40%);
  }

  .hero-sub {
    font-size: 1.1875rem;
  }

  /* Centred against the copy beside it. */
  .quote-card {
    align-self: center;
    margin-top: 0;
    padding: clamp(26px, 2.5vw, 36px);
  }

  /* The homepage form's desktop sizes. */
  .card-title {
    font-size: 1.8125rem;
  }

  .card-sub,
  .step-help,
  .step-error {
    font-size: 0.8125rem;
  }

  .option {
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    font-size: 0.8125rem;
  }

  .switch {
    min-height: 46px;
    font-size: 0.8125rem;
  }

  .field label {
    font-size: var(--text-sm);
  }

  .btn-next {
    font-size: var(--text-sm);
  }

  .btn-back {
    font-size: 0.8125rem;
  }

  .hero-proof {
    padding: var(--space-10) 0 0;
  }

  /* Split Studio: copy on one side, proof on the other. */
  .receipt {
    padding-block: var(--space-28) var(--space-24);
  }

  .receipt-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "copy chart"
      "cta chart";
    column-gap: var(--space-20);
    row-gap: var(--space-10);
    align-items: start;
  }

  .voices {
    padding-block: var(--space-24);
  }

  .voices-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    column-gap: var(--space-20);
    align-items: start;
  }

  .voices-list {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-10);
  }

  .voice blockquote {
    font-size: 1.5rem;
    line-height: 1.4;
  }

  .work {
    padding-block: var(--space-24) var(--space-20);
  }

  .work-lead img {
    aspect-ratio: 16 / 9;
  }

  .work-lead,
  .work-jobs {
    margin-top: var(--space-10);
  }

  .work-jobs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-10) var(--space-8);
  }

  .owner {
    padding-block: var(--space-24);
  }

  .owner-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    column-gap: var(--space-16);
    align-items: center;
  }

  .owner-photo {
    order: 0;
  }

  .owner-photo img {
    aspect-ratio: 4 / 5;
  }

  .steps {
    padding-block: var(--space-24);
  }

  .how {
    gap: var(--space-10);
    margin-top: var(--space-16);
  }

  .how strong {
    font-size: 1.4375rem;
  }

  .faq {
    padding-block: var(--space-24) var(--space-28);
  }

  .faq-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "head list"
      "cta list";
    column-gap: var(--space-20);
    align-items: start;
  }

  .sticky-cta {
    display: none;
  }

  .footer {
    padding-bottom: var(--space-8);
  }
}

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

  .btn-cta:hover,
  .btn-next:hover,
  .thanks .btn-save:hover {
    transform: none;
  }
}
