/* The self-serve demo's front door (/demo/, 3.0, 17 Oct 2026). One paper card on the butter ground, two steps (choose a sample
   business, your details) and then "check your inbox", after Qasim's reference (lead-engine-two-step-brand-matched). Kit colours and
   fonts only; the card is the one paper sheet, so it alone carries the soft shadow. States are flat: no tints, no glows. */
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/InstrumentSerif-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/assets/fonts/SpaceGrotesk-Variable.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }

:root {
  --butter: #F5EEDC; --paper: #FBF7EC; --field: #FFFDF8; --espresso: #28231F; --vermilion: #D84B32; --action: #C9432D; --white: #FFFFFF; --error: #A3321F;
  --ink-2: color-mix(in srgb, var(--espresso) 76%, var(--paper));
  --rule: color-mix(in srgb, var(--espresso) 22%, transparent);
  --rule-mid: color-mix(in srgb, var(--espresso) 34%, transparent);
  --serif: "Instrument Serif", Georgia, serif; --sans: "Space Grotesk", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --pad: 48px; --r: 6px;
}
@media (max-width: 639.98px) { :root { --pad: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { overflow-x: clip; }
body { position: relative; min-height: 100svh; display: flex; flex-direction: column; background: var(--butter); color: var(--espresso); font-family: var(--sans); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
/* Paper grain over everything, as on the home page. */
body::after { content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.06; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.14  0 0 0 0 0.12  0 0 0 1.4 -0.3'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
main { flex: 1 0 auto; padding: 64px 20px 0; outline: none; }
p, h1, h2, ol, ul, fieldset { margin: 0; }
h1, h2 { font-weight: 400; }
ol, ul { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--espresso); color: var(--butter); }
:focus-visible { outline: 2px solid var(--espresso); outline-offset: 3px; }
:root { caret-color: var(--action); accent-color: var(--action); }
[hidden] { display: none !important; }
.vh, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nw { white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 60; padding: 10px 14px; background: var(--espresso); color: var(--butter); text-decoration: none; }
.skip:focus { top: 12px; }
.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.link:hover { text-decoration-thickness: 2px; }
.link--btn { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }

/* ---------- The scene: a sunrise film, fixed behind the page ---------- */
/* Desktop: anchored left so the sun sits clear of the card's right edge; phones: the sun centred, lifted above the card. */
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #E9C3AE url("/demo/img/door-sunrise-poster.jpg") 0% 50% / cover no-repeat; }
.scene__film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0% 50%; transform-origin: 70% 52%; }
@media (max-width: 899.98px) {
  .scene { background-position: 81% 50%; }
  main { padding-top: 150px; }
  .scene__film { inset: auto 0 auto 0; top: -46vh; height: 100%; object-position: 81% 50%; }
  .scene::after { content: ""; position: absolute; inset: 54vh 0 0; background: #54636A; }
}
/* A slow push-in, as if the camera breathes; the film itself stays locked off. */
@media (prefers-reduced-motion: no-preference) {
  .scene__film { animation: push 40s ease-in-out infinite alternate; }
  @keyframes push { to { transform: scale(1.06); } }
}
main, .foot { position: relative; z-index: 1; }

/* ---------- The card ---------- */
.card { position: relative; width: 100%; max-width: 680px; margin: 0 auto; padding: 30px var(--pad) 40px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(40, 35, 31, 0.05), 0 32px 64px -36px rgba(40, 35, 31, 0.32); }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1.5px solid var(--espresso); }
.card__logo { display: block; border-radius: 2px; }
.card__logo img { height: 30px; width: auto; }
.card__crumb { font-size: 15px; font-weight: 500; white-space: nowrap; }
.card__end { margin-top: 36px; padding-top: 22px; border-top: 1.5px solid var(--espresso); }

/* ---------- Frosted paper: the card is a pane over the film ---------- */
/* The film shows through blurred and warmed, so the card belongs to the scene; ink stays at full contrast on it.
   Solid paper where blur isn't supported or the visitor asks for less transparency. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  @media not (prefers-reduced-transparency: reduce) {
    .card, .foot { -webkit-backdrop-filter: blur(30px) saturate(1.35); backdrop-filter: blur(30px) saturate(1.35); }
    .card { --r: 14px; background: color-mix(in srgb, var(--paper) 86%, transparent); border-color: rgba(255, 255, 255, 0.6);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 2px 6px rgba(60, 30, 20, 0.08), 0 48px 96px -40px rgba(60, 30, 20, 0.5); }
    .card .pick, .card .chosen { background: color-mix(in srgb, var(--field) 70%, transparent); border-color: rgba(40, 35, 31, 0.16); border-radius: 10px; }
    .card .pick:hover { background: color-mix(in srgb, var(--field) 80%, transparent); border-color: var(--espresso); }
    .card .pick:has(input:checked) { background: color-mix(in srgb, var(--field) 86%, transparent); border-color: var(--action); }
    .card .fld input { background: color-mix(in srgb, var(--field) 78%, transparent); border-color: rgba(40, 35, 31, 0.2); border-radius: 8px; }
    .card .fld input:focus { background: var(--field); }
    .card .btn { border-radius: 10px; overflow: hidden; }
    .card__top { border-bottom-color: color-mix(in srgb, var(--espresso) 85%, transparent); }
    .foot { --r: 12px; background: color-mix(in srgb, var(--paper) 82%, transparent); border-color: rgba(255, 255, 255, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); }
  }
}

/* ---------- Stepper: vermilion is now, espresso with a tick is done ---------- */
.stepper { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 24px 0 40px; }
.stepper__s { display: flex; }
.stepper__btn { display: inline-flex; align-items: center; gap: 12px; text-align: left; line-height: 1.15; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 500; color: inherit; border-radius: 4px; }
button.stepper__btn { cursor: pointer; }
button.stepper__btn:disabled { cursor: default; }
button.stepper__btn:not(:disabled):hover > span:last-child { text-decoration: underline; text-underline-offset: 0.22em; }
.stepper__n { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid var(--espresso); border-radius: 50%; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background-color 320ms var(--ease-out), border-color 320ms var(--ease-out), color 320ms var(--ease-out); }
.stepper__n > * { grid-area: 1 / 1; transition: opacity 220ms var(--ease-out), transform 320ms var(--spring); }
.stepper__n svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(0.4); }
.stepper__line { position: relative; width: 64px; height: 1.5px; background: var(--rule-mid); overflow: hidden; }
.stepper__line span { position: absolute; inset: 0; background: var(--espresso); transform: scaleX(0); transform-origin: left; transition: transform 640ms var(--ease-out) 80ms; }
/* now */
body[data-on="door"] [data-step="1"] .stepper__n, body[data-on="form"] [data-step="2"] .stepper__n { background: var(--action); border-color: var(--action); color: var(--white); }
/* done */
body:not([data-on="door"]) [data-step="1"] .stepper__n, body[data-on="sent"] [data-step="2"] .stepper__n { background: var(--espresso); border-color: var(--espresso); color: var(--butter); }
body:not([data-on="door"]) [data-step="1"] .stepper__d, body[data-on="sent"] [data-step="2"] .stepper__d { opacity: 0; transform: scale(0.4); }
body:not([data-on="door"]) [data-step="1"] svg, body[data-on="sent"] [data-step="2"] svg { opacity: 1; transform: none; }
body:not([data-on="door"]) .stepper__line span { transform: none; }

/* ---------- Headline: a bold grotesk line, then the 82% serif line ---------- */
.hd { display: grid; outline: none; }
.hl { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hd__sans { display: block; font-family: var(--sans); font-weight: 700; font-size: clamp(2.125rem, 8.4vw, 3.5rem); line-height: 1.02; letter-spacing: -0.035em; }
.hd__serif { display: block; width: 121.95122%; transform: scaleX(0.82); transform-origin: left center; font-family: var(--serif); font-size: clamp(2.875rem, 11.4vw, 4.75rem); line-height: 0.92; letter-spacing: -0.005em; white-space: nowrap; }
.lede { margin: 18px 0 30px; font-size: 18px; line-height: 1.45; max-width: 34em; text-wrap: pretty; }

/* ---------- (1) The choices: real radios, the whole card is the target ---------- */
.picks { display: grid; gap: 12px; }
.pick { position: relative; display: grid; grid-template-columns: 40px 1fr 24px; align-items: center; gap: 20px; padding: 20px 22px; background: var(--field); border: 1px solid var(--rule-mid); border-radius: var(--r); cursor: pointer;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out), transform 160ms var(--ease-out); -webkit-tap-highlight-color: transparent; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.pick:hover { border-color: var(--espresso); }
.pick:active { transform: scale(0.99); }
.pick:has(input:focus-visible) { outline: 2px solid var(--espresso); outline-offset: 3px; }
.pick:has(input:checked) { border-color: var(--action); box-shadow: inset 0 0 0 1px var(--action); }
.pick__i { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.pick__t { display: grid; gap: 2px; min-width: 0; }
.pick__n { font-size: 19px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.pick__s { font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.pick__r { position: relative; width: 24px; height: 24px; border: 1.5px solid var(--rule-mid); border-radius: 50%; transition: border-color 200ms var(--ease-out); }
.pick__r::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--action); transform: scale(0); transition: transform 280ms var(--spring); }
.pick:hover .pick__r { border-color: var(--espresso); }
.pick:has(input:checked) .pick__r { border-color: var(--action); }
.pick:has(input:checked) .pick__r::after { transform: scale(1); }
.picks + .err { margin-top: 14px; }

/* ---------- Buttons: the site's action label + arrow box, flat ---------- */
.btn { display: inline-flex; height: 60px; padding: 0; border: 0; font: inherit; text-decoration: none; cursor: pointer; flex-shrink: 0; -webkit-tap-highlight-color: transparent; transition: transform 160ms var(--ease-out); }
.btn:active { transform: scale(0.985); }
.btn__l { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 26px; background: var(--action); color: var(--white); font-weight: 500; font-size: 17px; line-height: 1; white-space: nowrap; transition: background-color 200ms var(--ease-out); }
.btn:hover .btn__l { background: #B03A26; }
.btn__a { width: 60px; display: grid; place-items: center; background: var(--espresso); color: var(--butter); }
.btn__a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 240ms var(--ease-out); }
.btn:hover .btn__a svg { transform: translateX(4px); }
.btn--full { display: flex; width: 100%; margin-top: 28px; }
.btn--full .btn__l { flex: 1; }
/* the outline is the button's own, so it follows the card's rounded clip at every corner (22 Oct: a border on the label was cut there) */
.btn--quiet { box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--quiet .btn__l { background: none; color: inherit; }
.btn--quiet:hover .btn__l { background: none; }
.btn--quiet:hover .btn__a svg { transform: translate(2px, -2px); }
.btn:disabled { cursor: progress; }
/* Sending: a crisp ring turns beside the label. */
.spin { display: none; width: 16px; height: 16px; border: 2px solid color-mix(in srgb, var(--white) 35%, transparent); border-top-color: var(--white); border-radius: 50%; animation: spin 700ms linear infinite; }
.btn[aria-busy="true"] .spin { display: block; }
.btn[aria-busy="true"] .btn__a svg { opacity: 0.4; }
@keyframes spin { to { transform: rotate(360deg); } }

.note { margin-top: 14px; font-size: 14px; color: var(--ink-2); text-align: center; }
.note--start { text-align: left; margin-top: 18px; font-size: 15px; }
.link--out { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 500; }
.link--out svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease-out); }
.link--out:hover svg { transform: translate(2px, -2px); }

/* ---------- (2) The form ---------- */
.chosen { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 20px; margin-bottom: 26px; padding: 16px 22px; border: 1px solid var(--rule-mid); border-radius: var(--r); }
.chosen__ch { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; color: var(--action); }
.form { display: grid; gap: 18px; }
.fld { display: grid; gap: 7px; }
.fld label { font-weight: 500; font-size: 15px; }
.fld input { width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid var(--rule-mid); border-radius: 4px; background: var(--field); color: inherit; font: inherit; font-size: 17px;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.fld input::placeholder { color: color-mix(in srgb, var(--espresso) 58%, var(--field)); opacity: 1; }
.fld input:hover { border-color: color-mix(in srgb, var(--espresso) 60%, transparent); }
.fld input:focus { outline: none; border-color: var(--espresso); box-shadow: inset 0 0 0 1px var(--espresso); }
.fld input[aria-invalid="true"] { border-color: var(--action); box-shadow: inset 0 0 0 1px var(--action); }
.fld__hint { font-size: 14px; color: var(--ink-2); }
.err, .status[data-state="error"] { font-size: 15px; font-weight: 500; color: var(--error); }
.err::before, .status[data-state="error"]::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 9px 2px 1px; border-radius: 50%; background: currentColor; vertical-align: middle; }
.ts { min-height: 65px; }
.ts:empty { min-height: 0; }
.form__send { display: grid; gap: 14px; }
.form__send .btn--full { margin-top: 4px; }
.status:empty { display: none; }
.status { font-size: 15px; }
.fine { font-size: 14px; color: var(--ink-2); max-width: 56ch; }

/* ---------- (3) Check your inbox ---------- */
.lede b { font-weight: 600; overflow-wrap: anywhere; }
.sub { margin-top: 6px; font-size: 15px; font-weight: 700; }
.next { margin-top: 12px; border-top: 1.5px solid var(--espresso); }
.next li { display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.45; }
.next b { font-weight: 700; }
.next__n { font-family: var(--serif); font-size: 30px; line-height: 0.8; color: var(--vermilion); }
.next__side { padding: 3px 8px; border: 1px solid var(--rule-mid); border-radius: 3px; font-size: 12px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
.next__owner .next__side { background: var(--espresso); border-color: var(--espresso); color: var(--butter); }
.card__end--call { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.call__q { font-family: var(--serif); font-size: 34px; line-height: 1; width: 121.95122%; margin-right: -21.95122%; transform: scaleX(0.82); transform-origin: left center; }

/* ---------- Footer: quiet, under the card ---------- */
/* On the film the footer sits on its own paper strip, so it reads over sky, sea or dune. */
.foot { display: grid; gap: 4px; justify-items: center; max-width: 680px; width: calc(100% - 20px); margin: 24px auto 32px; padding: 12px 20px 14px; color: var(--espresso); background: color-mix(in srgb, var(--paper) 92%, transparent); border: 1px solid var(--rule); border-radius: var(--r); font-size: 13px; text-align: center; color: var(--ink-2); }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
.foot a { display: inline-flex; align-items: center; min-height: 32px; }
.foot__links a[aria-current] { text-decoration-thickness: 2px; font-weight: 500; color: var(--espresso); }

/* ---------- Arrival: the card settles in once ---------- */
@media (prefers-reduced-motion: no-preference) {
  .card { animation: settle 720ms var(--ease-out) both; }
  @keyframes settle { from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.985); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Phone ---------- */
@media (max-width: 639.98px) {
  main { padding: 150px 10px 0; }
  .card { padding: 20px var(--pad) 28px; }
  .card__logo img { height: 24px; }
  .card__crumb { font-size: 13px; }
  .card__top { padding-bottom: 16px; }
  .stepper { gap: 10px; margin: 16px 0 28px; }
  .stepper__btn { gap: 8px; font-size: 13px; }
  .stepper__n { width: 30px; height: 30px; font-size: 14px; }
  .stepper__line { width: 24px; }
  .lede { font-size: 17px; margin: 14px 0 24px; }
  .pick { grid-template-columns: 32px 1fr 22px; gap: 14px; padding: 16px; }
  .pick__i { width: 32px; height: 32px; }
  .pick__n { font-size: 17px; }
  .pick__s { font-size: 15px; }
  .pick__r { width: 22px; height: 22px; }
  .chosen { grid-template-columns: 32px 1fr auto; gap: 14px; padding: 12px 16px; }
  .chosen .pick__i { width: 32px; height: 32px; }
  .next li { grid-template-columns: 28px 1fr; }
  .next__side { grid-column: 2; justify-self: start; margin-top: -4px; }
  .card__end--call { flex-direction: column; align-items: flex-start; }
  .call__q { font-size: 30px; }
  .foot__sep { display: none; }
  .foot__legal .nw { display: block; }
}
@media (max-width: 400px) { .btn__l { padding: 0 18px; } .stepper { gap: 8px; } .stepper__line { width: 16px; } }
@media (max-width: 369.98px) { .stepper__btn > span:last-child { max-width: 9ch; line-height: 1.15; } }
