/* permanentlightingboise.com — landing page + quiz.
   One committed dark theme: night is when the product exists, so the page is
   shot at night. Photography carries the design; type and one warm accent do
   the rest. No frameworks, no external requests, no gradients-as-decoration.

   Design tokens are the whole system. If a colour is not here it is a bug. */

@font-face {
  font-family: "Bricolage";
  src: url("/static/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ground: #0a0e16;
  --surface: #111726;
  --line: #232c3f;
  --text: #f2efe7;
  --muted: #9ba4b5;
  --accent: #f5b95a;
  --accent-hi: #ffcb77;
  --accent-ink: #1a1206;
  --good: #7bd88f;
  --bad: #ff8a80;
  --radius: 14px;

  --display: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
             Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --gap: clamp(56px, 10vw, 120px);
  --pad: clamp(18px, 5vw, 28px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 1.05rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

/* Content column. Photography goes full-bleed; words never do. */
.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

h1, h2, h3 {
  font-family: var(--display);
  font-optical-sizing: auto;
  text-wrap: balance;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
h1 { font-size: clamp(2.1rem, 8vw, 3.4rem); font-weight: 800; line-height: 1.04; }
h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 700; line-height: 1.12; }
h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.25; margin-bottom: 6px; }

p { margin: 0 0 16px; }
.sub { color: var(--muted); margin-bottom: 24px; }
.note { color: var(--muted); font-size: 0.95rem; margin: 0; }
.caption { color: var(--muted); font-size: 0.9rem; margin: 12px 0 0; }
.micro { color: var(--muted); font-size: 0.85rem; }
.good { color: var(--good); }

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Screen-reader-only, still focusable (the slider's range input). */
.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

[tabindex="-1"]:focus { outline: none; }

a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Motion budget: scene crossfade, slider handle, quiz progress. Nothing else
   moves on its own. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ====================================================================== hero */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(560px, 92svh, 800px);
  padding: 96px 0 clamp(28px, 6vw, 48px);
  overflow: hidden;
}
.hero-photo, .hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}
.hero-photo img { object-fit: cover; object-position: 50% 35%; }

/* The photo melts into the page: transparent at the top, ground at the bottom,
   with enough weight behind the copy to hold contrast on any frame. */
.hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 22, 0.34) 0%,
    rgba(10, 14, 22, 0.26) 24%,
    rgba(10, 14, 22, 0.66) 42%,
    rgba(10, 14, 22, 0.90) 62%,
    rgba(10, 14, 22, 0.97) 80%,
    var(--ground) 100%
  );
}
/* Type sits on a photograph, so it carries its own floor of contrast rather
   than trusting whichever frame the crop lands on. */
.hero-body { position: relative; }
.hero-body .eyebrow,
.hero-body h1,
.hero-body .lede { text-shadow: 0 1px 14px rgba(10, 14, 22, 0.85); }

.lede { font-size: 1.08rem; color: var(--text); margin-bottom: 22px; max-width: 44ch; }

.callline { margin: 6px 0 0; font-size: 0.95rem; color: var(--muted); }
/* The phone number is a conversion action, not decoration: it gets a real
   thumb target even though it sits inside a sentence. */
.callline a {
  display: inline-block;
  padding: 13px 6px;
  color: var(--text);
  text-underline-offset: 3px;
}
.callline a:hover { color: var(--accent); }
.callline-big { font-size: 1.02rem; margin-top: 10px; }

.microtrust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 26px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
/* The separator trails its item rather than leading the next one, so a wrapped
   line never opens with an orphaned dot. */
.microtrust li:not(:last-child)::after {
  content: "·";
  color: var(--accent);
  padding: 0 8px;
}

