@font-face {
  font-family: "GachaTV Title";
  src: url("default.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GachaTV Description";
  src: url("defaultB.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000000;
  --surface: #1a1a1a;
  --surface-2: #222222;
  --line: #2b2b2b;
  --line-strong: #3a3a3a;
  --accent: #9b4dff;
  --accent-soft: #b47bff;
  --success: #62d26f;
  --warning: #ffc107;
  --maintenance: #c084fc;
  --danger: #ff4d4d;
  --unknown: #888888;
  --text: #ffffff;
  --text-dim: #aaaaaa;
  --text-faint: #888888;
  --radius-pill: 4px;
  --radius-input: 4px;
  --font-body: "Roboto", arial, sans-serif;
  --font-brand: "GachaTV Title", "Roboto", arial, sans-serif;
  --font-description: "GachaTV Description", "Roboto", arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 900px 420px at 50% -12%, rgba(155, 77, 255, 0.2), transparent 62%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 var(--radius-input) 0;
}

.skip-link:focus {
  left: 0;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px clamp(18px, 5vw, 56px);
  background: rgba(0, 0, 0, 0.82);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.brand-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}

.brand-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.header-link {
  margin-left: auto;
  padding: 7px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
}

.header-link:hover {
  border-color: var(--accent);
  color: var(--accent-soft);
  text-decoration: none;
}

/* Layout */

.page {
  width: min(900px, 100% - clamp(32px, 8vw, 80px));
  margin: 0 auto;
  padding: clamp(44px, 8vw, 84px) 0 24px;
}

/* Intro */

.intro {
  padding-bottom: clamp(34px, 5vw, 56px);
}

.intro h1 {
  margin: 0 0 14px;
  font-family: var(--font-brand);
  font-size: clamp(34px, 5.2vw, 54px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(155, 77, 255, 0.35);
}

.overall {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-dim);
}

.overall-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--unknown);
  flex: none;
}

.overall[data-state="operational"] .overall-dot {
  background: var(--success);
  box-shadow: 0 0 10px rgba(98, 210, 111, 0.55);
}

.overall[data-state="pending"] .overall-dot { background: var(--warning); }
.overall[data-state="maintenance"] .overall-dot { background: var(--maintenance); }

.overall[data-state="down"] .overall-dot {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 77, 77, 0.6);
}

.overall[data-state="unknown"] .overall-dot { background: var(--unknown); }

/* Notice */

.notice {
  margin: 0 0 28px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-input);
  background: var(--surface);
  font-size: 13px;
}

.notice[data-tone="warning"] {
  border-left-color: var(--warning);
}

.notice[data-tone="info"] {
  border-left-color: var(--accent);
}

/* Services */

#servicios {
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

#servicios > h2 {
  margin: 0 0 4px;
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}

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

.service {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.service:last-child {
  border-bottom: none;
}

.service-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.service-id {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.service-id .dot {
  margin-top: 8px;
}

.service-name {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.service-name a {
  color: var(--text);
}

.service-name a:hover {
  color: var(--accent-soft);
  text-decoration: none;
}

.service-description {
  margin: 2px 0 0;
  font-family: var(--font-description);
  font-size: 13px;
  color: var(--text-dim);
}

.service-state {
  flex: none;
  text-align: right;
}

.state-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
}

.service[data-state="operational"] .state-label { color: var(--success); }
.service[data-state="pending"] .state-label { color: var(--warning); }
.service[data-state="maintenance"] .state-label { color: var(--maintenance); }
.service[data-state="down"] .state-label { color: #ff6b6b; }
.service[data-state="unknown"] .state-label { color: var(--text-faint); }

.service-metrics {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--unknown);
  flex: none;
  display: inline-block;
}

.dot[data-state="operational"] { background: var(--success); }
.dot[data-state="pending"] { background: var(--warning); }
.dot[data-state="maintenance"] { background: var(--maintenance); }
.dot[data-state="down"] { background: var(--danger); }
.dot[data-state="unknown"] { background: var(--unknown); }

/* Latency chart */

.chart {
  position: relative;
  height: 56px;
  margin: 16px 0 12px;
  touch-action: pan-y;
}

.chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chart .line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(155, 77, 255, 0.5);
  opacity: 0;
  pointer-events: none;
}

.chart-hover-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--bg);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 8px));
}

.chart-tooltip.is-below {
  transform: translate(-50%, 8px);
}

.chart-tooltip strong {
  font-weight: 600;
  color: var(--accent-soft);
  font-variant-numeric: tabular-nums;
}

.chart-empty {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
  font-size: 11px;
  color: var(--text-faint);
}

/* Availability timeline */

.timeline {
  display: flex;
  gap: 1px;
  height: 8px;
}

.timeline span {
  flex: 1 1 0;
  min-width: 1px;
  background: var(--unknown);
}

.timeline span[data-state="operational"] { background: var(--success); }
.timeline span[data-state="pending"] { background: var(--warning); }
.timeline span[data-state="maintenance"] { background: var(--maintenance); }
.timeline span[data-state="down"] { background: var(--danger); }

/* Empty */

.empty {
  margin: 20px 0 0;
  padding: 32px 0;
  text-align: center;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
}

/* Footer */

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(900px, 100% - clamp(32px, 8vw, 80px));
  margin: 0 auto;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-faint);
}

/* Responsive */

@media (max-width: 720px) {
  .service-top {
    gap: 12px;
  }

  .service-metrics {
    font-size: 11px;
  }
}

@media (max-width: 520px) {
  .brand-label,
  .brand-divider {
    display: none;
  }

  .service-top {
    flex-direction: column;
    gap: 8px;
  }

  .service-state {
    text-align: left;
    padding-left: 18px;
  }
}

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