/* ---------------- Home density overrides ---------------- */
/* Tighter vertical pacing — scoped to this page only */
:root {
  --pad-section-y: clamp(28px, 4.5vw, 64px);
  --stack-lg: clamp(24px, 3vw, 40px);
}

/* ---------------- Home-specific ---------------- */


/* Hero — MARQUEE variant */
.hero-marquee-inner {
  padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 4vw, 60px);
  position: relative;
}
.hero-marquee-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: 0 var(--pad-gutter);
  margin-bottom: clamp(40px, 6vw, 80px);
}
.hero-eyebrow-cluster {
  max-width: 320px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.7;
  color: var(--fg-muted);
}
.hero-eyebrow-cluster strong {
  color: var(--fg);
  font-weight: 500;
}
.hero-supertitle {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: flex;
  gap: 12px;
  align-items: center;
}
.hero-supertitle .tag {
  border: 1px solid var(--rule);
  padding: 4px 10px;
  border-radius: 999px;
}
.hero-headline {
  padding: 0 var(--pad-gutter);
  font-size: clamp(60px, 13vw, 240px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  margin: 0;
}
.hero-headline em {
  font-style: italic;
  color: var(--accent);
}
.hero-headline .stroke {
  -webkit-text-stroke: 1.5px var(--fg);
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-cap {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: flex-end;
  padding: clamp(40px, 5vw, 72px) var(--pad-gutter) 0;
}
.hero-cap-desc {
  max-width: 460px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-muted);
}
.hero-cap-desc strong { color: var(--fg); font-weight: 500; }
.hero-cap-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Headline swap variants */
html[data-headline="v1"] .hl-v1 { display: inline; }
html[data-headline="v2"] .hl-v2 { display: inline; }
html[data-headline="v3"] .hl-v3 { display: inline; }
.hl-v1, .hl-v2, .hl-v3 { display: none; }

/* Hero — SPLIT variant */
#hero-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  min-height: 56vh;
  padding-top: 0;
  padding-bottom: 0;
}
.split-left {
  padding: clamp(28px, 4vw, 56px) var(--pad-gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(20px, 2.5vw, 32px);
}
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.hero-btns .btn {
  padding: 16px 28px;
  font-size: 13px;
  letter-spacing: 0.12em;
}
.hero-desc {
  display: block;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 460px;
  margin: 0;
}
.split-right {
  background: var(--fg);
  position: relative;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.split-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('media/optimized/home-cover.webp');
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0;
}
#hero-split.hero-ready .split-right::before {
  animation: heroImageFadeIn 1400ms cubic-bezier(0.16, 1, 0.3, 1) 80ms both;
}

@keyframes heroImageFadeIn {
  from { opacity: 0; transform: scale(1.08); }
  to   { opacity: 1; transform: scale(1); }
}

#hero-split .split-headline,
#hero-split .hero-desc,
#hero-split .hero-btns {
  opacity: 0;
  transform: translateY(18px);
  animation: heroCopyIn 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
#hero-split .split-headline { animation-delay: 80ms; }
#hero-split .hero-desc { animation-delay: 180ms; }
#hero-split .hero-btns { animation-delay: 280ms; }

.split-right::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, color-mix(in oklch, var(--fg) 20%, transparent), transparent 38%),
    linear-gradient(180deg, transparent 62%, color-mix(in oklch, var(--fg) 24%, transparent));
  opacity: 0;
  pointer-events: none;
}
#hero-split.hero-ready .split-right::after {
  animation: heroImageTone 900ms cubic-bezier(0.16, 1, 0.3, 1) 160ms both;
}

@keyframes heroCopyIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroImageTone {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@media (max-width: 768px) {
  #hero-split { grid-template-columns: 1fr; min-height: auto; }
  .split-right { min-height: clamp(360px, 80vw, 480px); }
}

/* ── Hero Card Cluster — polaroid scatter ── */
.hero-star {
  position: relative;
  z-index: 2;
  width: 560px;
  height: 660px;
  flex-shrink: 0;
  margin-top: 60px;
}

@keyframes hsc-drop {
  from {
    opacity: 0;
    transform: rotate(var(--rot)) translateY(-40px) scale(0.88);
  }
  to {
    opacity: 1;
    transform: rotate(var(--rot)) translateY(0);
  }
}

.hsc {
  position: absolute;
  background: #F5F3EE;
  border-radius: 1px;
  box-sizing: border-box;
  --rot: 0deg;
  --drop-delay: 0ms;
  padding: 9px 9px 38px;
  transform: rotate(var(--rot));
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s ease;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.28),
    0 10px 32px rgba(0,0,0,0.22),
    0 1px 2px rgba(0,0,0,0.14);
  opacity: 0;
  overflow: hidden;
}
#hero-split.hero-ready .hsc {
  animation: hsc-drop 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--drop-delay);
}
#hero-split.hero-ready .hsc:not(.hsc-brand) {
  animation: none;
  transform: translate(var(--fly-x, 0px), var(--fly-y, 0px))
             rotate(var(--rot))
             scale(0.4);
  opacity: 0;
}

