/* ==========================================================================
   FSB Neon Lamp — shared (ROUND 17, 2026-11-22)
   The desk-lamp artwork, volumetric 3D beam, bed-switch on/off, colour
   dots and the focus spotlight, shared by the auth pages AND the four
   public forms (/complaint, /contact, /enquiry, /quote). Auth-only
   styling (card, flip, topbar, neon form fields) stays in
   css/auth-neon.css; the lamp markup lives in partials/neon-lamp.blade.php
   and the behaviour in js/neon-lamp.js — never duplicated per page.

   Accent colour is driven by CSS variables:
     --neon     (main accent, default FSB orange #f26a1b)
     --neon-2   (lighter gradient stop)
     --neon-rgb (space-separated triplet for alpha blends)
   Colour dots switch the variables via neon-lamp.js and persist the
   choice in localStorage (fsb-auth-accent). Lamp on/off persists as
   fsb-lamp-on ('1'/'0', default on) and is applied pre-paint as
   <html class="lamp-off"> by partials/neon-accent-prepaint.

   Animations only run when JS is present (html.js) and never under
   prefers-reduced-motion.
   ========================================================================== */

:root {
  --neon: #f26a1b;
  --neon-2: #ff8a3d;
  --neon-rgb: 242 106 27;
  --neon-2-rgb: 255 138 61;
  --neon-ink: #e8eef5;
  --neon-muted: #9fb0c3;
  --neon-card: rgb(255 255 255 / .055);
  --neon-card-border: rgb(255 255 255 / .1);
}

