/* ==========================================================================
   CorrosaLab — "Deep Water" experience
   Design system for the front-page + guide templates.
   Palette is strictly the Brand Guideline V3 palette + its documented
   tint/shade ramps. Type: Fraunces (display) / DM Sans (body) /
   Space Grotesk (technical labels).
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/Fraunces-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/Fraunces-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('../fonts/DMSans-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 100 1000;
  font-display: swap;
  src: url('../fonts/DMSans-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/SpaceGrotesk-normal.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  /* Brand Guideline V3 */
  --midnight: #0A525E;
  --abyss: #083E47;
  --ink: #191919;
  --sea: #07BEB8;
  --sea-bright: #39CBC6;
  --sea-soft: #6AD8D4;
  --sea-deep: #058F8A;
  --gold: #F7CE69;
  --flash: #F0F0F0;
  --pale: #CEDCDF;
  --mist: #9DBABF;
  --slate: #3B757E;
  --haze: #6C979E;

  /* Derived surfaces (shades of brand primaries, per guideline ramps) */
  --deep-0: #061418;   /* darkest: ink x abyss */
  --deep-1: #0A2328;
  --deep-2: #0E3038;
  --paper: #F4F2EC;    /* flash white warmed a touch for editorial sections */

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-label: 'Space Grotesk', 'SF Mono', monospace;

  --text-on-dark: #E8F1F0;
  --text-dim-dark: #AFC9C7;
  --text-on-light: #191919;
  --text-dim-light: #3E4A4C;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --maxw: 1440px;
  --radius: 20px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Base ---------- */
.cx-body {
  margin: 0;
  background: var(--deep-0);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
.cx-body *, .cx-body *::before, .cx-body *::after { box-sizing: border-box; }
.cx-body img { max-width: 100%; height: auto; display: block; }
.cx-body ::selection { background: var(--gold); color: var(--ink); }

/* Readable, unmissable links — a core fix requested for this redesign */
.cx-body a {
  color: inherit;
  text-decoration: none;
}
.cx-body .cx-prose a, .cx-body .cx-link {
  color: var(--sea-bright);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--gold) 75%, transparent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
  transition: color .25s var(--ease-out), text-decoration-color .25s var(--ease-out);
}
.cx-body .cx-prose a:hover, .cx-body .cx-link:hover { color: var(--gold); text-decoration-color: var(--gold); }
.cx-body .cx-light .cx-prose a, .cx-body .cx-light .cx-link { color: var(--midnight); }
.cx-body .cx-light .cx-prose a:hover, .cx-body .cx-light .cx-link:hover { color: var(--sea-deep); text-decoration-color: var(--sea-deep); }
.cx-body a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}
.cx-skip {
  position: fixed;
  top: .75rem;
  left: var(--gutter);
  z-index: 4000;
  padding: .7rem 1rem;
  border-radius: 8px;
  background: var(--gold);
  color: var(--ink) !important;
  font-family: var(--font-label);
  font-size: .78rem;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform .2s;
}
.cx-skip:focus { transform: translateY(0); }

.cx-container {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

/* ---------- Typography helpers ---------- */
.cx-eyebrow {
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sea-bright);
  display: inline-flex;
  align-items: center;
  gap: 0.85em;
  margin: 0 0 1.4rem;
}
.cx-eyebrow::before {
  content: '';
  width: 2.4em;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.cx-light .cx-eyebrow { color: var(--slate); }

.cx-display {
  font-family: var(--font-display);
  font-weight: 380;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0;
}
.cx-display em {
  font-style: normal;
  font-weight: 620;
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: .07em;
  text-underline-offset: .14em;
  text-decoration-skip-ink: none;
}
.cx-light .cx-display em { color: inherit; text-decoration-color: var(--sea); }

.cx-h2 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); }
.cx-h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-family: var(--font-display); font-weight: 450; line-height: 1.15; margin: 0; }