.hsc:hover {
  transform: rotate(calc(var(--rot) * 0.15)) translateY(-18px) scale(1.07);
  z-index: 50 !important;
  box-shadow:
    0 8px 20px rgba(0,0,0,0.28),
    0 24px 60px rgba(0,0,0,0.22);
}

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

.hsc-label {
  position: absolute;
  bottom: 11px;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(15,10,5,0.38);
  pointer-events: none;
}

/* Scattered positions — big rotations, heavy overlap, all within container */
.hsc-pa   { width: 162px; height: 198px; top: -5px;  left: 0px;   --rot: -13deg; z-index: 2; }
.hsc-st   { width: 148px; height: 184px; top: 20px;  left: 238px; --rot: 17deg;  z-index: 3; }
.hsc-wide { width: 178px; height: 216px; top: 18px;  left: 92px;  --rot: -8deg;  z-index: 4; }
.hsc-bt   { width: 188px; height: 228px; top: 0px;   left: 312px; --rot: 10deg;  z-index: 4; }
.hsc-logo { width: 158px; height: 194px; top: 198px; left: 60px;  --rot: -19deg; z-index: 3; }
.hsc-brand { width: 188px; height: 228px; top: 165px; left: 215px; --rot: -3deg;  z-index: 6; }

.hsc-sq4  { width: 142px; height: 176px; top: 172px; left: 390px; --rot: 13deg;  z-index: 2; }
.hsc-pb   { width: 162px; height: 198px; top: 360px; left: 292px; --rot: -9deg;  z-index: 3; }
.hsc-sqa  { width: 155px; height: 190px; top: 400px; left: 40px;  --rot: 16deg;  z-index: 2; }
.hsc-sq3  { width: 170px; height: 208px; top: 412px; left: 168px; --rot: -6deg;  z-index: 3; }
.hsc-sqb  { width: 140px; height: 172px; top: 432px; left: 408px; --rot: 8deg;   z-index: 1; }

/*
  Collapse vectors — offset from each card's natural position to the brand card centre.
  Brand card centre inside .hero-star ≈ (276px, 279px).
  Each vector = brand_centre − card_centre, so adding it moves the card onto the brand card.
*/
.hsc-pa   { --fly-x:  195px; --fly-y:  185px; --fly-delay:   0ms; }
.hsc-st   { --fly-x:  -36px; --fly-y:  167px; --fly-delay:  40ms; }
.hsc-wide { --fly-x:   95px; --fly-y:  153px; --fly-delay:  20ms; }
.hsc-bt   { --fly-x: -130px; --fly-y:  165px; --fly-delay:  10ms; }
.hsc-logo { --fly-x:  191px; --fly-y:  -16px; --fly-delay:  60ms; }
.hsc-sq4  { --fly-x: -185px; --fly-y:   19px; --fly-delay:  50ms; }
.hsc-pb   { --fly-x:  -97px; --fly-y: -180px; --fly-delay:  80ms; }
.hsc-sqa  { --fly-x:  158px; --fly-y: -216px; --fly-delay:  90ms; }
.hsc-sq3  { --fly-x:   23px; --fly-y: -237px; --fly-delay:  70ms; }
.hsc-sqb  { --fly-x: -202px; --fly-y: -239px; --fly-delay: 100ms; }

/* Default: non-brand cards sit collapsed on top of the brand card */
.hsc:not(.hsc-brand) {
  animation: none;
  transform: translate(var(--fly-x, 0px), var(--fly-y, 0px))
             rotate(var(--rot))
             scale(0.4);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.6s ease;
  transition-delay: var(--fly-delay, 0ms);
}

/* .is-expanded is controlled by JS so the stack can fan out and collapse deliberately */
.hero-star.is-expanded .hsc:not(.hsc-brand) {
  transform: rotate(var(--rot));
  opacity: 1;
  pointer-events: auto;
}
#hero-split.hero-ready .hero-star.is-expanded .hsc:not(.hsc-brand) {
  transform: rotate(var(--rot));
  opacity: 1;
  pointer-events: auto;
}
#hero-split.hero-ready .hero-star.is-expanded .hsc:not(.hsc-brand):hover {
  transform: rotate(calc(var(--rot) * 0.15)) translateY(-18px) scale(1.07);
}

.hero-star.is-expanded .hsc-brand {
  transform: rotate(0deg) scale(1) translateY(-8px);
  z-index: 30 !important;
  overflow: hidden;
  box-shadow:
    0 12px 32px rgba(0,0,0,0.32),
    0 32px 80px rgba(0,0,0,0.24);
}

