/* TWZL — infra / terminal-meets-clean */
:root {
  --bg: #070b10;
  --bg-elevated: #0e1620;
  --line: rgba(148, 178, 198, 0.14);
  --text: #9eb0c2;
  --bright: #e7eef6;
  --muted: #6d8094;
  --accent: #2ec4a2;
  --accent-dim: rgba(46, 196, 162, 0.18);
  --warn: #e6b84d;
  --warn-dim: rgba(230, 184, 77, 0.16);
  --bad: #ef5f5f;
  --bad-dim: rgba(239, 95, 95, 0.16);
  --maint: #5b9fd4;
  --maint-dim: rgba(91, 159, 212, 0.16);
  --font-display: "Sora", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --space: clamp(1rem, 3vw, 2rem);
  --max: 64rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--bright);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 20%, transparent 70%);
  opacity: 0.55;
  animation: grid-drift 28s linear infinite;
}

.bg-glow {
  position: fixed;
  inset: auto auto 10% -10%;
  width: 55vw;
  height: 55vw;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(46, 196, 162, 0.12), transparent 65%);
  filter: blur(10px);
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 48px, 48px 48px; }
}

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

.site-header {
  padding: 1rem var(--space);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 16, 0.82);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--bright);
}

.site-logo__mark {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}

.site-logo__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: lowercase;
}

.site-nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

/* Hero apex — one composition */
.hero--apex {
  min-height: min(92vh, 54rem);
  display: grid;
  align-items: center;
  padding: clamp(3rem, 10vh, 6rem) var(--space);
  position: relative;
}

.hero__scan {
  position: absolute;
  inset: 12% 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.35;
  animation: scan 5.5s var(--ease) infinite;
}

@keyframes scan {
  0%, 100% { transform: translateY(0); opacity: 0.15; }
  50% { transform: translateY(40vh); opacity: 0.45; }
}

.hero__content {
  max-width: 40rem;
  animation: rise 0.9s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(1.25rem); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__brand {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 10vw, 5.5rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--bright);
  line-height: 0.95;
}

.hero__headline {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 500;
  color: var(--bright);
  letter-spacing: -0.02em;
}

.hero__support {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  color: var(--text);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: #04241c;
}

.btn--primary:hover {
  background: #45d8b4;
  color: #04241c;
}

.btn--ghost {
  border-color: var(--line);
  color: var(--bright);
  background: transparent;
}

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

.section {
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--space);
  border-top: 1px solid var(--line);
}

.section__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section__inner--narrow {
  max-width: 36rem;
}

.section__eyebrow {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.section__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--bright);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section__lead {
  margin: 0 0 1.5rem;
  color: var(--text);
}

.section__foot {
  margin: 1.5rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
}

.clarify__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 1.5rem 0;
}

.clarify__col {
  padding: 1.15rem 1.2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}

.clarify__col h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.clarify__col--not h3 {
  color: var(--warn);
}

.clarify__col ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
}

.clarify__col li + li {
  margin-top: 0.45rem;
}

.clarify__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.cta-band .section__inner {
  text-align: left;
}

/* Statusboard */
.status-hero {
  padding: clamp(2rem, 6vw, 3.5rem) var(--space) 1.5rem;
}

.status-hero__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.status-hero__note {
  margin: 1rem 0 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.overall {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 1.25rem 1.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  animation: rise 0.7s var(--ease) both;
}

.overall__pulse {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-dim);
  animation: pulse 2.2s ease-out infinite;
  flex-shrink: 0;
}

.overall--degraded .overall__pulse {
  background: var(--warn);
  box-shadow: 0 0 0 0 var(--warn-dim);
}

.overall--outage .overall__pulse {
  background: var(--bad);
  box-shadow: 0 0 0 0 var(--bad-dim);
}

.overall--maintenance .overall__pulse {
  background: var(--maint);
  box-shadow: 0 0 0 0 var(--maint-dim);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70% { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.overall__title {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--bright);
}

.overall__meta {
  margin: 0.25rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.component-board {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.component-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.component-row:last-child {
  border-bottom: 0;
}

.component-row__info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.component-row__name {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--bright);
}

.component-row__desc {
  font-size: 0.85rem;
  color: var(--muted);
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge--operational {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(46, 196, 162, 0.35);
}

.badge--degraded {
  color: var(--warn);
  background: var(--warn-dim);
  border-color: rgba(230, 184, 77, 0.35);
}

.badge--outage {
  color: var(--bad);
  background: var(--bad-dim);
  border-color: rgba(239, 95, 95, 0.35);
}

.badge--maintenance {
  color: var(--maint);
  background: var(--maint-dim);
  border-color: rgba(91, 159, 212, 0.35);
}

.incident-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.incident-card {
  padding: 1.1rem 1.2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}

.incident-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.incident-card h2,
.incident-card h3,
.incident-card__title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--bright);
  font-weight: 600;
}

.incident-card__meta {
  margin: 0.45rem 0 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.update-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
}

.update-list time {
  display: inline-block;
  min-width: 6.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-right: 0.4rem;
}

.empty-state {
  color: var(--muted);
}

.site-footer {
  margin-top: auto;
  padding: 2rem var(--space) 2.5rem;
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.site-footer__line {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.site-footer__links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-decoration: none;
}

.site-footer__copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.error-id code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--warn);
}

.section__lead--tight {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.overall__live {
  color: var(--accent);
}

.sparkline {
  display: flex;
  gap: 2px;
  margin-top: 0.55rem;
  align-items: flex-end;
  height: 1.1rem;
}

.sparkline__bar {
  width: 0.35rem;
  height: 100%;
  background: var(--accent);
  opacity: 0.85;
}

.sparkline__bar--degraded {
  background: var(--warn);
  height: 70%;
}

.sparkline__bar--outage {
  background: var(--bad);
  height: 45%;
}

.sparkline__bar--maintenance {
  background: var(--maint);
  height: 80%;
}

[data-open-incidents][hidden] {
  display: none !important;
}

.reveal {
  opacity: 0;
  transform: translateY(0.8rem);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 640px) {
  .site-logo__tag {
    display: none;
  }

  .component-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero--apex {
    min-height: auto;
    padding-top: 4.5rem;
    padding-bottom: 3.5rem;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