.cx-lede {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.75;
  color: var(--text-dim-dark);
  max-width: 34em;
}
.cx-light .cx-lede { color: var(--text-dim-light); }

/* ---------- Grain overlay ---------- */
.cx-grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 2000;
  opacity: .032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: cx-grain-shift 14s steps(5) infinite;
}
@keyframes cx-grain-shift {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-2%,3%); }
  40% { transform: translate(3%,-2%); }
  60% { transform: translate(-3%,-3%); }
  80% { transform: translate(2%,2%); }
}

/* ---------- Header ---------- */
.cx-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  transition: transform .5s var(--ease-out), background .4s, box-shadow .4s;
}
.cx-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem var(--gutter);
  max-width: var(--maxw);
  margin-inline: auto;
}
.cx-header.is-scrolled {
  background: color-mix(in srgb, var(--deep-0) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(240,240,240,.08);
}
.cx-header.is-hidden { transform: translateY(-100%); }
.cx-header.is-hidden:focus-within { transform: translateY(0); }

.cx-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
}
.cx-brand img { width: 40px; height: 40px; }
.cx-brand .lab { color: var(--sea-bright); }

.cx-nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.4rem); }
.cx-nav__link {
  position: relative;
  font-family: var(--font-label);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim-dark);
  padding: .4rem 0;
  transition: color .25s;
}
.cx-nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease-out);
}
.cx-nav__link:hover, .cx-nav__link:focus-visible { color: var(--flash); }
.cx-nav__link.is-active { color: var(--flash); }
.cx-nav__link:hover::after, .cx-nav__link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}
.cx-nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Buttons ---------- */
.cx-btn {
  --btn-bg: var(--gold);
  --btn-fg: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: .7em;
  padding: 1em 1.9em;
  border-radius: 100px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-label);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: color .3s var(--ease-out), border-color .3s, transform .3s var(--ease-out), box-shadow .3s;
}
.cx-btn:not(.cx-btn--ghost) { color: var(--ink) !important; }
.cx-btn .cx-btn__label { position: relative; z-index: 2; }
.cx-btn .cx-btn__arrow { position: relative; z-index: 2; transition: transform .3s var(--ease-out); }
.cx-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sea);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .45s var(--ease-out);
}
.cx-btn:hover::before, .cx-btn:focus-visible::before { transform: translateY(0); }
.cx-btn:hover, .cx-btn:focus-visible { color: var(--ink); box-shadow: 0 12px 32px -12px rgba(7,190,184,.55); }
.cx-btn:hover .cx-btn__arrow { transform: translateX(4px); }

.cx-btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--flash);
  border-color: rgba(240,240,240,.25);
}
.cx-btn--ghost::before { background: var(--gold); }
.cx-btn--ghost:hover, .cx-btn--ghost:focus-visible { color: var(--ink); border-color: var(--gold); box-shadow: 0 12px 32px -12px rgba(247,206,105,.5); }

.cx-light .cx-btn--ghost { --btn-fg: var(--midnight); border-color: rgba(10,82,94,.35); }

/* ---------- Hero ---------- */
.cx-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Top padding keeps content clear of the fixed header when the stack
     outgrows a short viewport (content is bottom-anchored, so on tall
     screens this padding is invisible). */
  padding-top: clamp(5.75rem, 12svh, 7.5rem);
  padding-bottom: clamp(3rem, 7vh, 6rem);
  isolation: isolate;
  overflow: hidden;
}
.cx-hero__canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: linear-gradient(145deg, #061418 18%, #083E47 62%, #0A2328 100%);
}
/* Scoped under __canvas so the global `.cx-body img { height: auto }` reset
   can never win the cascade: with height:auto a replaced element ignores
   `inset: 0` and collapses to its intrinsic aspect height, which left the
   bottom of the hero as bare gradient on phones. */
