:root {
  --paper: #ffffff;
  --ink: #090b10;
  --soft-ink: #4c4f55;
  --line: #d8d8d4;
  --panel: #ffffff;
  --inverse: #111318;
  --inverse-soft: #cfd1d4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  width: 112px;
  height: 34px;
  overflow: hidden;
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  color: var(--soft-ink);
  font-size: 0.88rem;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--ink);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(48px, 8vw, 112px) clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--soft-ink);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 880px;
  margin-bottom: 26px;
  font-size: clamp(3rem, 6.8vw, 7.8rem);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 0.9;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 34px;
  color: var(--soft-ink);
  font-size: clamp(1rem, 1.45vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 650;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--ink);
  color: var(--paper);
}

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

.hero-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.hero-mark img {
  width: min(100%, 680px);
  filter: contrast(1.05);
}

.statement {
  display: grid;
  place-items: center;
  min-height: 46vh;
  padding: clamp(56px, 9vw, 120px) clamp(20px, 4vw, 56px);
  background: var(--inverse);
  color: var(--paper);
}

.statement p {
  max-width: 1080px;
  margin: 0;
  font-size: clamp(2.05rem, 4.6vw, 5.4rem);
  font-weight: 620;
  letter-spacing: 0;
  line-height: 0.98;
}

.projects-section,
.architecture,
.contact-section {
  padding: clamp(64px, 9vw, 124px) clamp(20px, 4vw, 56px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 0.65fr);
  gap: 32px;
  align-items: start;
  margin-bottom: clamp(34px, 5vw, 58px);
}

.section-heading h2,
.contact-section h2 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(2.2rem, 4.4vw, 5rem);
  font-weight: 620;
  letter-spacing: 0;
  line-height: 0.98;
}

@media (min-width: 1200px) {
  #projects-title {
    white-space: nowrap;
  }
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--panel);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.project-card.is-featured {
  background: var(--ink);
  color: var(--paper);
}

.project-card.is-featured p,
.project-card.is-featured dd {
  color: var(--inverse-soft);
}

.project-card.has-orb {
  background: var(--panel);
  color: var(--ink);
}

.project-index {
  margin-bottom: clamp(58px, 8vw, 108px);
  color: currentColor;
  font-size: 0.82rem;
  font-weight: 700;
}

.project-orb {
  align-self: center;
  width: min(100%, clamp(330px, 24vw, 460px));
  aspect-ratio: 1 / 1;
  margin: clamp(14px, 2.2vw, 26px) auto clamp(20px, 2.8vw, 32px);
  overflow: hidden;
  background: #ffffff;
}

.project-orb canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.project-logo {
  align-self: center;
  display: block;
  width: min(62%, 250px);
  height: auto;
  margin: clamp(18px, 2.5vw, 30px) auto clamp(20px, 2.8vw, 32px);
}

.project-logo-pay {
  width: min(68%, 270px);
}

.project-logo-os {
  width: min(86%, 340px);
  height: 190px;
  object-fit: contain;
}

.project-card h3 {
  margin-bottom: 18px;
  font-size: clamp(1.9rem, 3vw, 3rem);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
}

.project-card p {
  color: var(--soft-ink);
  font-size: 1rem;
}

.project-card dl {
  display: grid;
  gap: 18px;
  margin: auto 0 0;
}

.project-card.has-orb dl {
  margin-top: auto;
}

.project-card dl div {
  padding-top: 16px;
  border-top: 1px solid currentColor;
}

.project-card dt {
  margin-bottom: 5px;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.project-card dd {
  margin: 0;
  color: var(--soft-ink);
}

.architecture {
  border-top: 1px solid var(--line);
}

.architecture-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.architecture-item {
  min-height: 300px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--paper);
}

.architecture-item span {
  display: block;
  margin-bottom: 90px;
  font-size: clamp(1.6rem, 2.2vw, 2.4rem);
  font-weight: 650;
  line-height: 1;
}

.architecture-item p {
  max-width: 420px;
  margin-bottom: 0;
  color: var(--soft-ink);
}

.contact-section {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  background: var(--inverse);
  color: var(--paper);
}

.contact-section .eyebrow {
  color: var(--inverse-soft);
}

.contact-section .button {
  flex: 0 0 auto;
  border-color: var(--paper);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(20px, 4vw, 56px);
  background: var(--inverse);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--inverse-soft);
  font-size: 0.84rem;
}

