/* Radius v2 — "Field Station".
   A distance instrument, not a nightlife app: one cold petrol tonal family,
   a single hi-vis marker yellow that only ever means "here / act / locked",
   every number and band name in mono-display, and the range rail as the
   signature element that runs through the landing and the app alike.
   Cast by the Foundry design-engine v4.1. Corners: none. One radius family = 0. */

:root {
  /* tonal family — one hue (petrol ~205), five lightness steps */
  --n0: #080F13;   /* ground        oklch(12% .018 205) */
  --n1: #0D171C;   /* panel */
  --n2: #142229;   /* plate */
  --n3: #23343D;   /* rule / edge */
  --n4: #6D8794;   /* quiet text */
  --n5: #E4EBEE;   /* chalk text */

  /* the one meaning colour: hi-vis surveyor's marker */
  --mark: #F0D048;
  --mark-dim: #8A7A2A;

  --gap: 18px;
  --tap: 44px;
  --rule: 1px solid var(--n3);
  --hair: 1px solid rgba(228, 235, 238, .10);

  --mono: "Fragment Mono", ui-monospace, "SFMono-Regular", monospace;
  --sans: "Cabinet Grotesk", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 18px 40px -24px #04090C;

  --railw: 0px;

  /* aliases kept for the handful of inline styles in app.js — one meaning
     colour, so "near" and "plus" both resolve to the marker */
  --near: var(--mark);
  --plus: var(--mark);
  --slate: var(--n4);
}

* { box-sizing: border-box; }
::selection { background: var(--mark); color: var(--n0); }

html, body {
  margin: 0;
  background: var(--n0);
  color: var(--n5);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* film grain — 3% over the whole ground, keeps the flat dark from going plastic */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

body { min-height: 100dvh; display: flex; flex-direction: column; }
#app { display: flex; flex-direction: column; flex: 1; min-width: 0; }

a { color: var(--n5); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--mark); }

:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; }