/* ── Brand card ripple on entry ── */
@keyframes brand-pulse {
  0%   { box-shadow: 0 2px 6px rgba(0,0,0,0.28), 0 10px 32px rgba(0,0,0,0.22), 0 0 0 0px  rgba(147,169,210,0.55); }
  100% { box-shadow: 0 2px 6px rgba(0,0,0,0.28), 0 10px 32px rgba(0,0,0,0.22), 0 0 0 22px rgba(147,169,210,0);   }
}

/* Brand card: bigger on load, ripple plays 3× after drop-in */
.hsc-brand {
  overflow: visible;
  transform: rotate(var(--rot)) scale(1.1);
  animation: hsc-drop 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards,
             brand-pulse 1.3s ease-out 1.1s 3;
}

.hsc-brand .hsc-label { bottom: 11px; }


@media (prefers-reduced-motion: reduce) {
  .hsc { transition: none; animation: none; opacity: 1; }
  .hsc:not(.hsc-brand) { transition: none; }
  .hsc-brand { animation: none; }
  .hsc-brand::after { animation: none; opacity: 0.55; }
  .hero-star.is-expanded .hsc:not(.hsc-brand),
  .hero-star.is-expanded .hsc-brand { transition: none; }
}

.split-headline {
  font-family: var(--font-serif);
  font-size: clamp(56px, 8vw, 92px);
  line-height: 1.05;
  letter-spacing: normal;
}
.split-headline em { font-style: italic; color: var(--accent); }

/* Hero — TYPE variant */
#hero-type {
  min-height: 92vh;
  padding: clamp(60px, 8vw, 120px) var(--pad-gutter) clamp(40px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.type-hero-word {
  font-family: var(--font-serif);
  font-size: clamp(80px, 22vw, 420px);
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-align: center;
}
.type-hero-word em {
  font-style: italic;
  color: var(--accent);
}
.type-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding-top: 48px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}

/* Client ticker bar */
.client-bar {
  background: var(--fg);
  color: var(--cream);
  padding: 22px 0;
  overflow: hidden;
}
.client-bar .marquee-track {
  font-family: var(--font-mono);
  font-size: 14px;
  font-style: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  animation-duration: 30s;
}
.client-bar .marquee-track .dot { background: var(--accent); width: 6px; height: 6px; }

/* Logo marquee — continuous right-to-left scroll with hover pause */
.logo-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.logo-marquee-track {
  display: flex;
  width: max-content;
  animation: kaci-logo-marquee 40s linear infinite;
  will-change: transform;
}
.logo-marquee:hover .logo-marquee-track {
  animation-play-state: paused;
}
.logo-marquee-item {
  flex: 0 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
}
@media (min-width: 1024px) {
  .logo-marquee-item {
    height: 64px;
    padding: 0 40px;
  }
}
.logo-marquee-link {
  display: block;
  text-decoration: none;
  border-radius: 12px;
  outline: none;
}
.logo-marquee-link:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.logo-marquee-img {
  display: block;
  height: 48px;
  width: 48px;
  border-radius: 10px;
  object-fit: cover;
  opacity: 0.88;
  transition: opacity 0.4s ease, transform 0.4s ease;
  cursor: pointer;
}
@media (min-width: 1024px) { .logo-marquee-img { height: 60px; width: 60px; border-radius: 12px; } }
.logo-marquee-item:hover .logo-marquee-img { opacity: 1; transform: scale(1.04); }
@keyframes kaci-logo-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .logo-marquee-track { animation: none; }
}

/* Services block */
.services-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: var(--stack-lg);
}
.services-head h2 { font-size: clamp(34px, 4.5vw, 56px); letter-spacing: normal; line-height: 1.08; }
.services-head h2 em {
  font-style: italic;
  color: var(--accent);
  position: relative;
}
.services-head h2 em::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.45s;
}
.services-head.is-visible h2 em::after { transform: scaleX(1); }