.site-footer img {
  display: block;
  width: 118px;
  height: auto;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: auto;
  }

  .hero-mark {
    justify-content: flex-start;
    min-height: 180px;
  }

  .project-grid,
  .architecture-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 420px;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    min-height: 104px;
    flex-direction: column;
    gap: 12px;
  }

  .brand {
    width: 96px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .hero {
    padding-top: 42px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .contact-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: 2.72rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .project-card,
  .architecture-item {
    padding: 22px;
  }
}

/* ============================================================
   Shared product-page system
   ============================================================ */

.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(9, 11, 16, 0.06);
}

/* Brand wordmark + product label lockup in the topnav */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  overflow: visible;
}

.brand-lockup img {
  width: 96px;
  height: 29px;
}

.footer-family a {
  color: var(--paper);
}

.footer-family a:hover {
  text-decoration: underline;
}

/* Sitemap footer */
.footer-rich .footer-sitemap {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-col h4 {
  margin: 0 0 16px;
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.footer-col a {
  color: var(--inverse-soft);
  font-size: 0.94rem;
}

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

@media (max-width: 720px) {
  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 20px;
  }
}

@media (max-width: 460px) {
  .footer-nav {
    grid-template-columns: 1fr;
  }
}

.brand-lockup .product-tag {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--soft-ink);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-links .nav-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-weight: 650;
}

.nav-links .nav-button::after {
  display: none;
}

.nav-links .nav-button.is-fill {
  background: var(--ink);
  color: var(--paper);
}

/* Centered single-column hero used on product pages */
.hero.is-centered {
  display: block;
  text-align: left;
  max-width: 1180px;
  margin: 0 auto;
  min-height: auto;
  padding-top: clamp(56px, 9vw, 120px);
  padding-bottom: clamp(56px, 9vw, 120px);
}

.hero.is-centered .hero-inner {
  max-width: 980px;
}

.hero .hero-mark-inline {
  margin-bottom: 30px;
}

.hero .hero-mark-inline img {
  display: block;
  width: auto;
  height: clamp(64px, 9vw, 104px);
}

.hero .hero-note {
  margin-top: 22px;
  color: var(--soft-ink);
  font-size: 0.92rem;
}

.hero-orb {
  width: min(100%, clamp(220px, 26vw, 320px));
  aspect-ratio: 1 / 1;
  margin: 0 0 26px;
  overflow: hidden;
  background: #ffffff;
}

.hero-orb canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Eyebrow with brand letter-spacing for product surfaces */
.eyebrow {
  letter-spacing: 0.16em;
}

/* Numbered feature / step cells reused across products */
.cell-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.cell-grid.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cell {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: clamp(26px, 3vw, 40px);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.cell .cell-index {
  padding-bottom: 16px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--soft-ink);
}

.cell h3 {
  margin-bottom: 14px;
  font-size: 1.45rem;
  font-weight: 650;
  line-height: 1.05;
}

.cell p {
  color: var(--soft-ink);
  font-size: 0.98rem;
}

.cell .cell-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: auto;
  padding-top: 24px;
}

.cell .cell-meta dt {
  margin-bottom: 6px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft-ink);
}

.cell .cell-meta dd {
  margin: 0;
  font-size: 0.92rem;
}

/* Steps band (how it works) on inverse */
.band {
  padding: clamp(64px, 9vw, 124px) clamp(20px, 4vw, 56px);
  background: var(--inverse);
  color: var(--paper);
}

.band .eyebrow,
.band .lead {
  color: var(--inverse-soft);
}

.band h2 {
  max-width: 980px;
  margin: 0 0 clamp(40px, 6vw, 72px);
  font-size: clamp(2.2rem, 4.4vw, 4.4rem);
  font-weight: 620;
  line-height: 0.98;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
}

.steps .step .step-index {
  margin-bottom: 18px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--inverse-soft);
}

.steps .step h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
  font-weight: 650;
}

.steps .step p {
  color: var(--inverse-soft);
  font-size: 0.96rem;
  margin: 0;
}

/* What you get: two-column point grid (on inverse) */
.points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(34px, 4vw, 60px);
}

.points .point h3 {
  margin-bottom: 12px;
  font-size: 1.22rem;
  font-weight: 650;
}

.points .point p {
  margin: 0;
  color: var(--inverse-soft);
  font-size: 0.98rem;
}

/* Section wrapper for light feature sections */
.feature-section {
  padding: clamp(64px, 9vw, 124px) clamp(20px, 4vw, 56px);
}

.feature-section .section-heading {
  grid-template-columns: 1fr;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.feature-section .cell-grid,
.pricing .price-grid {
  max-width: 1180px;
  margin: 0 auto;
}

/* Pricing */
.pricing {
  padding: clamp(64px, 9vw, 124px) clamp(20px, 4vw, 56px);
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.price-card {
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3vw, 38px);
  background: var(--paper);
}

.price-card .price-tier {
  margin-bottom: 22px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft-ink);
}

