/* ============================================================
   Levitate Data — design system
   Light "paper" base for human-facing sections; dark "night"
   reserved for machine-room product sections only.
   Type: Newsreader (display serif) · Schibsted Grotesk (sans)
         JetBrains Mono (eyebrows, tags, trace text)
   ============================================================ */

:root {
  --paper: #faf8f4;
  --paper-2: #f3efe6;
  --ink: #1a2530;
  --ink-2: #46525d;
  --stone: #8a8577;
  --line: #e5dfd3;
  --slate: #2e5972;
  --night: #0a1218;
  --night-line: #223240;
  --ice: #aecbdc;
  --ice-2: #93a1ac;
  --cloud: #e6edf2; /* primary text on dark */
  --serif: "Newsreader", Georgia, serif;
  --sans: "Schibsted Grotesk", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1120px;
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
[id] {
  scroll-margin-top: 100px;
} /* clear the 69px sticky header, with slack for webfont layout shift */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  font-family: var(--sans);
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
::selection {
  background: var(--slate);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--slate);
  outline-offset: 3px;
  border-radius: 2px;
}
.dark :focus-visible {
  outline-color: var(--ice);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand em {
  font-style: normal;
  color: var(--slate);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 400;
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-links a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}
.nav-toggle {
  display: none;
}

/* ---------- buttons & links ---------- */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.78rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid var(--ink);
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s;
  cursor: pointer;
}
.btn:hover {
  background: var(--slate);
  border-color: var(--slate);
  color: #fff;
}
.btn-nav {
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
}
/* .nav-links a (0,1,1) would otherwise override .btn's color/padding */
.nav-links a.btn-nav {
  color: var(--paper);
  padding: 0.55rem 1.1rem;
}
.nav-links a.btn-nav:hover {
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  background: var(--paper-2);
  color: var(--ink);
  border-color: var(--stone);
}
.dark .btn {
  background: var(--ice);
  color: var(--night);
  border-color: var(--ice);
}
.dark .btn:hover {
  background: #c4dbe9;
  border-color: #c4dbe9;
  color: var(--night);
}
.arrow-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--slate);
  text-decoration: none;
  white-space: nowrap;
}
button.arrow-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--sans);
}
.arrow-link:hover {
  text-decoration: underline;
}
.dark .arrow-link {
  color: var(--ice);
}

/* ---------- hero pattern (centered) ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  min-height: calc(100svh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6.5rem 0 4.5rem;
  overflow: hidden;
  text-align: center;
}
/* Thick paper fog over the content column so the spotlight / wave never
   read on titles, CTAs, or in-hero numbers — art stays on the flanks.
   Fixed to the content column (not viewport %) so the wave can sit
   right against the copy on wide screens. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent max(0px, calc(50% - 350px)),
    rgba(250, 248, 244, 0.35) max(0px, calc(50% - 300px)),
    rgba(250, 248, 244, 0.92) max(0px, calc(50% - 260px)),
    var(--paper) max(0px, calc(50% - 230px)),
    var(--paper) min(100%, calc(50% + 230px)),
    rgba(250, 248, 244, 0.92) min(100%, calc(50% + 260px)),
    rgba(250, 248, 244, 0.35) min(100%, calc(50% + 300px)),
    transparent min(100%, calc(50% + 350px)),
    transparent 100%
  );
}
.hero-title {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}
.hero-lead {
  display: block;
  font-family: var(--sans);
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 0.35rem;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}
.hero-word {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 8.5vw, 6.4rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: var(--slate);
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
}
.hero-title .hero-lead,
.hero-title .hero-word {
  max-width: none;
}
.hero-kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.9vw, 1.4rem);
  color: var(--stone);
  margin-top: 1.2rem;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--ink-2);
  max-width: 52ch;
  margin: 1.8rem auto 0;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-top: 2.4rem;
}
.section .hero-cta {
  justify-content: flex-start;
}

/* Hero blueprint art: two stacked layers over the same drawing.
   .hero-wave  — soft light band sweeps so the art keeps announcing itself.
   .hero-art   — cursor spotlight on empty flanks only (JS skips content).
   Both are masked to the side flanks so they never paint through copy. */