.services-list {
  border-top: 1px solid var(--rule);
}
/* Staggered row entrance — one bar at a time */
.services-list .svc-row {
  opacity: 0;
  transform: translateX(-32px);
  transition:
    opacity 0.65s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
}
.services-list.is-visible .svc-row:nth-child(1) { opacity: 1; transform: translateX(0); transition-delay:    0ms; }
.services-list.is-visible .svc-row:nth-child(2) { opacity: 1; transform: translateX(0); transition-delay:  480ms; }
.services-list.is-visible .svc-row:nth-child(3) { opacity: 1; transform: translateX(0); transition-delay:  960ms; }
/* Title slides in 100ms after its row */
.services-list .svc-row .svc-title {
  opacity: 0;
  transform: translateX(-16px);
  transition:
    opacity  0.6s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.services-list.is-visible .svc-row:nth-child(1) .svc-title { opacity: 1; transform: translateX(0); transition-delay:  100ms; }
.services-list.is-visible .svc-row:nth-child(2) .svc-title { opacity: 1; transform: translateX(0); transition-delay:  580ms; }
.services-list.is-visible .svc-row:nth-child(3) .svc-title { opacity: 1; transform: translateX(0); transition-delay: 1060ms; }
/* Description slides in 100ms after its title */
.services-list .svc-row .svc-desc {
  opacity: 0;
  transform: translateX(-16px);
  transition:
    opacity  0.6s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.services-list.is-visible .svc-row:nth-child(1) .svc-desc { opacity: 1; transform: translateX(0); transition-delay:  200ms; }
.services-list.is-visible .svc-row:nth-child(2) .svc-desc { opacity: 1; transform: translateX(0); transition-delay:  680ms; }
.services-list.is-visible .svc-row:nth-child(3) .svc-desc { opacity: 1; transform: translateX(0); transition-delay: 1160ms; }
.svc-row {
  position: relative;
  display: grid;
  grid-template-columns: 60px 1fr 2fr 120px;
  gap: 32px;
  padding: 32px 0 32px 14px;
  border-bottom: none;
  align-items: baseline;
  cursor: pointer;
  transition: background 0.3s ease;
}
/* Bottom rule wipes in left-to-right with the row */
.svc-row::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--rule);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.services-list.is-visible .svc-row:nth-child(1)::after { transform: scaleX(1); transition-delay:    0ms; }
.services-list.is-visible .svc-row:nth-child(2)::after { transform: scaleX(1); transition-delay:  480ms; }
.services-list.is-visible .svc-row:nth-child(3)::after { transform: scaleX(1); transition-delay:  960ms; }
/* Accent left bar — replaces layout-shifting padding with a transform */
.svc-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.svc-row:hover {
  background: color-mix(in oklch, var(--accent) 8%, transparent);
}
.svc-row:hover::before { transform: scaleY(1); }
.svc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
}
.svc-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  position: relative;
  display: inline-block;
}
.svc-title::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 100%; height: 1.5px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.svc-row:hover .svc-title::after { transform: scaleX(1); }
.svc-desc {
  font-size: 15px;
  color: var(--fg-muted);
  max-width: 520px;
  line-height: 1.55;
}
.svc-arrow {
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.3s ease;
}
.svc-row:hover .svc-arrow { transform: translateX(8px); color: var(--accent); }
.svc-row:hover .svc-num { color: var(--accent); transition: color 0.25s ease; }

/* Process section */
.process {
  background: var(--fg);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.process .eyebrow { color: color-mix(in oklch, var(--cream) 60%, transparent); }
.process h2 { color: var(--cream); font-size: clamp(34px, 4.5vw, 56px); letter-spacing: normal; line-height: 1.08; }
.process h2 em { color: var(--accent); font-style: italic; }
.process .rule { background: color-mix(in oklch, var(--cream) 20%, transparent); }

.process-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 60px);
  align-items: stretch;
  margin-bottom: var(--stack-lg);
}
.process-head-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(20px, 2vw, 28px);
}
.process-head-text h2 { margin-bottom: clamp(8px, 1vw, 12px); }
.process-head p {
  color: color-mix(in oklch, var(--cream) 88%, transparent);
  max-width: 440px;
  font-size: 16px;
  line-height: 1.6;
}
.process-head-photo {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid color-mix(in oklch, var(--cream) 14%, transparent);
}
.process-head-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 768px) {
  .process-head { grid-template-columns: 1fr; }
  .process-head-photo { aspect-ratio: 16/10; }
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-left: 1px solid color-mix(in oklch, var(--cream) 20%, transparent);
  position: relative;
}
/* Accent connector line spanning all steps */
.process-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    color-mix(in oklch, var(--accent) 30%, transparent),
    var(--accent) 20%,
    var(--accent) 80%,
    color-mix(in oklch, var(--accent) 30%, transparent)
  );
  z-index: 1;
}
.process-step:last-child { border-right: 0; }
.process-step {
  padding: clamp(28px, 3vw, 44px) clamp(24px, 2.5vw, 36px);
  background: color-mix(in oklch, var(--cream) 8%, var(--fg));
  border-right: 1px solid color-mix(in oklch, var(--cream) 20%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--cream) 20%, transparent);
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  transition:
    background 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0ms,
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms);
}
.process-step:hover {
  background: color-mix(in oklch, var(--accent) 14%, var(--fg));
}

/* Timeline node — accent dot sitting on the connector line */
.process-step::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  z-index: 2;
}

/* Separator arrow — circular badge on each vertical divider */
.process-step:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(50%, -50%);
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  color: color-mix(in oklch, var(--cream) 68%, transparent);
  background: color-mix(in oklch, var(--cream) 8%, var(--fg));
  border: 1px solid color-mix(in oklch, var(--cream) 20%, transparent);
  border-radius: 50%;
  z-index: 2;
}

