/* JobRisk — "night-shift intel map" teaser */

:root {
  --bg: #05080f;
  /* feed types (keep in sync with COLORS in app.js) */
  --k-hazard: #ff5a1f;
  --k-payment: #ffc233;
  --k-customer: #ff4f8b;
  --k-schedule: #c9d3e3;
  --k-note: #9d8cff;
  --k-clear: #5ce1e6;
  --bg-2: #0a1120;
  --panel: rgba(9, 15, 28, 0.72);
  --ink: #e9eef6;
  --ink-2: #b9c4d6;
  --muted: #6f7e98;
  --line: rgba(130, 165, 215, 0.14);
  --line-strong: rgba(150, 180, 225, 0.28);
  --signal: #ff5a1f;
  --signal-hot: #ff7a3d;
  --signal-glow: rgba(255, 90, 31, 0.45);
  --cool: #5ce1e6;

  --f-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(120% 90% at 75% 40%, var(--bg-2) 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--signal); color: #000; }

/* ---------- atmosphere layers ---------- */

#map {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  animation: fade-in 2.2s 0.1s var(--ease-out) forwards;
}

.fx { position: fixed; inset: 0; pointer-events: none; z-index: 1; }

.fx-vignette {
  background:
    radial-gradient(80% 70% at 30% 50%, rgba(5, 8, 15, 0.82) 0%, rgba(5, 8, 15, 0.35) 55%, transparent 80%),
    radial-gradient(140% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.7) 100%);
}

.fx-scan {
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

.fx-grain {
  opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(3) infinite;
}

.frame { position: fixed; inset: 14px; pointer-events: none; z-index: 2; }
.frame i {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
}
.frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* Decorative reticle that trails the pointer (fine pointers only, set up in JS). */
.reticle {
  position: fixed;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  border: 1px solid rgba(255, 90, 31, 0.55);
  border-radius: 50%;
}
.reticle::before,
.reticle::after {
  content: "";
  position: absolute;
  background: rgba(255, 90, 31, 0.55);
}
.reticle::before { left: 50%; top: -9px; bottom: -9px; width: 1px; }
.reticle::after { top: 50%; left: -9px; right: -9px; height: 1px; }
.reticle.is-on { opacity: 1; }
.reticle-label {
  position: absolute;
  left: 34px;
  top: 30px;
  white-space: nowrap;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--signal-hot);
}

/* ---------- layout ---------- */

.topbar,
.stage,
.footer { position: relative; z-index: 4; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(22px + env(safe-area-inset-top)) var(--gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { width: 28px; height: 28px; color: var(--signal); filter: drop-shadow(0 0 8px var(--signal-glow)); }
.brand-word {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.14em;
  line-height: 1;
}
.brand-word b { font-weight: 800; color: var(--signal); }

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
  animation: blink 1.4s steps(2, jump-none) infinite;
}
.status-coords {
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(28px, 5vh, 72px) var(--gutter) clamp(24px, 4vh, 48px);
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

/* ---------- hero ---------- */

.hero { max-width: 900px; width: 100%; container-type: inline-size; }

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--signal-hot);
}
.kicker-caret { color: var(--signal); }
.kicker-cursor {
  margin-left: -6px;
  animation: blink 1s steps(2, jump-none) infinite;
}

.headline {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.6rem, min(14.5cqi, 13.5vh), 9rem);
  line-height: 0.86;
  letter-spacing: -0.005em;
}
.line {
  display: block;
  padding-bottom: 0.04em;
  /* Mask the rise from below, then open up so the glow isn't boxed in. */
  clip-path: inset(-1em -1em 0 -1em);
  animation: unclip 0.01s 2s forwards;
}
.line-inner {
  display: inline-block;
  transform: translateY(105%);
  animation: rise 1.1s var(--d, 0s) var(--ease-out) forwards;
}
.line-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink-2);
  font-weight: 800;
}
.line-signal {
  position: relative;
  color: var(--signal);
  text-shadow: 0 0 18px var(--signal-glow), 0 0 60px rgba(255, 90, 31, 0.25);
  animation:
    rise 1.1s var(--d, 0s) var(--ease-out) forwards,
    flicker 4.5s 1.9s linear infinite;
}
/* RGB-split ghost that glitches through occasionally */
.line-signal::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--cool);
  mix-blend-mode: screen;
  opacity: 0;
  text-shadow: none;
  animation: glitch 6s 2.4s steps(1) infinite;
}

.lede {
  max-width: 34em;
  margin: 26px 0 0;
  font-size: clamp(12.5px, 1.05vw, 14px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-2);
}