.season {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--text);
}
.season-dot {
  flex: none;
  margin-top: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 10px rgba(123, 216, 143, 0.9);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* =================================================================== bands */

.band { padding: var(--gap) 0; }
.band-final { padding-bottom: clamp(40px, 8vw, 72px); }

/* §2 — native scroll-snap strip, no JS, no lightbox. */
.strip {
  list-style: none;
  display: flex;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0 var(--pad);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip li {
  flex: 0 0 78vw;
  max-width: 460px;
  scroll-snap-align: center;
}
.strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
}

/* §3 — the one section that breaks the column: full-bleed stage, chips on it. */
.scenes { padding: var(--gap) 0; }
.stage {
  position: relative;
  margin: 28px 0 20px;
  aspect-ratio: 3 / 2;
  max-height: 74vh;
  overflow: hidden;
  background: var(--surface);
  isolation: isolate;
}
.stage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 200ms ease;
}
.stage-img.is-on { opacity: 1; }
.stage-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 14, 22, 0) 40%, rgba(10, 14, 22, 0.88) 88%, var(--ground) 100%);
}
.stage-chips {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 8px;
  padding: 12px var(--pad) 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stage-chips::-webkit-scrollbar { display: none; }
.stage-chips .chip { flex: 0 0 auto; }

/* §4 — numbered steps, no cards. */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 24px 52px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
}
.steps li:last-child { padding-bottom: 0; }
.steps p { color: var(--muted); margin: 0; }

.panel {
  margin: 32px 0 0;
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-size: 0.98rem;
}

/* §5 — before/after. `--pos` is set by app.js; CSS owns the resting state. */
.slider {
  position: relative;
  margin: 26px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  touch-action: pan-y;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}
.slider-base { width: 100%; }
.slider-top {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}
.slider-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  margin-left: -1px;
  background: rgba(242, 239, 231, 0.85);
  pointer-events: none;
}
.slider-handle .grip {
  position: absolute;
  top: 50%; left: 50%;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}
.slider-handle .grip::before,
.slider-handle .grip::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0; height: 0;
  margin-top: -5px;
  border: 5px solid transparent;
}
.slider-handle .grip::before { left: 8px; border-right-color: var(--accent-ink); }
.slider-handle .grip::after { right: 8px; border-left-color: var(--accent-ink); }
.slider-tag {
  position: absolute;
  top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(10, 14, 22, 0.72);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.slider-tag-l { left: 10px; }
.slider-tag-r { right: 10px; }

#preview .btn-accent { margin-top: 28px; }

/* §6 — the same eave, twice: off in daylight, then lit. */
.day-photo {
  width: 100%;
  margin-top: 24px;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: 50% 42%;
  border-radius: var(--radius);
  background: var(--surface);
}
.turn {
  margin: 30px 0 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.2rem, 4.4vw, 1.5rem);
  letter-spacing: -0.02em;
}
.turn-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
}