.cx-hero__canvas .cx-hero__still,
.cx-hero__canvas .cx-hero__loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% 42%;
}
.cx-motion .cx-hero__still { animation: cx-hero-drift 30s var(--ease-soft) infinite alternate; }
@keyframes cx-hero-drift {
  from { transform: scale(1.05) translate(1.2%, 0.4%); }
  to   { transform: scale(1.12) translate(-1.2%, -0.6%); }
}
.cx-hero__loop {
  opacity: 0;
  transition: opacity 1.4s var(--ease-out);
}
.cx-hero__loop.is-playing { opacity: 1; }
.cx-hero__canvas:has(.cx-hero__loop.is-playing) .cx-hero__still { animation-play-state: paused; }
.cx-hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6,20,24,.82) 0%, rgba(6,20,24,.25) 42%, rgba(6,20,24,.05) 62%, rgba(6,20,24,.88) 100%);
  pointer-events: none;
}
.cx-hero__content { position: relative; }
.cx-hero__title {
  font-size: clamp(3rem, 8.2vw, 7.4rem);
  max-width: 11.5em;
  color: var(--flash);
  text-wrap: balance;
}
.cx-hero__title .line { display: block; overflow: hidden; }
.cx-hero__title .line > span { display: inline-block; }
.cx-hero__sub {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}
.cx-hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.cx-hero__scroll {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(3rem, 7vh, 6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  font-family: var(--font-label);
  font-size: .68rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--text-dim-dark);
  writing-mode: vertical-rl;
}
.cx-hero__scroll::after {
  content: '';
  width: 1px;
  height: 4.5rem;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: cx-drip 2.4s var(--ease-soft) infinite;
}
@keyframes cx-drip {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Marquee ---------- */
.cx-trust {
  position: relative;
  padding: 2.4rem 0;
  border-top: 1px solid rgba(240,240,240,.07);
  border-bottom: 1px solid rgba(240,240,240,.07);
  background: var(--deep-1);
  overflow: hidden;
}
.cx-trust__label {
  text-align: center;
  font-family: var(--font-label);
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: .68rem;
  color: var(--text-dim-dark);
  margin: 0 0 1.6rem;
}
.cx-marquee { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.cx-marquee__track {
  display: flex;
  align-items: center;
  gap: clamp(3rem, 7vw, 6.5rem);
  padding-right: clamp(3rem, 7vw, 6.5rem);
  flex-shrink: 0;
  animation: cx-marquee 30s linear infinite;
}
.cx-marquee:hover .cx-marquee__track { animation-play-state: paused; }
@keyframes cx-marquee { to { transform: translateX(-100%); } }
.cx-marquee img {
  height: 34px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .55;
  transition: opacity .3s;
}
.cx-marquee img:hover { opacity: 1; }
/* Logos exported with heavy internal padding need a larger box to read */
.cx-marquee img.lg-pad { height: 110px; margin: -38px 0; }
.cx-marquee img.lg-sm { height: 40px; }

/* ---------- Manifesto (light editorial) ---------- */
.cx-light {
  background: var(--paper);
  color: var(--text-on-light);
}
.cx-manifesto {
  position: relative;
  padding: clamp(6rem, 13vh, 11rem) 0;
  overflow: hidden;
}
.cx-manifesto__bg {
  position: absolute;
  inset: 0;
  opacity: .55;
  pointer-events: none;
}
.cx-manifesto__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}
.cx-manifesto__text {
  position: relative;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.9vw, 3.6rem);
  line-height: 1.28;
  max-width: 24em;
  margin: 0;
}
.cx-manifesto__text .w {
  color: var(--midnight);
  transition: color .4s var(--ease-out);
}
.cx-motion .cx-manifesto__text .w { color: var(--mist); }
.cx-manifesto__text .w.is-lit { color: var(--midnight); }
.cx-manifesto__text .w.is-gold.is-lit { color: var(--midnight); font-style: normal; font-weight: 650; text-decoration: underline var(--sea) .08em; text-underline-offset: .12em; }
.cx-manifesto__sig {
  position: relative;
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-label);
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--slate);
}
.cx-manifesto__sig img { width: 34px; height: 34px; }