/* Large display number — Perandory Condensed as visual anchor */
.step-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: color-mix(in oklch, var(--cream) 72%, transparent);
  display: block;
  margin-bottom: 10px;
}
.step-n {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(56px, 6.5vw, 92px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--accent);
  display: block;
  margin-bottom: clamp(20px, 2.5vw, 32px);
  transition: color 0.35s ease;
}
.process-step:hover .step-n {
  color: color-mix(in oklch, var(--accent) 80%, var(--cream));
}

.process-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: clamp(16px, 2vw, 24px);
}
.process-title em {
  font-family: var(--font-serif) !important;
  font-weight: 400 !important;
  font-style: normal !important;
  color: var(--cream);
}
.process-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.65;
  color: color-mix(in oklch, var(--cream) 80%, transparent);
  margin-top: auto;
}

/* Process carousel — drag + prev/next + spring snap */
.process-carousel {
  display: block !important;
  position: relative;
  border-left: 0 !important;
}
.process-carousel::before { display: none; }
.process-carousel .process-step::before,
.process-carousel .process-step::after { display: none; }

.process-viewport {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
}
.process-track {
  display: flex;
  cursor: grab;
  transition: transform 0.58s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  touch-action: pan-y;
  will-change: transform;
}
.process-track.is-dragging {
  transition: none;
  cursor: grabbing;
}
.process-carousel .process-step {
  flex: 0 0 78%;
  min-width: 0;
  pointer-events: auto;
  opacity: 0.28;
  transform: scale(0.94);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.process-carousel .process-step.is-active {
  opacity: 1;
  transform: scale(1);
}
@media (min-width: 768px) {
  .process-carousel .process-step { flex-basis: 52%; }
}
@media (min-width: 1024px) {
  .process-carousel .process-step { flex-basis: 40%; }
}

.process-nav {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}
.process-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--cream) 10%, var(--fg));
  color: var(--cream);
  border: 1px solid color-mix(in oklch, var(--cream) 25%, transparent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 220ms cubic-bezier(0.16, 1, 0.3, 1),
    color 220ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.process-nav-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--fg);
  transform: translateY(-2px);
}
.process-nav-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.process-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.process-nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Work preview */
.work-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: var(--stack-lg);
  gap: 40px;
  flex-wrap: wrap;
}
.work-head h2 { font-size: clamp(34px, 4.5vw, 56px); letter-spacing: normal; line-height: 1.08; }
.work-head h2 em { font-style: italic; color: var(--accent); }
.work-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 24px;
}
.work-card { position: relative; cursor: pointer; }
.work-card .ph {
  aspect-ratio: 4/5;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-card:nth-child(1) .ph { aspect-ratio: 4/5.5; }
@media (max-width: 768px) {
  .work-grid { grid-template-columns: 1fr; }
}
.work-card:hover .ph { transform: scale(0.97); }
/* Hover overlay — gradient darkens from bottom on hover */
.work-card .ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    color-mix(in oklch, var(--fg) 50%, transparent) 0%,
    transparent 58%
  );
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
  pointer-events: none;
}
.work-card:hover .ph::after { opacity: 1; }

.work-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 14px;
  align-items: baseline;
}
.work-meta .title { font-family: var(--font-serif); font-size: 22px; letter-spacing: -0.01em; }
.work-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.work-meta .cat { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-muted); }
.work-meta-arrow {
  font-size: 14px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-card:hover .work-meta-arrow {
  opacity: 1;
  transform: translateX(0);
}
.work-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

/* Editorial work list — replaces the card grid on home */
.work-list {
  border-top: 1px solid var(--rule);
}
.work-row {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(20px, 2.4vw, 32px) clamp(8px, 1.5vw, 20px);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: padding 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease;
}
.work-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}
.work-row:hover::before { opacity: 0.04; }
.work-row > * { position: relative; z-index: 1; }
.work-row:hover {
  padding-left: clamp(16px, 2.4vw, 32px);
}
.work-row-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  flex: 0 0 auto;
}
.work-row-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1.1;
  letter-spacing: normal;
  color: var(--fg);
  flex: 1 1 auto;
}
.work-row-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  flex: 0 0 auto;
  white-space: nowrap;
}
.work-row-arrow {
  font-size: 18px;
  color: var(--fg-muted);
  flex: 0 0 auto;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
}
.work-row:hover .work-row-arrow {
  color: var(--fg);
  transform: translateX(8px);
}
@media (max-width: 600px) {
  .work-row {
    flex-wrap: wrap;
    column-gap: 14px;
    row-gap: 6px;
    padding: 22px 8px;
  }
  .work-row-num { order: 1; }
  .work-row-arrow { order: 2; margin-left: auto; }
  .work-row-title { order: 3; flex-basis: 100%; font-size: 22px; }
  .work-row-cat { order: 4; flex-basis: 100%; }
}