/* ── type ─────────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--mono);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(30px, 8vw, 46px); }
h2 { font-size: clamp(21px, 5vw, 27px); }
h3 { font-size: 16px; letter-spacing: -0.02em; }
p  { margin: 0 0 1em; text-wrap: pretty; max-width: 65ch; }

.muted { color: var(--n4); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }
.mono, .stamp, .readout, .band, .eyebrow, .count, td, th {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.mono { font-size: 12px; letter-spacing: .01em; }

.eyebrow {
  display: block;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--n4); margin: 0 0 14px;
}
.eyebrow b { color: var(--mark); font-weight: 400; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--gap); width: 100%; }
.stack > * + * { margin-top: 14px; }

/* ── buttons ──────────────────────────────────────────────────── */
button, .btn {
  font: 500 15px/1 var(--sans);
  letter-spacing: .01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  border: 1px solid var(--mark);
  border-radius: 0;
  background: var(--mark); color: var(--n0);
  text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
button::after, .btn::after { content: "→"; font-family: var(--mono); transition: transform .25s var(--ease); }
button.noarrow::after, .btn.noarrow::after, nav.tabs a::after, .item::after { content: none; }
@media (pointer: fine) {
  button:hover, .btn:hover { background: #FFE882; }
  button:hover::after, .btn:hover::after { transform: translateX(5px); }
}
button:disabled { opacity: .38; cursor: not-allowed; }
button.ghost, .btn.ghost {
  background: transparent; color: var(--n5); border-color: var(--n3);
}
button.ghost:hover, .btn.ghost:hover { border-color: var(--mark); color: var(--mark); background: transparent; }
button.link {
  background: none; border: 0; color: var(--n4); min-height: 40px; padding: 0;
  text-decoration: underline; text-underline-offset: 4px; font-size: 14px;
}
button.link::after { content: none; }
button.link:hover { color: var(--mark); }
button.danger { background: transparent; color: #E8836A; border-color: #5C3128; }
button.danger:hover { background: #E8836A; color: var(--n0); }
button.wide { width: 100%; }

/* ── fields ───────────────────────────────────────────────────── */
label {
  display: block;
  font: 400 11px/1 var(--mono);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--n4); margin: 0 0 8px;
}
input, textarea, select {
  width: 100%; min-height: 56px; padding: 14px 14px;
  font: 400 16px/1.4 var(--sans);
  color: var(--n5); background: var(--n1);
  border: 1px solid var(--n3); border-radius: 0;
  appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--n4) 50%), linear-gradient(135deg, var(--n4) 50%, transparent 50%);
  background-position: calc(100% - 20px) 24px, calc(100% - 14px) 24px;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
input:focus, textarea:focus, select:focus { border-color: var(--mark); outline: none; box-shadow: inset 0 -2px 0 var(--mark); }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] {
  appearance: auto; accent-color: var(--mark);
  width: 19px; height: 19px; min-height: 0; min-width: 19px;
  flex: 0 0 auto; padding: 0; border: 0; background: none;
}
input[type="file"] { min-height: 0; padding: 12px; font-size: 14px; }
.field + .field { margin-top: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 0; min-width: 0; }
.err {
  border-left: 3px solid #E8836A; background: rgba(232, 131, 106, .08);
  padding: 12px 14px; font-size: 14px; margin: 14px 0;
}

/* ── app chrome ───────────────────────────────────────────────── */
header.app {
  position: sticky; top: 0; z-index: 40;
  background: rgba(8, 15, 19, .82);
  backdrop-filter: blur(14px);
  border-bottom: var(--hair);
}
header.app .bar {
  height: 56px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 0 var(--gap); max-width: 1440px; margin: 0 auto;
}
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font: 400 15px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none; color: var(--n5);
}
.logo .dot {
  width: 9px; height: 9px; background: var(--mark);
  box-shadow: 0 0 0 4px rgba(240, 208, 72, .16);
}
.readout {
  font: 400 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--n4); text-align: right;
}

main { flex: 1; padding-bottom: 96px; }

nav.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: rgba(8, 15, 19, .93);
  backdrop-filter: blur(14px);
  border-top: var(--hair);
  padding-bottom: env(safe-area-inset-bottom);
}
nav.tabs ul {
  display: flex; margin: 0 auto; padding: 0; list-style: none; max-width: 640px;
}
nav.tabs li { flex: 1 1 0; }
nav.tabs a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 58px; text-decoration: none; color: var(--n4);
  font: 400 9px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
nav.tabs .glyph { font-size: 17px; line-height: 1; }
nav.tabs a[aria-current="page"] { color: var(--n5); }
nav.tabs a[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 2px; background: var(--mark);
}
nav.tabs .count {
  position: absolute; top: 6px; left: 50%; margin-left: 6px;
  background: var(--mark); color: var(--n0);
  font: 400 9px/1 var(--mono); padding: 3px 4px; letter-spacing: 0;
}

/* ── the range rail — signature element ───────────────────────── */
.rail {
  position: fixed; left: 0; top: 56px; bottom: 0; width: 108px; z-index: 30;
  display: none; padding: 26px 0 26px 18px;
  border-right: var(--hair);
  font: 400 9px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--n4);
  pointer-events: none;
}
.rail ol { list-style: none; margin: 0; padding: 0; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.rail li { position: relative; padding-left: 16px; }
.rail li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 8px; height: 1px; background: var(--n3);
}
.rail li b { display: block; font-weight: 400; color: var(--n4); }
.rail li i { font-style: normal; color: rgba(109, 135, 148, .55); }
.rail li.on b { color: var(--mark); }
.rail li.on::before { background: var(--mark); width: 13px; }
.rail .needle {
  position: absolute; left: 18px; width: 20px; height: 2px; background: var(--mark);
  transition: transform .6s var(--ease);
}