/* ---------- Problems (light; elaborates the manifesto's promise) ---------- */
.cx-problems { padding: clamp(1rem, 4vh, 3rem) 0 clamp(4.8rem, 10vh, 7.5rem); }
.cx-problems__head { max-width: 44em; margin-bottom: clamp(2.6rem, 6vh, 4.4rem); }
.cx-problems__head .cx-lede { margin-top: 1.4rem; }
.cx-problems__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.2rem, 2vw, 2rem); }
.cx-problem {
  border-radius: var(--radius);
  padding: 2.2rem 2rem 2.4rem;
  background: linear-gradient(135deg, #FBFAF6, #EAF2F1);
  border: 1px solid rgba(10,82,94,.14);
  box-shadow: 0 24px 48px -36px rgba(8,62,71,.45);
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.cx-problem:hover { transform: translateY(-5px); box-shadow: 0 30px 50px -30px rgba(8,62,71,.4); }
.cx-problem__glyph { width: 52px; height: 52px; color: var(--sea-deep); margin-bottom: 1.4rem; }
.cx-problem__glyph svg { width: 100%; height: 100%; }
.cx-problem h3 { font-size: clamp(1.35rem, 1.8vw, 1.6rem); color: var(--midnight); margin-bottom: .8rem; }
.cx-problem p { margin: 0; font-size: 1.02rem; line-height: 1.65; color: var(--text-dim-light); }
@media (max-width: 980px) { .cx-problems__grid { grid-template-columns: 1fr; } }

/* ---------- Services ---------- */
.cx-services { padding: clamp(4.8rem, 10vh, 7.5rem) 0; background: var(--deep-0); position: relative; overflow: hidden; }
.cx-services__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(3rem, 6vh, 5rem); }
.cx-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2vw, 2rem);
}
@media (max-width: 980px) { .cx-cards { grid-template-columns: 1fr; } }
.cx-card {
  position: relative;
  border-radius: var(--radius);
  padding: 2.6rem 2.2rem 2.4rem;
  background: linear-gradient(160deg, var(--deep-2) 0%, var(--deep-1) 60%);
  border: 1px solid rgba(240,240,240,.08);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color .35s, box-shadow .35s;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.cx-card__pattern {
  position: absolute;
  inset: auto -12% -18% -12%;
  height: 55%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%);
  mask-image: linear-gradient(180deg, transparent, #000 60%);
}
.cx-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(7,190,184,.14), transparent 42%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.cx-card:hover::before { opacity: 1; }
.cx-card:hover { border-color: rgba(7,190,184,.35); box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.cx-card__num {
  font-family: var(--font-label);
  font-size: .8rem;
  letter-spacing: .3em;
  color: var(--gold);
  margin-bottom: 2.6rem;
}
.cx-card__glyph { height: 64px; width: 64px; margin-bottom: 1.6rem; color: var(--sea-bright); }
.cx-card__glyph svg { width: 100%; height: 100%; }
.cx-card h3 { color: var(--flash); margin-bottom: .9rem; }
.cx-card p { color: var(--text-dim-dark); margin: 0 0 1.8rem; font-size: 1.02rem; }
.cx-card .cx-link { margin-top: auto; font-family: var(--font-label); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; }

/* ---------- Audience (who we support; deep-1 band after services) ---------- */
.cx-audience {
  padding: clamp(4.8rem, 10vh, 7.5rem) 0;
  background: radial-gradient(900px 420px at 85% -10%, rgba(7,190,184,.12), transparent 60%), var(--deep-1);
  border-top: 1px solid rgba(240,240,240,.07);
  border-bottom: 1px solid rgba(240,240,240,.07);
}
.cx-audience__head { max-width: 52em; margin-bottom: clamp(2.6rem, 6vh, 4.4rem); }
.cx-audience__head .cx-lede { margin-top: 1.4rem; }
.cx-audience__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.2rem, 2vw, 2rem); }
.cx-persona {
  border-radius: var(--radius);
  padding: 2.2rem 2.2rem 2.4rem;
  background: linear-gradient(160deg, var(--deep-2) 0%, var(--deep-1) 70%);
  border: 1px solid rgba(240,240,240,.08);
  overflow: hidden;
  transition: border-color .35s, transform .35s var(--ease-out);
}
.cx-persona:hover { border-color: rgba(7,190,184,.35); transform: translateY(-4px); }
.cx-persona__glyph { width: 46px; height: 46px; color: var(--sea-bright); margin-bottom: 1.3rem; }
.cx-persona__glyph svg { width: 100%; height: 100%; }
.cx-persona h3 { font-size: clamp(1.35rem, 1.8vw, 1.7rem); color: var(--flash); margin-bottom: .8rem; }
.cx-persona p { margin: 0; font-size: 1.02rem; line-height: 1.68; color: var(--text-dim-dark); }
@media (max-width: 900px) { .cx-audience__grid { grid-template-columns: 1fr; } }