.price-card .price-amount {
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
}

.price-card .price-sub {
  margin: 14px 0 26px;
  color: var(--soft-ink);
  font-size: 0.92rem;
}

.price-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.price-card li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
}

/* Code block (Pay) */
.code-block {
  margin: 0;
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--inverse);
  color: var(--paper);
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
}

.code-block .tok-muted {
  color: var(--inverse-soft);
}

/* Closing CTA section (light or inverse) */
.cta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding: clamp(72px, 10vw, 140px) clamp(20px, 4vw, 56px);
  background: var(--inverse);
  color: var(--paper);
}

.cta .eyebrow {
  color: var(--inverse-soft);
}

.cta h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.2rem, 4.4vw, 4.6rem);
  font-weight: 620;
  line-height: 0.98;
}

.cta .hero-actions .button {
  border-color: var(--paper);
}

.cta .button-primary {
  background: var(--paper);
  color: var(--ink);
}

/* Rich footer (wordmark, blurb, contact, family line) */
.footer-rich {
  padding: clamp(56px, 8vw, 104px) clamp(20px, 4vw, 56px) 28px;
  background: var(--inverse);
  color: var(--inverse-soft);
}

.footer-rich .footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 40px;
  align-items: start;
  padding-bottom: clamp(40px, 6vw, 72px);
}

.footer-rich .footer-mark img {
  display: block;
  width: clamp(150px, 18vw, 210px);
  height: auto;
  margin-bottom: 22px;
}

.footer-rich .footer-blurb {
  max-width: 460px;
  margin: 0;
  font-size: 0.96rem;
}

.footer-rich .footer-contact {
  display: flex;
  justify-content: flex-end;
}

.footer-rich .footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  color: var(--paper);
  font-size: 0.92rem;
  font-weight: 650;
}

.footer-rich .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.82rem;
}

.footer-rich .footer-bottom a {
  color: var(--inverse-soft);
}

.footer-rich .footer-bottom a:hover {
  color: var(--paper);
}

/* Health functional color (the one allowed exception) */
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--ink);
}

.swatch .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

/* Parent product-card extras */
.project-card dl {
  margin-bottom: 20px;
}

.card-link {
  align-self: flex-start;
  min-height: 40px;
  font-size: 0.86rem;
}

.project-card.is-featured .card-link {
  border-color: var(--paper);
  color: var(--paper);
}

.project-logo-health {
  width: min(88%, 330px);
}

.project-logo-next {
  width: min(74%, 280px);
}

.project-logo-ready {
  width: min(68%, 280px);
}

.project-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  margin: clamp(22px, 3vw, 40px) auto;
  line-height: 0.82;
}

.project-wordmark .wm-ava {
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.project-wordmark .wm-sub {
  font-size: clamp(1.1rem, 1.7vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
}

.card-architecture {
  justify-content: flex-start;
}

.card-architecture .card-link {
  margin-top: auto;
}

.dot-protein { background: #e0533d; }
.dot-carbs { background: #2ba8a0; }
.dot-fat { background: #e8a93b; }
.dot-signal { background: #3d7bd9; }
.dot-good { background: #1aa260; }

@media (max-width: 980px) {
  .cell-grid,
  .cell-grid.is-three,
  .steps,
  .points,
  .price-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-rich .footer-contact {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .cell .cell-meta {
    grid-template-columns: 1fr;
  }

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

  .footer-rich .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Product status tags */
.status-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 12px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft-ink);
}

.project-card.is-featured .status-tag {
  color: var(--inverse-soft);
  border-color: rgba(255, 255, 255, 0.35);
}

.status-tag.is-live {
  color: #0a7a3d;
  border-color: #0a7a3d;
}

.hero .status-tag {
  margin: 0 auto 14px;
}

.hero:not(.is-centered) .status-tag {
  margin: 0 0 14px;
}

/* Keep the products heading on one line on wider screens */
@media (min-width: 900px) {
  #products-title {
    white-space: nowrap;
    font-size: clamp(2.2rem, 3.8vw, 4.3rem);
  }
}

@media (min-width: 900px) {
  #architecture-title {
    white-space: nowrap;
    font-size: clamp(2rem, 3.2vw, 3.7rem);
  }
}

/* Logo sizing and vertical alignment across product cards */
.project-card .project-logo {
  margin-top: auto;
  margin-bottom: auto;
  padding: clamp(18px, 2.5vw, 30px) 0 clamp(20px, 2.8vw, 32px);
}

.project-logo-health {
  width: min(84%, 440px);
}

.project-logo-os {
  width: min(60%, 340px);
  height: auto;
}
