:root {
  color-scheme: dark;
  --background: #0b0b10;
  --surface: #111119;
  --line: #292932;
  --foreground: #f7f6fa;
  --muted: #9a99a8;
  --green: #40d28b;
  --amber: #e6b45b;
  --pink: #ef5da8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 75% 0%, rgba(121, 82, 255, 0.12), transparent 30%),
    var(--background);
  color: var(--foreground);
}

button,
a {
  color: inherit;
}

.topbar,
main,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--foreground);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--pink);
  font-weight: 800;
}

nav {
  display: flex;
  gap: 0.35rem;
}

nav button {
  border: 1px solid var(--line);
  background: transparent;
  padding: 0.45rem 0.6rem;
  font: 700 0.65rem ui-monospace, Consolas, monospace;
  cursor: pointer;
}

nav button[aria-pressed="true"] {
  border-color: var(--pink);
  color: var(--pink);
}

.hero {
  padding-block: clamp(5rem, 12vw, 9rem) 4rem;
}

.eyebrow,
.state,
.meta dt,
.service-card span,
.incident-card span,
footer span {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.meta dt,
.service-card span,
.incident-card span {
  color: var(--muted);
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  padding: 0.55rem 0.75rem;
  color: var(--amber);
}

.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.state[data-overall="operational"] {
  color: var(--green);
}

.state[data-overall="major_outage"],
.state[data-overall="partial_outage"] {
  color: var(--pink);
}

h1 {
  max-width: 900px;
  margin: 1.25rem 0;
  font-size: clamp(3.2rem, 9vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.hero > p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 720px;
  margin-top: 2.5rem;
  border: 1px solid var(--line);
}

.meta div {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border-right: 1px solid var(--line);
}

.meta div:last-child {
  border-right: 0;
}

.meta dd {
  margin: 0;
}

.services,
.incidents {
  padding-block: 4rem;
  border-top: 1px solid var(--line);
}

.services h2,
.incidents h2 {
  margin: 0.7rem 0 2rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.04em;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.service-card,
.incident-card {
  background: var(--surface);
  padding: 1.25rem;
}

.service-card {
  min-height: 160px;
}

.service-card header,
.incident-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.service-card h3,
.incident-card h3 {
  margin: 0;
  font-size: 1rem;
}

.service-card strong {
  color: var(--amber);
  font: 700 0.65rem ui-monospace, Consolas, monospace;
  text-transform: uppercase;
}

.service-card strong[data-state="operational"] {
  color: var(--green);
}

.service-card strong[data-state="major_outage"],
.service-card strong[data-state="partial_outage"] {
  color: var(--pink);
}

.service-card p,
.incident-card p,
.loading {
  margin: 2.5rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

#incident-list {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.incident-card p {
  margin-top: 1rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-block: 2rem 4rem;
  color: var(--muted);
  font-size: 0.75rem;
}

footer p {
  margin: 0;
}

.noscript {
  position: fixed;
  inset: auto 1rem 1rem;
  border: 1px solid var(--pink);
  background: var(--background);
  padding: 1rem;
}

@media (max-width: 720px) {
  .topbar,
  main,
  footer {
    width: min(100% - 24px, 1120px);
  }

  .service-grid,
  .meta {
    grid-template-columns: 1fr;
  }

  .meta div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .meta div:last-child {
    border-bottom: 0;
  }

  footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