/* mobile: the rail lies down as a hairline ruler under the header */
.rulerbar {
  position: sticky; top: 56px; z-index: 35;
  display: flex; gap: 2px; padding: 0 var(--gap) 0;
  background: var(--n0); border-bottom: var(--hair);
}
.rulerbar span { flex: 1 1 0; height: 3px; background: var(--n2); }
.rulerbar span.on { background: var(--mark); }

@media (min-width: 1024px) {
  :root { --railw: 108px; }
  .rail { display: block; }
  .rulerbar { display: none; }
  main { padding-left: var(--railw); }
  main.landing { padding-left: 0; }
  nav.tabs ul { margin-left: calc(var(--railw) / 2); }
}

/* ── landing ──────────────────────────────────────────────────── */
main.landing { padding-bottom: 0; }
main.landing section { position: relative; }

/* 1. full-bleed canvas hero — the gesture */
.canvas-hero {
  min-height: 92svh;
  display: grid; align-items: end;
  border-bottom: var(--hair);
}
.canvas-hero canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block;
}
.canvas-hero .copy {
  position: relative; z-index: 2;
  padding: 0 6vw 12vh 7vw;
  max-width: 1100px;
}
.canvas-hero h1 {
  font-size: clamp(42px, 12.5vw, 168px);
  line-height: .88; letter-spacing: -.055em;
  margin: 0 0 26px; text-wrap: balance;
}
.canvas-hero h1 em { font-style: normal; color: var(--mark); }
.canvas-hero .lede { font-size: clamp(16px, 2.1vw, 20px); color: var(--n5); max-width: 46ch; margin-bottom: 26px; }
.canvas-hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.canvas-hero .cta .btn { flex: 0 0 auto; }
.canvas-hero .fine { margin: 20px 0 0; color: var(--n4); }

/* the bewuste grensbreker: a survey plate straddling the hero edge */
.plate {
  position: absolute; z-index: 3;
  right: var(--gap); bottom: -30px;
  background: var(--n2); border: 1px solid var(--n3);
  padding: 13px 16px; box-shadow: var(--shadow);
  font: 400 10px/1.7 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--n4); max-width: min(74vw, 320px);
}
.plate b { display: block; color: var(--mark); font-weight: 400; letter-spacing: .2em; }
@media (min-width: 900px) { .plate { right: 6vw; } }

/* 2. split-screen — how the distance works */
.split { display: grid; gap: 0; border-bottom: var(--hair); }
.split .side {
  padding: 9vh 7vw 9vh 7vw;
  border-bottom: var(--hair);
}
.split .side:last-child { border-bottom: 0; }
.split .side.dim { background: var(--n1); }
@media (min-width: 900px) {
  .split { grid-template-columns: 1.15fr 1fr; }
  .split .side { border-bottom: 0; padding: 12vh 5vw; }
  .split .side:first-child { border-right: var(--hair); }
}
.legend ol { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.legend li {
  counter-increment: step;
  padding: 20px 0 20px 60px; position: relative;
  border-top: var(--hair);
  max-width: 60ch;
}
.legend li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 18px;
  font: 400 24px/1 var(--mono); color: var(--mark-dim); letter-spacing: -.04em;
}
.bandscale { list-style: none; margin: 0; padding: 0; }
.bandscale li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 15px 0; border-top: var(--hair);
  font: 400 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
.bandscale li span:last-child { color: var(--n4); }
.bandscale li:first-child { color: var(--mark); }

/* 3. stacked full-width sections */
.slab { padding: 10vh 7vw; border-bottom: var(--hair); }
.slab.dim { background: var(--n1); }
.slab > * { max-width: 68ch; }
.slab.table > * { max-width: 900px; }
.slab .big { font-size: clamp(22px, 3.4vw, 34px); line-height: 1.22; letter-spacing: -.02em; max-width: 22ch; }

