:root {
  --bg: #f7f5f0;
  --bg-2: #efebe3;
  --ink: #141414;
  --ink-soft: #494640;
  --line: rgba(20, 20, 20, 0.14);
  --accent-hot: #0d7f8d;
  --accent-sky: #37a9b8;
  --max: 1220px;
  --scroll: 0;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: Outfit, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -8%, #eafbff 0%, transparent 32%),
    linear-gradient(170deg, var(--bg) 0%, var(--bg-2) 100%);
  overflow-x: hidden;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 120;
  background: rgba(255, 255, 255, 0.6);
}

.scroll-progress span {
  display: block;
  width: calc(var(--scroll) * 100%);
  height: 100%;
  background: linear-gradient(90deg, var(--accent-hot), var(--accent-sky));
  transition: width 120ms linear;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: radial-gradient(rgba(0, 0, 0, 0.16) 0.3px, transparent 0.3px);
  background-size: 4px 4px;
  z-index: -3;
}

.cursor-dot,
.cursor-beam {
  position: fixed;
  pointer-events: none;
  z-index: 130;
  opacity: 0;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--accent-hot);
}

.cursor-beam {
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(13, 127, 141, 0), rgba(13, 127, 141, 0.35), rgba(13, 127, 141, 0));
}

.hero,
.engine-story,
.products-river,
.evidence-runway,
.waitlist-band,
.footer {
  width: min(var(--max), 92vw);
  margin-inline: auto;
}

.topbar {
  margin-top: 0;
  width: 100%;
  padding: 0;
  border-bottom: 1px solid rgba(13, 127, 141, 0.15);
  border-radius: 0;
  box-shadow: 0 8px 20px rgba(10, 86, 96, 0.08);
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(232, 247, 250, 0.93), rgba(240, 250, 252, 0.88));
}

.topbar-inner {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding: 14px 4vw;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.masthead {
  display: grid;
  gap: 4px;
}

.masthead p {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #5a7e86;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-family: Outfit, sans-serif;
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 0.95rem;
  color: #0a3a45;
}

.nav-logo {
  height: 28px;
  width: auto;
  max-width: 100%;
  display: block;
}

.topbar nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: #174c57;
  font-size: 0.95rem;
  font-weight: 500;
}

.topbar nav a {
  position: relative;
}

.topbar nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1.5px;
  background: #0d7f8d;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.topbar nav a:hover::after {
  transform: scaleX(1);
}

.head-cta-wrap {
  display: flex;
  align-items: center;
  gap: 0;
}

.top-newsletter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(13, 127, 141, 0.35);
  border-radius: 10px;
  font-size: 0.83rem;
  font-weight: 700;
  color: #0b4651;
  background: rgba(255, 255, 255, 0.72);
  transition: transform 180ms ease, background-color 180ms ease;
}

.top-newsletter:hover {
  transform: translateY(-1px);
  background: rgba(230, 246, 249, 0.92);
}

.hero {
  padding-top: clamp(56px, 10vw, 124px);
}

.kicker,
.step,
.row-index {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.76rem;
}

.kicker { color: #0d6f79; }

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

h1 {
  margin-top: 12px;
  font-family: Outfit, sans-serif;
  font-size: clamp(2.5rem, 9vw, 7.8rem);
  line-height: 0.87;
  letter-spacing: -0.03em;
}

.cycle-line { display: block; }
.word-cycle { color: var(--accent-hot); }

.lede {
  margin-top: 16px;
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: clamp(1.04rem, 1.6vw, 1.22rem);
  line-height: 1.45;
}

.hero-metrics {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-metrics span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.45);
}

.hero-metrics b {
  font-family: Outfit, sans-serif;
  font-weight: 700;
  margin-right: 4px;
}

.engine-story {
  margin-top: clamp(56px, 10vw, 120px);
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 42px;
}

.story-sticky {
  position: sticky;
  top: 110px;
  align-self: start;
}

.story-sticky h2 {
  margin-top: 10px;
  font-family: Outfit, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 0.98;
}

.story-sticky p:last-child {
  margin-top: 14px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.story-flow {
  border-left: 1px solid var(--line);
  padding-left: 22px;
  display: grid;
  gap: 28px;
}

.flow-item {
  position: relative;
  padding-bottom: 16px;
}

.flow-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-hot);
}