.hero-art,
.hero-wave {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-art,
  .hero-wave {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
  }
  /* Shared flanks gate: opaque on the sides, transparent through the
     content column. Short fade so the art sits right against the copy. */
  .hero-art {
    -webkit-mask-image:
      radial-gradient(
        circle var(--mr, 220px) at var(--mx, -999px) var(--my, -999px),
        #000 0%,
        transparent 72%
      ),
      linear-gradient(
        90deg,
        #000 0%,
        #000 max(0px, calc(50% - 280px)),
        transparent max(0px, calc(50% - 230px)),
        transparent min(100%, calc(50% + 230px)),
        #000 min(100%, calc(50% + 280px)),
        #000 100%
      );
    mask-image:
      radial-gradient(
        circle var(--mr, 220px) at var(--mx, -999px) var(--my, -999px),
        #000 0%,
        transparent 72%
      ),
      linear-gradient(
        90deg,
        #000 0%,
        #000 max(0px, calc(50% - 280px)),
        transparent max(0px, calc(50% - 230px)),
        transparent min(100%, calc(50% + 230px)),
        #000 min(100%, calc(50% + 280px)),
        #000 100%
      );
    -webkit-mask-size:
      100% 100%,
      100% 100%;
    mask-size:
      100% 100%,
      100% 100%;
    -webkit-mask-repeat: no-repeat, no-repeat;
    mask-repeat: no-repeat, no-repeat;
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
  .hero-wave {
    opacity: 0.45;
    transition: opacity 0.45s ease;
    -webkit-mask-image:
      linear-gradient(100deg, transparent 30%, rgba(0, 0, 0, 0.75) 50%, transparent 70%),
      linear-gradient(
        90deg,
        #000 0%,
        #000 max(0px, calc(50% - 280px)),
        transparent max(0px, calc(50% - 230px)),
        transparent min(100%, calc(50% + 230px)),
        #000 min(100%, calc(50% + 280px)),
        #000 100%
      );
    mask-image:
      linear-gradient(100deg, transparent 30%, rgba(0, 0, 0, 0.75) 50%, transparent 70%),
      linear-gradient(
        90deg,
        #000 0%,
        #000 max(0px, calc(50% - 280px)),
        transparent max(0px, calc(50% - 230px)),
        transparent min(100%, calc(50% + 230px)),
        #000 min(100%, calc(50% + 280px)),
        #000 100%
      );
    -webkit-mask-size:
      250% 100%,
      100% 100%;
    mask-size:
      250% 100%,
      100% 100%;
    -webkit-mask-repeat: no-repeat, no-repeat;
    mask-repeat: no-repeat, no-repeat;
    -webkit-mask-position:
      100% 0,
      0 0;
    mask-position:
      100% 0,
      0 0;
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
    animation: hero-wave 6s linear infinite;
  }
  /* while the cursor is exploring, the wave steps aside */
  .hero-spot.wave-paused .hero-wave {
    animation-play-state: paused;
    opacity: 0;
  }
}
@keyframes hero-wave {
  from {
    -webkit-mask-position:
      100% 0,
      0 0;
    mask-position:
      100% 0,
      0 0;
  }
  to {
    -webkit-mask-position:
      0% 0,
      0 0;
    mask-position:
      0% 0,
      0 0;
  }
}
.hero-art svg,
.hero-wave svg {
  width: 100%;
  height: 100%;
  display: block;
}
.hero-art img,
.hero-wave img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero > .container {
  position: relative;
  z-index: 1;
}

/* Home: logos + insights belong in the first screen, pinned under the copy */
.hero-home {
  justify-content: flex-start;
  padding-bottom: 2.5rem;
}
.hero-home-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}
.hero-home-proof {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 2.5rem;
  flex: 0 0 auto;
  /* Full-bleed logos/stats sit outside the center fog — opaque pad so the
     wave cannot sweep through them. */
  background: var(--paper);
}
.hero-home-proof .eyebrow {
  margin-bottom: 1.1rem;
}
.hero-home-proof .ribbon {
  border-left: none;
  border-right: none;
}
.hero-home .stats-below-ribbon {
  margin-top: 1.6rem;
}
.hero-home .stats-row {
  margin-top: 0;
  border-top: none; /* ribbon already supplies the divider above */
  border-bottom: none;
}