/* Philosophy / pull quote */
.pull {
  padding: var(--pad-section-y) var(--pad-gutter);
  max-width: 1600px;
  margin: 0 auto;
}
.pull blockquote {
  font-family: var(--font-serif);
  font-size: clamp(56px, 8vw, 120px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 1200px;
}
.pull blockquote em { font-style: italic; color: var(--accent); }
.pull .attrib {
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: flex;
  gap: 16px;
  align-items: center;
}
.pull .attrib-dot {
  width: 24px; height: 1px; background: currentColor;
}

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat {
  padding: 40px 28px;
  border-right: 1px solid var(--rule);
}
.stat:last-child { border-right: 0; }
.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.stat-num em { font-style: italic; color: var(--accent); }
.stat-unit { font-size: 0.45em; font-style: normal; letter-spacing: 0; font-family: var(--font-serif); font-weight: 700; }
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}


/* Client Love Letters */
.love {
  background: var(--olive);
  padding: var(--pad-section-y) var(--pad-gutter);
}
.love .eyebrow,
.love-head h2 { color: var(--fg); }
.love-inner { max-width: 1440px; margin: 0 auto; }
.love-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: var(--stack-lg);
}
.love-head h2 { font-size: clamp(34px, 4.5vw, 56px); letter-spacing: normal; line-height: 1.08; }
.love-head h2 em { font-style: italic; color: var(--accent); }
.love-placeholder-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  opacity: 0.7;
  margin-bottom: 16px;
  display: block;
}
/* Marquee wrapper — continuous spin + grab to browse */
.love-marquee {
  overflow-x: clip;
  overflow-y: visible;
  cursor: grab;
  margin: 0 calc(-1 * var(--pad-gutter));
  mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.love-marquee.is-grabbing { cursor: grabbing; }
.love-marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 4px var(--pad-gutter) 8px;
  will-change: transform;
}
.love-card {
  width: clamp(260px, 35vw, 380px);
  flex-shrink: 0;
  border: 1px solid color-mix(in oklch, var(--fg) 14%, transparent);
  border-radius: 4px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: var(--bg);
  min-height: 0;
  transition:
    border-color 240ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 240ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
.love-card:hover {
  border-color: color-mix(in oklch, var(--fg) 30%, transparent);
  box-shadow: 0 4px 24px rgba(88, 71, 56, 0.08);
  transform: translateY(-3px);
}
.love-quote {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.65;
  letter-spacing: 0;
  flex: 1;
}
.love-quote::before {
  content: '\201C';
  color: var(--accent);
  font-size: 1.5em;
  line-height: 0;
  vertical-align: -0.35em;
  margin-right: 2px;
}
.love-quote::after {
  content: '\201D';
  color: var(--accent);
  font-size: 1.5em;
  line-height: 0;
  vertical-align: -0.35em;
  margin-left: 2px;
}
/* Expandable full-letter pattern */
.love-full-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 420ms cubic-bezier(0.16, 1, 0.3, 1);
}
.love-full-wrap.is-open {
  grid-template-rows: 1fr;
}
.love-full-inner { overflow: hidden; }
.love-full {
  padding-top: 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.75;
  color: var(--fg-muted);
  margin: 0;
}
.love-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.love-expand-btn:hover { opacity: 0.7; }
.love-expand-arrow {
  display: inline-block;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.love-expand-btn[aria-expanded="true"] .love-expand-arrow { transform: rotate(180deg); }

.love-client {
  border-top: 1px solid color-mix(in oklch, var(--olive) 35%, transparent);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.love-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.love-brand {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* ── Ruler Carousel (HOW WE WORK) ── */
.process-ruler { position: relative; width: 100%; }

/* Film strip band — bleeds full width */
.ruler-band {
  margin: 0 calc(-1 * var(--pad-gutter));
  background: #1A140E;
  padding: 0;
  position: relative;
}
/* Film grain texture overlay */
.ruler-band::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.08;
  mix-blend-mode: screen;
}
/* Projector frame-change flash */
@keyframes projector-flash {
  0%   { opacity: 0.11; }
  100% { opacity: 0; }
}
.ruler-flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: var(--cream);
  opacity: 0;
}
.ruler-flash.is-flashing {
  animation: projector-flash 0.18s ease-out forwards;
}
@media (prefers-reduced-motion: reduce) {
  .ruler-flash { display: none; }
}
/* Sprocket perforations via SVG repeat pattern */
.ruler-strip {
  height: 28px;
  background-color: #1A140E;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='28'%3E%3Crect width='36' height='28' fill='%231A140E'/%3E%3Crect x='10' y='4' width='16' height='20' rx='3' fill='%23F8F6DA'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 36px 28px;
  overflow: visible;
}
.ruler-strip-inner { display: none; }
/* Film frame area */
.ruler-track-wrap {
  overflow: hidden;
  height: 88px;
  display: flex;
  align-items: center;
  position: relative;
  background: #1A140E;
  border-top: 1px solid rgba(248,246,218,0.07);
  border-bottom: 1px solid rgba(248,246,218,0.07);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.45);
}
.ruler-track-wrap::before,
.ruler-track-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 16%;
  z-index: 2;
  pointer-events: none;
}
.ruler-track-wrap::before { left:  0; background: linear-gradient(to right, #1A140E, transparent); }
.ruler-track-wrap::after  { right: 0; background: linear-gradient(to left,  #1A140E, transparent); }
.ruler-track {
  display: flex;
  align-items: center;
  gap: 80px;
  will-change: transform;
  transition: transform 0.62s cubic-bezier(0.16, 1, 0.3, 1);
}
.ruler-resetting .ruler-track,
.ruler-resetting .detail-track { transition: none !important; }
.ruler-item {
  flex-shrink: 0;
  width: 280px;
  background: none;
  border: none;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: clamp(20px, 3vw, 40px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--cream);
  white-space: nowrap;
  padding: 0;
  transition:
    transform 0.62s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.5s ease;
  will-change: transform, opacity;
}
.ruler-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
  margin-bottom: 24px;
}
.ruler-btn {
  background: none;
  border: 1px solid color-mix(in oklch, var(--cream) 22%, transparent);
  color: color-mix(in oklch, var(--cream) 55%, transparent);
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.ruler-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in oklch, var(--accent) 10%, transparent);
}
.ruler-steps {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ruler-step-pill {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: color-mix(in oklch, var(--cream) 70%, transparent);
  padding: 8px 12px;
  position: relative;
  transition: color 0.25s ease;
}
.ruler-step-pill::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  height: 1.5px;
  background: var(--accent);
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.ruler-step-pill.is-active { color: var(--cream); }
.ruler-step-pill.is-active::after { transform: translateX(-50%) scaleX(1); }
.ruler-detail {
  overflow: hidden;
  position: relative;
  min-height: 270px;
  margin-bottom: 0;
}
/* Gradient fades — dissolve peek panels into the dark section bg */
.ruler-detail::before,
.ruler-detail::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 26%;
  z-index: 2;
  pointer-events: none;
}
.ruler-detail::before { left: 0;  background: linear-gradient(to right, var(--fg) 0%, transparent 100%); }
.ruler-detail::after  { right: 0; background: linear-gradient(to left,  var(--fg) 0%, transparent 100%); }
.detail-track {
  display: flex;
  align-items: flex-start;
  gap: 60px;
  will-change: transform;
  transition: transform 0.62s cubic-bezier(0.16, 1, 0.3, 1);
  padding-top: clamp(16px, 2vw, 24px);
}
.detail-panel {
  flex-shrink: 0;
  position: relative;
  width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  cursor: pointer;
  transition:
    opacity 0.5s ease,
    transform 0.62s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.detail-panel .ruler-detail-desc {
  transition: opacity 0.38s ease;
}
.detail-panel:not(.is-active) .ruler-detail-desc,
.detail-panel:not(.is-active) .ruler-detail-title,
.detail-panel:not(.is-active) .ruler-detail-step {
  opacity: 0;
  pointer-events: none;
}
/* Adjacent step numbers — centred, muted, cream */
.detail-panel:not(.is-active) .ruler-detail-n {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: color-mix(in oklch, var(--cream) 55%, transparent);
  font-size: clamp(44px, 4.8vw, 76px);
  z-index: 0;
}
.ruler-bg-n {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-serif);
  font-size: clamp(150px, 20vw, 260px);
  font-weight: 700;
  line-height: 1;
  color: var(--cream);
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
  letter-spacing: -0.05em;
  user-select: none;
  transition: opacity 0.5s ease;
}
.detail-panel:not(.is-active) .ruler-bg-n { opacity: 0; }
/* Film edge codes — vertical metadata on the far sides */
.ruler-edge-mark {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.22em;
  color: color-mix(in oklch, var(--cream) 16%, transparent);
  writing-mode: vertical-rl;
  pointer-events: none;
  user-select: none;
  z-index: 3;
  white-space: nowrap;
  text-transform: uppercase;
}
.ruler-edge-mark-left  { left:  clamp(8px, 1.5%, 28px); }
.ruler-edge-mark-right { right: clamp(8px, 1.5%, 28px); }
.ruler-detail-step, .ruler-detail-n, .ruler-detail-title, .ruler-detail-desc {
  position: relative;
  z-index: 1;
}
.ruler-detail-step {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: color-mix(in oklch, var(--cream) 35%, transparent);
}
.ruler-detail-n {
  font-family: var(--font-serif);
  font-size: clamp(52px, 6.5vw, 88px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--accent);
  font-weight: 700;
}
.ruler-detail-title {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.8vw, 24px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.ruler-detail-desc {
  font-size: 16px;
  line-height: 1.65;
  color: color-mix(in oklch, var(--cream) 62%, transparent);
  max-width: 380px;
}

/* Responsive */
@media (max-width: 1150px) {
  .hero-star { zoom: 0.84; }
}

@media (max-width: 1100px) {
  /* ruler carousel — no column changes needed */
}

@media (max-width: 900px) {
  .hero-cap { flex-direction: column; align-items: flex-start; }
  #hero-split { grid-template-columns: 1fr; min-height: auto; }
  .split-right { min-height: 460px; }
  .hero-star { zoom: 0.68; }
  .services-head, .process-head, .work-grid, .stats {
    grid-template-columns: 1fr;
  }
  .services-head { gap: 16px; }
  .svc-row { grid-template-columns: 40px 1fr; gap: 16px; }
  .svc-row .svc-desc, .svc-row .svc-arrow { grid-column: 2; }
  .stat { border-right: 0; border-bottom: 1px solid var(--rule); }
  .type-hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .love-head { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .split-right { min-height: 380px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { border-right: 1px solid var(--rule); }
  .type-hero-word { font-size: clamp(48px, 12vw, 80px); }
}

@media (max-width: 430px) {
  .split-headline { font-size: clamp(44px, 11vw, 70px); }
  .hero-btns { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-star { zoom: 0.52; }
  .client-bar { padding: 14px 0; }
  .client-bar .marquee-track { font-size: 11px; }
  .svc-title { font-size: clamp(18px, 4vw, 22px); }
  .stats { grid-template-columns: 1fr; }
  .stat:nth-child(odd) { border-right: 0; }
  .process-num { font-size: 10px; }
  .pull blockquote { font-size: clamp(36px, 9vw, 56px); letter-spacing: -0.03em; }
  .type-hero-word { font-size: clamp(40px, 10vw, 60px); }
}

/* ── Process grid responsive columns ── */
@media (max-width: 1024px) {
  .process-grid { grid-template-columns: repeat(3, 1fr); }
  /* Hide the circular arrow badges between steps when wrapping */
  .process-step::after { display: none; }
}
@media (max-width: 768px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  /* Connector line and timeline dots don't make sense across rows */
  .process-grid::before { display: none; }
  .process-step::before { display: none; }
}
@media (max-width: 600px) {
  .process-grid { grid-template-columns: 1fr; border-left: none; }
  /* Hide service row arrows — whole row is the tap target */
  .svc-arrow { display: none; }
  /* Speed up marquee on small screens */
  .client-bar .marquee-track { animation-duration: 20s; }
  /* Stroke text legibility */
  .hero-headline .stroke { -webkit-text-stroke: 1px var(--fg); }
  /* Match CSS gaps to JS iG()/iDG() values so carousel centering is accurate */
  .ruler-track  { gap: 40px; }
  .detail-track { gap: 32px; }
}
/* Narrowest phones */
@media (max-width: 360px) {
  .hero-star { zoom: 0.42; }
  .split-right { min-height: 300px; }
}

/* ── Touch devices: prevent stuck hover states ── */
@media (hover: none) {
  .svc-row:hover { background: transparent; }
  .work-card:hover .ph { transform: none; }
  .work-card:hover .ph::after { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #hero-split .split-headline,
  #hero-split .hero-desc,
  #hero-split .hero-btns,
  .split-right::before,
  .split-right::after {
    animation: none !important;
    opacity: 1;
    transform: none !important;
  }

  .process-track,
  .process-carousel .process-step,
  .process-nav-btn,
  .work-card .ph,
  .work-card .ph::after,
  .work-meta-arrow,
  .love-card,
  .ruler-track,
  .detail-track,
  .detail-panel,
  .ruler-item,
  .svc-title::after,
  .ruler-step-pill::after {
    transition-duration: 0.01ms !important;
  }

  .process-nav-btn:hover:not(:disabled),
  .process-nav-btn:active:not(:disabled),
  .love-card:hover {
    transform: none !important;
  }
}

/* ── Section blend dividers ── */
.sec-blend {
  --divider-top: var(--bg);
  --divider-bottom: var(--fg);
  --divider-slope: clamp(12px, 2vw, 28px);
  display: block;
  position: relative;
  height: calc(2 * var(--divider-slope));
  margin-bottom: -1px;
  overflow: hidden;
  background: var(--divider-top);
  pointer-events: none;
}
.sec-blend::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--divider-bottom);
  clip-path: polygon(0 var(--divider-slope), 100% 0, 100% 100%, 0 100%);
}
.sec-blend.divider-right::after {
  clip-path: polygon(0 0, 100% var(--divider-slope), 100% 100%, 0 100%);
}
.blend-fg-to-bg     { --divider-top: var(--fg);    --divider-bottom: var(--bg); }
.blend-bg-to-olive  { --divider-top: var(--bg);    --divider-bottom: var(--olive); }
.blend-olive-to-bg  { --divider-top: var(--olive); --divider-bottom: var(--bg); }


/* Restore section backgrounds to solid colours */
.love         { background: var(--olive); }
.closing-cta  { background: var(--bg); }

