/*
 * Portal Frontier, at the scale of a page.
 *
 * The aesthetic is decided by the concept sheet and §26-28: wireframe low-poly,
 * neon on dark, glowing edges over a dark real room. That is not a style choice
 * borrowed for the website — it is what AR line-work actually looks like, so a
 * page drawn this way is a page that looks like the game rather than like an
 * advert for it.
 *
 * The colour rule, which is the same rule the HUD uses so that neither has to
 * be learned twice:
 *
 *   CYAN is the room and the player's own line-work.
 *   VIOLET is a portal — the thing that is not from here.
 *   BREACH RED is threat and damage, and nothing else is ever red.
 *
 * Body copy is never any of the three. Colour always means something.
 *
 * Dark only. There is no light variant because the game is only ever played in
 * a dim room and the brand has no light half to invent. `color-scheme` is
 * declared and the background is painted explicitly rather than borrowed.
 *
 * No web fonts. A font CDN is a third party on every page view of a site whose
 * headline claim is that we do not collect things (ADR-0002), and that would be
 * a small hypocrisy on the one page it matters most.
 */

:root {
  --void: #06070b;
  --void2: #0c0e16;

  --edge: #37e6ff;
  --portal: #8b5cff;
  --breach: #ff3d6e;

  --line: rgba(255, 255, 255, 0.82);
  --line-soft: rgba(140, 190, 255, 0.16);
  --text: #eaf2f8;
  --dim: rgba(234, 242, 248, 0.58);
  --faint: rgba(234, 242, 248, 0.3);
  --surf: rgba(120, 170, 255, 0.045);

  --f-disp: "Archivo Black", Impact, "Haettenschweiler", "Arial Narrow Bold", system-ui, sans-serif;
  --f-ui: -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 38rem;
  --page: 64rem;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font: 16px/1.65 var(--f-ui);
  -webkit-font-smoothing: antialiased;
}

/*
 * The navgrid, behind everything.
 *
 * Two crossed line gradients, masked to a soft ellipse — the derived floor grid
 * enemies path across (ADR-0001), drawn at the size of a page. Fixed rather
 * than scrolling so it reads as the surface the page sits on, and faint enough
 * that no text is ever read against a line.
 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(55, 230, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 230, 255, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 85% at 50% 12%, #000, transparent 76%);
  mask-image: radial-gradient(120% 85% at 50% 12%, #000, transparent 76%);
}

header, main, footer { position: relative; z-index: 1; }

/* ============ type ============ */

h1, h2, h3 { font-family: var(--f-disp); text-transform: uppercase; letter-spacing: -0.01em; }

h1 {
  font-size: clamp(2.1rem, 7vw, 4.2rem);
  line-height: 1.02;
  margin: 0 0 0.7rem;
}
h2 { font-size: clamp(1.3rem, 3.4vw, 1.95rem); line-height: 1.06; margin: 0 0 0.75rem; }
h3 { font-size: 1rem; line-height: 1.2; margin: 0 0 0.4rem; letter-spacing: 0.02em; }

p { margin: 0 0 1rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: var(--text); }
.dim { color: var(--dim); }

a { color: var(--edge); text-underline-offset: 0.2em; }
a:hover { color: var(--text); }

code, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

.cap {
  display: block;
  font: 700 0.66rem/1.3 var(--f-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 0.6rem;
}

/* ============ layout ============ */

.page { max-width: var(--page); margin: 0 auto; padding: 0 1.25rem; }

section { padding: 3.5rem 0; border-top: 1px solid var(--line-soft); }
section:first-of-type { border-top: 0; }

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 1.75rem;
}

/* ============ wireframe marks ============ */

