/* FIRSTPASS Night Shift.
   Layout: one pinned film stage (WebGL scene + overlays) driven by scroll, then the booking panel.
   Colour is light itself: the night, the lamps, and hi-vis yellow from the 15° nozzle tip. */
:root {
  --night: #060706;
  --night-2: #0d0f0c;
  --night-3: #181b16;
  --line: #2a2f27;
  --paper: #f2f3ef;
  --muted: #8d9288;
  --hivis: #ffc21a;
  --hivis-2: #ffd34d;
  --lamp: #dfeaff;
  --tip-white: #f4f4f1;
  --tip-black: #0b0c0a;
  --font: "Anybody", ui-sans-serif, system-ui, sans-serif;
  --gut: clamp(16px, 4vw, 64px);
  --lvh: 100vh;
  /* names the owner dashboard uses */
  --grime: var(--night); --grime-2: var(--night-2); --grime-3: var(--line);
  --muted-d: var(--muted); --tip-yellow: var(--hivis); --ink: var(--night);
  color-scheme: dark;
}
@supports (height: 100lvh) { :root { --lvh: 100lvh; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--night); color: var(--paper);
  font-family: var(--font); font-size: 1rem; line-height: 1.5; font-stretch: 100%;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--hivis); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.only-lite { display: none; }
.lite .only-full { display: none; }
.lite .only-lite { display: inline; }

/* ---------- buttons & tips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .7em 1.3em; border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 800; font-stretch: 115%; font-size: .95rem; letter-spacing: .01em;
  text-decoration: none; white-space: nowrap; transition: transform .2s, background-color .2s, box-shadow .2s;
}
.btn--tip { background: var(--hivis); color: var(--night); box-shadow: 0 0 0 0 rgba(255,194,26,.4); }
.btn--tip:hover { transform: translateY(-1px); background: var(--hivis-2); box-shadow: 0 0 40px 0 rgba(255,194,26,.35); }
.btn--ink { background: var(--night); color: var(--hivis); }
.btn--ink:hover { transform: translateY(-1px); }
.btn--line { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--big { min-height: 60px; font-size: 1.1rem; }
.tip {
  display: inline-block; width: .85em; height: 1.1em; margin-right: .6em; vertical-align: -.18em;
  border-radius: 2px 2px 5px 5px; background: currentColor; box-shadow: inset 0 -.26em 0 rgba(0,0,0,.25);
}
.tip--black { color: var(--tip-black); box-shadow: inset 0 0 0 1px #3d4338; }
.tip--white { color: var(--tip-white); }

/* ---------- pressure dial ---------- */
.dial { width: 100%; height: auto; overflow: visible; }
.dial__track { fill: none; stroke: rgba(242,243,239,.14); stroke-width: 5; stroke-linecap: round; }
.dial__fill { fill: none; stroke: var(--hivis); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 0 202; filter: drop-shadow(0 0 6px rgba(255,194,26,.6)); }
.dial__ticks line { stroke: rgba(242,243,239,.5); stroke-width: 1.2; }
.dial__ticks line.is-major { stroke: rgba(242,243,239,.85); stroke-width: 1.8; }
.dial__ticks text { fill: rgba(242,243,239,.65); font: 600 7px var(--font); font-stretch: 90%; text-anchor: middle; }
.dial__needle { stroke: var(--paper); stroke-width: 2.4; stroke-linecap: round; transform-origin: 60px 60px; transform: rotate(-120deg); }
.dial__hub { fill: var(--paper); }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: .4rem;
  background: var(--night); transition: opacity .6s .15s, visibility .8s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.dial--big { width: min(220px, 52vw); }