/* ---------- Process (compact editorial grid) ---------- */
.cx-process { background: var(--paper); padding: clamp(4.8rem, 10vh, 7.5rem) 0; position: relative; }
.cx-process__head { max-width: 40em; margin-bottom: clamp(3rem, 7vh, 6rem); }
.cx-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.cx-steps:focus-visible { outline: 2px solid var(--midnight); outline-offset: 6px; border-radius: var(--radius); }
.cx-step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(70px, 110px) 1fr;
  gap: clamp(1.2rem, 2.4vw, 2.2rem);
  align-items: center;
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3.4vw, 3.2rem);
  min-height: 300px;
  border: 1px solid rgba(10,82,94,.14);
  box-shadow: 0 24px 48px -32px rgba(8,62,71,.45);
  overflow: hidden;
}
.cx-step:nth-child(odd) { background: linear-gradient(135deg, var(--midnight), var(--abyss)); color: var(--text-on-dark); }
.cx-step:nth-child(even) { background: linear-gradient(135deg, #FBFAF6, #EAF2F1); color: var(--text-on-light); }
.cx-step__num {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 7vw, 6rem);
  font-style: normal;
  font-weight: 560;
  line-height: 1;
  opacity: .9;
}
.cx-step:nth-child(odd) .cx-step__num { color: var(--gold); }
.cx-step:nth-child(even) .cx-step__num { color: var(--midnight); }
.cx-step__body h3 { margin-bottom: .7rem; }
.cx-step:nth-child(odd) h3 { color: var(--flash); }
.cx-step__body p { margin: 0; font-size: 1.05rem; line-height: 1.65; }
.cx-step:nth-child(odd) p { color: var(--text-dim-dark); }
.cx-step:nth-child(even) p { color: var(--text-dim-light); }
.cx-step__tag {
  font-family: var(--font-label);
  font-size: .7rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.cx-step:nth-child(odd) .cx-step__tag { color: var(--sea-soft); }
.cx-step:nth-child(even) .cx-step__tag { color: var(--slate); }
.cx-step__art { grid-column: 1 / -1; align-self: stretch; border-radius: 12px; overflow: hidden; position: relative; min-height: 86px; }
.cx-step__art img, .cx-step__art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .cx-steps {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
    scrollbar-color: var(--midnight) transparent;
    padding: .4rem var(--gutter) 1rem;
    margin-inline: calc(-1 * var(--gutter));
  }
  .cx-step {
    flex: 0 0 min(84vw, 360px);
    grid-template-columns: 64px 1fr;
    min-height: 470px;
    position: static;
    scroll-snap-align: start;
  }
  .cx-step__art { min-height: 72px; }
}

/* ---------- Case studies (native grid; no scroll-jacking) ---------- */
.cx-cases { background: var(--deep-0); position: relative; overflow: hidden; }
.cx-cases__pin { padding: clamp(4.8rem, 10vh, 7.5rem) 0; }
.cx-cases__head { margin-bottom: 3rem; display:flex; flex-wrap:wrap; justify-content: space-between; align-items:flex-end; gap:2rem; }
.cx-cases__rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.4rem, 2.4vw, 2.4rem);
}
.cx-case {
  min-width: 0;
  border-radius: var(--radius);
  background: var(--deep-1);
  border: 1px solid rgba(240,240,240,.08);
  overflow: hidden;
  transition: border-color .35s, transform .35s var(--ease-out);
}
.cx-case:hover { border-color: rgba(247,206,105,.4); transform: translateY(-6px); }
.cx-case__img { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.cx-case__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.cx-case:hover .cx-case__img img { transform: scale(1.06); }
.cx-case__img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6,20,24,.9));
}
.cx-case__body { padding: 1.6rem 1.8rem 2rem; }
.cx-case__meta { font-family: var(--font-label); font-size: .7rem; letter-spacing: .26em; text-transform: uppercase; color: var(--sea-bright); margin-bottom: .8rem; }
.cx-case h3 { font-size: 1.3rem; color: var(--flash); margin-bottom: .7rem; }
.cx-case p { font-size: .98rem; color: var(--text-dim-dark); margin: 0; }
.cx-case:nth-child(n+4) { grid-column: span 1; }