.neon-body {
  background: #04070c;
  color: var(--neon-ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- stage / ambient background ---------- */
.neon-stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(1100px 600px at 78% -10%, rgb(22 40 58 / .85), transparent 60%),
    radial-gradient(700px 500px at 8% 108%, rgb(var(--neon-rgb) / .10), transparent 60%),
    linear-gradient(180deg, #05080d 0%, #04070c 55%, #030509 100%);
}
.neon-stage::before { /* faint star dust */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgb(255 255 255 / .55), transparent 60%),
    radial-gradient(1px 1px at 28% 68%, rgb(255 255 255 / .4), transparent 60%),
    radial-gradient(1.5px 1.5px at 44% 12%, rgb(255 255 255 / .5), transparent 60%),
    radial-gradient(1px 1px at 63% 84%, rgb(255 255 255 / .35), transparent 60%),
    radial-gradient(1.5px 1.5px at 82% 30%, rgb(255 255 255 / .45), transparent 60%),
    radial-gradient(1.5px 1.5px at 93% 62%, rgb(255 255 255 / .5), transparent 60%),
    radial-gradient(1px 1px at 70% 8%, rgb(255 255 255 / .4), transparent 60%),
    radial-gradient(1px 1px at 5% 48%, rgb(255 255 255 / .35), transparent 60%);
}

/* ---------- ambient lamp glow ---------- */
.neon-lamp-glow {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  top: 6%;
  left: 2%;
  width: 46vw;
  height: 46vw;
  max-width: 560px;
  max-height: 560px;
  background: radial-gradient(circle at 58% 30%,
    rgb(var(--neon-rgb) / .34) 0%,
    rgb(var(--neon-rgb) / .1) 42%,
    transparent 68%);
  filter: blur(10px);
  transition: opacity .5s ease;
}
html.js .neon-lamp-glow { animation: neonBreathe 6s ease-in-out infinite; }
@keyframes neonBreathe {
  0%, 100% { opacity: .85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

/* ---------- volumetric beam (ROUND 17 SCOPE 2) ----------
   Three stacked cones at different depths/opacities replace the old
   flat gradient cone: outer haze (widest, softest, farthest), mid beam,
   inner bright core (narrowest, sharpest, nearest). All three live
   INSIDE .neon-lamp-wrap so their origin stays glued to the bulb.
   --beam-rotate / --beam-shift are set by neon-lamp.js when a field is
   focused (the light aims at the field); --par-x / --par-y are the
   mouse-move parallax offsets (desktop only). */
.neon-lamp-wrap {
  position: relative;
  transform: translate(var(--par-x, 0px), var(--par-y, 0px));
  will-change: transform;
}
.neon-beam-layer {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  transform-origin: 12% 0;
  transform: rotate(var(--beam-rotate, 0deg))
    translate(calc(var(--beam-shift, 0px) + var(--par-x, 0px) * 1.4), var(--par-y, 0px));
  transition: transform .6s ease, opacity .5s ease;
}
.neon-beam-haze {
  top: 30%;
  left: 44%;
  width: 265%;
  height: 142%;
  background: linear-gradient(158deg,
    rgb(var(--neon-rgb) / .16) 0%,
    rgb(var(--neon-rgb) / .06) 50%,
    transparent 85%);
  clip-path: polygon(0 0, 7% 0, 100% 100%, 48% 100%);
  filter: blur(26px);
  opacity: .45;
}
.neon-beam-mid {
  top: 32%;
  left: 50%;
  width: 230%;
  height: 135%;
  background: linear-gradient(158deg,
    rgb(var(--neon-rgb) / .34) 0%,
    rgb(var(--neon-rgb) / .12) 48%,
    rgb(var(--neon-rgb) / .02) 78%,
    transparent 100%);
  clip-path: polygon(0 0, 9% 0, 100% 100%, 52% 100%);
  filter: blur(14px);
  opacity: .55;
}
.neon-beam-core {
  top: 32%;
  left: 54%;
  width: 130%;
  height: 135%;
  background: linear-gradient(158deg,
    rgb(var(--neon-rgb) / .42) 0%,
    rgb(var(--neon-rgb) / .14) 55%,
    transparent 85%);
  clip-path: polygon(0 0, 14% 0, 88% 100%, 55% 100%);
  filter: blur(8px);
  opacity: .55;
}
html.js .neon-beam-haze { animation: neonFlickerHaze 8s ease-in-out infinite; }
html.js .neon-beam-mid { animation: neonFlickerSoft 7s ease-in-out infinite; }
html.js .neon-beam-core { animation: neonFlicker 7s .9s ease-in-out infinite; }
@keyframes neonFlicker {
  0%, 100% { opacity: .8; }
  12% { opacity: .94; }
  24% { opacity: .86; }
  38% { opacity: 1; }
  55% { opacity: .84; }
  71% { opacity: .95; }
  84% { opacity: .88; }
}
@keyframes neonFlickerSoft {
  0%, 100% { opacity: .6; }
  25% { opacity: .78; }
  50% { opacity: .66; }
  75% { opacity: .8; }
}
@keyframes neonFlickerHaze {
  0%, 100% { opacity: .32; }
  30% { opacity: .48; }
  60% { opacity: .38; }
}

/* ---------- floor pool of light (3D: perspective floor plane) ---------- */
.neon-pool {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  left: -12%;
  bottom: -1%;
  width: 124%;
  height: 64px;
  background: radial-gradient(ellipse at 50% 50%,
    rgb(var(--neon-rgb) / .30) 0%,
    rgb(var(--neon-rgb) / .10) 55%,
    transparent 75%);
  transform: perspective(520px) rotateX(62deg);
  transform-origin: 50% 100%;
  filter: blur(5px);
  transition: opacity .5s ease;
}

/* ---------- lamp column (desktop only, as on auth) ---------- */
.neon-lamp-col {
  display: none;
}
@media (min-width: 1024px) {
  .neon-lamp-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding-right: 1rem;
  }
}
.neon-lamp-svg {
  position: relative;
  z-index: 1;
  width: min(30vw, 460px);
  height: auto;
  max-height: 62vh;
  filter: drop-shadow(0 0 26px rgb(var(--neon-rgb) / .25));
  transition: filter .5s ease;
}
html.js .neon-lamp-svg { animation: neonLampIn .9s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes neonLampIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.neon-bulb-glow, .neon-bulb-core, .neon-rim { transition: opacity .45s ease, fill .45s ease; }
.neon-lamp-caption { text-align: center; margin-top: .5rem; }
.neon-lamp-caption h1 {
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
}
.neon-lamp-caption h1 span { color: var(--neon); }
.neon-lamp-caption p { color: var(--neon-muted); font-size: .95rem; max-width: 26rem; margin: .6rem auto 0; }
.neon-lamp-stats {
  display: flex;
  gap: 1.4rem;
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--neon-muted);
}
.neon-lamp-stats b { color: #fff; }

/* ---------- colour dots (shared: auth topbar + form lamp panels) ---------- */
.neon-dots {
  display: flex;
  align-items: center;
  gap: .15rem;
  padding: .2rem .35rem;
  border-radius: 999px;
  background: rgb(255 255 255 / .06);
  border: 1px solid rgb(255 255 255 / .09);
  backdrop-filter: blur(8px);
}
.neon-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.neon-dot i {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--dot, #f26a1b);
  box-shadow: 0 0 10px var(--dot, #f26a1b);
  transition: transform .2s ease, box-shadow .2s ease;
}
.neon-dot:hover i, .neon-dot:focus-visible i { transform: scale(1.2); }
.neon-dot:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.neon-dot.is-active i {
  transform: scale(1.22);
  box-shadow: 0 0 0 2px #04070c, 0 0 0 4px #fff, 0 0 14px var(--dot, #f26a1b);
}
.neon-dots-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  margin-top: 1.1rem;
}
.neon-dots-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--neon-muted);
}

/* ---------- bed-switch rocker (ROUND 17 SCOPE 3) ----------
   A tactile bedside-lamp rocker: a dark plate with a pivoting rocker
   (I = on, O = off) and a small LED. ON: rocker tilts left, LED glows
   in the accent colour. OFF: rocker tilts right, LED dark. The same
   button is used at the lamp base (.neon-bedswitch--at-base) and as a
   compact control near the form heading (.neon-bedswitch--compact). */
.neon-bedswitch {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: transparent;
  border: 0;
  padding: .3rem;
  cursor: pointer;
  color: var(--neon-ink);
  font: inherit;
}
.neon-bedswitch:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 8px; }
.neon-bedswitch-plate {
  position: relative;
  flex: none;
  width: 58px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(180deg, #2b3644, #161e28);
  border: 1px solid #4a5a6c;
  box-shadow: inset 0 2px 5px rgb(0 0 0 / .6), 0 2px 6px rgb(0 0 0 / .45);
}
.neon-bedswitch-rocker {
  position: absolute;
  inset: 3px;
  border-radius: 6px;
  background: linear-gradient(180deg, #55677c, #2c3846);
  box-shadow: 0 2px 4px rgb(0 0 0 / .5), inset 0 1px 0 rgb(255 255 255 / .18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 9px;
  font-weight: 800;
  transition: transform .28s cubic-bezier(.3, 1.4, .5, 1);
}
.neon-bedswitch-rocker i { font-style: normal; line-height: 1; }
.neon-bedswitch-rocker .sw-on { color: #aeb9c6; }
.neon-bedswitch-rocker .sw-off { color: #aeb9c6; }
.neon-bedswitch[aria-pressed="true"] .neon-bedswitch-rocker { transform: rotate(-7deg); }
.neon-bedswitch[aria-pressed="true"] .neon-bedswitch-rocker .sw-on {
  color: #fff;
  text-shadow: 0 0 6px var(--neon);
}
.neon-bedswitch[aria-pressed="false"] .neon-bedswitch-rocker { transform: rotate(7deg); }
.neon-bedswitch[aria-pressed="false"] .neon-bedswitch-rocker .sw-off {
  color: #fff;
  text-shadow: 0 0 6px rgb(255 255 255 / .6);
}
.neon-bedswitch-led {
  position: absolute;
  top: -6px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
  transition: background .3s ease, box-shadow .3s ease;
}
.neon-bedswitch[aria-pressed="false"] .neon-bedswitch-led {
  background: #39434f;
  box-shadow: none;
}
.neon-bedswitch-text {
  font-size: .85rem;
  font-weight: 700;
  color: var(--neon-ink);
  white-space: nowrap;
}
.neon-bedswitch--compact .neon-bedswitch-plate { width: 48px; height: 26px; }
.neon-bedswitch--compact .neon-bedswitch-text { font-size: .8rem; }
/* At the lamp base: sits just right of the base ellipse, above the SVG. */
.neon-bedswitch--at-base {
  position: absolute;
  left: 32%;
  bottom: 1%;
  z-index: 3;
}

/* ---------- lamp OFF state (ROUND 17 SCOPE 3) ----------
   Driven by <html class="lamp-off"> (pre-paint + neon-lamp.js). Beam,
   pool, glow and bulb die; a dim ambient remains and the form — a
   light card on the dark stage — stays fully readable. The focus
   spotlight (below) is NOT tied to this state: it still works when
   the lamp is off, as a field-local soft glow. */
html.lamp-off .neon-beam-layer,
html.lamp-off .neon-beam-haze,
html.lamp-off .neon-beam-mid,
html.lamp-off .neon-beam-core,
html.lamp-off .neon-pool,
html.lamp-off .neon-lamp-glow {
  animation: none;
}
html.lamp-off .neon-beam-layer,
html.lamp-off .neon-pool { opacity: 0; }
html.lamp-off .neon-lamp-glow { opacity: .05; }
html.lamp-off .neon-lamp-svg {
  filter: drop-shadow(0 0 4px rgb(255 255 255 / .06));
}
html.lamp-off .neon-bulb-glow { opacity: 0; }
html.lamp-off .neon-bulb-core { fill: #39434f; }
html.lamp-off .neon-rim { opacity: .06; }

/* ---------- focus spotlight (ROUND 17 SCOPE 4) ----------
   A soft radial halo positioned by neon-lamp.js over the focused
   field (absolute, pointer-events none, never moves layout). It sits
   ABOVE the form card so the glow is visible on the light card. */
.neon-spotlight {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgb(var(--neon-rgb) / .22) 0%,
    rgb(var(--neon-rgb) / .08) 55%,
    transparent 72%);
  opacity: 0;
  transition: opacity .35s ease, top .35s ease, left .35s ease,
    width .35s ease, height .35s ease;
}
.neon-spotlight.is-on { opacity: 1; }

/* ---------- main layout (auth + form stages share it) ---------- */
.neon-main {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: .5rem 1rem 2.5rem;
}
@media (min-width: 1024px) {
  .neon-main {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: 0;
    padding: 0 2.5rem 3rem;
    min-height: calc(100vh - 76px);
    min-height: calc(100dvh - 76px);
  }
}

/* ---------- form stages (ROUND 17 SCOPE 1) ----------
   The form section of a light public page becomes a dark panel with
   the lamp beside the form. min-height is dropped (it is a section,
   not a full page); overflow:clip (not hidden) keeps the rounded
   corners while letting the lamp column stick on long forms. */
.neon-stage--form {
  min-height: 0;
  min-height: auto;
  border-radius: 22px;
  overflow: clip;
  margin: 0 0 1.5rem;
}
.neon-stage--form .neon-main {
  padding: .9rem;
  gap: .9rem;
  min-height: 0;
}
@media (min-width: 1024px) {
  .neon-stage--form .neon-main {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    align-items: start;
    gap: 2rem;
    padding: 2rem 2.25rem;
    min-height: 0;
  }
  .neon-stage--form .neon-lamp-col {
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }
  .neon-stage--form .neon-lamp-svg {
    width: min(100%, 340px);
  }
}
.neon-form-col {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
}
/* Compact switch row above the form — reachable on mobile when the
   lamp artwork is hidden. */
.neon-form-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: .9rem;
}
/* Bare text that sits directly on the dark stage (not inside a light
   card) needs light colours. Note-lines INSIDE a light card keep
   their normal muted colour — the light override would wash them out
   on white. */
.neon-stage--form .sec-head h2 { color: #fff; }
.neon-stage--form .sec-head .sub { color: #b9cbdc; }
.neon-stage--form .note-line { color: #b9cbdc; }
.neon-stage--form .formcard .note-line,
.neon-stage--form .bcard .note-line,
.neon-stage--form .qform .note-line { color: var(--muted); }

/* ---------- /quote: the navy section itself is the stage ----------
   The lamp becomes a third grid column (lamp | copy | form) on desktop.
   Below 1024px the lamp hides and the existing 2-col / stacked grids
   take over unchanged. */
.neon-stage--quote { min-height: 0; }
.quote.neon-stage {
  background: linear-gradient(120deg, var(--navy) 0%, #1d3a56 130%);
}
/* Pre-existing fsb-sample.css `.quote p` paints ALL paragraphs in the
   section light blue — including the note-line inside the WHITE qform
   card, where it is barely readable. Restore the normal muted colour
   inside the light card (same fix as the .note-line exclusion above). */
.quote.neon-stage .qform .note-line { color: var(--muted); }
@media (min-width: 1024px) {
  .quote.neon-stage .wrap {
    grid-template-columns: minmax(220px, 270px) minmax(0, 1fr) minmax(0, 1.12fr);
    gap: clamp(24px, 3vw, 44px);
  }
  .quote.neon-stage .neon-lamp-col { padding-right: 0; }
  .quote.neon-stage .neon-lamp-svg { width: min(100%, 300px); }
}

/* ---------- reduced motion: everything static ---------- */
@media (prefers-reduced-motion: reduce) {
  .neon-beam-layer, .neon-beam-haze, .neon-beam-mid, .neon-beam-core,
  .neon-lamp-glow, .neon-lamp-svg, .neon-pool {
    animation: none !important;
  }
  .neon-beam-layer, .neon-spotlight, .neon-dot i,
  .neon-bedswitch-rocker, .neon-lamp-svg, .neon-pool, .neon-lamp-glow {
    transition: none;
  }
  .neon-lamp-wrap { transform: none; }
}