.launch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 90, 31, 0.06);
  font-size: 10px;
  letter-spacing: 0.2em;
}
.launch-tag { color: var(--muted); }
.launch-val { color: var(--ink); font-weight: 500; }
.launch-bar {
  position: relative;
  width: 84px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.launch-bar span {
  position: absolute;
  inset: 0;
  width: 86%;
  background: repeating-linear-gradient(90deg, var(--signal) 0 5px, transparent 5px 7px);
  transform-origin: left;
  animation: load 2.4s 1.6s var(--ease-out) both;
}

/* ---------- early-access form ---------- */

.access { margin-top: 18px; max-width: 560px; }
.access-label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.access-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.access-row:focus-within {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.15), 0 0 40px rgba(255, 90, 31, 0.12);
}
.access-prompt {
  display: grid;
  place-items: center;
  padding-left: 14px;
  font-size: 18px;
  color: var(--signal);
}
.access input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 16px 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 400 14px/1.2 var(--f-mono);
  caret-color: var(--signal);
}
.access input::placeholder { color: #4f5d75; }
.access-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border: 0;
  background: var(--signal);
  color: #0b0b0b;
  font: 800 17px/1 var(--f-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s;
}
.access-btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease-out); }
.access-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
}
.access-btn:hover { background: var(--signal-hot); }
.access-btn:hover::before { transform: translateX(120%); transition: transform 0.7s var(--ease-out); }
.access-btn:hover svg { transform: translateX(4px); }
.access-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.access-btn[disabled] { cursor: progress; background: #b8461c; }

.access-msg {
  min-height: 1.6em;
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.access-msg.is-error { color: var(--signal-hot); }
.access-msg.is-ok { color: var(--cool); }

.access.is-done .access-row {
  border-color: rgba(92, 225, 230, 0.5);
  box-shadow: 0 0 40px rgba(92, 225, 230, 0.12);
}
.access.is-done .access-btn { background: var(--cool); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- simulated feed ---------- */

.feed {
  align-self: center;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 17, 32, 0.78), rgba(5, 8, 15, 0.55));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 10.5px;
}
.feed-head,
.feed-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  letter-spacing: 0.16em;
  font-size: 9.5px;
}
.feed-head { border-bottom: 1px solid var(--line); }
.feed-foot { border-top: 1px solid var(--line); color: var(--muted); }
.feed-live { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.feed-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
  animation: blink 1s steps(2, jump-none) infinite;
}
.feed-sim { color: var(--muted); }
.feed-count { color: var(--signal-hot); font-variant-numeric: tabular-nums; }

.feed-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  height: 292px;
  overflow: hidden;
}
.feed-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 4px 10px;
  padding: 9px 14px;
  border-bottom: 1px dashed rgba(130, 165, 215, 0.08);
  animation: feed-in 0.6s var(--ease-out) both;
}
.feed-item::before {
  content: "";
  grid-row: span 2;
  width: 6px;
  height: 6px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}
[data-kind="hazard"] { --c: var(--k-hazard); }
[data-kind="payment"] { --c: var(--k-payment); }
[data-kind="customer"] { --c: var(--k-customer); }
[data-kind="schedule"] { --c: var(--k-schedule); }
[data-kind="note"] { --c: var(--k-note); }
[data-kind="clear"] { --c: var(--k-clear); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 9px 14px;
  list-style: none;
  border-bottom: 1px solid var(--line);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.legend > * { display: inline-flex; align-items: center; gap: 6px; }
.legend > *::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
}

/* Pin shapes mirror the map: diamond, square, triangle, dot, bar, ringed dot. */
[data-kind="hazard"]::before { transform: rotate(45deg) scale(0.9); border-radius: 0; }
[data-kind="payment"]::before { border-radius: 0; }
[data-kind="customer"]::before { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); box-shadow: none; }
[data-kind="note"]::before { width: 9px; height: 3px; border-radius: 0; }
[data-kind="clear"]::before { outline: 1px solid var(--c); outline-offset: 2px; }
.feed-type { color: var(--c); letter-spacing: 0.14em; font-weight: 500; }
.feed-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.feed-desc { grid-column: 2 / 4; color: var(--ink-2); font-weight: 300; }

/* ---------- footer ---------- */

.footer { padding-bottom: env(safe-area-inset-bottom); }

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 15, 0.6);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  padding: 11px 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-track span::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 26px;
  background: var(--signal);
  transform: rotate(45deg);
  opacity: 0.8;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter) 24px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-tag { color: var(--ink-2); }

/* ---------- load choreography ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.9s var(--d, 0s) var(--ease-out) forwards;
}

@keyframes reveal { to { opacity: 1; transform: none; } }
@keyframes rise { to { transform: translateY(0); } }
@keyframes unclip { to { clip-path: inset(-1em -1em -1em -1em); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes feed-in {
  from { opacity: 0; transform: translateX(16px); background: rgba(255, 90, 31, 0.12); }
  to { opacity: 1; transform: none; background: transparent; }
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-3%, 2%); }
  66% { transform: translate(2%, -3%); }
  100% { transform: translate(0, 0); }
}
@keyframes flicker {
  0%, 18%, 20%, 22%, 62%, 64%, 100% { opacity: 1; }
  19%, 21%, 63% { opacity: 0.45; }
}
@keyframes glitch {
  0%, 91%, 100% { opacity: 0; transform: none; clip-path: inset(0); }
  92% { opacity: 0.85; transform: translate(-4px, 1px); clip-path: inset(10% 0 55% 0); }
  94% { opacity: 0.85; transform: translate(5px, -1px); clip-path: inset(60% 0 8% 0); }
  96% { opacity: 0.6; transform: translate(-2px, 0); clip-path: inset(35% 0 30% 0); }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .stage { grid-template-columns: 1fr; align-content: center; }
  .feed { max-width: 560px; width: 100%; }
  .feed-list { height: 146px; }
}

@media (max-width: 640px) {
  body { font-size: 12px; }
  .frame { inset: 8px; }
  .frame i { width: 14px; height: 14px; }
  .status-coords { display: none; }
  .status span:nth-child(2) { display: none; }
  .status::after { content: "PRE-LAUNCH"; }
  .brand-word { font-size: 21px; }
  .kicker { font-size: 10.5px; margin-bottom: 14px; }
  .line-outline { -webkit-text-stroke-width: 1px; }
  .access-row { flex-wrap: wrap; }
  .access input[type="email"] { padding: 15px 12px; }
  .access-btn { flex: 1 0 100%; justify-content: center; padding: 15px 20px; }
  .footer-row { flex-direction: column; align-items: center; gap: 4px; text-align: center; }
  .marquee-track span { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; }
  .line-signal::after { display: none; }
  .fx-grain { animation: none; }
}
