@font-face {
  font-family: 'Geist';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/geist-sans-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist';
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/geist-sans-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist Mono';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/geist-mono-latin-400-normal.woff2') format('woff2');
}

:root {
  --font-sans: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --bg: #000000;
  --ink: #f0f0f0;
  --muted: #8a8a8a;
  --rule: #2a2a2a;
  --accent: #00b9bc;

  --gutter: clamp(16px, 3vw, 40px);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background-color: var(--accent);
  color: #000000;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* The dot field sits behind everything and never takes pointer events. */

.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100dvh;
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--gutter);
  color: var(--muted);
}

.topbar__time {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  padding: 48px var(--gutter);
}

.hero__name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  cursor: default;
}

/* Each letter keeps its final width while it scrambles, so the line never jitters. */
.hero__char {
  display: inline-block;
  text-align: center;
  white-space: pre;
}

.hero__char--scrambling {
  color: var(--accent);
}

.hero__summary {
  max-width: 52ch;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
  background-color: var(--bg);
  box-shadow: 0 0 0 8px var(--bg);
}

.hero__status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  /* A solid backing keeps glowing dots from showing through the small text. */
  background-color: var(--bg);
  box-shadow: 0 0 0 8px var(--bg);
}

.hero__dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  background-color: var(--accent);
}

.hero__dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  animation: ping 2.4s var(--ease-out) infinite;
}

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  70%,
  100% {
    transform: scale(3.2);
    opacity: 0;
  }
}

.hero__link {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  transition: color 180ms ease-out, border-color 180ms ease-out;
}

.hero__link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Tiles: an ink fill rises from the bottom edge on hover. */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 720px;
  margin-top: 28px;
}

.tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
  background-color: var(--bg);
  transition: border-color 220ms ease-out, color 220ms ease-out;
}

.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 380ms var(--ease-out);
}

.tile__link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 18px 20px 20px;
}

.tile__label {
  color: var(--muted);
  transition: color 220ms ease-out;
}

.tile__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.tile__action {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 4px 6px;
  color: var(--muted);
  transition: color 220ms ease-out, transform 380ms var(--ease-out);
}

.tile__arrow {
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
}

.tile:hover {
  border-color: var(--ink);
  color: var(--bg);
}

.tile:hover::before {
  transform: scaleY(1);
}

.tile:hover .tile__label,
.tile:hover .tile__action {
  color: var(--accent);
}

.tile:hover .tile__arrow {
  transform: translate(3px, -3px);
}

.tile__action[data-done] {
  color: var(--accent);
}

/* Stations: a small timeline in three columns, stacked on narrow screens. */

.stations {
  width: 100%;
  max-width: 720px;
  margin-top: 36px;
  background-color: var(--bg);
  box-shadow: 0 0 0 8px var(--bg);
}

.stations__title {
  margin: 0 0 12px;
  font-weight: 400;
  color: var(--muted);
}

.stations__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.stations__item {
  display: grid;
  grid-template-columns: 6.5rem 9.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.stations__years {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.stations__name {
  font-size: 0.9375rem;
  font-weight: 500;
}

.stations__note {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.footer__links {
  display: flex;
  gap: 20px;
}

.footer__links a,
.footer__links button,
.topbar__back {
  padding: 4px 0;
  transition: color 180ms ease-out;
}

.footer__links a:hover,
.footer__links button:hover,
.topbar__back:hover {
  color: var(--ink);
}

/* Privacy page */

.legal {
  width: 100%;
  max-width: 68ch;
  padding: 64px var(--gutter) 80px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.legal__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.legal__meta {
  margin-top: 12px;
}

.legal__heading {
  margin: 40px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-weight: 400;
  color: var(--ink);
}

.legal p + p {
  margin-top: 12px;
}

.legal a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.legal a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.legal code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--ink);
}

/* Consent: a small panel, both choices equally weighted. */

.consent {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 10;
  width: min(360px, calc(100% - 2 * var(--gutter)));
  padding: 18px 20px 20px;
  border: 1px solid var(--rule);
  background-color: var(--bg);
  animation: rise 700ms var(--ease-out) 900ms both;
}

.consent__title {
  margin: 0;
  font-weight: 400;
  color: var(--ink);
}

.consent__text {
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}

.consent__text a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.consent__text a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.consent__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.consent__button {
  padding: 10px 12px;
  border: 1px solid var(--rule);
  color: var(--ink);
  transition: border-color 180ms ease-out, color 180ms ease-out;
}

.consent__button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Entrance: everything rises into place in reading order. */

.enter {
  animation: rise 800ms var(--ease-out) both;
  animation-delay: calc(var(--i) * 90ms + 120ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media (max-width: 600px) {
  /* Span the same column as the page content instead of floating at a fixed width. */
  .consent {
    left: var(--gutter);
    width: auto;
  }

  .stations__item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .stations__years {
    grid-column: 2;
    grid-row: 1;
  }

  .stations__note {
    grid-column: 1 / -1;
  }

  .tiles {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 16px;
  }

  .tile__link {
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
