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

:root {
  --bg:        #0a0a0a;
  --surface:   #111111;
  --border:    #1e1e1e;
  --muted:     #3a3a3a;
  --text:      #c8c8c2;
  --text-dim:  #5a5a54;
  --accent:    #d4a843;
  --danger:    #c0392b;
  --online:    #2ecc71;
  --offline:   #e74c3c;
  --mono: 'IBM Plex Mono', monospace;
  --serif: 'Cormorant Garamond', Georgia, serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── noise & scanline overlays ── */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  z-index: 1000;
}

.scanline {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  z-index: 999;
}

/* ── layout ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 40px 80px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ── header components ── */
.logo-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  color: var(--accent);
  font-size: 16px;
}

.logo-text {
  letter-spacing: 0.2em;
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  border: 1px solid rgba(212,168,67,0.25);
  padding: 5px 12px;
  border-radius: 2px;
  background: rgba(212,168,67,0.04);
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.85); }
}

/* ── incident block ── */
.incident-block {
  margin-bottom: 72px;
  animation: fadeUp 0.6s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.incident-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--danger);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.incident-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--danger);
}

h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 300;
  line-height: 1.1;
  color: #e8e8e0;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

h1 em {
  font-style: italic;
  color: var(--accent);
}

.incident-desc {
  max-width: 560px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 28px;
}

.incident-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.incident-meta strong {
  color: var(--text);
  font-weight: 600;
}

.sep {
  color: var(--muted);
}

/* ── animation block ── */
.animation-block {
  margin-bottom: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fadeUp 0.6s 0.1s ease both;
}

#server-canvas {
  width: 100%;
  max-width: 680px;
  height: 220px;
  display: block;
  border: 1px solid var(--border);
  background: #0d0d0d;
  cursor: crosshair;
}

.anim-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-align: center;
  min-height: 16px;
  transition: color 0.4s;
}

/* ── services block ── */
.services-block {
  animation: fadeUp 0.6s 0.15s ease both;
}

.services-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

.legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--text-dim);
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.dot.online  { background: var(--online); box-shadow: 0 0 6px var(--online); }
.dot.offline { background: var(--offline); }

/* ── service grid ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service-card {
  background: var(--surface);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  background: #161616;
}

.service-card.online::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--online);
}

.service-card.offline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--offline);
  opacity: 0.5;
}

.service-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-name .dot {
  flex-shrink: 0;
}

.service-domain {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.service-status {
  font-size: 10px;
  letter-spacing: 0.14em;
  margin-top: 4px;
  font-weight: 600;
}

.service-card.online  .service-status { color: var(--online); }
.service-card.offline .service-status { color: var(--offline); opacity: 0.7; }

.service-note {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

@media (max-width: 600px) {
  header    { padding: 16px 20px; }
  main      { padding: 40px 20px 60px; }
  footer    { padding: 14px 20px; }
  .services-grid { grid-template-columns: 1fr; }
}