.loader__psi { font-weight: 800; font-stretch: 125%; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.loader__note { color: var(--muted); font-size: .9rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: clamp(10px, 2vw, 28px);
  padding: max(16px, env(safe-area-inset-top, 0px)) var(--gut) 16px;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.brand {
  display: inline-flex; align-items: center; gap: .55rem; margin-right: auto;
  font-weight: 900; font-stretch: 135%; font-size: 1.05rem; text-decoration: none;
}
.brand__fan { width: 26px; height: 19px; fill: var(--hivis); filter: drop-shadow(0 0 8px rgba(255,194,26,.5)); }
.sound {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .5rem;
  background: none; border: 0; cursor: pointer; font-size: .9rem; font-weight: 600;
}
.sound__icon { width: 20px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.sound__icon path:first-child { stroke: none; }
.sound__icon .w1, .sound__icon .w2 { fill: none; display: none; }
.sound__icon .x { fill: none; }
.sound[aria-pressed="true"] .w1, .sound[aria-pressed="true"] .w2 { display: block; }
.sound[aria-pressed="true"] .x { display: none; }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(242,243,239,.7);
  opacity: 0; transition: opacity .2s, width .15s, height .15s, margin .15s, box-shadow .15s;
}
.cursor i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--hivis); }
.cursor.is-on { opacity: 1; }
.cursor.is-blasting { width: 24px; height: 24px; margin: -12px 0 0 -12px; box-shadow: inset 0 0 0 2px var(--hivis); }
.lite .cursor { display: none; }

/* ---------- film ---------- */
.film { position: relative; height: calc(var(--lvh) * 15); }
.lite .film { height: calc(var(--lvh) * 11); }
.film__stage { position: sticky; top: 0; height: var(--lvh); overflow: hidden; background: #000; touch-action: pan-y; }
.full .film__stage { cursor: none; }
.stage, .spray { position: absolute; inset: 0; width: 100%; height: 100%; }
.spray { pointer-events: none; }
.no-gl .stage { display: none; }
.no-gl .film__stage { background: center / cover no-repeat url(../img/pavers-1k.webp); }
.flash { position: absolute; inset: 0; background: var(--lamp); opacity: 0; pointer-events: none; mix-blend-mode: screen; }
/* keeps copy readable over bright, freshly washed surfaces */
.shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0) 38%), linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,0) 22%); }
.lite .shade { background: linear-gradient(to bottom, rgba(0,0,0,.72), rgba(0,0,0,.3) 34%, rgba(0,0,0,0) 48%), linear-gradient(to top, rgba(0,0,0,.5), rgba(0,0,0,0) 22%); }

.reel {
  position: absolute; left: var(--gut); top: calc(max(16px, env(safe-area-inset-top, 0px)) + 54px);
  pointer-events: none; font-size: .85rem; line-height: 1.3;
}
.reel__n { font-weight: 800; font-stretch: 120%; font-variant-numeric: tabular-nums; color: var(--hivis); }
.reel__name { color: rgba(242,243,239,.7); }

.copy {
  position: absolute; left: var(--gut); bottom: calc(var(--gut) + 6px); max-width: min(560px, 62vw);
  pointer-events: none; opacity: 0; visibility: hidden;
  text-shadow: 0 2px 30px rgba(0,0,0,.8);
}
.copy.is-on { opacity: 1; visibility: visible; }
.copy__hint { font-weight: 900; font-stretch: 112%; text-transform: uppercase; font-size: clamp(1.7rem, 3.2vw, 3rem); line-height: .95; }
.copy__do { margin-top: .9rem; max-width: 40ch; font-size: clamp(.95rem, 1.1vw, 1.1rem); color: rgba(242,243,239,.85); }
.copy__title {
  font-weight: 900; font-stretch: 135%; text-transform: uppercase;
  font-size: clamp(2.6rem, 6.4vw, 6.8rem); line-height: .86; letter-spacing: -.01em;
}
.copy__lead { margin-top: 1rem; max-width: 30ch; font-size: clamp(1.05rem, 1.5vw, 1.4rem); line-height: 1.3; font-weight: 600; }
.copy__how { margin-top: 1rem; max-width: 40ch; font-size: .95rem; color: rgba(242,243,239,.75); }
.copy--big .copy__title { color: var(--hivis); text-shadow: 0 0 60px rgba(255,194,26,.35), 0 2px 30px rgba(0,0,0,.8); }

