@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/chakra-petch-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/chakra-petch-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Share Tech Mono";
  src: url("/assets/fonts/share-tech-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --void: #050505;
  --cell: #0a0a0a;
  --white: #f5f5f5;
  --muted: rgba(245, 245, 245, 0.55);
  --faint: rgba(245, 245, 245, 0.28);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --punch: #ff0040;
  --punch-dim: rgba(255, 0, 64, 0.45);
  --punch-glow: rgba(255, 0, 64, 0.22);
  --ghost: rgba(255, 255, 255, 0.022);
  --display: "Chakra Petch", system-ui, sans-serif;
  --mono: "Share Tech Mono", ui-monospace, monospace;
  --hex: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  --gutter: clamp(0.75rem, 3vw, 1.25rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; }
html, body { min-height: 100%; }
body {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--white);
  background: var(--void);
  overflow-x: clip;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--punch); color: #fff; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(255, 255, 255, 0.03), transparent 60%),
    linear-gradient(180deg, #030303 0%, var(--void) 50%, #020202 100%);
}
.mesh::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath fill='none' stroke='rgba(255%2C255%2C255%2C0.06)' stroke-width='0.6' d='M28 0 L56 16 L56 50 L28 66 L0 50 L0 16 Z M28 34 L56 50 L56 84 L28 100 L0 84 L0 50 Z'/%3E%3C/svg%3E");
  background-size: 56px 100px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 5%, transparent 78%);
}

.scan {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 3px
  );
  opacity: 0.4;
}

.ghost {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ghost-jinx,
.ghost-cult {
  position: absolute;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(6rem, 22vw, 14rem);
  line-height: 0.85;
  letter-spacing: 0.06em;
  color: var(--ghost);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  user-select: none;
}
.ghost-jinx {
  left: max(0.25rem, env(safe-area-inset-left));
  top: 16%;
}
.ghost-cult {
  right: max(0.25rem, env(safe-area-inset-right));
  bottom: 10%;
}

.trap {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding:
    max(var(--gutter), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(var(--gutter), env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.anchor-mark {
  position: fixed;
  top: max(var(--gutter), env(safe-area-inset-top));
  right: max(var(--gutter), env(safe-area-inset-right));
  z-index: 5;
  width: 36px;
  height: 36px;
  clip-path: var(--hex);
  background: var(--cell);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  transition: box-shadow 0.2s ease;
}
.anchor-mark:hover { box-shadow: 0 0 16px var(--punch-glow); }
.anchor-mark img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.1);
}

.lattice {
  position: relative;
  z-index: 2;
  width: min(74rem, 100%);
  min-height: calc(100dvh - 2 * var(--gutter));
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 2.4fr) minmax(0, 0.75fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: clamp(0.45rem, 1.2vw, 0.7rem);
  align-content: center;
}

.pane {
  min-width: 0;
  background: rgba(10, 10, 10, 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.pane-signal {
  grid-column: 1 / 3;
  grid-row: 1;
  padding: 0.75rem 0.9rem;
}

.telemetry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.45rem 1rem;
}
.telemetry div { min-width: 0; }
.telemetry dt {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.15rem;
}
.telemetry dd {
  font-size: 0.78rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.telemetry dd.hot { color: var(--punch); }
.telemetry dd.bar {
  letter-spacing: 0.06em;
  color: var(--white);
}

.pane-rail { display: none; }

.pane-lure {
  grid-column: 1 / 3;
  grid-row: 2;
  position: relative;
  padding: clamp(0.55rem, 1.5vw, 0.85rem);
  border-color: var(--line-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.pane-lure .logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) contrast(1.08);
}
.tld-badge {
  position: absolute;
  right: clamp(0.65rem, 2vw, 1rem);
  bottom: clamp(0.65rem, 2vw, 1rem);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.1rem, 0.7rem + 2cqw, 1.55rem);
  letter-spacing: 0.06em;
  color: var(--punch);
  padding: 0.2rem 0.55rem;
  background: rgba(5, 5, 5, 0.92);
  border: 1px solid var(--punch-dim);
  clip-path: var(--hex);
  min-width: 3.2rem;
  min-height: 2.6rem;
  display: grid;
  place-items: center;
  box-shadow: 0 0 24px var(--punch-glow);
}

.pane-chips {
  grid-column: 3;
  grid-row: 1 / 3;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 0.55rem;
  background: transparent;
  border: none;
}
.hex-chip {
  width: min(100%, 5.5rem);
  aspect-ratio: 1 / 1.12;
  display: grid;
  place-items: center;
  clip-path: var(--hex);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(10, 10, 10, 0.95));
  border: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(0.72rem, 0.55rem + 1cqw, 0.88rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.35rem;
  overflow-wrap: anywhere;
  color: var(--white);
}
.hex-chip.hot {
  color: var(--punch);
  border-color: var(--punch-dim);
  box-shadow: 0 0 22px var(--punch-glow);
}
.hex-chip span {
  display: block;
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 0.15rem;
}

.pane-brief {
  grid-column: 1;
  grid-row: 3;
  padding: 0.85rem 0.9rem;
}
.brief-lines {
  list-style: none;
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--muted);
}
.brief-lines li {
  padding-left: 0.85rem;
  position: relative;
  margin-bottom: 0.35rem;
  overflow-wrap: anywhere;
}
.brief-lines li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--punch);
}

