/* Tokens are build.inc's own (apps/landing/src/app.css, typography.css),
   served from this bucket so the page never depends on the landing site. */
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Tobias";
  src: url("fonts/Tobias-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --gray-50: oklch(0.985 0.001 106.423);
  --gray-100: oklch(0.97 0.001 106.424);
  --gray-200: oklch(0.923 0.003 48.717);
  --gray-300: oklch(0.869 0.005 56.366);
  --gray-400: oklch(0.709 0.01 56.259);
  --gray-500: oklch(0.553 0.013 58.071);
  --gray-600: oklch(0.444 0.011 73.639);
  --gray-700: oklch(0.374 0.01 67.558);
  --gray-800: oklch(0.268 0.007 34.298);
  --gray-900: oklch(0.216 0.006 56.043);
  --gray-950: oklch(0.147 0.004 49.25);

  --green: #2d5016;
  --yellow: #ffb101;
  --red: #871517;
  --blue: oklch(0.45 0.09 255);

  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Tobias", Georgia, "Times New Roman", serif;

  --frame: 72rem;
  --gutter: 1rem;
  --inset: 1.25rem;
}
@media (min-width: 640px) { :root { --inset: 2rem; } }
@media (min-width: 768px) { :root { --gutter: 1.25rem; } }
@media (min-width: 1024px) { :root { --gutter: 2rem; --inset: 3rem; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--gray-950);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }

/* The framed column: hairline rules left and right, like build.inc/changelog. */
.frame-outer { padding: 0 var(--gutter); }
.frame {
  max-width: var(--frame);
  margin: 0 auto;
  border-left: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
}
.band { border-bottom: 1px solid var(--gray-200); padding: 2.5rem var(--inset); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / 0.85); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--gray-200); }
.nav .frame { border-color: transparent; }
.nav-inner { display: flex; align-items: center; gap: 1rem; height: 4rem; padding: 0 var(--inset); }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--gray-950); }
.brand svg { display: block; }
.brand .mark { width: 1.25rem; height: 1.25rem; }
.brand .wordmark { height: 1rem; width: auto; }
.brand-divider { width: 1px; height: 1rem; background: var(--gray-300); margin: 0 0.25rem; }
.brand-section { font-size: 0.9375rem; color: var(--gray-500); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; }
.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--gray-800);
  background: linear-gradient(to right, #0d0d0c, var(--gray-900));
  color: var(--gray-50);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: filter 0.3s ease-out, transform 0.3s ease-out;
}
.button:hover { filter: brightness(1.25); }
.button:active { transform: scale(0.98); }
.button svg { width: 0.875rem; height: 0.875rem; }
@media (max-width: 560px) { .brand-divider, .brand-section { display: none; } }

/* ---------- Hero ---------- */
.hero { padding-top: 3rem; padding-bottom: 2.5rem; }
@media (min-width: 1024px) { .hero { padding-top: 4.5rem; padding-bottom: 3.5rem; } }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: 2.025rem; line-height: 1.1; }
@media (min-width: 1024px) { h1 { font-size: 4rem; } }
.lede { margin: 1.25rem 0 0; max-width: 32rem; color: var(--gray-500); }

.overall {
  margin-top: 2.5rem;
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.375rem;
  background: var(--gray-50);
}
.overall-text { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.overall-title { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.015em; }
@media (min-width: 1024px) { .overall-title { font-size: 1.6875rem; } }
.overall-meta { font-size: 0.875rem; color: var(--gray-500); }

.dot {
  --c: var(--gray-400);
  flex: none;
  width: 0.75rem; height: 0.75rem;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--c), transparent 82%);
}
.overall .dot { width: 0.875rem; height: 0.875rem; box-shadow: 0 0 0 5px color-mix(in oklch, var(--c), transparent 82%); }
.dot.live { animation: breathe 3s ease-in-out infinite; }
@keyframes breathe {
  50% { box-shadow: 0 0 0 7px color-mix(in oklch, var(--c), transparent 92%); }
}
@media (prefers-reduced-motion: reduce) { .dot.live { animation: none; } }

.stale {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  border: 1px solid color-mix(in oklch, var(--yellow), transparent 55%);
  background: color-mix(in oklch, var(--yellow), white 88%);
  font-size: 0.875rem;
  color: var(--gray-800);
}