.flow-item h3 {
  margin-top: 6px;
  font-family: Outfit, sans-serif;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.flow-item p:last-child {
  margin-top: 8px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.products-river {
  margin-top: clamp(56px, 10vw, 120px);
  display: grid;
  gap: 22px;
}

.product-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  transform-style: preserve-3d;
  transition: transform 220ms ease;
}

.product-row:last-child {
  border-bottom: 1px solid var(--line);
}

.row-index {
  color: var(--ink-soft);
  padding-top: 10px;
}

.product-row h3 {
  font-family: Outfit, sans-serif;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 0.9;
}

.product-row p {
  margin-top: 10px;
  max-width: 70ch;
  line-height: 1.45;
}

.row-meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.evidence-runway {
  margin-top: clamp(56px, 10vw, 118px);
}

.evidence-head h2 {
  margin-top: 10px;
  font-family: Outfit, sans-serif;
  font-size: clamp(2rem, 4.8vw, 4rem);
  line-height: 0.93;
}

.metric-lines {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.metric-line {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.metric-line p {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.line-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.line-track span {
  display: block;
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, var(--accent-hot), var(--accent-sky));
}

.metric-line strong {
  font-family: Outfit, sans-serif;
  font-size: 1.4rem;
}

.evidence-links {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.evidence-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.83rem;
  color: var(--ink-soft);
}

.waitlist-band {
  margin-top: clamp(56px, 10vw, 120px);
  padding: 24px 0 4px;
  border-top: 1px solid var(--line);
}

.waitlist-band h3 {
  margin-top: 8px;
  font-family: Outfit, sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 0.95;
}

.waitlist-form {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.waitlist-form input,
.waitlist-form button {
  height: 48px;
  border-radius: 12px;
  font-size: 1rem;
}

.waitlist-form input {
  flex: 1 1 280px;
  border: 1px solid var(--line);
  background: #fff;
  color: #102226;
  padding: 0 12px;
  appearance: none;
}

.waitlist-form input::placeholder {
  color: #5d747a;
}

.waitlist-form input:-webkit-autofill,
.waitlist-form input:-webkit-autofill:hover,
.waitlist-form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: #102226;
}

.waitlist-form button {
  border: 0;
  color: #fff;
  background: linear-gradient(120deg, var(--accent-hot), #3aaebd);
  font-weight: 700;
  padding: 0 16px;
}

.form-message {
  min-height: 24px;
  margin-top: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
  color: #0d7f8d;
}

.footer {
  margin: 22px auto 34px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  color: #6e6a64;
  font-size: 0.93rem;
}

.footer div {
  display: flex;
  gap: 14px;
}

.footer a {
  position: relative;
  color: #4a676e;
}

.footer a:hover {
  color: #0d6f79;
}

.footer a[aria-current="page"] {
  opacity: 0.7;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

.js-motion .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--stagger, 0) * 80ms);
}

.js-motion .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1020px) {
  .engine-story {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .story-sticky {
    position: static;
  }

  .metric-line {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 900px) {
  .topbar-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .topbar nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .product-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .row-index {
    padding-top: 0;
  }

  .cursor-dot,
  .cursor-beam {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }

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

  .cursor-dot,
  .cursor-beam {
    display: none;
  }
}

/* Shared content pages */
.page-content {
  width: min(900px, 92vw);
  margin: clamp(56px, 8vw, 94px) auto 0;
}

.legal-shell {
  padding-bottom: 24px;
}

.legal-card {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(13, 127, 141, 0.15);
  border-radius: 16px;
  padding: clamp(22px, 3vw, 34px);
  box-shadow: 0 8px 24px rgba(10, 86, 96, 0.06);
}

.legal-card h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: #0a3a45;
  line-height: 1;
}

.legal-card h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 1.15rem;
  color: #0d6f79;
}

.legal-card p {
  margin-top: 0;
  margin-bottom: 12px;
  line-height: 1.6;
  color: #2b3d41;
}

.newsletter-page {
  width: min(1050px, 92vw);
  margin: clamp(56px, 8vw, 96px) auto 0;
}

.newsletter-feed {
  margin-top: clamp(44px, 8vw, 84px);
}

.newsletter-feed .product-row {
  grid-template-columns: 110px 1fr;
}

.newsletter-feed .product-row h3 {
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
  line-height: 1;
}

.newsletter-feed .row-index {
  font-size: 0.72rem;
  color: #58757c;
}

.newsletter-hero {
  position: relative;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 18px;
  border: 1px solid rgba(13, 127, 141, 0.2);
  background:
    radial-gradient(circle at 84% 10%, rgba(55, 169, 184, 0.15), transparent 30%),
    rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 34px rgba(10, 86, 96, 0.08);
}

.newsletter-hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.2rem);
  line-height: 0.9;
}

.newsletter-layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.newsletter-feature {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(13, 127, 141, 0.14);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 28px);
  box-shadow: 0 10px 28px rgba(10, 86, 96, 0.07);
}

.newsletter-feature h2 {
  margin-top: 8px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.16;
  color: #0d6f79;
}

.newsletter-feature p {
  margin-top: 12px;
  color: #2f4044;
  line-height: 1.62;
}

.newsletter-feature ul {
  margin-top: 16px;
  padding-left: 18px;
  color: #355056;
  display: grid;
  gap: 8px;
}

.newsletter-side {
  display: grid;
  gap: 12px;
}

.news-entry {
  height: 100%;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(13, 127, 141, 0.14);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(10, 86, 96, 0.06);
}

.news-date {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: #658086;
  margin-bottom: 8px;
  display: block;
}

.news-entry h3 {
  font-size: clamp(1.05rem, 1.9vw, 1.28rem);
  line-height: 1.25;
  color: #0d6f79;
}

.news-entry p {
  margin-top: 8px;
  color: #2f4044;
  line-height: 1.45;
}

.newsletter-archive {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(13, 127, 141, 0.12);
  border-radius: 14px;
  padding: 18px;
}

.newsletter-archive h2 {
  font-size: 1.3rem;
  color: #0a3a45;
}

.newsletter-archive article {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(13, 127, 141, 0.1);
}

.newsletter-archive span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5c767c;
}

.newsletter-archive article p {
  margin-top: 8px;
  color: #2f4448;
  line-height: 1.45;
}

.email-capture {
  display: flex;
  gap: 10px;
  max-width: 620px;
}

.legal-hero {
  margin-bottom: 16px;
}

.legal-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.92;
}

.legal-hero p {
  margin-top: 10px;
  color: #4d666b;
}

@media (max-width: 740px) {
  .email-capture {
    flex-direction: column;
  }

  .newsletter-layout {
    grid-template-columns: 1fr;
  }

  .newsletter-page,
  .page-content {
    margin-top: 46px;
  }
}
