/* Verivius status page styling.
 *
 * Static, brand-aligned, no JavaScript. Palette mirrors the main app:
 * navy primary, teal accent, slate/muted greys, 8px radius, Inter. State
 * colours (green / amber / red) drive the hero tint, the signal dot, the
 * component rows and the incident pills via `state-*` classes the
 * generator stamps onto elements. */

:root {
  color-scheme: light;

  --bg: #eef2f6;
  --bg-glow: #e4ecf1;
  --surface: #ffffff;
  --surface-soft: #fbfcfd;
  --border: #e8ecf0;
  --border-strong: #d1d9e0;

  --primary: #0f1b2d;
  --secondary: #1b2e4a;
  --accent: #0abab5;
  --text: #2d3e50;
  --text-muted: #6b7b8f;

  --success: #1f9d57;
  --success-soft: rgba(31, 157, 87, 0.1);
  --warning: #e08a0b;
  --warning-soft: rgba(224, 138, 11, 0.12);
  --risk: #d8453a;
  --risk-soft: rgba(216, 69, 58, 0.1);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06);
  --shadow-md: 0 8px 28px rgba(15, 27, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(120% 60% at 50% -10%, var(--bg-glow) 0%, var(--bg) 55%) no-repeat,
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin-top: 0;
}

/* ── Top brand band (mirrors the app's navy header) ─────────────────── */

.topbar {
  background: var(--primary);
  border-bottom: 1px solid var(--secondary);
}

.topbar-inner {
  width: min(100%, 1080px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #ffffff;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand strong {
  font-weight: 700;
  color: var(--accent);
}

.brand svg {
  width: 30px;
  height: 21px;
  flex: none;
}

.topbar-contact {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 4px;
}

.topbar-contact:hover {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

/* ── Page shell ─────────────────────────────────────────────────────── */

.page {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 32px 24px 8px;
}

/* ── Hero status banner ─────────────────────────────────────────────── */

.status-hero {
  position: relative;
  padding: 40px 40px 36px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--success);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.status-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--success-soft);
  opacity: 0.7;
  pointer-events: none;
}

.status-hero > * {
  position: relative;
}

.hero-eyebrow {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-headline {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.hero-dot {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 6px var(--success-soft);
  animation: status-pulse 2.6s ease-out infinite;
}

.hero-headline h1 {
  margin: 0;
  color: var(--primary);
  font-size: 2.2rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.hero-message {
  max-width: 680px;
  margin: 0 0 18px;
  color: var(--text);
  font-size: 1.08rem;
}

.hero-updated {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Hero state variants: tint + accent border + dot colour. */
.status-hero.state-investigating,
.status-hero.state-identified {
  border-left-color: var(--warning);
}
.status-hero.state-investigating::before,
.status-hero.state-identified::before {
  background: var(--warning-soft);
}
.status-hero.state-investigating .hero-dot,
.status-hero.state-identified .hero-dot {
  background: var(--warning);
  box-shadow: 0 0 0 6px var(--warning-soft);
}

.status-hero.state-major-outage {
  border-left-color: var(--risk);
}
.status-hero.state-major-outage::before {
  background: var(--risk-soft);
}
.status-hero.state-major-outage .hero-dot {
  background: var(--risk);
  box-shadow: 0 0 0 6px var(--risk-soft);
}

/* ── Two-column layout ──────────────────────────────────────────────── */

/* Service components + Need help sit as an equal-height pair; incident
 * history runs full width below. align-items:stretch keeps the two cards
 * the same height so the help panel does not read as stranded. */
.status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 308px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.card h2 {
  margin-bottom: 18px;
  color: var(--primary);
  font-size: 1.2rem;
  line-height: 1.3;
}

/* ── Service components ─────────────────────────────────────────────── */

.component-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.component {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.component:first-child {
  border-top: 0;
  padding-top: 0;
}

.component-name {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--primary);
  font-weight: 600;
}

.component .dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 999px;
  background: var(--success);
}

.component-state {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--success);
}

.component.state-investigating .dot,
.component.state-identified .dot {
  background: var(--warning);
}
.component.state-investigating .component-state,
.component.state-identified .component-state {
  color: var(--warning);
}
.component.state-major-outage .dot {
  background: var(--risk);
}
.component.state-major-outage .component-state {
  color: var(--risk);
}

/* ── Incident timeline ──────────────────────────────────────────────── */

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

.incident {
  position: relative;
  padding: 0 0 24px 26px;
  border-left: 2px solid var(--border-strong);
}

.incident:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.incident::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--surface);
}

.incident.state-investigating::before,
.incident.state-identified::before {
  background: var(--warning);
}
.incident.state-major-outage::before {
  background: var(--risk);
}

.incident-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 8px;
}

.incident-head time {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.incident-pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--success);
  background: var(--success-soft);
}

.incident.state-investigating .incident-pill,
.incident.state-identified .incident-pill {
  color: var(--warning);
  background: var(--warning-soft);
}
.incident.state-major-outage .incident-pill {
  color: var(--risk);
  background: var(--risk-soft);
}

.incident h3 {
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 1.04rem;
  line-height: 1.4;
}

.incident p {
  margin-bottom: 8px;
  color: var(--text);
}

.incident p:last-child {
  margin-bottom: 0;
}

.incident-resolution {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.empty {
  margin: 0;
  color: var(--text-muted);
}

/* ── Help sidebar ───────────────────────────────────────────────────── */

.help {
  padding: 24px;
}

.help p {
  color: var(--text);
}

.help p:last-child {
  margin-bottom: 0;
}

.help a {
  color: var(--secondary);
  font-weight: 600;
  text-underline-offset: 3px;
  text-decoration-color: rgba(10, 186, 181, 0.5);
}

.help .muted {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.page-footer {
  width: min(100%, 1080px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 24px 36px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-sep {
  color: var(--border-strong);
}

/* ── Motion + responsive ────────────────────────────────────────────── */

@keyframes status-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--success-soft);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(31, 157, 87, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(31, 157, 87, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-dot {
    animation: none;
  }
}

@media (max-width: 860px) {
  .status-row {
    grid-template-columns: 1fr;
  }
  .status-hero {
    padding: 32px 24px 28px;
  }
  .hero-headline h1 {
    font-size: 1.85rem;
  }
  .card {
    padding: 24px;
  }
}

@media (max-width: 520px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .page {
    padding: 24px 18px 8px;
  }
  .status-hero {
    padding: 26px 20px 24px;
  }
  .hero-headline {
    align-items: flex-start;
    gap: 12px;
  }
  .hero-headline h1 {
    font-size: 1.6rem;
  }
}
