/* escalator.red
 *
 * A cool, quiet grey page; the logo's reds only where something is
 * urgent or clickable. The one loud thing is the escalation in the hero:
 * a night-dark panel where the logo's staircase climbs as nobody
 * answers.
 *
 * Archivo (SIL OFL, see archivo-OFL.txt) is self-hosted so visitors'
 * browsers never talk to a third party. Its width axis carries the
 * hierarchy: headings are wide and heavy like the logo, body text is
 * normal width.
 */

@font-face {
  font-family: "Archivo";
  src: url("/static/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #f2f3f4;
  --surface: #ffffff;
  --ink: #1c2329;
  --slate: #5a636b;
  --rule: #d8dcdf;
  --signal: #d12525;
  --oxblood: #860e10;
  --night-text: #e8ebed;
  --night-muted: #98a2aa;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.25rem);
  font-stretch: 120%;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  font-stretch: 115%;
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.3;
}

p {
  margin: 1rem 0 0;
}

a {
  color: var(--oxblood);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--signal);
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

code,
pre {
  font: 0.9rem/1.65 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Layout */

.wrap {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.narrow {
  max-width: 48rem;
}

.nowrap {
  white-space: nowrap;
}

.lead {
  max-width: 36rem;
  color: var(--slate);
  font-size: 1.25rem;
  line-height: 1.55;
}

/* Header */

.top {
  border-bottom: 1px solid var(--rule);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand img {
  display: block;
  width: 132px;
  height: auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.link[aria-current="page"] {
  color: var(--oxblood);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Buttons: pills, so what can be pressed never looks like a panel. */

.button {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  border: 1.5px solid var(--oxblood);
  border-radius: 999px;
  background: var(--oxblood);
  color: #ffffff;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}

.button:hover {
  border-color: var(--signal);
  background: var(--signal);
  color: #ffffff;
}

.button.ghost {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.button.ghost:hover {
  border-color: var(--oxblood);
  color: var(--oxblood);
}

.button.light {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--oxblood);
}

.button.light:hover {
  background: transparent;
  color: #ffffff;
}

.button.large {
  padding: 0.8rem 1.6rem;
  font-size: 1.0625rem;
}

.button[aria-disabled="true"] {
  border-color: var(--rule);
  color: var(--slate);
  cursor: not-allowed;
  pointer-events: none;
}

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

/* Hero */

.hero {
  padding-top: 4.5rem;
  padding-bottom: 5rem;
}

.hero-grid {
  display: grid;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: 1.15fr 1fr;
    gap: 4.5rem;
  }
}

.pitch .lead {
  margin-top: 1.5rem;
}

/* The incident: an alert at night climbing the escalation staircase.
   The SVG draws the stairs in the first column; each tread lines up
   with an event in the second, oldest at the bottom. */

.incident {
  display: grid;
  grid-template-columns: clamp(5rem, 22%, 8.5rem) 1fr;
  grid-template-rows: repeat(4, 4.5rem);
  margin: 0;
  padding: 1.5rem 1.75rem 1.5rem 1.5rem;
  border-radius: 14px;
  background: var(--ink);
  color: var(--night-text);
}

.stairs {
  grid-column: 1;
  grid-row: 1 / 5;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.stairs path {
  fill: none;
  stroke: var(--signal);
  stroke-width: 5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: climb 2.2s cubic-bezier(0.6, 0, 0.3, 1) 0.2s both;
}

.incident ol {
  display: grid;
  grid-column: 2;
  grid-row: 1 / 5;
  grid-template-rows: repeat(4, 1fr);
  margin: 0;
  padding: 0 0 0 1rem;
  list-style: none;
}

.incident li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1.05rem;
  animation: appear 0.4s ease-out both;
}

.incident time {
  color: var(--night-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.incident li:nth-child(4) {
  animation-delay: 0.2s;
}

.incident li:nth-child(3) {
  animation-delay: 0.8s;
}

.incident li:nth-child(2) {
  animation-delay: 1.4s;
}

.incident li:nth-child(1) {
  animation-delay: 2.1s;
}

.incident .answered {
  font-weight: 700;
  font-stretch: 110%;
}

.incident .answered time {
  color: var(--signal);
  font-weight: 700;
}

@keyframes climb {
  from {
    stroke-dashoffset: 1;
  }
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateX(-0.4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stairs path,
  .incident li {
    animation: none;
  }

  .button {
    transition: none;
  }
}

/* Your on-call is a file */

.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
  border-top: 1px solid var(--rule);
}

.split p {
  max-width: 34rem;
  color: var(--slate);
}

@media (min-width: 60rem) {
  .split {
    grid-template-columns: 1fr 1.2fr;
    gap: 4.5rem;
  }
}

.code {
  margin: 0;
  overflow-x: auto;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
}

.code .k {
  color: var(--oxblood);
}

.code .c {
  color: var(--slate);
}

/* Features */

.features {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.features .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 2.25rem 3rem;
  margin-top: 2.5rem;
}

.features .grid > div {
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
}

.features .grid p {
  margin-top: 0.5rem;
  color: var(--slate);
}

/* Channels: one sentence, set large. */

.channels {
  padding-top: 3.5rem;
  padding-bottom: 5rem;
}

.channels p {
  max-width: 54rem;
  margin: 0;
  color: var(--slate);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-stretch: 108%;
  font-weight: 450;
  line-height: 1.3;
  text-wrap: pretty;
}

.channels strong {
  color: var(--ink);
  font-weight: 800;
}

/* Closing band */

.closing {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  background: var(--oxblood);
}

.closing-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.closing h2 {
  color: #ffffff;
}

/* Inner pages */

.page {
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.page .lead {
  margin-top: 1rem;
}

/* Pricing: one panel split into plans, not three floating cards. */

.tiers {
  display: grid;
  margin-top: 3rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

@media (min-width: 52rem) {
  .tiers {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tier {
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

.tier + .tier {
  border-top: 1px solid var(--rule);
}

@media (min-width: 52rem) {
  .tier + .tier {
    border-top: 0;
    border-left: 1px solid var(--rule);
  }
}

.tier h2 {
  font-size: 1.25rem;
  font-stretch: 110%;
}

.tier .price {
  margin-top: 1.25rem;
  font-size: 3.25rem;
  font-stretch: 120%;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.tier .price span {
  margin-left: 0.5rem;
  color: var(--slate);
  font-size: 1rem;
  font-stretch: 100%;
  font-weight: 450;
  letter-spacing: 0;
}

.tier .seats {
  font-weight: 650;
}

.tier p:not(.price):not(.seats) {
  color: var(--slate);
}

.tier .button {
  align-self: flex-start;
  margin-top: auto;
}

.tier p:last-of-type {
  margin-bottom: 2rem;
}

.note {
  max-width: 44rem;
  margin-top: 2rem;
  color: var(--slate);
}

/* Blog */

.posts {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.posts li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.posts a {
  color: var(--ink);
  font-size: 1.25rem;
  font-stretch: 108%;
  font-weight: 700;
  text-decoration: none;
}

.posts a:hover {
  color: var(--oxblood);
}

.posts time,
.post > time {
  color: var(--slate);
  font-size: 0.95rem;
}

.post h1 {
  margin-top: 0.5rem;
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.25rem);
}

.prose {
  margin-top: 2rem;
}

.prose p {
  max-width: 38rem;
  font-size: 1.125rem;
  line-height: 1.7;
}

.back {
  margin-top: 3rem;
  font-weight: 600;
}

/* Footer */

.bottom {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--rule);
}

.bottom a {
  color: var(--slate);
}
