/* Home hero: the steampunk room under the black bar. Only the filament and the cord are drawn into the room.
   Panels over the footage are frosted glass (the only glass on the site). Below the hero everything is flat. */
.track { position: relative; height: 300vh; }
.stagewrap { position: sticky; top: var(--bar); }
.stage { position: relative; height: calc(100vh - var(--bar)); height: calc(100svh - var(--bar)); min-height: 520px; overflow: hidden; background: var(--caviar); }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.js .fallback { display: none; }
.js.locked .below { display: none; }

#fil { position: absolute; z-index: 3; overflow: visible; pointer-events: none; }
#fil path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.js #fil { display: block; }
html:not(.js) #fil, html:not(.js) #cordcv, html:not(.js) #pull, html:not(.js) #tag, html:not(.js) #cv { display: none; }

#pull { position: absolute; z-index: 5; width: 44px; margin: 0; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; transform: translate(-50%, 0); }
#pull:active { cursor: grabbing; }
#pull:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }

/* frosted glass: blur, a 1px light border and an inset highlight; dark tint so text holds AA over any frame */
.glass { background: rgba(37, 35, 36, 0.74); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(243, 240, 235, 0.28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); border-radius: var(--r); color: var(--snow); }
.tag { position: absolute; z-index: 6; padding: 8px 12px; font: 500 14px/1 var(--f); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0; transform: translateY(-4px); transition: opacity 400ms var(--e), transform 400ms var(--e); pointer-events: none; white-space: nowrap; }
.tag.on { opacity: 1; transform: none; }

/* the dock: intro copy first, the form after the light comes on */
.dock { position: relative; z-index: 6; padding: 24px 16px; pointer-events: none; }   /* layout box only: on phones it overlapped the cord and ate every touch */
.dock .panel { pointer-events: auto; }
.panel { padding: 32px; max-width: 480px; }
.panel > * + * { margin-top: 16px; }
.panel h1 { font-size: 40px; color: var(--snow); }
.panel h2 { font-size: 32px; color: var(--snow); }
.panel .fact { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; color: var(--muted-dark); }
.panel .fact b { font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; color: var(--snow); margin-right: 8px; }
.panel p { color: var(--muted-dark); }
.panel .hint { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-dark); transition: opacity 300ms var(--e); }
.js .dock { position: absolute; inset: 0 auto 0 clamp(360px, 40vw, 900px); width: min(520px, 42vw); padding: 0; display: grid; align-items: center; }   /* sits beside the lamp, not at the far edge, so the wall between them is not a wide empty gap */
.js .dock .panel { grid-area: 1 / 1; width: 100%; }
.js .panel--form { opacity: 0; transform: translateY(24px); visibility: hidden; transition: opacity 250ms var(--e), transform 250ms var(--e), visibility 0s linear 250ms; }
.js .panel--intro { transition: opacity 250ms var(--e), transform 250ms var(--e); }
.js .is-lit .panel--intro { opacity: 0; transform: translateY(-16px); pointer-events: none; }
.js .is-lit .panel--form { opacity: 1; transform: none; visibility: visible; transition: opacity 500ms var(--e) var(--lag, 900ms), transform 500ms var(--e) var(--lag, 900ms), visibility 0s linear var(--lag, 900ms); }
.js .panel--form .lead > * { opacity: 0; transform: translateY(16px); }
.js .is-lit .panel--form .lead > * { opacity: 1; transform: none; transition: opacity 400ms var(--e), transform 400ms var(--e); transition-delay: calc(var(--lag, 900ms) + 120ms + var(--i, 0) * 30ms); }
.js .panel--form .lead > :nth-child(1) { --i: 0; } .js .panel--form .lead > :nth-child(2) { --i: 1; } .js .panel--form .lead > :nth-child(3) { --i: 2; }
.js .panel--form .lead > :nth-child(4) { --i: 3; } .js .panel--form .lead > :nth-child(5) { --i: 4; } .js .panel--form .lead > :nth-child(6) { --i: 5; }
.panel .lead .field:first-child { margin-top: 0; }

/* the spark: an orange overlay that crosses the room, lights the form panel, then lands on the logo in the black bar.
   Orange is never gold: gold lives only in the logo file. Overlays are removed when they finish. */
