/* ==========================================================================
   ZodBerserk — shared stylesheet
   No external resources: system fonts only, inline SVG only.
   ========================================================================== */

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

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #0a0b0f;
  --bg-soft: #0d0f15;
  --panel: rgba(255, 255, 255, 0.032);
  --panel-hover: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Text */
  --text: #e9ebf1;
  --text-muted: #9aa4b2;
  --text-dim: #7d8797;

  /* Accent (electric cyan) */
  --accent: #22d3ee;
  --accent-ink: #04141a;
  --accent-soft: rgba(34, 211, 238, 0.1);
  --accent-line: rgba(34, 211, 238, 0.38);

  /* Semantic */
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.12);

  /* Geometry */
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1120px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 20px 45px -28px rgba(0, 0, 0, 0.95);

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0.035) 0,
    rgba(34, 211, 238, 0) 420px
  );
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip (not hidden) keeps position: sticky working on the header */
  overflow-x: clip;
}

/* Keep anchor targets clear of the sticky header */
[id] {
  scroll-margin-top: 84px;
}

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

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

strong {
  color: #fff;
  font-weight: 600;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}

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

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 15, 0.78);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: #fff;
}

.brand__mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex: none;
}

.brand__name {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.35rem);
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--text-muted);
  padding: 0.35rem 0.15rem;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  border-bottom-color: var(--accent-line);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Narrow phones: keep the header on one line without overflow */
@media (max-width: 390px) {
  .site-header__inner {
    min-height: 58px;
  }

  .brand {
    font-size: 1rem;
  }

  .site-nav {
    font-size: 0.875rem;
    gap: 0.5rem;
  }

  .site-nav a[href="#what"] {
    display: none;
  }
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4.5rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -55% -15% auto;
  height: 150%;
  z-index: -1;
  background: radial-gradient(
      42% 46% at 50% 40%,
      rgba(34, 211, 238, 0.2) 0%,
      rgba(34, 211, 238, 0.06) 45%,
      rgba(34, 211, 238, 0) 72%
    ),
    radial-gradient(
      28% 32% at 78% 18%,
      rgba(99, 102, 241, 0.14) 0%,
      rgba(99, 102, 241, 0) 70%
    );
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.7rem 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  flex: none;
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(2.15rem, 1.35rem + 3.6vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.hero h1 .grad {
  background: linear-gradient(100deg, #7ef0ff 0%, var(--accent) 45%, #7c8cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 58ch;
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.25rem);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero__note {
  margin-top: 1.5rem;
  color: var(--text-dim);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.2s ease,
    border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

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

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -12px rgba(34, 211, 238, 0.6);
}

.btn--primary:hover {
  background: #5ce3f7;
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--panel);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--panel-hover);
  border-color: var(--accent-line);
  transform: translateY(-1px);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

/* -------------------------------------------------------------- sections */

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

.section__head {
  max-width: 62ch;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.section__title {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 680;
  margin-bottom: 0.6rem;
}

.section__sub {
  color: var(--text-muted);
}

/* ----------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: clamp(1.1rem, 2.4vw, 1.55rem);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.048) 0%,
    rgba(255, 255, 255, 0.014) 100%
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, background-color 0.2s ease,
    transform 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card__icon {
  width: 34px;
  height: 34px;
  padding: 7px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.card__title {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.card__text {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.card__host {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.55rem;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tag--muted {
  border-color: var(--border);
  background: var(--panel);
  color: var(--text-muted);
}

/* ------------------------------------------------------------- stage box */

.stage {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.055) 0%,
    rgba(255, 255, 255, 0.012) 55%
  );
  box-shadow: var(--shadow);
}

.stage::before {
  content: "";
  position: absolute;
  left: clamp(1.25rem, 3vw, 2rem);
  top: -1px;
  width: 64px;
  height: 1px;
  background: var(--accent);
}

.stage__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  font-weight: 650;
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
}

.stage__title svg {
  color: var(--accent);
  flex: none;
}

.stage p {
  color: var(--text-muted);
  max-width: 76ch;
}

.stage p + p {
  margin-top: 0.85rem;
}

.stage__list {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.stage__list li {
  position: relative;
  padding-left: 1.35rem;
}

.stage__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
}

/* --------------------------------------------------------------- contact */

.contact {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  padding: clamp(1.35rem, 3vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.contact__text {
  color: var(--text-muted);
  max-width: 62ch;
}

.contact__text + .contact__text {
  margin-top: 0.7rem;
}

@media (min-width: 780px) {
  .contact {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
  }

  .contact__actions {
    justify-self: end;
  }
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ---------------------------------------------------------------- status */

.page-head {
  padding-block: clamp(2.25rem, 6vw, 3.75rem) clamp(1.5rem, 4vw, 2.5rem);
}

.page-head h1 {
  font-size: clamp(1.85rem, 1.4rem + 2.2vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.page-head p {
  color: var(--text-muted);
  max-width: 62ch;
}

.page-head__status {
  margin-top: 1.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 0.9375rem;
  font-weight: 600;
}

.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16);
  flex: none;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.9rem clamp(1rem, 2.5vw, 1.4rem);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.panel__title {
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.panel__meta {
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.svc-list {
  display: grid;
}

.svc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 1rem;
  align-items: center;
  padding: 1rem clamp(1rem, 2.5vw, 1.4rem);
  border-top: 1px solid var(--border);
}

.svc:first-child {
  border-top: 0;
}

.svc__name {
  font-weight: 600;
  min-width: 0;
}

.svc__uptime {
  grid-column: 1;
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.svc__uptime b {
  color: var(--text-muted);
  font-weight: 500;
}

.svc__state {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ok);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

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

.status-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 1rem;
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.status-foot__check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.status-foot__check svg {
  width: 15px;
  height: 15px;
  color: var(--text-dim);
}

.note {
  margin-top: 1.75rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-line);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255, 255, 255, 0.018);
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

@media (min-width: 720px) {
  .svc {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
    grid-template-rows: auto;
  }

  .svc__uptime {
    grid-column: 2;
    grid-row: 1;
  }

  .svc__state {
    grid-column: 3;
    grid-row: 1;
  }
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--border);
  padding-block: 1.75rem 2.25rem;
  color: var(--text-dim);
  font-size: 0.875rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer p {
  margin: 0;
}

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

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--text);
}

/* -------------------------------------------------------- accessibility */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

  .card:hover,
  .btn:hover {
    transform: none;
  }
}

/* ----------------------------------------------------------------- print */

@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: #fff !important;
    color: #111;
    background-image: none;
    font-size: 11pt;
  }

  .site-header,
  .hero::before,
  .btn,
  .skip-link {
    display: none !important;
  }

  .card,
  .panel,
  .stage,
  .contact,
  .note {
    background: #fff !important;
    border-color: #bbb !important;
    box-shadow: none !important;
  }

  .card__text,
  .section__sub,
  .hero__lead,
  .stage p,
  .contact__text,
  .note {
    color: #333 !important;
  }

  .hero h1 .grad {
    background: none !important;
    -webkit-text-fill-color: initial;
    color: #111 !important;
  }

  .site-footer {
    color: #555;
    border-top-color: #bbb;
  }
}