/* ---------- Testimonials (client voices; light band after cases) ---------- */
.cx-voices { padding: clamp(4.8rem, 10vh, 7.5rem) 0; }
.cx-voices__head { max-width: 44em; margin-bottom: clamp(2.6rem, 6vh, 4rem); }
.cx-voices__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.2rem, 2vw, 2rem); }
.cx-voice {
  margin: 0;
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem 2.2rem;
  background: #FBFAF6;
  border: 1px solid rgba(10,82,94,.12);
  box-shadow: 0 24px 48px -36px rgba(8,62,71,.4);
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.cx-voice:hover { transform: translateY(-5px); box-shadow: 0 30px 50px -30px rgba(8,62,71,.4); }
.cx-voice::before {
  content: '\201C';
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.4rem;
  line-height: .6;
  color: var(--gold);
  margin-bottom: 1.1rem;
}
.cx-voice blockquote {
  margin: 0 0 1.6rem;
  font-family: var(--font-display);
  font-weight: 430;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.45;
  color: var(--midnight);
  text-wrap: pretty;
}
.cx-voice figcaption {
  margin-top: auto;
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--slate);
  display: grid;
  gap: .3rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(10,82,94,.12);
}
.cx-voice figcaption strong { color: var(--midnight); font-weight: 600; }
@media (max-width: 900px) { .cx-voices__grid { grid-template-columns: 1fr; } }

/* ---------- Video quote ---------- */
.cx-quote {
  position: relative;
  min-height: 62vh;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(5rem, 12vh, 9rem) 0;
}
.cx-quote video, .cx-quote .cx-quote__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.cx-quote::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: rgba(6,20,24,.55);
}
.cx-quote blockquote {
  margin: 0;
  max-width: 16em;
  text-align: center;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 420;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.2;
  color: var(--flash);
  text-wrap: balance;
}
.cx-quote blockquote strong { color: inherit; font-weight: 650; text-decoration: underline var(--gold) .08em; text-underline-offset: .14em; text-decoration-skip-ink: none; }
.cx-quote figcaption {
  margin-top: 2rem;
  text-align: center;
  font-family: var(--font-label);
  font-size: .75rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--text-dim-dark);
}

