/* Cyberspace Deck website. Colors and type match the app (client/src/index.css). */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --void: #02030a;
  --abyss: #040915;
  --panel: #06101e;
  --raised: #0a1a2c;
  --edge: #10304a;
  --edge-bright: #1b5878;
  --neon: #22e4ff;
  --neon-soft: #8ff3ff;
  --gold: #ffb21e;
  --acid: #2bff9a;
  --scarlet: #ff2d55;
  --orchid: #ff4fd8;
  --ink: #d3e6f0;
  --dim: #8aa7ba;
  --faint: #3d566a;
  --sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 15% -10%, rgb(34 228 255 / 0.12), transparent 70%),
    radial-gradient(700px 500px at 95% 10%, rgb(255 79 216 / 0.08), transparent 70%),
    var(--void);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* The grid floor behind the hero. */
body::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 900px;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, rgb(34 228 255 / 0.07) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgb(34 228 255 / 0.07) 0 1px, transparent 1px 64px);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--neon);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--neon-soft);
}
:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
}
h1,
h2,
h3 {
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
b {
  color: var(--ink);
  font-weight: 600;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--panel);
}

/* Header ---------------------------------------------------------------------------- */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(20px, calc((100vw - 1120px) / 2));
  background: rgb(2 3 10 / 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgb(16 48 74 / 0.7);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--neon);
  text-decoration: none;
  font: 700 14px/1 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.brand .dim {
  color: var(--dim);
}
.top nav {
  display: flex;
  gap: 4px;
}
.top nav a {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--dim);
  text-decoration: none;
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.06em;
}
.top nav a:hover {
  color: var(--ink);
  background: rgb(34 228 255 / 0.06);
}

/* Shared ---------------------------------------------------------------------------- */
main,
footer {
  width: min(1120px, 100% - 40px);
  margin: 0 auto;
}
.label {
  margin: 0 0 14px;
  color: var(--neon);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.sub {
  max-width: 62ch;
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 18px;
}
.fine {
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--edge-bright);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}
.btn:hover {
  border-color: var(--neon);
  color: #fff;
}
.btn.primary {
  background: var(--neon);
  border-color: var(--neon);
  color: var(--void);
  box-shadow: 0 0 28px rgb(34 228 255 / 0.35);
}
.btn.primary:hover {
  background: var(--neon-soft);
  color: var(--void);
  box-shadow: 0 0 36px rgb(34 228 255 / 0.5);
}
.size {
  font: 500 12px/1 var(--mono);
  opacity: 0.75;
}
.size:empty {
  display: none;
}

/* Screenshots get the app's HUD corner brackets. */
.shot {
  position: relative;
  margin: 56px 0 0;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--panel);
  box-shadow:
    0 40px 90px rgb(0 0 0 / 0.65),
    0 0 60px rgb(34 228 255 / 0.08);
}
.shot img {
  display: block;
  border-radius: 9px;
}
.shot::before,
.shot::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--neon);
  opacity: 0.8;
  pointer-events: none;
}
.shot::before {
  top: -6px;
  left: -6px;
  border-top: 2px solid;
  border-left: 2px solid;
}
.shot::after {
  right: -6px;
  bottom: -6px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

/* Hero ------------------------------------------------------------------------------ */
.hero {
  padding: 96px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  font-weight: 800;
}
.glow {
  color: var(--neon);
  text-shadow: 0 0 28px rgb(34 228 255 / 0.45);
}
.lede {
  max-width: 62ch;
  margin: 22px auto 0;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}
.cta .btn {
  padding: 14px 26px;
  font-size: 17px;
}

/* Sections -------------------------------------------------------------------------- */
.band {
  padding: 96px 0 24px;
}
.band h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
}
.legend,
.grid,
.platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
/* Six cards: three by two on desktop, two by three on tablets, one column on phones. */
.legend,
.grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.legend li,
.card,
.platform {
  padding: 22px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: linear-gradient(180deg, rgb(8 20 36 / 0.9), rgb(4 10 21 / 0.9));
}
.legend h3,
.card h3,
.platform h3 {
  margin: 14px 0 6px;
  font-size: 18px;
}
.legend p,
.card p {
  margin: 0;
  color: var(--dim);
  font-size: 15px;
}
.legend svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.legend .neon {
  stroke: var(--neon);
}
.legend .gold {
  stroke: var(--gold);
}
.legend .scarlet {
  stroke: var(--scarlet);
}
.legend .scarlet.fill {
  fill: var(--scarlet);
}
.legend .orchid {
  stroke: var(--orchid);
}
.legend .dashed {
  stroke-dasharray: 4 4;
}
.legend .dim-line {
  stroke: var(--faint);
}
.legend .faint-stroke {
  opacity: 0.7;
}
.card svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--neon);
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* Downloads ------------------------------------------------------------------------- */
.platform {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.platform h3 {
  margin: 0 0 6px;
  font-size: 22px;
}
.platform .btn {
  justify-content: space-between;
}
.platform .note {
  margin: 6px 0 0;
  color: var(--dim);
  font-size: 14px;
}
.platform.recommended {
  border-color: var(--neon);
  box-shadow: 0 0 40px rgb(34 228 255 / 0.12);
}
.platform.recommended::before {
  content: 'Your system';
  position: absolute;
  top: 22px;
  right: 22px;
  color: var(--acid);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Footer ---------------------------------------------------------------------------- */
footer {
  margin-top: 96px;
  padding: 48px 0 64px;
  border-top: 1px solid rgb(16 48 74 / 0.7);
  text-align: center;
  color: var(--dim);
  font-size: 15px;
}
footer blockquote {
  max-width: 52ch;
  margin: 0 auto 24px;
  color: var(--ink);
  font-size: 18px;
  font-style: italic;
}
footer cite {
  display: block;
  margin-top: 10px;
  color: var(--dim);
  font: 500 12px/1 var(--mono);
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Small screens --------------------------------------------------------------------- */
@media (max-width: 680px) {
  body {
    font-size: 16px;
  }
  .top nav a:not([href='#download']) {
    display: none;
  }
  .hero {
    padding-top: 64px;
  }
  .band {
    padding-top: 72px;
  }
  /* Stacked cards: the visitor's own platform first. */
  .platform.recommended {
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
