:root {
  --bg: #06080b;
  --fg: #e9eef3;
  --muted: #8a97a6;
  --accent: #5cf2c8;              /* terminal teal-green */
  --ascii: #eef2f5;              /* white terminal glyphs for the grid */
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
}

/* --- nav --------------------------------------------------------------- */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
}
.nav__brand {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
  font-size: 1.05rem;
}
.nav__tld { color: var(--accent); }
.nav__links { display: flex; gap: 1.5rem; }
.nav__link {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav__link:hover, .nav__link:focus-visible { color: var(--accent); }

/* --- hero -------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: var(--bg);
}

/* Decorative ASCII layer. */
.ascii-hero {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.ascii-hero__frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  white-space: pre;
  font-family: var(--mono);
  font-variant-ligatures: none;
  font-size: 0.72vw;              /* 260-col grid covers the hero; slight overscan */
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--ascii);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.08);
}

/* Readability overlay between the animation and the copy. */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(6, 8, 11, 0.72) 0%, rgba(6, 8, 11, 0.25) 40%, rgba(6, 8, 11, 0.05) 70%, rgba(6, 8, 11, 0.15) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(1.25rem, 6vw, 6rem);
  max-width: 46rem;
}
.hero__eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.75rem;
  color: var(--fg);
  margin: 0 0 1.25rem;
}
.hero__title {
  font-size: clamp(2rem, 5.5vw, 4rem);
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}
.hero__lede {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  line-height: 1.5;
  color: #cfd6dd;
  margin: 0 0 2rem;
  max-width: 34rem;
}
.cta {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--bg);
  background: var(--accent);
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 2px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.cta:hover, .cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(92, 242, 200, 0.25);
}

/* mobile variant grid is narrower (56 cols) -> larger glyphs to fill width */
@media (max-width: 640px) {
  .ascii-hero__frame { font-size: 2.19vw; }
  .hero__overlay {
    background:
      linear-gradient(180deg, rgba(6, 8, 11, 0.2) 0%, rgba(6, 8, 11, 0.55) 55%, rgba(6, 8, 11, 0.75) 100%);
  }
}

/* Reduced motion: the inlined poster stays; JS never starts the animation. */
@media (prefers-reduced-motion: reduce) {
  .cta { transition: none; }
}