/* night hero (products: the machine room starts at the top) */
.hero.dark {
  background: var(--night);
}
.hero.dark::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent max(0px, calc(50% - 350px)),
    rgba(10, 18, 24, 0.35) max(0px, calc(50% - 300px)),
    rgba(10, 18, 24, 0.92) max(0px, calc(50% - 260px)),
    var(--night) max(0px, calc(50% - 230px)),
    var(--night) min(100%, calc(50% + 230px)),
    rgba(10, 18, 24, 0.92) min(100%, calc(50% + 260px)),
    rgba(10, 18, 24, 0.35) min(100%, calc(50% + 300px)),
    transparent min(100%, calc(50% + 350px)),
    transparent 100%
  );
}
.hero.dark .hero-lead {
  color: var(--cloud);
}
.hero.dark .hero-word {
  color: var(--ice);
}
.hero.dark .hero-kicker {
  color: var(--ice-2);
}
.hero.dark .hero-sub {
  color: var(--ice-2);
}
.hero.dark .btn-ghost {
  background: transparent;
  color: var(--cloud);
  border-color: var(--night-line);
}
.hero.dark .btn-ghost:hover {
  background: rgba(174, 203, 220, 0.07);
  color: #fff;
  border-color: var(--ice-2);
}

/* ---------- section scaffolding ---------- */
.section {
  padding: 5.5rem 0;
}
@media (min-height: 900px) {
  .section {
    padding: 7.5rem 0;
  }
}
.section-tint {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--stone);
  margin-bottom: 1rem;
}
.headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 26ch;
}
.headline em {
  font-style: italic;
  color: var(--slate);
}
.section-intro {
  margin-top: 1.2rem;
  font-size: 1.02rem;
  color: var(--ink-2);
  max-width: 62ch;
}
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.section-head-row + .section-intro {
  margin-top: 1.2rem;
}

/* ---------- dark machine-room sections ---------- */
.dark {
  position: relative;
  background: var(--night);
  color: var(--cloud);
  overflow: hidden;
}
.dark .eyebrow {
  color: var(--ice-2);
}
.dark .headline {
  color: var(--cloud);
}
.dark .headline em {
  color: var(--ice);
}
.dark .section-intro,
.dark p {
  color: var(--ice-2);
}
.dark .section-intro strong,
.dark p strong {
  color: var(--cloud);
}
.trace {
  position: absolute;
  inset: 0;
  padding: 2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 2.1;
  color: var(--ice);
  opacity: 0.07;
  white-space: pre;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.dark > .container {
  position: relative;
  z-index: 1;
}

/* closing CTA: decorative trace lives here, not on content-heavy sections */
.section-cta {
  text-align: center;
}
.section-cta .headline {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}
.section-cta .section-intro {
  margin-left: auto;
  margin-right: auto;
}
.section-cta .hero-cta {
  justify-content: center;
}
.section-cta .trace {
  opacity: 0.09;
}

/* stats below client logo ribbon */
.stats-below-ribbon {
  margin-top: 2.5rem;
}

/* ---------- stats ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 3.5rem;
}
.stats-row.cols3 {
  grid-template-columns: repeat(3, 1fr);
}
.stat {
  padding: 1.6rem 1rem;
  text-align: center;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border-right: none;
}
.stat-n {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1.1;
  color: var(--slate);
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--stone);
  margin-top: 0.35rem;
}
.dark .stat {
  border-color: var(--night-line);
}
.dark .stats-row {
  border-color: var(--night-line);
}
.dark .stat-n {
  color: var(--ice);
}
.dark .stat-label {
  color: var(--ice-2);
}

/* ---------- logo wall ---------- */
.logo-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2.4rem;
  align-items: baseline;
  margin-top: 1.4rem;
}
.logo-wall span {
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--stone);
  text-transform: uppercase;
}

/* ---------- cards ---------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.8rem;
  align-items: stretch;
}
.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card > p:not(.story-meta):not(.story-sub) {
  margin-top: auto;
}
.card-body {
  margin-top: auto;
}
.card-body > p {
  margin-top: 0;
}
.card > .flag-chip,
.card > .card-num,
.card > .draft-chip,
.card > .pill,
.card > .meta-pill {
  align-self: flex-start;
  width: fit-content;
}
.card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.card p {
  font-size: 0.95rem;
  color: var(--ink-2);
}
.card .arrow-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.section-tint .card {
  background: var(--paper);
}
.dark .card {
  background: rgba(174, 203, 220, 0.05);
  border-color: var(--night-line);
}
.dark .card h3 {
  color: var(--cloud);
}
.dark .card p {
  color: var(--ice-2);
}

.card-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--slate);
  display: block;
  margin-bottom: 0.9rem;
}
.dark .card-num {
  color: var(--ice);
}

/* lists inside cards / service areas */
.check-list {
  list-style: none;
  margin-top: 1rem;
}
.check-list li {
  position: relative;
  padding-left: 1.3rem;
  font-size: 0.93rem;
  color: var(--ink-2);
  margin-bottom: 0.45rem;
}
.check-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--slate);
}
.dark .check-list li {
  color: var(--ice-2);
}
.dark .check-list li::before {
  color: var(--ice);
}

