/* FlowSTT landing: one stylesheet, no external requests. */

:root {
  color-scheme: light dark;

  --bg: #f7f8f7;
  --surface: #ffffff;
  --text: #131c1c;
  --muted: #4b5a59;
  --line: #d3dbda;
  --line-strong: #7e918f;
  --accent: #0a6a68;
  --accent-ink: #ffffff;
  --accent-tint: #e1f0ee;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --radius: 10px;
  --column: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1415;
    --surface: #131c1d;
    --text: #e8efee;
    --muted: #9db0ae;
    --line: #2b3a3a;
    --line-strong: #5d7573;
    --accent: #4cc9bd;
    --accent-ink: #062321;
    --accent-tint: #12302f;
  }
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

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

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

a:hover {
  text-decoration-thickness: 2px;
}

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

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

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

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: 6px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  outline: 3px solid var(--text);
  outline-offset: 2px;
}

/* Header */

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 1.25rem;
}

.wordmark {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

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

.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.nav__list a {
  display: inline-block;
  padding-block: 0.4rem;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.nav__list a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* Shared bits */

.label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  max-width: 40rem;
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  line-height: 1.55;
  color: var(--muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
}

.btn:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.btn--ghost:hover {
  background: var(--accent-tint);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--muted);
}

.badge::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}

/* Status modifiers: change the text and swap one class. */
.badge--invite {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent);
}

.badge--invite::before {
  background: currentColor;
}

.badge--soon {
  color: var(--text);
}

.badge--prep {
  border-style: dashed;
}

.badge--prep::before {
  border-style: dotted;
}

/* Hero */

.hero {
  padding-block: clamp(2.5rem, 8vw, 5rem) clamp(1.5rem, 4vw, 2.5rem);
}

.hero .label {
  margin-bottom: 1rem;
}

.hero__title {
  max-width: 18ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2.25rem, 7.5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}

.hero .lead {
  margin-bottom: 2rem;
}

.wave {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  display: block;
  width: 100%;
  height: clamp(5rem, 14vw, 7.5rem);
  margin-top: clamp(2.5rem, 7vw, 4rem);
  fill: var(--accent);
}

/* Sections */

.section {
  padding-block: clamp(3rem, 8vw, 5rem);
  border-top: 1px solid var(--line);
}

.section h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section__intro,
.section__text,
.section__note {
  max-width: 42rem;
}

.section__intro {
  margin-bottom: 2rem;
  color: var(--muted);
}

.section__text + .section__text,
.section__text + .actions {
  margin-top: 1rem;
}

.section__text + .actions {
  margin-top: 1.75rem;
}

.section__note {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Product cards */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: clamp(1.1rem, 3vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.card__title {
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.card__text {
  font-size: 1rem;
}

.card__stack {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--muted);
}

@media (max-width: 519px) {
  .card__head {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 0.6rem;
  }
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

/* Pipeline diagram */

.diagram {
  margin-bottom: 1.75rem;
  padding: clamp(1rem, 3vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pipeline {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
  color: var(--text);
  font-family: var(--font-sans);
}

.pipeline--wide {
  display: none;
}

.pipeline--tall {
  max-width: 24rem;
}

.node rect {
  fill: var(--bg);
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.node--model rect {
  fill: var(--accent-tint);
  stroke: var(--accent);
  stroke-width: 2;
}

.node text {
  fill: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-anchor: middle;
}

.node .node__note {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.arrow__line {
  stroke: var(--muted);
  stroke-width: 1.75;
  stroke-linecap: round;
}

.arrow__head {
  fill: var(--muted);
}

@media (min-width: 860px) {
  .pipeline--wide {
    display: block;
  }

  .pipeline--wide .node text {
    font-size: 13.5px;
  }

  .pipeline--wide .node .node__note {
    font-size: 13px;
  }

  .pipeline--tall {
    display: none;
  }
}

/* Speed table */

.table-block {
  margin-top: 2.5rem;
}

.speed {
  width: 100%;
  border-collapse: collapse;
}

.speed caption {
  max-width: 42rem;
  margin-bottom: 0.75rem;
  text-align: left;
  font-size: 0.9375rem;
  color: var(--muted);
}

.speed th,
.speed td {
  padding: 0.7rem 0.75rem 0.7rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.speed thead th {
  border-bottom-color: var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.speed tbody th {
  font-weight: 600;
}

.speed td {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  white-space: nowrap;
}

.speed tbody tr:last-child > * {
  border-bottom-color: var(--line-strong);
}

@media (max-width: 480px) {
  .speed th,
  .speed td {
    padding-right: 0.5rem;
  }

  .speed thead th {
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
  }

  .speed tbody th {
    font-size: 0.875rem;
  }

  .speed td {
    font-size: 0.75rem;
  }
}

/* Notes */

.notes {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.notes__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

.notes__title {
  font-weight: 600;
}

/* Footer */

.site-footer {
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer__sep {
  padding-inline: 0.25rem;
}

/* Motion: only when the visitor has not asked for less of it. */

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

  .card,
  .btn,
  .badge {
    transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  }

  .card:hover {
    transform: translateY(-2px);
  }

  .wave rect {
    transform-box: fill-box;
    transform-origin: center;
    animation: wave-pulse 2.6s ease-in-out infinite alternate;
  }

  .wave rect:nth-child(4n + 1) {
    animation-duration: 2.2s;
    animation-delay: -0.4s;
  }

  .wave rect:nth-child(4n + 2) {
    animation-duration: 3s;
    animation-delay: -1.3s;
  }

  .wave rect:nth-child(4n + 3) {
    animation-duration: 2.6s;
    animation-delay: -2.1s;
  }

  .wave rect:nth-child(4n) {
    animation-duration: 3.4s;
    animation-delay: -0.8s;
  }

  @keyframes wave-pulse {
    from {
      transform: scaleY(1);
    }

    to {
      transform: scaleY(0.55);
    }
  }
}
