/* Home: the Searchlight and One night stories.
   Without home-stories.js, or with reduced motion, both rest as plain readable
   content. The script adds .live, and only then do they animate. */
.fx-light, .fx-night { --amber: #f0b35a; --night: #040a1c; --window: #ffd98a; }
.fx-light [hidden], .fx-night [hidden] { display: none !important; }

/* ---------- Searchlight ---------- */
.fx-light { --r: clamp(130px, 19vw, 230px); position: relative; overflow: hidden; background: var(--night); color: var(--on-navy); border-top: 1px solid rgba(95, 201, 201, .16); padding-block: clamp(48px, 6vw, 72px); touch-action: pan-y; }
.fx-light.live { cursor: crosshair; }
.fx-light.live.done { cursor: default; }
/* The beam: this lights the background, and the tiles it hits turn bright (.fx-true below) */
.fx-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle var(--r) at var(--x, 30%) var(--y, 40%), rgba(255, 244, 214, .55) 0%, rgba(255, 240, 205, .42) 58%, rgba(120, 205, 205, .12) 82%, transparent 100%); display: none; }
.live .fx-glow { display: block; opacity: 0; transition: opacity .2s; }
.live.lit .fx-glow { opacity: 1; }
.fx-light .container { position: relative; }
.fx-light .eyebrow { color: var(--teal-300); }
.fx-light h2 { color: #fff; font-size: clamp(1.4rem, 2.8vw, 1.9rem); margin-top: 6px; }
.fx-light-top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 24px; margin-bottom: 22px; }
.fx-count { font: 700 .95rem/1 var(--f-head); color: var(--amber); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-board { position: relative; }
.fx-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fx-tile { display: grid; gap: 6px; padding: 18px; min-height: 112px; align-content: start; border-radius: 10px; border: 1px solid var(--amber); background: #1a2238; }
.fx-name { font: 600 .92rem/1.3 var(--f-head); color: var(--amber); }
.fx-val { display: grid; font-size: 1.02rem; line-height: 1.35; }
.fx-val > span { grid-area: 1 / 1; }
.fx-fine { visibility: hidden; color: rgba(201, 211, 227, .62); }
.fx-find { color: #fff; font-weight: 600; }
/* Live: a calm copy underneath; the real findings show only inside the light, and opacity (not
   visibility) keeps them readable to screen readers while the light is off */
.live .fx-true { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s;
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--mx, 30%) var(--my, 40%), #000 72%, transparent 100%);
  mask-image: radial-gradient(circle var(--r) at var(--mx, 30%) var(--my, 40%), #000 72%, transparent 100%); }
.live.lit .fx-true { opacity: 1; }
.live .fx-true .fx-tile { background: #fff6dd; border-color: #fff6dd; }
.live .fx-true .fx-name { color: #8a5200; }
.live .fx-true .fx-find { color: var(--navy); }
.fx-calm .fx-tile:not(.found) { border-color: rgba(201, 211, 227, .16); background: rgba(19, 40, 94, .32); }
.fx-calm .fx-tile:not(.found) .fx-name { color: var(--on-navy); }
.fx-calm .fx-tile:not(.found) .fx-fine { visibility: visible; }
.fx-calm .fx-tile:not(.found) .fx-find { visibility: hidden; }
.fx-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 20px; min-height: 48px; }
.fx-note { font-size: .9rem; }
.fx-end .btn-ghost { margin-left: auto; }
@media (max-width: 640px) { .fx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .fx-tile { padding: 14px; min-height: 104px; } .fx-val { font-size: .95rem; } }

/* ---------- One night ---------- */
.fx-night { --stage-h: clamp(560px, 86vh, 820px); position: relative; overflow: hidden; background: var(--navy-900); color: var(--on-navy); }
.fx-n-layer, .fx-n-sun, .fx-n-clock, .fx-n-log, .fx-n-ruler { display: none; }
.fx-n-ui { padding-block: clamp(64px, 9vw, 104px); }
.fx-night .eyebrow { color: var(--teal-300); }
.fx-n-events { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 22px; }
.fx-n-events > li { display: grid; gap: 6px; justify-items: start; }
.fx-n-t { font: 700 .85rem/1 var(--f-head); color: var(--teal-300); font-variant-numeric: tabular-nums; }
.fx-n-tag { font: 700 .72rem/1 var(--f-head); letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: rgba(7, 18, 47, .78); color: var(--teal-300); }
.fx-n-tag.warn { color: var(--amber); }
.fx-n-events strong { font: 700 clamp(1.3rem, 2.8vw, 2rem)/1.2 var(--f-head); color: #fff; text-wrap: balance; }
.fx-n-sub { color: #fff; font-size: 1.05rem; }
.fx-n-events .btn { margin-top: 8px; }
.fx-night .btn-primary { background: var(--navy); }
.fx-night .btn-primary:hover { background: var(--navy-900); }
.fx-n-sample { margin-top: 24px; font-size: .8rem; }
.fx-ctrls { position: absolute; z-index: 6; right: 16px; bottom: 16px; display: flex; gap: 8px; }
.fx-ctrls .btn { background: rgba(7, 18, 47, .6); }

/* Live: the film */
.fx-night.live { height: var(--stage-h); background: var(--night); }
.live .fx-n-layer { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-n-nightsky { background: linear-gradient(var(--night) 0%, var(--navy) 62%, var(--navy-700) 100%); }
.fx-n-dawn { opacity: 0; background: linear-gradient(var(--navy-700) 0%, var(--teal-700) 44%, var(--teal-300) 64%, #f7c27a 82%, #fde3b0 100%); }
.live .fx-n-sun { display: block; position: absolute; left: 50%; bottom: 8%; width: min(80vw, 640px); aspect-ratio: 1; translate: -50% 0; border-radius: 50%; opacity: 0; background: radial-gradient(circle, #fff6dc 0 12%, rgba(255, 214, 140, .75) 24%, rgba(255, 190, 110, .25) 46%, transparent 68%); }
.fx-n-far { fill: #0a1a3f; }
.fx-n-near { fill: #071330; }
.fx-n-main { fill: #050e27; }
.fx-n-ground { fill: var(--night); }
.fx-n-win { fill: #0d1c42; transition: fill .25s; }
.fx-n-win.lit { fill: var(--window); }
.fx-n-spark { fill: var(--window); opacity: .35; }
.fx-n-dome { stroke: var(--teal-300); stroke-width: 2.5; fill: url(#fx-dome-fill); opacity: .3; }
.fx-n-owl.owl-blink .owl-eye { transform: none; } /* on guard all night: this owl does not blink */
.fx-n-comet { fill: var(--amber); }
.fx-n-trail { stroke: var(--amber); stroke-width: 3; stroke-linecap: round; }
.fx-n-burst { fill: none; stroke: var(--amber); stroke-width: 3; }
.fx-n-ring { fill: none; stroke: var(--teal-300); stroke-width: 3; }
.live .fx-n-ui { position: absolute; inset: 0; padding-block: clamp(20px, 5vh, 52px) 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 24px; align-content: start; }
.live .fx-n-clock { display: block; margin-top: 10px; font: 800 clamp(2.8rem, 7.5vw, 5.4rem)/1 var(--f-head); color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.02em; max-width: none; }
.fx-n-clock small { font-size: .36em; font-weight: 700; letter-spacing: .04em; margin-left: .3em; color: var(--teal-300); }
.live .fx-n-events { gap: 0; margin-top: 16px; }
.live .fx-n-events > li { grid-area: 1 / 1; opacity: 0; transform: translateY(10px); filter: blur(8px); transition: opacity .35s, transform .35s, filter .35s; pointer-events: none; }
.live .fx-n-events > li.on { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.live .fx-n-t { display: none; }
.live .fx-n-log { display: grid; align-self: start; gap: 10px; padding: 16px; border-radius: 14px; background: rgba(7, 18, 47, .72); border: 1px solid rgba(95, 201, 201, .28); }
.fx-n-log-title { font: 700 .72rem/1.3 var(--f-head); letter-spacing: .12em; text-transform: uppercase; color: var(--teal-300); }
.fx-n-log ul { list-style: none; display: grid; gap: 10px; }
.fx-n-log li { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: .86rem; color: #fff; opacity: .16; transition: opacity .3s; font-variant-numeric: tabular-nums; }
.fx-n-log li.done { opacity: 1; }
.fx-n-log time { color: var(--on-navy); }
.fx-n-log b { font: 700 .66rem/1 var(--f-head); letter-spacing: .04em; color: var(--teal-300); }
.live .fx-n-sample { position: absolute; left: 20px; bottom: 14px; margin: 0; color: var(--on-navy); }
.live .fx-n-ruler { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--teal-300); transform: scaleX(0); transform-origin: left; }
@media (max-width: 780px) { .live .fx-n-ui { grid-template-columns: minmax(0, 1fr); } .live .fx-n-log { display: none; } }
@media (max-width: 440px) { .live .fx-n-sample { max-width: 150px; line-height: 1.25; } }
