/* ==========================================================================
   Look and feel modelled on brand.ai: warm paper ground, one very large
   display headline, generous vertical air, quiet controls, images as big
   soft-cornered blocks. Type is Plus Jakarta Sans (brand.ai's own ABC
   Monument Grotesk is licensed and not redistributable).
   ========================================================================== */

:root {
  /* Ground + ink */
  --paper: #f7f5f2;
  --paper-deep: #efece7;
  --ink: #1b1b1b;
  --ink-soft: #6f6b66;
  --ink-faint: #a5a09a;
  --rule: #dedad3;

  /* Accent. Kept for reference; headings and statements are ink, and the
     only pink on the page is the button fill below. */
  --pink: #ff4081;
  --pink-deep: #e02f6c;

  /* Buttons */
  --btn: #e6005c;
  --btn-hover: #c4004f;

  /* Type */
  --font: "Plus Jakarta Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --size-hero: 80px;
  --size-xlarge: 54px;
  --size-large: 44px;
  --size-medium: 28px;
  --size-body2: 22px;
  --size-body: 18px;
  --size-small: 15px;
  --size-micro: 13px;

  /* Space */
  --gutter: 4rem;
  --measure: 62rem;
  --max: 1360px;
  --module-gap: 11rem;

  --radius: 20px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  font-family: var(--font);
  font-size: var(--size-body);
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* The hidden attribute must always win. Component rules like
   .news-item { display: block } otherwise override the browser default
   and leave filtered-out items on screen. */
[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.module {
  padding-block: var(--module-gap);
}

.module + .module {
  padding-top: 0;
}

.measure {
  max-width: var(--measure);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 8px;
  background-color: var(--btn);
  /* Pure white, not --paper: on #e6005c the paper tint gives 4.27:1, under
     the 4.5:1 AA floor for 15px text. White gives 4.65:1 and clears it. */
  color: #fff;
  font-size: var(--size-small);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:hover {
  background-color: var(--btn-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}

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

.link-underline {
  display: inline-block;
  font-size: var(--size-small);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.2s var(--ease);
}

.link-underline:hover {
  opacity: 0.55;
}

/* ---------- media placeholder ---------- */

.media {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  background-color: var(--paper-deep);
  overflow: hidden;
}

.media::after {
  content: attr(data-label);
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px;
  text-align: center;
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Portrait sources in a landscape frame: show them whole rather than
   cropping away half the activity. */
.media.is-contain img {
  object-fit: contain;
  padding: 6%;
}

/* A filled slot drops its placeholder label. */
.media.has-img::after {
  content: none;
}

.media-4x3 {
  aspect-ratio: 4 / 3;
}
.media-3x2 {
  aspect-ratio: 3 / 2;
}
.media-1x1 {
  aspect-ratio: 1 / 1;
}
.media-wide {
  aspect-ratio: 16 / 9;
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background-color: rgba(247, 245, 242, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.header.is-stuck {
  border-bottom-color: var(--rule);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* The mark is ~2.6:1, so height drives it and width follows the ratio.
   Stays under the 46px CTA button, so header height is unchanged. */
.brand .logo {
  height: 42px;
  width: auto;
}

.footer .brand .logo {
  height: 36px;
}

@media (max-width: 860px) {
  .brand .logo {
    height: 34px;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

.nav a {
  font-size: var(--size-small);
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

/* The CTA in the nav is a button, not a nav link: .nav a would otherwise
   out-specify .btn and paint its label muted grey on the button fill. */
.nav a.btn,
.nav a.btn:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 1.5px;
  background-color: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
}

.nav-toggle span::before {
  transform: translateY(-6px);
}
.nav-toggle span::after {
  transform: translateY(6px);
}

.header.nav-open .nav-toggle span {
  background-color: transparent;
}
.header.nav-open .nav-toggle span::before {
  transform: rotate(45deg);
}
.header.nav-open .nav-toggle span::after {
  transform: rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: 8rem;
  padding-bottom: 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.75rem, 1.1rem + 5.6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  max-width: 18ch;
  margin: 0 auto;
}

.hero-sub {
  max-width: 34rem;
  margin: 1.75rem auto 0;
  color: var(--ink-soft);
  font-size: var(--size-body);
}

.hero-cta {
  margin-top: 2.25rem;
}

.hero-media {
  margin-top: 5.5rem;
}

.hero-media .media {
  aspect-ratio: 3 / 2;
  max-width: 900px;
  margin: 0 auto;
}

/* ---------- logo strip ---------- */

.logos {
  padding-block: 5rem;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4.5rem;
}

.logos-title {
  text-align: center;
  font-size: var(--size-medium);
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-bottom: 2.5rem;
}

.logo-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--size-small);
  font-weight: 600;
  color: var(--ink-soft);
}

.logo-item img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.logo-slot {
  width: 118px;
  height: 34px;
  border-radius: 6px;
  background-color: var(--paper-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ==========================================================================
   Statement cloud
   brand.ai's module-hero-inline: the statement is pinned in the middle while
   a field of images flies past it in 3D. The section is tall to give the
   pinned stage scroll runway; the stage itself is one viewport.
   ========================================================================== */

.cloud {
  position: relative;
  height: 260vh;
}

.cloud-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 900px;
  perspective-origin: 50% 50%;
}

.cloud-field {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.cloud-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--w);
  margin: 0;
  transform: translate3d(calc(var(--x) - 50%), calc(var(--y) - 50%), var(--z));
  opacity: 0;
}

/* Without JS the field never moves, so show a calm static scatter rather
   than an empty band of nothing. */
html:not(.js) .cloud-img {
  opacity: 0.35;
}

.cloud-img .media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
}

.cloud-text {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 46rem;
  padding: 0 var(--gutter);
  text-align: center;
  pointer-events: none;
}

.cloud-line {
  grid-area: 1 / 1;
  font-size: clamp(1.6rem, 0.85rem + 2.1vw, 2.75rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.cloud-line.is-on {
  opacity: 1;
  transform: none;
}

/* No JS: stack both statements rather than hiding one behind the other. */
html:not(.js) .cloud {
  height: auto;
}

html:not(.js) .cloud-stage {
  position: static;
  height: auto;
  padding-block: var(--module-gap);
}

html:not(.js) .cloud-field {
  display: none;
}

html:not(.js) .cloud-text {
  display: block;
}

html:not(.js) .cloud-line {
  opacity: 1;
  transform: none;
  margin-bottom: 3rem;
}

/* ==========================================================================
   Feature module (sticky media + timed accordion)
   ========================================================================== */

.feature-head {
  max-width: 34rem;
  margin-bottom: 5rem;
}

.feature-eyebrow {
  display: block;
  font-size: clamp(1.8rem, 1rem + 1.6vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.feature-head h2 {
  font-size: clamp(1.8rem, 1rem + 1.6vw, 2.5rem);
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: -0.03em;
  margin-bottom: 2.25rem;
}

.feature-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.feature-body.is-flipped .feature-media {
  order: 2;
}

.feature-media {
  position: sticky;
  top: 7rem;
}

.feature-media .media {
  aspect-ratio: 3 / 2;
}

/* stacked media: only the active one shows */
.feature-media .media {
  display: none;
}

.feature-media .media.is-active {
  display: block;
}

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.step {
  position: relative;
  padding: 1.35rem 0 1.35rem 2rem;
}

/* the rail: a faint dot when idle, a filling bar when active */
.step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--ink-faint);
  transition: opacity 0.3s var(--ease);
}

.step.is-active::before {
  opacity: 0;
}

.step-rail {
  position: absolute;
  left: 1px;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 3px;
  border-radius: 3px;
  background-color: var(--rule);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  overflow: hidden;
}

.step.is-active .step-rail {
  opacity: 1;
}

.step-rail::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 0%;
  background-color: var(--ink);
  border-radius: 3px;
}

.step.is-active .step-rail::after {
  animation: railFill var(--step-duration, 7s) linear forwards;
}

@keyframes railFill {
  from {
    height: 0%;
  }
  to {
    height: 100%;
  }
}

.step-title {
  font-size: var(--size-body2);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: left;
  width: 100%;
  transition: color 0.25s var(--ease);
}

.step:not(.is-active) .step-title:hover {
  color: var(--ink-soft);
}

.step-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}

.step.is-active .step-panel {
  grid-template-rows: 1fr;
}

.step-panel-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.step.is-active .step-panel-inner {
  opacity: 1;
  transition-delay: 0.12s;
}

.step-panel p {
  color: var(--ink-soft);
  font-size: var(--size-body);
  max-width: 40ch;
  padding-top: 0.65rem;
}

.step-panel .link-underline {
  margin-top: 1rem;
}

/* ==========================================================================
   The loop: live -> offline -> live, with what carries across each handover
   ========================================================================== */

.loop-head {
  max-width: 46rem;
  margin-bottom: 4rem;
}

.loop-head h2 {
  font-size: clamp(1.8rem, 1rem + 1.6vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.loop-head p {
  color: var(--ink-soft);
  margin-top: 1rem;
}

.loop-steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0 2rem;
  align-items: stretch;
}

.loop-step {
  border-top: 2px solid var(--ink);
  padding-top: 1.5rem;
}

.loop-num {
  display: block;
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--btn);
  margin-bottom: 0.75rem;
}

.loop-step h3 {
  font-size: var(--size-body2);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.loop-step p {
  font-size: var(--size-small);
  color: var(--ink-soft);
  line-height: 1.6;
}

/* the arrow between two beats, labelled with what survives it */
.loop-arrow {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  max-width: 12rem;
  padding: 1.5rem 0;
  position: relative;
}

.loop-arrow::before {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(to right, var(--rule), var(--btn), var(--rule));
  margin-bottom: 1rem;
}

.loop-arrow span {
  font-size: var(--size-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}

.loop-arrow strong {
  font-size: var(--size-small);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
}

.loop-cta {
  margin-top: 4rem;
}

@media (max-width: 991px) {
  .loop-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .loop-arrow {
    max-width: 100%;
    padding: 1.75rem 0;
    text-align: left;
  }

  .loop-arrow::before {
    background: linear-gradient(to bottom, var(--rule), var(--btn), var(--rule));
    width: 1px;
    height: 2rem;
    margin: 0 0 0.75rem 0;
  }

  .loop-step {
    padding-bottom: 0.5rem;
  }
}

/* ==========================================================================
   Persona filter grid
   ========================================================================== */

.filter-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.filter-head h2 {
  font-size: clamp(1.6rem, 0.9rem + 1.9vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  max-width: 24ch;
  margin: 0 auto;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 4rem;
}

.tab {
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  font-size: var(--size-small);
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: all 0.22s var(--ease);
}

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

.tab[aria-selected="true"] {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.card .media {
  margin-bottom: 1.25rem;
}

.card h3 {
  font-size: var(--size-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: var(--size-small);
  color: var(--ink-soft);
  line-height: 1.55;
}

.tabpanel[hidden] {
  display: none;
}

/* ==========================================================================
   Quotes
   ========================================================================== */

.quotes .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

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

.quote blockquote {
  font-size: var(--size-body2);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 2rem;
}

.quote figcaption {
  font-size: var(--size-small);
  color: var(--ink-soft);
}

.quote .name {
  color: var(--ink);
  font-weight: 600;
}

/* ==========================================================================
   News / best practices grid
   ========================================================================== */

.news-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
}

.news-head h2 {
  font-size: clamp(1.5rem, 1rem + 1.2vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.news-item {
  display: block;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  transition: opacity 0.25s var(--ease);
}

.news-item:hover {
  opacity: 0.6;
}

.news-item h3 {
  font-size: var(--size-body2);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

.news-meta {
  display: flex;
  gap: 1rem;
  font-size: var(--size-small);
  color: var(--ink-soft);
}

/* ==========================================================================
   Closing CTA + footer
   ========================================================================== */

.closing {
  text-align: center;
}

.closing h2 {
  font-size: clamp(2rem, 1rem + 3vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  max-width: 20ch;
  margin: 0 auto 2.25rem;
}

.footer {
  border-top: 1px solid var(--rule);
  padding-block: 3.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer h4 {
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
}

.footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer a {
  font-size: var(--size-small);
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}

.footer a:hover {
  color: var(--ink);
}

.footer-blurb {
  font-size: var(--size-small);
  color: var(--ink-soft);
  max-width: 30ch;
  margin-top: 0.9rem;
}

.footer-legal {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: var(--size-micro);
  color: var(--ink-faint);
}

/* ==========================================================================
   Interior pages
   ========================================================================== */

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

.page-head h1 {
  font-size: clamp(2.5rem, 1.2rem + 4vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
}

.page-head p {
  max-width: 40rem;
  margin-top: 1.5rem;
  color: var(--ink-soft);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 3.5rem;
}

.empty-note {
  color: var(--ink-soft);
  padding: 3rem 0;
}

/* demo page */

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.demo-points {
  list-style: none;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
}

.demo-points li {
  border-top: 1px solid var(--rule);
  padding: 1.1rem 0;
  color: var(--ink-soft);
  font-size: var(--size-small);
}

.form {
  background-color: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.field label {
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: var(--size-small);
  color: var(--ink);
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background-color: var(--paper);
  transition: border-color 0.2s var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
}

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

.form .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.form-note {
  font-size: var(--size-micro);
  color: var(--ink-faint);
  margin-top: 1rem;
}

.form-success {
  display: none;
  border: 1px solid var(--ink);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: var(--size-small);
  margin-bottom: 1.25rem;
}

.form-error {
  display: none;
  border: 1px solid var(--btn);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: var(--size-small);
  margin-bottom: 1.25rem;
}

.form-success.is-visible,
.form-error.is-visible {
  display: block;
}

/* ==========================================================================
   Prose: articles, About, Terms
   ========================================================================== */

.prose {
  max-width: 44rem;
}

.prose > * + * {
  margin-top: 1.35rem;
}

.prose h2 {
  font-size: var(--size-medium);
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-top: 3.5rem;
}

.prose h3 {
  font-size: var(--size-body2);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 2.5rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
  line-height: 1.7;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.6rem;
}

.prose blockquote {
  border-left: 2px solid var(--btn);
  padding-left: 1.5rem;
  font-size: var(--size-body2);
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.prose a:not(.btn) {
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}

.prose a:not(.btn):hover {
  border-bottom-color: var(--ink);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin-block: 3rem;
}

/* blog index: stage headings marking the far-to-close arc */

.stage-head {
  grid-column: 1 / -1;
  border-top: 1px solid var(--ink);
  padding-top: 1.25rem;
  margin-top: 2.5rem;
}

.stage-head:first-child {
  margin-top: 0;
}

.stage-num {
  display: block;
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
}

.stage-head h2 {
  font-size: var(--size-medium);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.stage-head p {
  font-size: var(--size-small);
  color: var(--ink-soft);
  margin-top: 0.5rem;
  max-width: 46ch;
}

.stage-head[hidden] {
  display: none;
}

.news-dek {
  font-size: var(--size-small);
  color: var(--ink-soft);
  line-height: 1.55;
  margin-top: -0.75rem;
  margin-bottom: 1.25rem;
}

/* read next, on each post */

.read-next {
  border-top: 1px solid var(--ink);
  padding-top: 1.5rem;
}

.read-next > h2 {
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2rem;
}

/* the one-line thesis, on the blog index */

.blog-thesis {
  font-size: var(--size-body2);
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 46rem;
}

/* the spine linking every post back to the argument */

.thesis-note {
  border-left: 2px solid var(--btn);
  padding-left: 1.25rem;
  font-size: var(--size-small);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.thesis-note,
.thesis-note a {
  color: var(--ink-soft);
}

.thesis-note a {
  border-bottom: 1px solid var(--rule);
}

.thesis-note a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* article header */

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: var(--size-small);
  color: var(--ink-soft);
  margin-top: 1.25rem;
}

.article-dek {
  font-size: var(--size-body2);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 40rem;
  margin-top: 1.5rem;
  letter-spacing: -0.01em;
}

.back-link {
  display: inline-block;
  font-size: var(--size-small);
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

.back-link:hover {
  color: var(--ink);
}

/* stat row (About) */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.stat-num {
  font-size: clamp(2rem, 1.2rem + 2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-label {
  font-size: var(--size-small);
  color: var(--ink-soft);
  margin-top: 0.5rem;
}

@media (max-width: 620px) {
  .stat-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */

/* Scoped to .js so the page is fully visible when scripts do not run.
   Without this, a blocked or failed main.js leaves every section at
   opacity 0 and the site renders blank. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  :root {
    --gutter: 2.5rem;
    --module-gap: 8rem;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quotes .wrap,
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  /* Shorter runway and larger cards, or the field reads as confetti. */
  .cloud {
    height: 240vh;
  }

  .cloud-stage {
    perspective: 620px;
  }

  .cloud-img {
    width: calc(var(--w) * 2.1);
  }

  .cloud-text {
    max-width: 100%;
  }


  :root {
    --gutter: 1.5rem;
    --module-gap: 6rem;
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
    position: relative;
  }

  .header.nav-open .nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background-color: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1.5rem;
  }

  .header.nav-open .nav a {
    width: 100%;
    padding: 0.9rem 0;
    font-size: var(--size-body);
    border-bottom: 1px solid var(--rule);
  }

  .header.nav-open .nav .btn {
    margin-top: 1rem;
    width: 100%;
  }

  .hero {
    padding-top: 4.5rem;
  }

  .hero-media {
    margin-top: 3.5rem;
  }

  .hero-media .media {
    aspect-ratio: 4 / 3;
  }

  .feature-body,
  .demo-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .feature-body.is-flipped .feature-media {
    order: 0;
  }

  .feature-media {
    position: static;
  }

  .feature-head {
    margin-bottom: 3rem;
  }

  .card-grid,
  .quotes .wrap,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form {
    padding: 1.5rem;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .logo-row {
    gap: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  /* No dolly: show a still field and the first statement. */
  .cloud {
    height: auto;
  }

  .cloud-stage {
    position: static;
    height: auto;
    padding-block: var(--module-gap);
  }

  .cloud-field {
    display: none;
  }

  .cloud-text {
    display: block;
  }

  .cloud-line {
    opacity: 1;
    transform: none;
    margin-bottom: 3rem;
  }
}