.pricetable { width: 100%; border-collapse: collapse; margin: 8px 0 0; font-size: 14px; }
.pricetable th, .pricetable td { text-align: left; padding: 13px 10px; border-top: var(--hair); vertical-align: top; }
.pricetable thead th {
  border-top: 0; border-bottom: 1px solid var(--n3);
  font: 400 10px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--n4);
}
.pricetable thead th:last-child { color: var(--mark); }
.pricetable th:first-child { font: 400 14px/1.4 var(--sans); color: var(--n5); width: 46%; }
.pricetable td { font-family: var(--mono); font-size: 13px; color: var(--n4); width: 27%; }
.pricetable td:last-child { color: var(--n5); }
.pricetable tbody tr:hover { background: rgba(228, 235, 238, .03); }

footer.site {
  padding: 8vh 7vw 40px;
  border-top: var(--hair);
  color: var(--n4); font-size: 13px;
}
footer.site .brand {
  font: 400 clamp(48px, 17vw, 190px)/.8 var(--mono);
  letter-spacing: -.06em; color: #1C2E36;
  margin: 0 0 34px; user-select: none;
}
footer.site a { color: var(--n4); }
footer.site a:hover { color: var(--mark); }
footer.site p { margin: 0 0 8px; }

/* ── grid of people ───────────────────────────────────────────── */
.band {
  display: flex; align-items: center; gap: 12px;
  margin: 30px 0 12px;
  font: 400 10px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--n4);
}
.band::after { content: ""; flex: 1; height: 1px; background: var(--n3); }
.band .n { color: var(--n5); }
.band:first-child { margin-top: 18px; }

.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .people { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .people { grid-template-columns: repeat(4, 1fr); } }

.person {
  position: relative; display: block; aspect-ratio: 3 / 4;
  background: var(--n1); border: 1px solid var(--n3);
  overflow: hidden; text-decoration: none; color: var(--n5);
  transition: border-color .2s var(--ease), transform .3s var(--ease);
}
@media (pointer: fine) { .person:hover { border-color: var(--mark); transform: translateY(-3px); } }
.person img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.92) contrast(1.03); }
.person .noimg {
  width: 100%; height: 100%; display: grid; place-items: center;
  font: 400 32px/1 var(--mono); color: var(--n3); background: var(--n1);
}
.person .meta {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 9px;
  background: linear-gradient(to top, rgba(8, 15, 19, .94), rgba(8, 15, 19, 0));
  font-size: 13px; font-weight: 500; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.person .meta .age { color: var(--n4); font-family: var(--mono); font-size: 11px; }
.stamp {
  position: absolute; top: 0; left: 0;
  background: var(--n0); color: var(--n4);
  font: 400 10px/1 var(--mono); letter-spacing: .06em;
  padding: 5px 7px; border-right: 1px solid var(--n3); border-bottom: 1px solid var(--n3);
}
.stamp.near { background: var(--mark); color: var(--n0); border-color: var(--mark); }
.live {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px;
  background: var(--n5); box-shadow: 0 0 0 3px rgba(8, 15, 19, .8);
}

.locked { margin-top: 34px; border-top: 1px solid var(--n3); padding-top: 4px; }
.locked .strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 12px 0 18px; }
.locked .strip div {
  aspect-ratio: 3 / 4; background:
    repeating-linear-gradient(135deg, var(--n1) 0 6px, var(--n2) 6px 12px);
  border: 1px solid var(--n3);
}
.locked p { margin-bottom: 16px; }
.locked strong { color: var(--mark); font-family: var(--mono); }