/* ---------- pills / stack tags ---------- */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.2rem;
}
.pill {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  white-space: nowrap;
}
.dark .pill {
  background: rgba(174, 203, 220, 0.07);
  border-color: var(--night-line);
  color: var(--ice-2);
}

/* ---------- service areas (what we do) ---------- */
.service-block {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 3rem;
  padding: 3rem 0;
  border-top: 1px solid var(--line);
}
.service-block:last-of-type {
  border-bottom: 1px solid var(--line);
}
.service-block h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.service-block .lede {
  font-family: var(--serif);
  font-style: italic;
  color: var(--slate);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}
.service-block p {
  font-size: 0.98rem;
  color: var(--ink-2);
  max-width: 48ch;
}

/* ---------- comparison (how we work) ---------- */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.8rem;
}
.compare-card {
  position: relative;
}
.compare-card.is-us {
  border: 1.5px solid var(--slate);
}
.badge {
  position: absolute;
  top: -0.75rem;
  left: 1.5rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--slate);
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
}

/* ---------- process steps ---------- */
.steps {
  margin-top: 2.8rem;
  border-top: 1px solid var(--line);
}
.step {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.step-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--slate);
  padding-top: 0.4rem;
}
.step h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.step p {
  font-size: 0.96rem;
  color: var(--ink-2);
  max-width: 64ch;
}

/* ---------- principle / quote band ---------- */
.quote-band {
  text-align: center;
  padding: 5.5rem 0;
}
.quote-band blockquote {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 24ch;
  margin: 0 auto;
}
.quote-band blockquote em {
  color: var(--slate);
}
.quote-band .quote-support {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 1.4rem auto 0;
}

/* ---------- story cards ---------- */
.story-card {
  margin-top: 1.25rem;
}
.story-card .story-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.8rem;
}
.story-card h3 {
  font-size: 1.5rem;
}
.story-card .story-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--slate);
  margin-bottom: 0.9rem;
}
.card .story-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--slate);
  margin-bottom: 0.7rem;
}
.dark .card .story-sub {
  color: var(--ice);
}

/* ---------- forms ---------- */
.form-grid {
  display: grid;
  gap: 1.4rem;
  max-width: 680px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}
@media (max-width: 720px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* contact: form left, compact process rail right */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.7fr);
  gap: 3rem;
  align-items: start;
}
.contact-aside {
  position: sticky;
  top: 100px;
}
.mini-steps {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.2rem;
}
.mini-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.6rem;
}
.mini-step .step-num {
  padding-top: 0.15rem;
}
.mini-step strong {
  font-weight: 500;
  color: var(--ink);
  display: block;
  font-size: 0.95rem;
}
.mini-step p {
  font-size: 0.88rem;
  color: var(--ink-2);
  margin-top: 0.15rem;
}
.aside-note {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-2);
}
@media (max-width: 960px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .contact-aside {
    position: static;
  }
}
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.45rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.98rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
}
.field textarea {
  min-height: 150px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--slate);
  outline-offset: 1px;
  border-color: var(--slate);
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-tag {
  font-family: var(--serif);
  font-style: italic;
  color: var(--stone);
  margin-top: 0.6rem;
  font-size: 1rem;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.9rem;
}
.footer-col a {
  display: block;
  font-size: 0.92rem;
  color: var(--ink-2);
  text-decoration: none;
  margin-bottom: 0.5rem;
}
.footer-col a:hover {
  color: var(--ink);
}
.footer-meta {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--stone);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}
.footer-legal a {
  color: var(--stone);
  text-decoration: none;
}
.footer-legal a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ---------- brand logo ---------- */
.brand-logo {
  height: 26px;
  width: auto;
  display: block;
  filter: brightness(0);
  opacity: 0.92; /* source asset is white; render as ink */
}
.site-footer .brand-logo {
  height: 30px;
}