/* §7 — the only card grid on the page. */
.cards {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
}
.cards li {
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cards h3 { color: var(--accent); font-size: 1rem; }
.cards p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* §8 — FAQ. */
.faq { border-bottom: 1px solid var(--line); }
.faq:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 34px 18px 0;
  position: relative;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px; top: 26px;
  width: 9px; height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transform-origin: center;
}
.faq[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq p { margin: 0 0 20px; color: var(--muted); }

/* ================================================================== footer */

.foot {
  padding: clamp(36px, 7vw, 60px) 0 calc(96px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.foot p { margin: 0 0 10px; overflow-wrap: anywhere; }
.foot-phone {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.foot-phone a {
  display: inline-block;
  padding: 10px 2px;
  color: var(--text);
  text-decoration: none;
}
.foot-phone a:hover { color: var(--accent); }
.foot-links { margin-bottom: 2px; }
.foot-links a { display: inline-block; padding: 12px 2px; }
.foot-fine { font-size: 0.72rem; color: rgba(155, 164, 181, 0.66); line-height: 1.5; }

.foot a, .consent a, .legal a, .callline a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(242, 239, 231, 0.24);
  text-underline-offset: 3px;
  border-radius: 4px;
}
.consent a, .callline a { color: var(--text); }
.foot a:hover, .consent a:hover, .legal a:hover, .callline a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

/* ============================================================= sticky bar */

.stickybar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  gap: 10px;
  align-items: stretch;
  min-height: 56px;
  padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.sticky-cta { flex: 1 1 auto; min-height: 52px; font-size: 1rem; }
.sticky-call {
  flex: 0 0 52px;
  width: 52px;
  min-height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--ground);
  color: var(--accent);
  text-decoration: none;
}
.sticky-call:hover { border-color: var(--accent); color: var(--accent-hi); }
body.is-quiz .stickybar { display: none; }

/* ==================================================================== quiz */

.quiz { display: block; }
.quiz-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 22px var(--pad) calc(48px + env(safe-area-inset-bottom));
}

.screen { display: none; }
.screen.is-active { display: block; }
.quiz h2 { margin-bottom: 10px; }

.progress { margin: 0 0 26px; }
.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 15%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 200ms ease;
}
.progress-label {
  margin: 8px 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.options { display: grid; gap: 12px; }
.options-grid { grid-template-columns: 1fr 1fr; }

.opt {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 16px;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 150ms ease, background 150ms ease;
}
.opt:hover, .opt:focus-visible { border-color: var(--accent); }
.opt:active { background: rgba(245, 185, 90, 0.12); border-color: var(--accent); }
.opt-wide { grid-column: 1 / -1; }
.opt-cta { border-color: var(--accent); background: rgba(245, 185, 90, 0.09); }
.opt strong { display: block; font-size: 1.05rem; }
.opt span {
  display: block;
  margin-top: 5px;
  font-weight: 400;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.other-wrap { margin-top: 16px; }

.points { margin: 0 0 4px; padding-left: 20px; color: var(--muted); }
.points li { margin-bottom: 8px; }

.check {
  width: 56px; height: 56px;
  margin: 0 0 18px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  color: var(--accent-ink);
  background: var(--good);
  border-radius: 50%;
}

/* =================================================================== forms */

.field { display: block; margin: 0 0 16px; border: 0; padding: 0; }
.field > span, .field legend {
  display: block;
  padding: 0;
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.field em { font-style: normal; font-weight: 400; color: var(--muted); }

input[type="text"], input[type="tel"], input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 16px; /* prevents iOS zoom-on-focus */
  transition: border-color 150ms ease;
}
input::placeholder { color: #6c7590; }
input[type="text"]:hover, input[type="tel"]:hover, input[type="email"]:hover {
  border-color: #33405a;
}
input[aria-invalid="true"] { border-color: var(--bad); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  flex: 1 1 auto;
  min-height: 48px;
  padding: 12px 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.chip[aria-pressed="true"]:hover { background: var(--accent-hi); }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 20px 0 16px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
}
.consent:has(input:checked) { border-color: var(--accent); }
.consent input {
  flex: none;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ================================================================= buttons */

.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 15px 18px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 150ms ease;
}
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hi); }
.btn-accent:disabled { opacity: 0.45; cursor: not-allowed; background: var(--accent); }
.btn-link {
  margin-top: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 48px;
}
.btn-link:hover { color: var(--text); }
form .btn-accent { margin-top: 4px; }

.err {
  margin: 6px 0 12px;
  padding: 10px 12px;
  color: var(--bad);
  background: rgba(255, 138, 128, 0.10);
  border: 1px solid rgba(255, 138, 128, 0.30);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ============================================================ wider screens */

@media (min-width: 701px) {
  .hero-photo img { object-position: 50% 50%; }
  .strip li { flex: 0 0 42vw; }
  .stage { aspect-ratio: 16 / 8; }
  /* Full-bleed rails still start on the text column's left edge, so the first
     photo and the first chip line up under the heading above them. */
  .strip, .stage-chips {
    padding-left: max(var(--pad), calc((100% - 680px) / 2));
    padding-right: max(var(--pad), calc((100% - 680px) / 2));
  }
}

@media (max-width: 430px) {
  .cards { grid-template-columns: 1fr; }
}

/* ============================================================= legal pages */

.legal { padding-top: 32px; padding-bottom: 64px; }
.legal h1 { font-size: clamp(1.7rem, 6vw, 2.2rem); margin-bottom: 4px; }
.legal .sub { margin-top: 0; }
.legal h2 { font-size: 1.15rem; margin-top: 30px; }
.legal p { line-height: 1.6; }
.legal .foot-link { margin-top: 36px; }