/* ── lists ────────────────────────────────────────────────────── */
.list { list-style: none; margin: 6px 0 0; padding: 0; }
.item {
  display: flex; gap: 14px; align-items: center;
  padding: 14px 4px; border-bottom: var(--hair);
  text-decoration: none; color: var(--n5);
}
.item:hover { background: rgba(228, 235, 238, .035); }
.item .thumb { width: 54px; height: 54px; object-fit: cover; flex: 0 0 auto; background: var(--n1); border: 1px solid var(--n3); }
.item .thumb.noimg { display: grid; place-items: center; font: 400 19px/1 var(--mono); color: var(--n3); }
.item .body { flex: 1; min-width: 0; }
.item .body .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.item .body .name { font-weight: 500; }
.item .body .sub { display: block; color: var(--n4); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge {
  display: inline-block; background: var(--mark); color: var(--n0);
  font: 400 10px/1 var(--mono); padding: 4px 6px; letter-spacing: .08em;
}

/* ── profile ──────────────────────────────────────────────────── */
.gallery { position: relative; margin: 18px 0 0; background: var(--n1); border: 1px solid var(--n3); }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.gallery .nav { position: absolute; inset: 0; display: flex; justify-content: space-between; }
.gallery .nav button {
  background: none; border: 0; width: 30%; min-height: 0; color: transparent; padding: 0;
}
.gallery .nav button::after { content: none; }
.gallery .pips { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.gallery .pips i { width: 18px; height: 2px; background: rgba(228, 235, 238, .3); }
.gallery .pips i.on { background: var(--mark); }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; padding: 0; }
.tags li {
  border: 1px solid var(--n3); padding: 6px 10px;
  font: 400 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--n4);
}
.deffield { margin: 20px 0; }
.deffield dt {
  font: 400 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--n4); margin-top: 16px;
}
.deffield dd { margin: 6px 0 0; }

.taprow { display: flex; gap: 10px; margin: 18px 0; }
.taprow button { flex: 1; flex-direction: column; gap: 6px; min-height: 74px; background: transparent; color: var(--n5); border-color: var(--n3); }
.taprow button::after { content: none; }
.taprow button .glyph { font: 400 21px/1 var(--mono); }
.taprow button.on { border-color: var(--mark); color: var(--mark); }

/* ── chat ─────────────────────────────────────────────────────── */
.thread { display: flex; flex-direction: column; gap: 10px; padding: 16px 0 8px; }
.msg {
  max-width: 78%; align-self: flex-start;
  background: var(--n1); border: 1px solid var(--n3);
  padding: 10px 13px; font-size: 15px;
}
.msg.mine { align-self: flex-end; background: var(--n2); border-color: var(--n3); }
.msg img { max-width: 100%; display: block; margin: 6px 0 2px; }
.msg .when { display: block; margin-top: 5px; font: 400 10px/1 var(--mono); color: var(--n4); letter-spacing: .08em; }
.composer {
  position: sticky; bottom: 58px; z-index: 20;
  display: flex; gap: 10px; align-items: flex-end;
  padding: 12px 0; background: var(--n0); border-top: var(--hair);
}
.composer textarea { min-height: 56px; max-height: 140px; }

/* ── misc ─────────────────────────────────────────────────────── */
.skel { background: linear-gradient(100deg, var(--n1) 30%, var(--n2) 50%, var(--n1) 70%); background-size: 260% 100%; animation: sweep 1.5s var(--ease) infinite; }
.skel.tile { aspect-ratio: 3 / 4; border: 1px solid var(--n3); }
@keyframes sweep { to { background-position: -160% 0; } }

.plusnote { border-left: 2px solid var(--mark); background: rgba(240, 208, 72, .05); padding: 14px 16px; margin: 18px 0; font-size: 14px; }
.plusnote strong { color: var(--mark); font-family: var(--mono); font-weight: 400; }

#toast {
  position: fixed; left: 50%; bottom: 78px; transform: translate(-50%, 14px);
  background: var(--mark); color: var(--n0);
  font: 400 13px/1 var(--mono); padding: 13px 18px;
  opacity: 0; pointer-events: none; transition: all .3s var(--ease); z-index: 70;
  max-width: 88vw; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