/* ---------- Insights ---------- */
.cx-insights { padding: clamp(4.8rem, 10vh, 7.5rem) 0; }
.cx-insights__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 3rem; }
.cx-insights .cx-cards { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .cx-insights .cx-cards { grid-template-columns: 1fr; } }
.cx-post {
  border-radius: var(--radius);
  overflow: hidden;
  background: #FBFAF6;
  border: 1px solid rgba(10,82,94,.12);
  transition: box-shadow .35s, transform .35s var(--ease-out);
  display: flex;
  flex-direction: column;
}
.cx-post:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -30px rgba(8,62,71,.4); }
.cx-post__img { aspect-ratio: 16/9; overflow: hidden; }
.cx-post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.cx-post:hover .cx-post__img img { transform: scale(1.05); }
.cx-post__body { padding: 1.6rem 1.7rem 2rem; display: flex; flex-direction: column; flex: 1; }
.cx-post__meta { font-family: var(--font-label); font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; color: var(--midnight); margin-bottom: .8rem; }
.cx-post h3 { font-size: 1.22rem; color: var(--ink); margin: 0 0 1.2rem; }
.cx-post .cx-link { margin-top: auto; font-family: var(--font-label); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; }

/* ---------- CTA ---------- */
.cx-cta {
  position: relative;
  padding: clamp(5.5rem, 11vh, 8.5rem) 0;
  background: radial-gradient(1200px 500px at 50% 120%, rgba(7,190,184,.18), transparent 60%), var(--deep-0);
  text-align: center;
  overflow: hidden;
}
.cx-cta .cx-eyebrow { justify-content: center; }
.cx-cta .cx-eyebrow::before { display:none; }
.cx-cta__title {
  font-size: clamp(3rem, 9vw, 7.5rem);
  color: var(--flash);
  margin-bottom: 2.8rem;
}
.cx-cta__orb {
  position: absolute;
  left: 50%;
  bottom: -19vw;
  transform: translateX(-50%);
  width: 46vw;
  max-width: 680px;
  aspect-ratio: 1;
  mix-blend-mode: screen;
  opacity: .9;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 70%);
}

/* ---------- Footer ---------- */
.cx-footer {
  background: var(--deep-1);
  border-top: 1px solid rgba(240,240,240,.08);
  padding: clamp(3.4rem, 7vh, 5.6rem) 0 2.4rem;
  font-size: .98rem;
}
.cx-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: clamp(2rem, 4vw, 4rem);
  margin-bottom: 3.4rem;
}
@media (max-width: 900px) {
  .cx-footer__grid { grid-template-columns: 1fr 1fr; }
  .cx-nav { display: none; }
  .cx-burger { display: block; }
  .cx-header .cx-header__inner > .cx-btn { display: none; }
}
@media (max-width: 560px) {
  .cx-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.25rem; }
  .cx-footer__grid > div:first-child,
  .cx-footer__grid > div:last-child { grid-column: 1 / -1; }
  .cx-footer__bar { font-size: .75rem; }
}
.cx-footer h2 {
  font-family: var(--font-label);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--sea-bright);
  margin: 0 0 1.2rem;
}
.cx-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.cx-footer p { color: var(--text-dim-dark); margin: 1rem 0 0; max-width: 30em; }
.cx-footer__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(240,240,240,.07);
  color: var(--text-dim-dark);
  font-size: .85rem;
}

/* ---------- Reveal primitives (JS adds .is-in) ---------- */
.cx-reveal { opacity: 1; transform: none; }
.cx-motion .cx-reveal { opacity: 0; transform: translateY(28px); transition: opacity .75s var(--ease-out), transform .75s var(--ease-out); }
.cx-reveal.is-in { opacity: 1; transform: none; }
.cx-reveal[data-delay="1"] { transition-delay: .12s; }
.cx-reveal[data-delay="2"] { transition-delay: .24s; }
.cx-reveal[data-delay="3"] { transition-delay: .36s; }

