@font-face {
  font-family: "Inter Display";
  src: url("/fonts/InterDisplay-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter Display";
  src: url("/fonts/InterDisplay-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --ink: #0B0D10;
  --line: #EEF1F2;
  --mint: #5BE7D6;
  --warm: #FF6B42;
  --muted: #8C969E;
  --faint: #56606A;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --stage: min(500px, 84vw, 54svh);
}

* { box-sizing: border-box; }
html { background: var(--ink); }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: radial-gradient(ellipse 70% 55% at 50% 38%, #0F151A 0%, var(--ink) 70%);
  color: var(--line);
  font-family: "Inter Display", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* WebGL field behind everything */
#field {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
}
#field.on { opacity: 1; }

main {
  position: relative; z-index: 1;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 7vh 24px 9vh;
}

/* the logo in three depth layers */
.stage {
  width: var(--stage);
  aspect-ratio: 864 / 820;
  perspective: 1100px;
  position: relative;
}
.tilt {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
}
/* scale compensates the perspective so the layers line up exactly at rest */
#layerRadar { transform: translateZ(-60px) scale(1.0545); }
#layerMorse { transform: translateZ(-24px) scale(1.0218); }
#layerBull  { transform: translateZ(44px)  scale(0.96); }

.layer .m { opacity: 0.6; transition: opacity 90ms linear; }
.layer .m.on { opacity: 1; filter: drop-shadow(0 0 6px rgba(91, 231, 214, 0.95)); }

h1 {
  margin: 1.3rem 0 0;
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* the name: pure outlines in one colour; app.js lights each letter as the radar beam passes
   under it (--g, 0..1) */
.tg { display: block; width: 5.43em; height: auto; overflow: visible; }
.tg path {
  stroke-width: 1.9;
  stroke-linejoin: round;
  stroke-opacity: calc(0.72 + 0.28 * var(--g, 0));
  filter: drop-shadow(0 0 calc(var(--g, 0) * 6px) rgba(214, 246, 241, 0.6));
}
@media (max-width: 640px) { .tg path { stroke-width: 2.6; } }
.tg .syms text {
  font-family: var(--mono); font-size: 64px; text-anchor: middle; dominant-baseline: middle;
  fill: none; stroke: var(--line); stroke-width: 1.4; stroke-opacity: 0.55; stroke-linejoin: round;
}

.soon {
  margin: 1.4rem 0 0;
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted);
}
.soon .dot {
  width: 7px; height: 7px; border-radius: 50%;
  border: 1.6px solid var(--warm);
  animation: ping 2.4s ease-out infinite;
}
.contact { margin: 1.1rem 0 0; font-size: 1rem; position: relative; }
a.email:not([href]) { cursor: pointer; }
.copied {
  position: absolute; left: 50%; top: calc(100% + 0.6rem);
  transform: translate(-50%, 4px);
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mint); white-space: nowrap;
  opacity: 0; transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.copied.show { opacity: 1; transform: translate(-50%, 0); }
a {
  color: var(--line); text-decoration: none;
  background: linear-gradient(var(--mint), var(--mint)) left bottom / 0% 1px no-repeat,
              linear-gradient(rgba(91, 231, 214, 0.4), rgba(91, 231, 214, 0.4)) left bottom / 100% 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.45s cubic-bezier(.2,.7,.2,1), color 0.3s;
}
a:hover, a:focus-visible { color: var(--mint); background-size: 100% 1px, 100% 1px; outline: none; }
a:focus-visible { box-shadow: 0 0 0 3px rgba(91, 231, 214, 0.25); border-radius: 2px; }

/* HUD readouts in the corners */
.hud { position: fixed; inset: 0; z-index: 2; pointer-events: none; font-family: var(--mono); }
.hud-block {
  position: absolute;
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 14px;
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.hud-block .v { color: var(--muted); }
.hud-block::before, .hud-block::after {
  content: ""; position: absolute; width: 10px; height: 10px;
  border-color: rgba(91, 231, 214, 0.35); border-style: solid; border-width: 0;
}
.tl { top: max(18px, env(safe-area-inset-top)); left: 18px; }
.tr { top: max(18px, env(safe-area-inset-top)); right: 18px; text-align: right; align-items: flex-end; }
.bl { bottom: max(18px, env(safe-area-inset-bottom)); left: 18px; }
.br { bottom: max(18px, env(safe-area-inset-bottom)); right: 18px; text-align: right; align-items: flex-end; }
.tl::before { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.tr::before { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.bl::before { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.br::before { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.hud .live {
  display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 8px var(--mint);
  vertical-align: 1px;
  animation: blink 1.8s steps(1) infinite;
}

/* reticle cursor (fine pointers only, switched on by app.js) */
.reticle { position: fixed; left: 0; top: 0; z-index: 3; pointer-events: none; display: none; }
html.reticle-on .reticle { display: block; }
html.reticle-on, html.reticle-on a { cursor: none; }
.reticle .pip, .reticle .ring { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.reticle .pip {
  width: 4px; height: 4px; margin: -2px 0 0 -2px; background: var(--mint);
  box-shadow: 0 0 calc(var(--h, 0) * 10px) calc(var(--h, 0) * 2px) rgba(91, 231, 214, calc(var(--h, 0) * 0.9));
}
.reticle .ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(91, 231, 214, calc(0.55 + 0.45 * var(--h, 0)));
  box-shadow: 0 0 calc(var(--h, 0) * 14px) rgba(91, 231, 214, calc(var(--h, 0) * 0.75)),
              inset 0 0 calc(var(--h, 0) * 8px) rgba(91, 231, 214, calc(var(--h, 0) * 0.5));
  transition: width .25s, height .25s, margin .25s;
}
.reticle .ring::before, .reticle .ring::after { content: ""; position: absolute; }
.reticle .ring::before {
  left: 50%; top: -7px; width: 1px; height: calc(100% + 14px); margin-left: -0.5px;
  background: linear-gradient(to bottom, rgba(91,231,214,calc(.6 + .4 * var(--h, 0))) 0 9px, transparent 9px calc(100% - 9px), rgba(91,231,214,calc(.6 + .4 * var(--h, 0))) calc(100% - 9px));
}
.reticle .ring::after {
  top: 50%; left: -7px; height: 1px; width: calc(100% + 14px); margin-top: -0.5px;
  background: linear-gradient(to right, rgba(91,231,214,calc(.6 + .4 * var(--h, 0))) 0 9px, transparent 9px calc(100% - 9px), rgba(91,231,214,calc(.6 + .4 * var(--h, 0))) calc(100% - 9px));
}
html.reticle-hover .reticle .ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: var(--mint); }

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 66, 0.55); }
  80%, 100% { box-shadow: 0 0 0 9px rgba(255, 107, 66, 0); }
}
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0.25; } }

/* power-on sequence: radar opens from the centre, the bull draws itself, then the text arrives */
@media (prefers-reduced-motion: no-preference) {
  #layerRadar { animation: radarOn 1.5s cubic-bezier(.3,.6,.2,1) both 0.15s; }
  #layerMorse { animation: fadeIn 0.8s ease both 1.1s; }
  .bull { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.1s cubic-bezier(.45,.05,.25,1) forwards 0.35s; }
  .tg path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.9s cubic-bezier(.45,.05,.25,1) forwards; }
  .tg path:nth-child(1) { animation-delay: 1.000s; }
  .tg path:nth-child(2) { animation-delay: 1.085s; }
  .tg path:nth-child(3) { animation-delay: 1.170s; }
  .tg path:nth-child(4) { animation-delay: 1.255s; }
  .tg path:nth-child(5) { animation-delay: 1.340s; }
  .tg path:nth-child(6) { animation-delay: 1.425s; }
  .tg path:nth-child(7) { animation-delay: 1.510s; }
  .tg path:nth-child(8) { animation-delay: 1.595s; }
  .tg path:nth-child(9) { animation-delay: 1.680s; }
  .tg path:nth-child(10) { animation-delay: 1.765s; }
  .tg path:nth-child(11) { animation-delay: 1.850s; }
  .soon { animation: rise 0.9s cubic-bezier(.2,.7,.2,1) both 1.6s; }
  .contact { animation: rise 0.9s cubic-bezier(.2,.7,.2,1) both 1.8s; }
  .hud { animation: fadeIn 1.2s ease both 2.2s; }
}
@keyframes radarOn {
  from { clip-path: circle(0% at 50% 53%); opacity: 0.2; }
  to   { clip-path: circle(120% at 50% 53%); opacity: 1; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

@media (prefers-reduced-motion: reduce) {
  .soon .dot, .hud .live { animation: none; }
  .layer .m { opacity: 1; }
}

@media (max-width: 640px) {
  :root { --stage: min(420px, 86vw, 50svh); }
  .hud-block { font-size: 9px; letter-spacing: 0.12em; padding: 8px 10px; }
  .tl, .bl { left: 10px; } .tr, .br { right: 10px; }
  main { padding-top: 12vh; padding-bottom: 14vh; }
}

/* 404 page */
.nf .code { margin: 0; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.3em; color: var(--warm); }
h1.small { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-top: 0.8rem; white-space: normal; }