.spark, .spark-t, .spark-pool { position: fixed; z-index: 60; left: 0; top: 0; opacity: 0; pointer-events: none; will-change: transform, opacity; }
.spark, .spark-t { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; }
.spark { background: radial-gradient(circle, #FFE3B5 0 30%, #FF8418 68%, rgba(255, 132, 24, 0) 100%); box-shadow: 0 0 10px 3px rgba(255, 125, 20, 0.8); }
.spark-t { background: radial-gradient(circle, rgba(255, 150, 50, 0.9), rgba(255, 132, 24, 0) 70%); }
.spark-pool { z-index: 8; width: 240px; height: 240px; margin: -120px 0 0 -120px; border-radius: 50%; mix-blend-mode: screen; background: radial-gradient(circle, rgba(255, 170, 80, 0.55), rgba(255, 140, 40, 0.18) 45%, rgba(255, 120, 20, 0) 70%); }
.lk-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lk-ring { position: absolute; left: 40.43%; top: 27.94%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 1.5px solid rgba(255, 190, 110, 0.95); border-radius: 50%; opacity: 0; }
.lk-band { position: absolute; inset: 0; opacity: 0; transform: translateX(-110%); mix-blend-mode: overlay; background: linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, #fff 50%, rgba(255, 255, 255, 0) 70%); }
.lk-ring.go { animation: lkring 340ms var(--e) both; }
.lk-band.go { animation: lkband 640ms var(--e) 120ms both; }
@keyframes lkring { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes lkband { 0% { transform: translateX(-110%); opacity: 1; } 100% { transform: translateX(110%); opacity: 1; } }
@media (max-width: 860px) { .lk-ring { left: 50%; top: 40%; width: 20px; height: 20px; margin: -10px 0 0 -10px; } }   /* phones: the bulb of the mark */
/* the card lights as the spark reaches it */
.js .panel--form { position: relative; overflow: hidden; }
.panel--form::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transform: translateX(-100%); background: linear-gradient(100deg, rgba(255, 190, 120, 0) 25%, rgba(255, 190, 120, 0.3) 50%, rgba(255, 190, 120, 0) 75%); }
.panel--form.sweep::after { animation: psweep 700ms var(--e) both; }
@keyframes psweep { 0% { transform: translateX(-100%); opacity: 1; } 100% { transform: translateX(100%); opacity: 0; } }
html:not(.js) .spark, html:not(.js) .spark-t, html:not(.js) .spark-pool { display: none; }
@media (prefers-reduced-motion: reduce) { .spark, .spark-t, .spark-pool, .lk-fx { display: none; } .panel--form.sweep::after { animation: none; } }

.skipform { position: fixed; z-index: 50; left: 16px; bottom: 16px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-size: 16px; font-weight: 500; text-decoration: none; }
html.lit .skipform, html.past .skipform { display: none; }
.skipform:hover { background-color: rgba(37, 35, 36, 0.9); }
html:not(.js) .skipform { display: none; }

/* no-JS: the lit room is a still, both panels sit in flow */
html:not(.js) .track { height: auto; }
html:not(.js) .stage { height: auto; min-height: 0; padding: 32px 16px; }
html:not(.js) .dock { display: grid; gap: 24px; justify-items: center; }
html:not(.js) .panel { position: relative; width: 100%; }

/* phones */
@media (max-width: 860px) {
  .track { height: 240vh; }
  .stage { height: calc(100vh - var(--bar) - 64px); height: calc(100svh - var(--bar) - 64px); }
  .js .dock { inset: auto 16px 16px 16px; width: auto; align-items: end; }
  .panel { padding: 16px; max-width: none; }
  .panel > * + * { margin-top: 8px; }
  .panel h1 { font-size: 24px; line-height: 1.1; }
  .panel h2 { font-size: 24px; }
  .panel .fact { display: none; }       /* the price sits in the bottom bar */
  .panel .copy { font-size: 16px; }
  .js .panel--form { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
  .js .dock .panel--form { align-self: end; }
  /* lit state on a phone: a compact form that leaves the lamp (bulb, socket, cord) in view above it */
  .js .panel--form { padding: 12px 16px; }
  .js .panel--form h2 { font-size: 20px; line-height: 1.15; }
  .js .panel--form .lead { gap: 8px; }
  .js .panel--form .field { margin-top: 0; }
  .js .panel--form .field + .field { margin-top: 16px; }   /* groups sit 16px apart, label to field 4px */
  .js .panel--form .lead > div:not(.sent) { margin-top: 0; }
  .js .panel--form .field span { font-size: 12px; margin-bottom: 4px; display: block; }
  .js .panel--form .field input { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
  .js .panel--form .check { margin-top: 16px; min-height: 44px; align-items: center; }
  .js .panel--form .btn { min-height: 48px; margin-top: 16px; }
  .js .panel--form .note { font-size: 14px; line-height: 1.35; margin-top: 4px; }
  .below .sec:first-child { padding-top: 48px; }
  .skipform { left: auto; right: 16px; bottom: auto; top: calc(var(--bar) + 16px); }
  html:not(.js) .stage { padding: 16px; }
}
@media (min-width: 861px) { .skipform { bottom: 24px; } }

@media (prefers-reduced-motion: reduce) {
  .js .panel--form, .js .panel--intro, .js .panel--form .lead > *, .tag { transition: none !important; }
  .js .panel--form .lead > * { opacity: 1; transform: none; }
  html.rm .track { height: auto; }
  html.rm .stage { min-height: 520px; }
}
html:not(.js) .hint { display: none; }