/* ---------- Preloader ---------- */
.cx-loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: var(--deep-0);
  transition: opacity .7s var(--ease-out), visibility .7s;
  animation: cx-loader-failsafe .01s 4s forwards;
}
.cx-loader.is-done { opacity: 0; visibility: hidden; }
.cx-loader__mark { width: 76px; height: 76px; animation: cx-breathe 1.6s var(--ease-soft) infinite; }
@keyframes cx-breathe {
  0%,100% { transform: scale(1); opacity: .85; }
  50% { transform: scale(1.12); opacity: 1; }
}
@keyframes cx-loader-failsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cx-body *, .cx-body *::before, .cx-body *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .cx-reveal { opacity: 1; transform: none; }
  .cx-hero__still { animation: none !important; }
  .cx-hero__loop { display: none; }
  .cx-manifesto__text .w { color: var(--midnight); }
  .cx-step { position: static; }
}

/* ---------- Mobile menu ---------- */
.cx-burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(240,240,240,.25);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.cx-burger span, .cx-burger::before, .cx-burger::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: var(--flash);
  transition: transform .35s var(--ease-out), opacity .25s, top .35s var(--ease-out);
}
.cx-burger::before { top: 16px; }
.cx-burger span { top: 21px; }
.cx-burger::after { top: 26px; }
.cx-burger[aria-expanded="true"]::before { top: 21px; transform: rotate(45deg); }
.cx-burger[aria-expanded="true"] span { opacity: 0; }
.cx-burger[aria-expanded="true"]::after { top: 21px; transform: rotate(-45deg); }

.cx-mobmenu {
  position: fixed;
  inset: 0;
  z-index: 890;
  background: color-mix(in srgb, var(--deep-0) 96%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  display: grid;
  place-items: start center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(6.5rem, 16vh, 9rem) var(--gutter) 3rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease-out), visibility .4s;
}
.cx-mobmenu.is-open { opacity: 1; visibility: visible; }
.cx-menu-open .cx-brand { pointer-events: none; }
.cx-mobmenu nav { display: grid; gap: 1.6rem; width: min(100%, 32rem); margin-inline: auto; text-align: center; }
.cx-mobmenu a:not(.cx-btn) {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  color: var(--flash);
  transition: color .25s;
}
.cx-mobmenu a:not(.cx-btn):hover { color: var(--gold); }
.cx-mobmenu .cx-btn { justify-self: center; margin-top: 1rem; }

/* ---------- Case rail progress ---------- */
.cx-cases__bar {
  display: none;
}
.cx-cases__bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--sea), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .cx-nav { display: none; }
  .cx-burger { display: block; }
  .cx-header .cx-header__inner > .cx-btn { display: none; }
  .cx-hero__scroll { display: none; }
  .cx-hero__title { font-size: clamp(2.5rem, 11.5vw, 3.4rem); }
  .cx-hero__still { object-position: 72% 30%; }
  .cx-hero__loop { display: none; }
  .cx-grain { display: none; }
  .cx-services .cx-cards,
  .cx-insights .cx-cards,
  .cx-cases__rail {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    /* Snap positions must respect the restored gutter, or the browser's
       initial snap drags the first card flush to the screen edge. */
    scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
    scrollbar-color: var(--sea-deep) transparent;
    padding: .4rem var(--gutter) 1rem;
    margin-inline: calc(-1 * var(--gutter));
  }
  .cx-services .cx-card,
  .cx-insights .cx-post,
  .cx-cases .cx-case {
    flex: 0 0 min(84vw, 390px);
    scroll-snap-align: start;
  }
  .cx-services .cx-card { min-height: 530px; }
  .cx-insights .cx-post { min-height: 430px; }
  .cx-cases .cx-case { min-height: 470px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .cx-cases__rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 901px) {
  .cx-mobmenu { display: none; }
}
