/*
 * Dash0's look: near-black, white type, one accent. Pico's dark theme under
 * it, re-pointed at our tokens; everything else here is the few pieces Pico
 * does not have. One font, Mona Sans (SIL OFL), served from this origin —
 * nothing loads from anyone else.
 */
@font-face {
  font-family: 'Mona Sans';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/assets/mona-sans.8ki275q1cegh.woff2') format('woff2');
}

@font-face {
  font-family: 'Mona Sans';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url('/assets/mona-sans.qup1xb7kotxj.woff2') format('woff2');
}

:root[data-theme='dark'] {
  --accent: #35e0c1;
  --accent-ink: #04221c;
  --accent-soft: rgb(53 224 193 / 12%);
  --surface: #161616;
  --line: #262626;
  --line-strong: #353535;
  --muted: #9a9a9a;
  /* The dimmest text colour: still 5.6:1 on the page, 5.2:1 on a card (WCAG AA wants 4.5:1). */
  --faint: #8a8a8a;
  /* Chrome on Linux resolves bare ui-monospace to a serif; name real faces first. */
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'DejaVu Sans Mono', Menlo, monospace;

  --pico-font-family: 'Mona Sans', system-ui, sans-serif;
  --pico-background-color: #0e0e0e;
  --pico-color: #e8e8e8;
  --pico-muted-color: var(--muted);
  --pico-muted-border-color: var(--line);
  --pico-card-background-color: var(--surface);
  --pico-primary: var(--accent);
  --pico-primary-hover: #5ceed3;
  --pico-primary-background: var(--accent);
  --pico-primary-hover-background: #5ceed3;
  --pico-primary-inverse: var(--accent-ink);
  --pico-primary-focus: rgb(53 224 193 / 35%);
  --pico-form-element-background-color: #121212;
  --pico-form-element-border-color: var(--line-strong);
  --pico-form-element-focus-color: var(--accent);
  --pico-h1-color: #fff;
  --pico-h2-color: #fff;
  --pico-h3-color: #fff;

  /*
   * Pico grows the root font from 100% to 131.25% across its breakpoints,
   * which is what made every line look oversized on a wide screen. One size.
   */
  --pico-font-size: 100%;
  --pico-line-height: 1.6;
}

/* Pico drops the side padding from 768px on, expecting its own narrower widths. */
.container {
  max-width: 74.5rem;
  padding-inline: 1.25rem;
}