/* A card is a facet: a thin bright edge and almost nothing inside it. */
.card {
  background: var(--surf);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  padding: 1.15rem 1.25rem;
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  inset: -1px auto auto -1px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--edge);
  border-left: 2px solid var(--edge);
}
.card p { color: var(--dim); font-size: 0.925rem; margin-bottom: 0; }
.card p + p { margin-top: 0.6rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: 800 0.7rem/1 var(--f-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  color: var(--dim);
}
.chip.edge { color: var(--edge); border-color: color-mix(in srgb, var(--edge) 55%, transparent); }
.chip.portal { color: var(--portal); border-color: color-mix(in srgb, var(--portal) 55%, transparent); }
.chip.breach { color: var(--breach); border-color: color-mix(in srgb, var(--breach) 55%, transparent); }

/* The one claim the whole project hangs from (ADR-0002). Given the portal
   colour on purpose: it is the promise about the thing that opens in your wall. */
.trust {
  border-left: 2px solid var(--portal);
  padding: 0.2rem 0 0.2rem 1.1rem;
  margin: 1.75rem 0;
  max-width: var(--measure);
}
.trust strong { color: var(--portal); }

/* ============ header ============ */

.site-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--void) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.site-head .page { display: flex; align-items: center; gap: 1rem; padding-block: 0.75rem; }
.site-head .wordmark {
  font: 800 0.9rem/1 var(--f-disp);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.site-head nav { margin-left: auto; display: flex; gap: 1rem; flex-wrap: wrap; }
.site-head nav a {
  font: 800 0.72rem/1 var(--f-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dim);
}
.site-head nav a:hover { color: var(--edge); }

@media (max-width: 34rem) { .site-head nav { display: none; } }

/* ============ hero ============ */

.hero { padding: 4.5rem 0 3.5rem; text-align: center; border-top: 0; }
.hero p { margin-inline: auto; }
.hero .actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.75rem; }

.button {
  display: inline-block;
  font: 800 0.75rem/1 var(--f-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.3rem;
  border: 1px solid var(--edge);
  border-radius: 2px;
  color: var(--edge);
}
.button:hover { background: color-mix(in srgb, var(--edge) 12%, transparent); color: var(--edge); }
.button[aria-disabled="true"] { border-color: var(--line-soft); color: var(--faint); pointer-events: none; }

/*
 * The portal, drawn in CSS.
 *
 * A ring with a violet bloom, because the hero needs the shape the game is
 * named for and a rendered screenshot would be a promise the build cannot keep
 * yet. This is unambiguously a graphic; nobody will mistake it for footage.
 */
.portal-mark {
  width: min(15rem, 46vw);
  aspect-ratio: 1;
  margin: 0 auto 2rem;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--portal) 70%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--portal) 22%, transparent),
    0 0 60px color-mix(in srgb, var(--portal) 28%, transparent),
    inset 0 0 60px color-mix(in srgb, var(--portal) 22%, transparent);
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--portal) 16%, transparent), transparent 68%);
}

/* ============ lists ============ */

ul.plain { list-style: none; padding: 0; margin: 1.25rem 0 0; max-width: var(--measure); }
ul.plain li { padding: 0.75rem 0; border-top: 1px solid var(--line-soft); color: var(--dim); }
ul.plain li strong { color: var(--text); }

ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.75rem 0 0; }
ol.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.5rem 3.2rem;
  max-width: var(--measure);
  color: var(--dim);
}
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.15rem;
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  font: 800 1rem/1 var(--f-disp);
  color: var(--edge);
  border: 1px solid color-mix(in srgb, var(--edge) 55%, transparent);
  border-radius: 2px;
}
ol.steps li strong { color: var(--text); display: block; margin-bottom: 0.2rem; }

/* ============ FAQ ============ */

details { border-top: 1px solid var(--line-soft); padding: 0.9rem 0; max-width: var(--measure); }
summary { cursor: pointer; font-weight: 700; color: var(--text); }
summary::marker { color: var(--edge); }
details p { margin-top: 0.6rem; color: var(--dim); }

/* ============ footer ============ */

.site-foot {
  border-top: 1px solid var(--line-soft);
  margin-top: 2rem;
  padding: 2.5rem 0 3.5rem;
  color: var(--dim);
  font-size: 0.875rem;
}
.site-foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 1rem; }
.site-foot a { text-decoration: none; }

/* ============ 404 and /play ============ */

.void { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 1rem; }
.void p { margin-inline: auto; }

/* ============ placeholder copy ============
 *
 * Lane I owns the words and is writing them in `marketing/`; Lane G owns this
 * HTML and CSS. Until the two meet, every sentence written by the wrong lane
 * says so ON THE PAGE, in breach red, so that nobody can ship it by forgetting.
 * A comment in the source would not have that property.
 */
[data-copy="placeholder"] {
  border-left: 2px dashed var(--breach);
  padding-left: 1rem;
  position: relative;
}
[data-copy="placeholder"]::after {
  content: "PLACEHOLDER COPY — LANE I";
  display: block;
  margin-top: 0.5rem;
  font: 800 0.62rem/1 var(--f-ui);
  letter-spacing: 0.14em;
  color: var(--breach);
}