.card {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2rem;
  background: var(--night); opacity: 0; visibility: hidden; text-align: center; padding: 0 var(--gut);
}
.card__word {
  font-weight: 900; text-transform: uppercase; line-height: .8; letter-spacing: -.02em; white-space: nowrap;
  font-size: clamp(4rem, 19vw, 22rem); font-stretch: var(--w, 50%);
  background: linear-gradient(90deg, var(--hivis) 0 50%, #2a2e26 50% 100%);
  background-size: 200% 100%; background-position: var(--bp, 100%) 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 50px rgba(255,194,26,var(--glow, 0)));
}
.card--end .card__word { font-size: clamp(3.4rem, 14vw, 16rem); }
.card--end .btn { pointer-events: auto; }

.hud {
  position: absolute; right: var(--gut); bottom: calc(var(--gut) - 4px);
  display: flex; align-items: center; gap: 12px; pointer-events: none;
  transition: opacity .3s;
}
.hud .dial { width: clamp(96px, 9vw, 132px); }
.hud__psi { font-weight: 800; font-stretch: 125%; font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1; font-variant-numeric: tabular-nums; }
.hud__clean { margin-top: .35rem; color: rgba(242,243,239,.75); font-size: .9rem; font-variant-numeric: tabular-nums; }
.cue {
  position: absolute; left: 50%; bottom: calc(var(--gut) + 6px); transform: translateX(-50%);
  pointer-events: none; font-size: .85rem; font-weight: 600; color: rgba(242,243,239,.7); white-space: nowrap;
  transition: opacity .4s;
}
.cue span::after { content: ""; display: block; width: 1.5px; height: 26px; margin: 8px auto 0; background: linear-gradient(var(--hivis), transparent); animation: cue 1.6s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- price ---------- */
.price { position: relative; padding: clamp(90px, 14vh, 160px) var(--gut) clamp(70px, 11vh, 130px); background: var(--night); }
.price__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.2rem 3rem; margin-bottom: clamp(36px, 6vh, 64px); }
.price__head h2 { font-weight: 900; font-stretch: 130%; text-transform: uppercase; font-size: clamp(2.6rem, 6.4vw, 7rem); line-height: .86; }
.price__head p { max-width: 36ch; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.2rem); }
.quote { display: grid; grid-template-columns: 1fr minmax(300px, 390px); gap: clamp(24px, 4vw, 64px); align-items: start; }
.quote__fields { min-width: 0; }
.q { margin: 0 0 2.2rem; padding: 0; border: 0; min-width: 0; }
.q legend { padding: 0; margin-bottom: .9rem; font-weight: 700; font-stretch: 110%; font-size: 1.05rem; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.chip input, .seg input, .days input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: grid; gap: .6rem; padding: 8px 8px 12px; border-radius: 12px; cursor: pointer;
  background: var(--night-2); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; font-size: .95rem;
  transition: box-shadow .2s, background-color .2s;
}
.chip img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 7px; filter: grayscale(1) brightness(.45); transition: filter .35s; }
.chip input:checked + span { box-shadow: inset 0 0 0 2px var(--hivis), 0 0 30px -8px rgba(255,194,26,.5); }
.chip input:checked + span img { filter: none; }
.chip input:focus-visible + span, .seg input:focus-visible + span, .days input:focus-visible + span { outline: 2px solid var(--hivis); outline-offset: 2px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg span, .days span {
  display: inline-flex; flex-direction: column; justify-content: center; min-height: 48px; padding: .55rem 1rem;
  border-radius: 10px; cursor: pointer; background: var(--night-2); box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 600; font-size: .95rem; line-height: 1.2; transition: background-color .2s, color .2s;
}
.seg input:checked + span, .days input:checked + span { background: var(--hivis); color: var(--night); box-shadow: none; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.days small { font-weight: 500; font-size: .8rem; opacity: .7; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: .35rem; font-size: .875rem; font-weight: 600; color: var(--muted); }
.field input {
  min-height: 52px; padding: 0 14px; border: 0; border-radius: 10px; color: var(--paper);
  background: var(--night-2); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 1rem; font-weight: 500;
}
.field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--hivis); }
.q__error { margin-top: .8rem; color: #ff8a7a; font-weight: 600; }
.total {
  position: sticky; top: 90px; padding: 28px; border-radius: 18px;
  background: var(--hivis); color: var(--night);
  box-shadow: 0 30px 90px -30px rgba(255,194,26,.45);
}
.total__label { font-weight: 700; font-size: .95rem; }
.total__num { margin: .1rem 0 .6rem; font-weight: 900; font-stretch: var(--tw, 120%); font-size: clamp(3.6rem, 6vw, 5.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.total__lines { min-height: 1.5em; font-size: .95rem; font-weight: 600; }
.total__note { margin: .6rem 0 1.4rem; font-size: .875rem; opacity: .75; }
.total .btn { width: 100%; }
.booked[hidden], .quote[hidden] { display: none; }
.booked { display: grid; justify-items: start; gap: 1rem; padding: clamp(24px, 6vh, 60px) 0; }
.booked__title { font-weight: 900; font-stretch: 140%; text-transform: uppercase; color: var(--hivis); font-size: clamp(3rem, 9vw, 9rem); line-height: .85; text-shadow: 0 0 80px rgba(255,194,26,.3); }
.booked__when { font-weight: 700; font-stretch: 110%; font-size: clamp(1.2rem, 2vw, 1.6rem); }
.booked__what { max-width: 48ch; color: var(--muted); font-size: 1.05rem; }
.booked__row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: .6rem; }

/* ---------- footer ---------- */
.foot { padding: 0 var(--gut) 28px; overflow: hidden; border-top: 1px solid var(--night-3); }
.foot__word {
  font-weight: 900; font-stretch: 150%; font-size: 10.6vw; line-height: .8; letter-spacing: -.02em; margin: .25em -.03em .3em;
  background: linear-gradient(90deg, var(--hivis) 0 50%, #1f231d 50% 100%);
  background-size: 200% 100%; background-position: var(--bp, 100%) 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.foot__row { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: baseline; padding-top: 1.4rem; border-top: 1.5px solid var(--line); }
.foot__row p:first-child { flex: 1 1 320px; max-width: 46ch; color: var(--muted); }
.foot__phone, .foot__row a { font-weight: 700; }
.foot__row a { text-underline-offset: 4px; }
.foot__small { margin-top: 2rem; font-size: .8rem; color: var(--muted); }

/* ---------- phone ---------- */
@media (max-width: 820px) {
  .sound__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .btn { font-size: .875rem; padding: .6em 1em; }
  .copy { max-width: none; right: var(--gut); bottom: auto; top: calc(max(16px, env(safe-area-inset-top, 0px)) + 104px); }
  .copy__title { font-size: 13vw; }
  .hud { right: auto; left: var(--gut); bottom: calc(var(--gut) + 4px); }
  .hud .dial { width: 84px; }
  .cue { left: auto; right: var(--gut); transform: none; bottom: calc(var(--gut) + 28px); }
  .price__head { display: grid; }
  .quote { grid-template-columns: 1fr; }
  .total { position: static; }
  .fields { grid-template-columns: 1fr; }
  .chips { grid-template-columns: repeat(2, 1fr); }
  .card__word { font-size: 21vw; }
  .card--end .card__word { font-size: 15vw; }
}

@media (prefers-reduced-motion: reduce) {
  .cue span::after { animation: none; }
}