/* ---------- Section headers ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 2rem var(--inset) 1.25rem; }
h2 { font-size: 1.35rem; line-height: 1.2; }
@media (min-width: 1024px) { h2 { font-size: 1.6875rem; } }
.section-note { font-size: 0.875rem; color: var(--gray-500); white-space: nowrap; }

/* ---------- Components ---------- */
.components { border-top: 1px solid var(--gray-200); }
.component {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1.25rem var(--inset);
  border-bottom: 1px solid var(--gray-200);
}
@media (min-width: 1024px) {
  .component { grid-template-columns: 14rem 1fr; gap: 3rem; align-items: center; padding-top: 1.5rem; padding-bottom: 1.5rem; }
}
.component-label { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
@media (min-width: 1024px) { .component-label { flex-direction: column; align-items: flex-start; gap: 0.375rem; } }
.component-name { font-weight: 500; }
.state { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--gray-600); white-space: nowrap; }
.state .dot { width: 0.5rem; height: 0.5rem; box-shadow: 0 0 0 3px color-mix(in oklch, var(--c), transparent 82%); }

.bars { display: flex; gap: 3px; height: 2rem; }
.bar { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--gray-100); transition: opacity 0.15s ease-out; }
.bars:hover .bar { opacity: 0.55; }
.bars:hover .bar:hover { opacity: 1; }
.bar.ok { background: color-mix(in oklch, var(--green) 82%, white); }
.bar.partial { background: var(--yellow); }
.bar.bad { background: color-mix(in oklch, var(--red) 90%, white); }
@media (max-width: 640px) { .bars { gap: 1px; height: 1.75rem; } }
.bars-scale { display: flex; justify-content: space-between; margin-top: 0.5rem; font-size: 0.75rem; color: var(--gray-500); }
.bars-scale .uptime { color: var(--gray-700); }

.tooltip {
  position: fixed; z-index: 20; pointer-events: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background: var(--gray-950);
  color: var(--gray-50);
  font-size: 0.8125rem;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
  transform: translate(-50%, calc(-100% - 10px));
}
.tooltip span { color: var(--gray-400); }

/* ---------- Incidents, laid out like build.inc/changelog ---------- */
.incident {
  display: grid;
  grid-template-columns: 1fr;
  padding: 2rem var(--inset);
  border-bottom: 1px solid var(--gray-200);
}
@media (min-width: 1024px) { .incident { grid-template-columns: 14rem 1fr; gap: 3rem; padding-top: 2.5rem; padding-bottom: 2.5rem; } }
.incident-aside { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1rem; font-size: 0.875rem; color: var(--gray-500); }
@media (min-width: 1024px) { .incident-aside { flex-direction: column; align-items: flex-start; margin: 0.25rem 0 0; } }
.pill {
  --c: var(--gray-500);
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  border: 1px solid color-mix(in oklch, var(--c), transparent 70%);
  background: color-mix(in oklch, var(--c), white 92%);
  color: color-mix(in oklch, var(--c), black 25%);
  font-size: 0.8125rem;
  text-transform: capitalize;
}
.incident h3 { font-size: 1.125rem; line-height: 1.25; }
@media (min-width: 1024px) { .incident h3 { font-size: 1.35rem; } }
.affected { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.75rem; }
.affected .range { margin-left: 0.25rem; align-self: center; }
.chip { padding: 0.125rem 0.5rem; border-radius: 0.25rem; background: var(--gray-100); color: var(--gray-700); font-size: 0.8125rem; }
.timeline { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1.25rem 1.5rem; }
.timeline li::before { content: ""; position: absolute; left: 0.25rem; top: 0.45rem; width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: var(--gray-300); }
.timeline li:first-child::before { background: var(--gray-950); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 0.46875rem; top: 1.1rem; bottom: 0.15rem; width: 1px; background: var(--gray-200); }
.timeline li:last-child { padding-bottom: 0; }
.timeline time { display: block; font-size: 0.8125rem; color: var(--gray-500); }
.timeline p { margin: 0.125rem 0 0; color: var(--gray-800); }

.empty { padding: 1.5rem var(--inset) 2.5rem; color: var(--gray-500); font-size: 0.875rem; border-bottom: 1px solid var(--gray-200); }

/* ---------- Footer ---------- */
footer .frame { border-bottom: 1px solid var(--gray-200); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 2rem var(--inset) 3rem; font-size: 0.875rem; color: var(--gray-500); }
.footer-inner nav { display: flex; gap: 1.25rem; }
.footer-inner a { text-decoration: none; color: var(--gray-600); }
.footer-inner a:hover { color: var(--gray-950); }

[hidden] { display: none !important; }
