/* cdn-azure.com — Azure CDN Status Dashboard */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --white: #FFFFFF;
  --dark: #0F172A;
  --sky: #0EA5E9;
  --green: #22C55E;
  --amber: #EAB308;
  --red: #EF4444;
  --light: #F8FAFC;
  --border: #E2E8F0;
  --text: #334155;
  --text-light: #64748B;
  --radius: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--sky);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--sky);
  text-decoration: none;
  font-family: var(--mono);
  letter-spacing: -0.5px;
}

.logo:hover {
  text-decoration: none;
}

.logo span {
  color: var(--dark);
}

.main-nav {
  display: flex;
  gap: 24px;
  list-style: none;
}

.main-nav a {
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--dark);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--dark);
}

/* Status Banner */
.status-banner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}

.status-banner.operational {
  border-color: #BBF7D0;
  background: #F0FDF4;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--green);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-green 2s infinite;
}

.status-dot.amber {
  background: var(--amber);
  animation: pulse-amber 2s infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

@keyframes pulse-amber {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(234, 179, 8, 0); }
}

.status-meta {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--text-light);
  font-family: var(--mono);
}

/* Components Grid */
.components-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.component-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--white);
}

.component-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark);
}

.component-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--mono);
}

.component-status.operational {
  color: var(--green);
}

.component-status.degraded {
  color: var(--amber);
}

.component-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Metrics Row */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--dark);
  letter-spacing: -1px;
}

.metric-value.green {
  color: var(--green);
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Section */
.section {
  margin-bottom: 24px;
}

.section-header {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Regions */
.regions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.region-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.region-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.region-pops {
  font-size: 0.8125rem;
  font-family: var(--mono);
  color: var(--sky);
  margin-bottom: 8px;
}

.region-cities {
  font-size: 0.8125rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* Incidents */
.incident {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 8px;
}

.incident-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.incident-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
}

.incident-date {
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--text-light);
}

.incident-body {
  font-size: 0.8125rem;
  color: var(--text-light);
  line-height: 1.5;
}

.incident-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #F0FDF4;
  color: var(--green);
}

/* Page Content */
.page-header {
  padding: 40px 0 24px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
}

.page-header p {
  color: var(--text-light);
  margin-top: 4px;
  font-size: 0.9375rem;
}

.content-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.content-card h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 12px;
}

.content-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
  margin-top: 20px;
}

.content-card h3:first-child {
  margin-top: 0;
}

.content-card p {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 12px;
}

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

.content-card ul,
.content-card ol {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 12px;
  padding-left: 20px;
}

.content-card li {
  margin-bottom: 4px;
}

/* Code Blocks */
pre {
  background: var(--dark);
  color: #E2E8F0;
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  margin: 12px 0;
}

code {
  font-family: var(--mono);
  font-size: 0.8125rem;
}

p code {
  background: var(--light);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--dark);
}

/* Network Table */
.network-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.network-table thead {
  background: var(--light);
}

.network-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.network-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.network-table tr:last-child td {
  border-bottom: none;
}

.network-table .mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
}

/* API Endpoint */
.api-endpoint {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-method {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--sky);
  color: var(--white);
  flex-shrink: 0;
}

.api-method.post {
  background: var(--green);
}

.api-method.get {
  background: var(--sky);
}

.api-path {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--dark);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 48px;
  text-align: center;
}

.site-footer p {
  font-size: 0.75rem;
  color: var(--text-light);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  list-style: none;
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--text-light);
}

.footer-links a:hover {
  color: var(--dark);
}

/* 404 Page */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.error-code {
  font-family: var(--mono);
  font-size: 4rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -2px;
}

.error-message {
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--text-light);
  margin-top: 8px;
}

.error-link {
  margin-top: 24px;
}

/* Privacy / Legal */
.legal-content h2 {
  margin-top: 24px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

/* Hero image usage */
.network-hero {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 20px;
    gap: 12px;
  }

  .main-nav.open {
    display: flex;
  }

  .metrics-row {
    grid-template-columns: 1fr;
  }

  .regions-grid {
    grid-template-columns: 1fr;
  }

  .status-banner {
    padding: 24px 16px;
  }

  .header-inner {
    position: relative;
  }
}

@media (max-width: 480px) {
  .incident-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