/* ---------- logo ribbon (clickable marquee) ---------- */
.ribbon {
  overflow: hidden;
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 0;
}
.ribbon-track {
  display: flex;
  width: max-content;
}
.ribbon-seg {
  display: flex;
  align-items: center;
  gap: 4.5rem;
  padding-right: 4.5rem;
  flex: none;
}
.ribbon-track {
  animation: ribbon-scroll 42s linear infinite;
}
.ribbon:hover .ribbon-track,
.ribbon:focus-within .ribbon-track {
  animation-play-state: paused;
}
.ribbon-item {
  display: flex;
  align-items: center;
  flex: none;
  text-decoration: none;
}
.ribbon-item img {
  height: 26px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  filter: brightness(0);
  opacity: 0.5;
  transition: opacity 0.2s;
}
a.ribbon-item:hover img {
  opacity: 0.95;
}
@keyframes ribbon-scroll {
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ribbon-track {
    animation: none;
    width: auto;
    flex-wrap: wrap;
  }
  .ribbon-seg + .ribbon-seg {
    display: none;
  }
  .ribbon-seg {
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    padding-right: 0;
    width: 100%;
  }
}

/* ---------- product pills (our products stand out in stacks) ---------- */
.pill-product {
  background: var(--slate);
  border-color: var(--slate);
  color: #fff;
  font-weight: 500;
}
.dark .pill-product {
  background: var(--ice);
  border-color: var(--ice);
  color: var(--night);
}

/* ---------- flagship chip ---------- */
.flag-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  border: 1px solid var(--slate);
  border-radius: 999px;
  padding: 0.26rem 0.85rem;
  margin-bottom: 1.1rem;
}
.dark .flag-chip {
  color: var(--ice);
  border-color: var(--ice);
}

/* ---------- story modals ---------- */
.story-modal {
  /* the global *{margin:0} reset kills the UA's dialog centering,
     so restore it explicitly: fixed inset 0 + margin auto = centered */
  position: fixed;
  inset: 0;
  margin: auto;
  border: none;
  border-radius: 12px;
  padding: 0;
  width: min(94vw, 780px);
  max-width: 780px;
  height: fit-content;
  max-height: 88vh;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(10, 18, 24, 0.35);
}
.story-modal::backdrop {
  background: rgba(10, 18, 24, 0.55);
}
.story-modal-inner {
  padding: 2.6rem;
  max-height: 82vh;
  overflow: auto;
  position: relative;
}
.story-modal .story-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.8rem;
  padding-right: 3rem;
}
.story-modal h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.story-modal .story-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--slate);
  margin-bottom: 0.4rem;
}
.story-modal p {
  font-size: 0.97rem;
  color: var(--ink-2);
}
.modal-section {
  margin-top: 1.7rem;
}
.modal-section .eyebrow {
  margin-bottom: 0.55rem;
}
.modal-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 2.2rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--line);
}
.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.story-open {
  cursor: pointer;
}

/* ---------- article prose ---------- */
.article-head {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  padding: 4.5rem 24px 1rem;
}
.article-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-top: 1rem;
}
.article-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-top: 1.4rem;
}
.prose {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.prose p {
  margin: 0 0 1.15rem;
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.75;
}
.prose h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.9rem;
  color: var(--ink);
  margin: 2.6rem 0 0.9rem;
  line-height: 1.2;
}
.prose h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.12rem;
  color: var(--ink);
  margin: 1.9rem 0 0.6rem;
}
.prose ul,
.prose ol {
  margin: 0 0 1.15rem 1.2rem;
  color: var(--ink-2);
}
.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}
.prose strong {
  color: var(--ink);
  font-weight: 500;
}
.prose a {
  color: var(--slate);
}
.prose a.btn {
  color: var(--paper);
}
.prose a.btn:hover {
  color: #fff;
}
.prose blockquote {
  border-left: 3px solid var(--slate);
  padding: 0.4rem 0 0.4rem 1.4rem;
  margin: 1.8rem 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}
.prose blockquote p {
  color: var(--ink);
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}
.table-wrap {
  overflow-x: auto;
  margin: 1.6rem 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 520px;
}
.prose th {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--stone);
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
.prose td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: top;
}

/* article layout: sticky glass table of contents beside the prose */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.toc {
  display: none;
}
@media (min-width: 1100px) {
  .article-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .toc {
    display: block;
    position: sticky;
    top: 110px;
    background: rgba(250, 248, 244, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.3rem 1.4rem;
  }
}
.toc-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.8rem;
}
.toc a {
  display: block;
  font-size: 0.86rem;
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.32rem 0 0.32rem 0.9rem;
  border-left: 2px solid var(--line);
  line-height: 1.35;
}
.toc a:hover {
  color: var(--ink);
}
.toc a.active {
  color: var(--slate);
  border-left-color: var(--slate);
  font-weight: 500;
}

/* draft chip for placeholder resources */
.draft-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  border: 1px dashed var(--stone);
  border-radius: 999px;
  padding: 0.26rem 0.85rem;
  margin-bottom: 1rem;
}

