:root {
  --bg: #0a0b10;
  --surface: rgba(255, 255, 255, 0.022);
  --text: #f2f2f6;
  --muted: #8a8a93;
  --muted-strong: #b4b4bd;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 212, 255, 0.4);
  --accent: #00d4ff;
  --green: #4ade80;
  --red: #f87171;
  --gray: #4a4a52;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --container: 1100px;
}

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

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

.site-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.wordmark { display: flex; flex-direction: column; gap: 2px; }

.wordmark .word {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.wordmark .subtitle {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--muted-strong);
  transition: border-color 200ms ease, color 200ms ease;
}

.status-pill[data-status="ok"]   { color: var(--text); }
.status-pill[data-status="down"] { color: var(--red); border-color: rgba(248, 113, 113, 0.35); }

main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  padding: 72px 0 56px;
  max-width: 720px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--text);
}

.hero .stack {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.apps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 80px;
}

@media (min-width: 640px)  { .apps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .apps-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 220ms ease, background-color 220ms ease;
}

.card:hover { border-color: var(--border-hover); }

.corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 0 solid var(--accent);
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.card:hover .corner { opacity: 1; }

.corner.tl { top: -1px; left: -1px;   border-top-width: 1px; border-left-width: 1px; }
.corner.tr { top: -1px; right: -1px;  border-top-width: 1px; border-right-width: 1px; }
.corner.bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.corner.br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.status { display: inline-flex; align-items: center; gap: 8px; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gray);
  flex-shrink: 0;
}

.dot[data-status="live"]        { background: var(--green); animation: pulse 2.6s ease-in-out infinite; }
.dot[data-status="offline"]     { background: var(--red); }
.dot[data-status="loading"]     { background: var(--muted); animation: pulse 1.4s ease-in-out infinite; }
.dot[data-status="placeholder"] { background: var(--gray); }

.status-pill .dot { width: 6px; height: 6px; }

.latency {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: none;
  opacity: 0;
  transition: opacity 400ms ease;
}

.latency.is-visible { opacity: 1; }

.card-title {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}

.card-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted-strong);
}

.card-url {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
}

.card-footer {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding-top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 200ms ease, color 200ms ease;
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.btn svg { width: 12px; height: 12px; }

.card--placeholder {
  border: 1px dashed rgba(255, 255, 255, 0.07);
  background: transparent;
}

.card--placeholder:hover { border-color: rgba(255, 255, 255, 0.12); }
.card--placeholder .corner { opacity: 0; }
.card--placeholder:hover .corner { opacity: 0; }

.slot {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.site-footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 24px 48px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none !important; }
  * { transition-duration: 0.01ms !important; }
}