.pane-await {
  grid-column: 2 / 4;
  grid-row: 3;
  padding: 0.85rem 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  border-color: rgba(255, 255, 255, 0.14);
}
.await-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1rem, 0.75rem + 1.5cqw, 1.25rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  flex: 1 1 100%;
}
.await-sub {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  flex: 1 1 100%;
  margin-top: -0.35rem;
}
.signal-btn {
  display: inline-grid;
  place-items: center;
  min-width: 9.5rem;
  min-height: 3.2rem;
  padding: 0.65rem 1.35rem;
  clip-path: var(--hex);
  background: var(--punch);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 0 32px var(--punch-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.signal-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 44px rgba(255, 0, 64, 0.4);
}
.ping {
  flex: 1 1 100%;
  font-size: 0.68rem;
  color: var(--faint);
}
.ping a {
  color: var(--white);
  text-decoration: none;
}
.ping a:hover { color: var(--punch); }

.pane-fine {
  grid-column: 1 / -1;
  grid-row: 4;
  padding: 0.65rem 0.85rem;
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(5, 5, 5, 0.6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  font-size: 0.6rem;
  line-height: 1.5;
  color: var(--faint);
}
.pane-fine a {
  color: var(--muted);
  text-decoration: none;
}
.pane-fine a:hover { color: var(--white); }

@media (min-width: 900px) {
  .lattice {
    grid-template-columns: 2.4rem minmax(0, 1fr) minmax(0, 2fr) 2.4rem minmax(0, 0.8fr);
    grid-template-rows: auto minmax(12rem, 1fr) auto auto;
  }

  .pane-signal { grid-column: 1 / 5; grid-row: 1; }

  .pane-rail {
    display: grid;
    place-items: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.35em;
    color: rgba(255, 255, 255, 0.12);
    background: transparent;
    border: none;
    padding: 0.5rem 0;
  }
  .pane-rail--left { grid-column: 1; grid-row: 2; }
  .pane-rail--right {
    grid-column: 4;
    grid-row: 2;
    color: rgba(255, 0, 64, 0.14);
  }

  .pane-lure { grid-column: 2 / 4; grid-row: 2; }
  .pane-chips { grid-column: 5; grid-row: 1 / 3; }
  .pane-brief { grid-column: 1 / 3; grid-row: 3; }
  .pane-await { grid-column: 3 / 5; grid-row: 3; }
}

@media (max-width: 899px) {
  .lattice {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    align-content: start;
  }

  .pane-signal,
  .pane-lure,
  .pane-chips,
  .pane-brief,
  .pane-await,
  .pane-fine {
    grid-column: 1;
    grid-row: auto;
  }

  .pane-chips {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.65rem;
    background: rgba(10, 10, 10, 0.82);
    border: 1px solid var(--line);
  }

  .hex-chip {
    width: calc(33.333% - 0.5rem);
    min-width: 4.5rem;
    flex: 1 1 4.5rem;
  }

  .ghost { display: none; }
}

@media (max-width: 640px) {
  .hex-chip {
    width: calc(50% - 0.35rem);
    flex: 1 1 calc(50% - 0.35rem);
  }
}

.legal {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto;
  padding:
    clamp(2rem, 6vw, 3.5rem)
    max(var(--gutter), env(safe-area-inset-right))
    clamp(2rem, 6vw, 3.5rem)
    max(var(--gutter), env(safe-area-inset-left));
  min-height: 100dvh;
  color: var(--white);
}
.legal h1 {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.legal h2 {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: var(--punch);
}
.legal p,
.legal li {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 0.65rem;
}
.legal ul { margin-left: 1.15rem; }
.legal a { color: var(--white); }
.legal address { font-style: normal; }
.legal .stand {
  font-size: 0.72rem;
  color: var(--faint);
  margin-top: 1.5rem;
}
.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.nav-row a {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--punch);
  text-decoration: none;
}

.error-trap {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--gutter);
}
.error-hex {
  width: min(20rem, 100%);
  aspect-ratio: 1 / 1.12;
  clip-path: var(--hex);
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  box-shadow: 0 0 40px var(--punch-glow);
}
.error-hex img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: grayscale(1);
  margin-bottom: 0.75rem;
}
.error-hex h1 {
  font-family: var(--display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--punch);
  margin-bottom: 0.35rem;
}
.error-hex p {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.55;
  max-width: 16rem;
}
.error-hex a {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}
.error-hex a:hover { color: var(--punch); }

@media (prefers-reduced-motion: reduce) {
  .signal-btn { transition: none; }
}