/* ---------- reveal on scroll ----------
   Hidden-then-revealed ONLY when JS is running (html.js). Without
   JavaScript every section is simply visible — the site is fully
   functional as plain static files. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- no-JS fallbacks ---------- */
html:not(.js) .story-open {
  display: none;
} /* modals need JS; cards already summarize */

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .service-block {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 960px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 24px 1.2rem;
  }
  .nav-links a {
    padding: 0.65rem 0;
    width: 100%;
  }
  .nav-links a.btn-nav {
    margin-top: 0.8rem;
    width: auto;
    padding: 0.55rem 1.1rem;
  }
  body.nav-open .nav-links {
    display: flex;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    width: 42px;
    height: 38px;
    cursor: pointer;
    color: var(--ink);
  }
  /* without JS the menu can't toggle, so keep it expanded */
  html:not(.js) .nav-links {
    display: flex;
    position: static;
    border-bottom: none;
    padding: 0.2rem 0 1rem;
  }
  html:not(.js) .nav-toggle {
    display: none;
  }
  html:not(.js) .nav-row {
    height: auto;
    flex-wrap: wrap;
    padding: 0.8rem 0 0;
  }
}
@media (max-width: 720px) {
  .hero {
    min-height: calc(100svh - 68px);
    padding: 4.5rem 0 3.5rem;
  }
  .hero-home {
    padding-bottom: 2rem;
  }
  .hero-home-proof {
    margin-top: 2rem;
  }
  .section {
    padding: 4rem 0;
  }
  .stats-row,
  .stats-row.cols3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat:nth-child(2) {
    border-right: none;
  }
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .dark .stat:nth-child(-n + 2) {
    border-color: var(--night-line);
  }
  .cols-2,
  .cols-3,
  .cols-4,
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .step {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- article share + mid-essay CTA ---------- */
.article-share-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.4rem;
  flex-wrap: wrap;
}
.share-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.share-icon-btn svg {
  width: 1rem;
  height: 1rem;
  display: block;
}
.share-icon-btn:hover {
  background: var(--paper-2);
  border-color: var(--stone);
  color: var(--ink);
}
.share-icon-btn.is-copied {
  border-color: var(--slate);
  color: var(--slate);
}

.inline-cta {
  margin: 2.2rem 0;
  padding: 1.8rem 1.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  text-align: left;
}
.inline-cta-kicker {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.inline-cta-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.25;
  color: var(--ink);
  margin-top: 0.7rem;
}
.inline-cta-copy {
  margin-top: 0.7rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink-2);
}
.inline-cta .btn {
  margin-top: 1.3rem;
}
@media (max-width: 720px) {
  .inline-cta {
    padding: 1.3rem 1.15rem;
    margin: 1.5rem 0;
  }
  .inline-cta-title {
    font-size: 1.2rem;
  }
  .inline-cta .btn {
    width: 100%;
    text-align: center;
  }
}

/* ---------- HubSpot contact embed ---------- */
.contact-form-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  max-width: 680px;
  width: 100%;
}
.contact-form-wrap .hs-form-frame,
.contact-form-wrap .hs-form-frame iframe {
  width: 100% !important;
  max-width: 100% !important;
}
.hs-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 0;
}
.hs-spinner {
  height: 36px;
  width: 36px;
  border-radius: 999px;
  border: 3px solid var(--line);
  border-top-color: var(--slate);
  animation: hs-spin 0.8s linear infinite;
}
@keyframes hs-spin {
  to {
    transform: rotate(360deg);
  }
}
.hs-form-note {
  font-size: 0.82rem;
  color: var(--stone);
  margin-top: 1.25rem;
  text-align: center;
}
@media (max-width: 720px) {
  .contact-form-wrap {
    padding: 1.25rem;
  }
}

/* ---------- resources featured card ---------- */
.featured-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.featured-label::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--slate);
}
.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-height: 360px;
}
.featured-card-img {
  background: #faf7f0;
  min-height: 260px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.featured-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.featured-card-body {
  padding: 2rem 2.1rem;
  display: flex;
  flex-direction: column;
}
.featured-card-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 1rem;
  letter-spacing: -0.015em;
}
.featured-card-body .featured-excerpt {
  font-size: 0.98rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 1.4rem;
  flex: 1;
}
.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}
.meta-pill {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .featured-card-img {
    min-height: 220px;
    aspect-ratio: 16/9;
  }
  .featured-card-body {
    padding: 1.5rem 1.35rem;
  }
}