body {
  background-image: radial-gradient(rgb(255 255 255 / 4.5%) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---- Type ---------------------------------------------------------------- */

h1,
h2 {
  font-weight: 500;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.1;
}

h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

h3 {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

p {
  color: var(--muted);
}

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

.accent {
  color: var(--accent);
}

.lead {
  max-width: 40rem;
  font-size: 1.125rem;
}

.note {
  font-size: 0.875rem;
  color: var(--faint);
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.55rem;
  font: 600 0.6875rem var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.eyebrow-accent {
  color: var(--accent);
  border-color: rgb(53 224 193 / 40%);
  background: var(--accent-soft);
}

/* ---- Calls to action ----------------------------------------------------- */

/* Links that act as calls to action. Links, not buttons: they navigate. */
.cta,
button.cta {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 0.55rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
}

.cta:hover {
  color: var(--accent-ink);
  background: var(--pico-primary-hover);
  border-color: var(--pico-primary-hover);
}

.cta.outline {
  color: #fff;
  background: transparent;
  border-color: var(--line-strong);
}

.cta.outline:hover {
  border-color: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ---- Header -------------------------------------------------------------- */

/* Dash0's nav: a framed bar that stays at the top while the page scrolls. */
header.container {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  padding-block: 0;
}

header nav {
  padding-inline: 1.25rem;
  background: rgb(22 22 22 / 85%);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

header nav li {
  padding-block: 0.625rem;
}

header nav a {
  font-size: 0.9375rem;
  white-space: nowrap;
}

header nav a:not(.cta, .wordmark) {
  color: var(--muted);
}

header nav a:not(.cta, .wordmark):hover {
  color: #fff;
}

header nav .cta {
  padding: 0.35rem 0.8rem;
}

/* On a phone the bar holds the wordmark and the two buttons; the anchors are one scroll away anyway. */
@media (width < 48rem) {
  header nav li:has(> a[href^='/#']:not(.cta)) {
    display: none;
  }
}

/* ---- Sections ------------------------------------------------------------ */

main > section {
  margin: 0;
  padding-block: 4.5rem;
}

main > section + section {
  border-top: 1px solid var(--line);
}

/* A jump to any #anchor should not land under the sticky header. */
[id] {
  scroll-margin-top: 6rem;
}

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  padding-top: 6rem;
  text-align: center;
}

.hero .lead {
  margin-inline: auto;
}

.hero .note {
  margin-top: 1rem;
}

/* The hero diagram, drawn as Dash0 draws its pipeline: labelled nodes on one line. */
.pipeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 44rem;
  margin: 3.5rem auto 0;
  padding: 0;
  --node: 3.5rem;
}

.pipeline li {
  position: relative;
  display: grid;
  gap: 0.6rem;
  justify-items: center;
  list-style: none;
}

.pipeline-name {
  font: 500 0.75rem var(--mono);
  color: var(--muted);
}

.pipeline-node {
  display: grid;
  place-items: center;
  width: var(--node);
  height: var(--node);
  color: var(--faint);
  background: var(--pico-background-color);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}

.pipeline li[data-status='building'] .pipeline-name {
  color: #fff;
}

.pipeline li[data-status='building'] .pipeline-node {
  color: var(--accent);
  background: #0f1715;
  border-color: rgb(53 224 193 / 55%);
  box-shadow: 0 0 24px rgb(53 224 193 / 18%);
}

/* ---- Heute / Mit foilo --------------------------------------------------- */

.compare-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.compare-head p {
  margin: 0;
}

.compare-steps {
  padding: 0;
  counter-reset: step;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.compare-steps li {
  display: grid;
  grid-template-columns: 1fr 1fr;
  list-style: none;
  counter-increment: step;
}

.compare-steps li + li {
  border-top: 1px solid var(--line);
}

.compare-steps li > div {
  padding: 1.1rem 1.35rem;
}

.compare-steps p {
  margin: 0;
  font-size: 0.9375rem;
}

.today {
  background: var(--surface);
}

.today strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

.today strong::before {
  margin-right: 0.6rem;
  content: '0' counter(step);
  font: 600 0.75rem var(--mono);
  color: var(--faint);
}

.with-foilo {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  background: #111514;
  border-left: 1px solid var(--line);
}

.with-foilo p {
  color: #d6d6d6;
}

@media (width < 48rem) {
  .compare-head,
  .compare-steps li {
    grid-template-columns: 1fr;
  }

  .with-foilo {
    border-left: 0;
    border-top: 1px dashed var(--line-strong);
  }
}

/* ---- Status tags --------------------------------------------------------- */

.status {
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  font: 600 0.6875rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.status-ready {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.status-building {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgb(53 224 193 / 45%);
}

.status-planned {
  color: var(--muted);
}

/* ---- Tools --------------------------------------------------------------- */

.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 2rem;
  padding: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.tools li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.1rem 1.35rem;
  list-style: none;
  background: var(--surface);
}

/* Seven tools in two columns: the last one spans, so no empty cell is left. */
.tools li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.tools strong {
  font-size: 0.9375rem;
}

.tools p {
  margin: 0.2rem 0 0;
  font-size: 0.9375rem;
}

@media (width < 48rem) {
  .tools {
    grid-template-columns: 1fr;
  }
}

/* ---- Cards --------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.cards article {
  margin: 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}

.cards article p {
  margin: 0;
  font-size: 0.9375rem;
}

main > section.cards-two {
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  margin-top: 0;
}

.cards-two h2 {
  font-size: 1.375rem;
}

/* ---- FAQ ----------------------------------------------------------------- */

.faq {
  max-width: 48rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.faq details {
  margin: 0;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

.faq summary {
  font-weight: 500;
  color: #fff;
}

.faq details p {
  margin: 0.6rem 0 0;
  font-size: 0.9375rem;
}

/* ---- Waitlist ------------------------------------------------------------ */

main > section.waitlist {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: start;
  margin-block: 2rem 5rem;
  padding: 2.5rem;
  background: radial-gradient(ellipse at 0% 0%, rgb(53 224 193 / 10%), transparent 55%), var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}

.waitlist fieldset {
  margin-bottom: 1rem;
}

.waitlist legend {
  margin-bottom: 0.5rem;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.choices label {
  margin: 0;
  font-size: 0.9375rem;
}

@media (width < 48rem) {
  main > section.waitlist {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
}

/* ---- Forms --------------------------------------------------------------- */

label,
legend {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
}

label small,
legend small {
  font-weight: 400;
  color: var(--faint);
}

.consent small {
  font-size: 0.8125rem;
  color: var(--faint);
}

.consent a {
  color: var(--muted);
}

/* The forms' honeypot: off-screen for people, still there for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Text pages: Kontakt, Impressum, Datenschutz, notices ---------------- */

/* Pico draws every <article> as a card; a page of text is not one. */
.prose,
.legal,
.notice {
  max-width: 44rem;
  margin: 0;
  padding: 4rem 0 5rem;
  background: none;
  box-shadow: none;
}

.legal h1,
.prose h1,
.notice h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

.legal h2 {
  margin-top: 2.5rem;
  font-size: 1.25rem;
}

.legal h3 {
  margin-top: 1.5rem;
  font-size: 1rem;
}

.legal p,
.legal li {
  font-size: 0.9375rem;
}

.notice {
  min-height: 50vh;
}

/* ---- Footer -------------------------------------------------------------- */

body > footer.container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  padding-block: 2.5rem 3rem;
  /* A line inside the padding, so it ends where the section lines above it do. */
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - 2.5rem) 1px no-repeat;
}

footer p {
  max-width: 26rem;
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--faint);
}

footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
}

footer li {
  list-style: none;
}

footer ul a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

footer ul a:hover {
  color: #fff;
}

/* Pico spaces list items for prose; these lists are drawn as tables and grids. */
.pipeline li,
.compare-steps li,
.tools li,
footer li {
  margin: 0;
}

@media (width < 48rem) {
  .hero {
    padding-top: 3.5rem;
  }

  /* Five mono labels do not fit a phone's width; the narrower face does. */
  .pipeline-name {
    font: 500 0.6875rem var(--pico-font-family);
  }

  .pipeline {
    --node: 2.75rem;
  }
}

/* The hub said this visitor is signed in (account.ts): the waitlist has nothing for them. */
:root[data-signed-in] .waitlist-only {
  display: none;
}

/*
 * The pipeline in motion, as Dash0 animates its own: a comet runs each
 * connector in turn and the node it reaches flares. Accent into the stages
 * being built, dim white into the planned ones — so the motion shows the
 * status too. One 5s cycle; each hop takes 0.6s.
 */
.pipeline li:not(:first-child)::before,
.pipeline li:not(:first-child)::after {
  position: absolute;
  bottom: calc(var(--node) / 2);
  left: calc(-50% + var(--node) / 2);
  width: calc(100% - var(--node));
  content: '';
}

.pipeline li:not(:first-child)::before {
  height: 1px;
  background: var(--line-strong);
}

.pipeline li[data-status='building']:not(:first-child)::before {
  background: rgb(53 224 193 / 55%);
}

.pipeline li:not(:first-child)::after {
  --comet: rgb(255 255 255 / 70%);
  height: 2px;
  margin-bottom: -0.5px;
  background: linear-gradient(90deg, transparent, var(--comet) 85%, #fff) no-repeat;
  background-position: -4rem 0;
  background-size: 4rem 100%;
  filter: drop-shadow(0 0 3px var(--comet)) drop-shadow(0 0 8px var(--comet));
}

.pipeline li[data-status='building']:not(:first-child)::after {
  --comet: var(--accent);
}

.pipeline li:nth-child(3)::after {
  animation-delay: 0.6s;
}

.pipeline li:nth-child(4)::after {
  animation-delay: 1.2s;
}

.pipeline li:nth-child(5)::after {
  animation-delay: 1.8s;
}

.pipeline li:nth-child(2) .pipeline-node {
  animation-delay: 0.6s;
}

.pipeline li:nth-child(3) .pipeline-node {
  animation-delay: 1.2s;
}

.pipeline li:nth-child(4) .pipeline-node {
  animation-delay: 1.8s;
}

.pipeline li:nth-child(5) .pipeline-node {
  animation-delay: 2.4s;
}

@keyframes comet {
  0% {
    background-position: -4rem 0;
  }

  12%,
  100% {
    background-position: calc(100% + 4rem) 0;
  }
}

@keyframes arrive-built {
  0%,
  16%,
  100% {
    box-shadow: 0 0 24px rgb(53 224 193 / 18%);
  }

  3% {
    border-color: var(--accent);
    box-shadow: 0 0 32px rgb(53 224 193 / 55%);
  }
}

@keyframes arrive-planned {
  0%,
  16%,
  100% {
    color: var(--faint);
  }

  3% {
    color: #d0d0d0;
    border-color: #5a5a5a;
    box-shadow: 0 0 18px rgb(255 255 255 / 12%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Longhands, not the `animation` shorthand: that would reset the delays that stagger the hops. */
  .pipeline li:not(:first-child)::after,
  .pipeline-node {
    animation-duration: 5s;
    animation-iteration-count: infinite;
    animation-fill-mode: backwards;
  }

  .pipeline li:not(:first-child)::after {
    animation-name: comet;
    animation-timing-function: linear;
  }

  .pipeline li[data-status='building'] .pipeline-node {
    animation-name: arrive-built;
    animation-timing-function: ease-out;
  }

  .pipeline li[data-status='planned'] .pipeline-node {
    animation-name: arrive-planned;
    animation-timing-function: ease-out;
  }
}
