/* ==========================================================================
   Homepage sections. Builds on css/system.css.
   ========================================================================== */

/* ==========================================================================
   Hero — sans headline, serif subheading, and the foundation built layer
   by layer from your systems up to AI (js/components/hero-stack.js).
   The photo and its grading come from css/system.css; the shade here is
   about 8 points lighter than the shared one.
   ========================================================================== */

.hero--home {
  --h-cream: #F7EFE2;
  --h-cream-2: #E3D4BF;
  --h-cream-3: #B9AE9F;
  --h-ink-2: #56504A;
  --h-sage: #4F6B52;
  --h-sage-soft: #E3ECE1;
  --h-glass: rgba(255, 255, 255, 0.06);
  --h-glass-line: rgba(255, 255, 255, 0.14);
}

.hero--home .hero-shade {
  background:
    linear-gradient(90deg, rgba(19, 18, 15, 0.86) 0%, rgba(19, 18, 15, 0.66) 36%, rgba(19, 18, 15, 0.14) 72%, rgba(19, 18, 15, 0.22) 100%),
    linear-gradient(180deg, rgba(19, 18, 15, 0.52) 0%, rgba(19, 18, 15, 0) 22%, rgba(19, 18, 15, 0) 68%, rgba(19, 18, 15, 0.74) 100%);
}

.hero--home .hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
  padding-top: 136px;
  padding-bottom: 104px;
}

.hero--home .hero-title {
  max-width: 16ch;
  font-family: var(--sans);
  font-size: clamp(44px, 5.4vw, 78px);
  font-weight: 650;
  font-variation-settings: normal;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--h-cream);
}

.hero--home .hero-title em {
  font-style: normal;
  font-weight: inherit;
  color: var(--h-cream-3);
}

.hero--home .hero-lead {
  max-width: 30ch;
  margin-top: 28px;
  font-family: var(--serif);
  font-size: clamp(20px, 1.7vw, 24px);
  font-weight: 300;
  line-height: 1.45;
  color: var(--h-cream-2);
}

.hero--home .hero-actions {
  align-items: center;
  gap: 14px 28px;
  margin-top: 40px;
}

.hero--home .hero-actions .btn {
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 16px;
  transition: background-color 0.25s, translate 0.25s var(--ease);
}

.hero--home .btn--light {
  background: var(--h-cream);
}

.hero--home .btn--light:hover {
  background: var(--white);
  translate: 0 -2px;
}

.hero-link {
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(247, 239, 226, 0.35);
  font-size: 16px;
  font-weight: 500;
  color: var(--h-cream);
  transition: border-color 0.25s;
}

.hero-link:hover {
  border-color: var(--h-cream);
}

/* Entrance: the copy rises line by line (replaces the shared hero entrance) */
.js .hero--home .hero-inner > * {
  opacity: 1;
  transform: none;
  animation: none;
}

.js .hero--home .hero-copy > * {
  opacity: 0;
  translate: 0 18px;
  animation: heroRise 0.9s var(--ease) forwards;
}

.js .hero--home .hero-copy > :nth-child(2) { animation-delay: 0.12s; }
.js .hero--home .hero-copy > :nth-child(3) { animation-delay: 0.24s; }

@keyframes heroRise {
  to { opacity: 1; translate: 0 0; }
}

/* The foundation, layer by layer */
.hero-stack {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 560px;
  transition: translate 0.7s var(--ease);
}

.hs-spine {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04));
}

.hs-spine i {
  position: absolute;
  bottom: 0;
  left: -1px;
  width: 3px;
  height: 90px;
  border-radius: 3px;
  background: linear-gradient(180deg, transparent, rgba(247, 239, 226, 0.9), transparent);
  opacity: 0;
}

.hs-layers {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs-layer {
  position: relative;
  width: var(--w, 100%);
  padding: 18px 22px;
  border: 1px solid var(--h-glass-line);
  border-radius: 18px;
  background: var(--h-glass);
  -webkit-backdrop-filter: blur(14px) saturate(110%);
  backdrop-filter: blur(14px) saturate(110%);
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.8);
  color: var(--h-cream);
  transition: opacity 0.8s var(--ease), translate 0.8s var(--ease), border-color 0.5s, background-color 0.5s;
}

/* Each layer a little narrower than the one below */
.hs-layer:nth-child(1) { --w: 100%; }
.hs-layer:nth-child(2) { --w: 92%; }
.hs-layer:nth-child(3) { --w: 84%; }
.hs-layer:nth-child(4) { --w: 76%; }
.hs-layer:nth-child(5) { --w: 68%; }

.js .hs-layer {
  opacity: 0;
  translate: 0 26px;
}

.js .hs-layers.ready .hs-layer {
  opacity: 1;
  translate: 0 0;
}

.hs-layer:hover,
.js .hs-layers.ready .hs-layer:hover {
  border-color: rgba(255, 255, 255, 0.28);
  translate: 0 -3px;
}

.hs-layer.is-lit {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

.hs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hs-name {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hs-text {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--h-cream-3);
}

.hs-ic {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.hs-ic svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--h-cream);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.hs-chips span {
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 14px;
  line-height: 1.2;
  color: var(--h-cream-2);
}

.hs-people {
  display: flex;
  margin-top: 14px;
}

.hs-people span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: -8px;
  border: 2px solid #2A2522;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.hs-people span:nth-child(1) { background: #E3D4BF; }
.hs-people span:nth-child(2) { background: #CFDCCB; }
.hs-people span:nth-child(3) { background: #E8D9C2; }

.hs-people em {
  align-self: center;
  margin-left: 18px;
  font-size: 14px;
  font-style: normal;
  color: var(--h-cream-3);
}

/* Top layer: the result, in cream */
.hs-layer.is-top {
  border-color: var(--h-cream);
  background: var(--h-cream);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  color: var(--ink);
}

.hs-layer.is-top.is-lit {
  background: var(--white);
}

.hs-layer.is-top .hs-text {
  color: var(--h-ink-2);
}

.hs-layer.is-top .hs-ic {
  background: var(--h-sage-soft);
}

.hs-layer.is-top .hs-ic svg {
  stroke: var(--h-sage);
  stroke-width: 2.2;
}

@media (prefers-reduced-motion: reduce) {
  .js .hero--home .hero-copy > * {
    opacity: 1;
    translate: none;
    animation: none;
  }

  .hero-stack,
  .hs-layer,
  .hero--home .hero-actions .btn,
  .hero-link {
    transition: none;
  }

  .js .hs-layer {
    opacity: 1;
    translate: none;
  }
}

/* ==========================================================================
   01 The problem — the question, and the records it depends on

   The section is taller than the screen; its stage sticks while the four
   records drift from scattered positions into a row and get wired to the
   question (js/site.js, initProblemStage). Phones, short screens and
   reduced motion get the final layout with a simple reveal.
   ========================================================================== */

.problem {
  position: relative;
  height: 190vh;
  background: var(--paper);
}

.problem-stage {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 720px;
  padding-top: 12vh;
  padding-bottom: 8vh;
}

.problem-head {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  align-items: end;
  gap: 56px;
}

.problem-title {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.problem-title span {
  color: var(--ink-3);
}

.problem .problem-lead {
  max-width: 400px;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-2);
}

.problem-board {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 5vh;
}

.problem-question {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--sans);
  font-size: clamp(26px, 2.7vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-align: center;
}

.problem-question em {
  font-style: normal;
  color: var(--signal);
}

.problem-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.problem-wires path {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1;
}

.problem-wires .trunk {
  stroke: var(--signal);
}

.problem-wires circle {
  fill: var(--signal);
}

.problem-records {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 9vh;
}

.rec {
  position: relative;
  padding: 20px 20px 18px;
  border: 1px solid var(--line-2);
  background: var(--white);
  will-change: transform, opacity;
  transition: border-color 0.25s var(--ease);
}

.rec:hover,
.rec:focus-visible {
  border-color: var(--ink);
  outline: none;
}

.rec h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.rec .src {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-3);
}

.rec p {
  margin: 10px 0 16px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
}

.rec svg {
  display: block;
  width: 100%;
  height: 28px;
}

.glyph .base {
  stroke: var(--line-2);
}

.glyph .mark {
  stroke: var(--ink);
}

.glyph .hot {
  stroke: var(--signal);
  fill: var(--signal);
}

.glyph text {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--ink-3);
}

/* Opening: each record drops in, one after another. Only with JS, so the
   records always show without it. */
.js .rec {
  opacity: 0;
  scale: 0.86;
  translate: 0 48px;
}

.js .rec.is-in {
  animation: recDeal 0.9s var(--ease) both;
}

.js .rec:nth-child(2).is-in { animation-delay: 0.12s; }
.js .rec:nth-child(3).is-in { animation-delay: 0.24s; }
.js .rec:nth-child(4).is-in { animation-delay: 0.36s; }

@keyframes recDeal {
  0%   { opacity: 0; scale: 0.86; translate: 0 48px; }
  60%  { opacity: 1; scale: 1.02; translate: 0 -4px; }
  100% { opacity: 1; scale: 1; translate: 0 0; }
}

.rec.is-in {
  box-shadow: 0 1px 0 rgba(26, 26, 26, 0.04);
}

.js .problem-question {
  opacity: 0;
  translate: 0 16px;
}

.js .problem-question.is-in {
  animation: recRise 0.8s var(--ease) both;
}

@keyframes recRise {
  to { opacity: 1; translate: 0 0; }
}

/* Records come alive once they settle */
.g-draw {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 1s var(--ease);
}

.rec.is-live .g-draw {
  stroke-dashoffset: 0;
}

.rec.is-live .g-draw--late {
  transition-delay: 0.45s;
}

.g-slide {
  opacity: 0;
  transform: translateX(-120px);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 1.1s var(--ease), opacity 0.4s;
}

.rec.is-live .g-slide {
  opacity: 1;
  transform: none;
  animation: recPulse 2.6s ease-in-out 1.2s infinite;
}

@keyframes recPulse {
  0%, 100% { r: 5; }
  50%      { r: 6.5; }
}

.g-route {
  stroke-dashoffset: 0;
}

.rec.is-live .g-route {
  animation: recMarch 1.6s linear infinite;
}

@keyframes recMarch {
  to { stroke-dashoffset: -16; }
}

.g-blink {
  opacity: 0.25;
  transition: opacity 0.4s 0.8s;
}

.rec.is-live .g-blink {
  opacity: 1;
  animation: recBlink 2.4s ease-in-out 1.4s infinite;
}

@keyframes recBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.g-shine {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  transition: stroke-dashoffset 0.9s var(--ease) 0.3s;
}

.rec.is-live .g-shine {
  stroke-dashoffset: 0;
}

.rec.is-linked h3::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--signal);
  vertical-align: middle;
  animation: recPop 0.4s var(--ease);
}

@keyframes recPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.problem-answer {
  max-width: 920px;
  margin: 5vh auto 0;
  font-family: var(--sans);
  font-size: clamp(26px, 2.7vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-align: center;
  text-wrap: balance;
  color: var(--ink-3);
}

.problem-answer b {
  font-weight: 700;
  color: var(--ink);
}

/* Phones and short screens: no sticky stage, final layout, simple reveal */
@media (max-width: 900px), (max-height: 640px) {
  .problem {
    height: auto;
  }

  .problem-stage {
    position: static;
    height: auto;
    min-height: 0;
    padding-top: 88px;
    padding-bottom: 88px;
  }

  .problem-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .problem-records {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 40px;
  }

  .problem-wires {
    display: none;
  }

  .rec {
    transition: transform 0.8s var(--ease), opacity 0.6s, border-color 0.25s;
  }

  .problem-board {
    margin-top: 48px;
  }

  .problem-answer {
    margin-top: 32px;
    text-align: left;
  }

}

@media (max-width: 420px) {
  .problem-records {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .problem {
    height: auto;
  }

  .problem-stage {
    position: static;
    height: auto;
  }

  .problem *,
  .problem *::before,
  .problem *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .rec,
  .js .problem-question {
    opacity: 1;
    scale: 1;
    translate: 0 0;
  }

  .g-draw,
  .g-shine {
    stroke-dashoffset: 0;
  }

  .g-slide {
    opacity: 1;
    transform: none;
  }

  .g-blink {
    opacity: 1;
  }
}

/* ==========================================================================
   03 The foundation — four steps as a pinned story

   The story is taller than the screen and its stage sticks: scrolling
   moves through the four steps, each pairing a short text with a
   before/after scene (js/site.js, initFoundationStory). Clicking a step
   jumps to it. Tablets, phones and reduced motion get the steps stacked,
   each scene playing as it scrolls into view. The brown palette belongs
   to this section only.
   ========================================================================== */

.found {
  --brown: #5B4130;
  --brown-2: #735644;
  --cream: #F7EFE2;
  --cream-2: #E6D7C2;
  --cream-3: #C9B39A;
  --card: #FBF6EE;
  --before: #F0E5D5;
  --f-ink: #35261B;
  --f-ink-2: #6B5747;
  --f-line: #E3D5C2;
  --amber: #B45309;
  --amber-soft: #FBE4C8;
  --sage: #4F6B52;
  --sage-soft: #E1EADF;
  --pop: cubic-bezier(0.34, 1.4, 0.64, 1);

  background: var(--brown);
  color: var(--cream);
}

.found .marker {
  margin-bottom: 20px;
  color: var(--cream-2);
}

.found .marker-num {
  border-color: rgba(247, 239, 226, 0.35);
  color: var(--cream);
}

.found-head {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  align-items: end;
  gap: 56px;
}

.found-title {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.found-title span {
  color: var(--cream-3);
}

.found-lead {
  max-width: 400px;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--cream-2);
}

/* Pinned story — heading, steps and scene pin together as one screen */
.found-story {
  height: 380vh;
}

.found-pin {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 720px;
  padding: 100px 0 40px;
}

.found-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  grid-template-rows: repeat(4, auto) auto;
  align-content: center;
  column-gap: 72px;
  margin-top: 32px;
}

.found-step {
  display: contents;
}

.found-txt {
  position: relative;
  grid-column: 1;
  padding: 16px 0 16px 34px;
  border-left: 1px solid rgba(247, 239, 226, 0.18);
}

.found-txt::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--cream);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s var(--ease);
}

.found-txt h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(21px, 1.9vw, 26px);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--cream-3);
  transition: color 0.35s;
}

.found-txt button {
  all: unset;
  display: block;
  cursor: pointer;
}

.found-txt button:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 6px;
}

.found-txt h3 small {
  display: inline-block;
  width: 30px;
  font-size: 13px;
  font-weight: 400;
  color: var(--cream-3);
}

.found-txt p {
  display: grid;
  grid-template-rows: 0fr;
  max-width: 380px;
  margin: 0;
  padding-left: 30px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--cream-2);
  opacity: 0;
  transition: grid-template-rows 0.5s var(--ease), opacity 0.4s, margin 0.5s;
}

.found-txt p span {
  overflow: hidden;
}

.found-step.is-on .found-txt::before {
  transform: none;
}

.found-step.is-on .found-txt h3 {
  color: var(--cream);
}

.found-step.is-on .found-txt p {
  grid-template-rows: 1fr;
  margin-top: 8px;
  opacity: 1;
}

.found-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  grid-column: 1;
  justify-self: start;
  margin: 26px 0 0 34px;
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--cream);
  font-size: 15px;
  font-weight: 500;
  color: var(--brown);
  transition: background-color 0.2s;
}

.found-cta:hover {
  background: var(--white);
}

.found-cta:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 4px;
}

/* Scenes: all four share one cell on the right */
.found-scene {
  grid-column: 2;
  grid-row: 1 / 6;
  align-self: center;
  margin: 0;
  padding: 30px;
  border-radius: 24px;
  background: var(--card);
  color: var(--f-ink);
  box-shadow: 0 30px 60px -30px rgba(30, 18, 10, 0.6);
  opacity: 0;
  visibility: hidden;
  translate: 0 16px;
  transition: opacity 0.45s, translate 0.45s var(--ease), visibility 0s 0.45s;
}

.found-step.is-on .found-scene {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  transition: opacity 0.45s, translate 0.45s var(--ease);
}

.found .scene__q {
  margin: 0 0 18px;
  font-size: 15px;
  color: var(--f-ink-2);
}

.found .scene__q b {
  font-weight: 500;
  color: var(--f-ink);
}

.found .ba {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: stretch;
}

.found-panel {
  display: flex;
  flex-direction: column;
  min-height: clamp(300px, 42vh, 420px);
  padding: 18px;
  border-radius: 16px;
}

.found-panel--before {
  background: var(--before);
}

.found-panel--after {
  border: 1px solid var(--f-line);
  background: var(--white);
}

.found .tag {
  align-self: flex-start;
  margin-bottom: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.found-panel--before .tag {
  background: #E4D5C1;
  color: var(--f-ink-2);
}

.found-panel--after .tag {
  background: var(--sage-soft);
  color: var(--sage);
}

.found .arrow {
  display: grid;
  place-items: center;
  color: var(--amber);
}

.found .arrow svg {
  width: 22px;
  height: 22px;
}

.found-step.is-on .arrow svg {
  animation: foundNudge 1.6s ease-in-out 0.6s infinite;
}

@keyframes foundNudge {
  50% { transform: translateX(4px); }
}

.found .cap {
  margin-top: auto;
  padding-top: 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--f-ink-2);
}

.found-panel--after .cap {
  color: var(--f-ink);
}

/* Things that appear in the After panel, one by one */
.found .in {
  opacity: 0;
  translate: 0 10px;
  scale: 0.96;
}

.found-step.is-on .in {
  animation: foundPop 0.55s var(--pop) both;
}

.found-step.is-on .in:nth-of-type(2) { animation-delay: 0.12s; }
.found-step.is-on .in:nth-of-type(3) { animation-delay: 0.24s; }
.found-step.is-on .in:nth-of-type(4) { animation-delay: 0.36s; }
.found-step.is-on .d1 { animation-delay: 0.35s; }
.found-step.is-on .d2 { animation-delay: 0.5s; }
.found-step.is-on .d3 { animation-delay: 0.65s; }
.found-step.is-on .d4 { animation-delay: 0.8s; }

@keyframes foundPop {
  to { opacity: 1; translate: 0 0; scale: 1; }
}

/* Step 1: name tags */
.found .names {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.found .name {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--white);
  font-size: 14px;
}

.found .name i,
.found .apps i {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  color: var(--white);
}

.found .name small {
  margin-left: auto;
  font-size: 12px;
  color: var(--f-ink-2);
}

.found .names .name:nth-child(1) { rotate: -2deg; }
.found .names .name:nth-child(2) { rotate: 1.5deg; margin-left: 10px; }
.found .names .name:nth-child(3) { rotate: -1deg; margin-left: 4px; }
.found .names .name:nth-child(4) { rotate: 2deg; margin-left: 14px; }

.found .one {
  padding: 16px;
  border: 1px solid var(--f-line);
  border-radius: 14px;
  text-align: center;
}

.found .one .face {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--amber-soft);
  box-shadow: 0 6px 16px -8px rgba(53, 38, 27, 0.5);
  font-size: 20px;
  font-weight: 600;
  color: var(--amber);
}

.found .one b {
  display: block;
  font-size: 16px;
  font-weight: 500;
}

.found .apps {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

/* Photo slots — initials or a plain disc until a photo is added */
.found .ph {
  position: relative;
  overflow: hidden;
}

.found .ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

/* Step 2: jars */
.found .jars {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

.found .jar {
  width: 72px;
  font-size: 12.5px;
  line-height: 1.3;
  text-align: center;
  color: var(--f-ink-2);
}

.found .jar div {
  position: relative;
  height: 104px;
  margin-bottom: 8px;
  overflow: hidden;
  border: 2px solid var(--f-ink);
  border-top: 0;
  border-radius: 0 0 14px 14px;
}

.found .jar div::before {
  content: '';
  position: absolute;
  top: 0;
  left: -2px;
  right: -2px;
  height: 6px;
  border-top: 2px solid var(--f-ink);
}

.found .jar div i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--h);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.9s var(--ease);
}

.found-step.is-on .jar div i {
  transform: scaleY(1);
}

.found-step.is-on .jar:nth-child(2) div i { transition-delay: 0.15s; }
.found-step.is-on .jar:nth-child(3) div i { transition-delay: 0.3s; }

.found .jar b {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--f-ink);
}

.found .bubbles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.found .bubble {
  padding: 9px 12px;
  border-radius: 12px 12px 12px 4px;
  background: var(--white);
  font-size: 13.5px;
}

.found .bubble span {
  display: block;
  font-size: 12px;
  color: var(--f-ink-2);
}

/* Step 3: rules */
.found .doc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: var(--white);
  font-size: 14px;
  line-height: 1.3;
}

.found .doc + .doc {
  margin-top: 8px;
}

.found .doc svg {
  flex: 0 0 auto;
}

.found .doc s {
  color: var(--f-ink-2);
}

.found .doc .ok {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--sage-soft);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--sage);
}

.found .doc--clash {
  background: var(--amber-soft);
}

.found .doc--clash .ok {
  background: var(--white);
  color: var(--amber);
}

.found-step.is-on .doc--clash.in {
  animation: foundPop 0.55s var(--pop) 0.3s both, foundGlow 2.4s ease-in-out 1.2s infinite;
}

@keyframes foundGlow {
  50% { box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.15); }
}

/* Step 4: people */
.found .person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--f-line);
  border-radius: 12px;
  background: var(--white);
  font-size: 14px;
}

.found .person + .person {
  margin-top: 8px;
}

.found .person .av {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.found .person .av.ph {
  width: 40px;
  height: 40px;
}

.found .person b {
  display: block;
  font-weight: 500;
}

.found .person span span {
  display: block;
  font-size: 12.5px;
  color: var(--f-ink-2);
}

.found .crowd {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  padding: 14px 0;
}

.found .crowd .ph {
  width: 36px;
  height: 36px;
  margin-left: -8px;
  border: 2px solid var(--before);
  border-radius: 50%;
  background: #E4D5C1;
}

.found .crowd .ph:first-child {
  margin-left: 0;
}

/* Tablet and phone — the steps stack, each scene plays as it arrives */
@media (max-width: 980px) {
  .found-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .found-story {
    height: auto;
  }

  .found-pin {
    position: static;
    display: block;
    height: auto;
    min-height: 0;
    padding: 88px 0;
  }

  .found-grid {
    display: block;
    margin-top: 12px;
  }

  .found-txt {
    padding: 28px 0 14px;
    border-left: 0;
  }

  .found-txt::before {
    display: none;
  }

  .found-txt h3 {
    color: var(--cream);
  }

  .found-txt p {
    grid-template-rows: 1fr;
    margin-top: 8px;
    padding-left: 30px;
    opacity: 1;
  }

  .found-scene {
    padding: 18px;
    opacity: 1;
    visibility: visible;
    translate: 0 0;
  }

  .found-cta {
    margin: 32px 0 0;
  }
}

@media (max-width: 560px) {
  .found .ba {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .found .arrow {
    height: 30px;
  }

  .found .arrow svg {
    rotate: 90deg;
  }

  .found-panel {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .found *,
  .found *::before,
  .found *::after {
    transition: none !important;
    animation: none !important;
  }

  .found .in {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }

  .found .jar div i {
    transform: none;
  }

  .found-story {
    height: auto;
  }

  .found-pin {
    position: static;
    display: block;
    height: auto;
    min-height: 0;
    padding: 88px 0 96px;
  }

  .found-grid {
    display: block;
    margin-top: 12px;
  }

  .found-scene {
    margin-bottom: 24px;
    opacity: 1;
    visibility: visible;
    translate: 0 0;
  }

  .found-txt p {
    grid-template-rows: 1fr;
    opacity: 1;
  }
}

/* ==========================================================================
   04 What becomes possible — four uses of the same foundation (bento)

   Each card shows one use as a small live example: a question answered
   with sources, agreed report figures, a workflow with an approval step,
   and two candidate sites compared on a demand map
   (js/components/foundation-uses.js). Loops run only while a card is on
   screen; reduced motion shows the finished state.
   ========================================================================== */

.uses {
  --u-panel: #F8F4EE;
  --u-line: #E7E1D6;
  --u-amber: #B45309;
  --u-amber-2: #E8862A;
  --u-amber-soft: #FCEBD5;
  --u-sage: #4F6B52;
  --u-sage-soft: #E3ECE1;
  --u-brown: #5B4130;

  padding: 128px 0;
  background: var(--paper);
}

.uses-head {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  align-items: end;
  gap: 56px;
  margin-bottom: 56px;
}

.uses-title {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.uses-title span {
  color: var(--ink-3);
}

.uses-lead {
  max-width: 400px;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink-2);
}

.uses .bento {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.uses .card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 32px;
  border: 1px solid var(--u-line);
  border-radius: 24px;
  background: var(--white);
  transition: opacity 0.8s var(--ease), translate 0.8s var(--ease), border-color 0.3s;
}

.uses .c-ask { grid-column: span 3; }
.uses .c-dash { grid-column: span 2; }
.uses .c-flow { grid-column: span 2; }
.uses .c-site { grid-column: span 3; }

/* Cards rise in once the grid is reached — only with JS */
.js .uses .card {
  opacity: 0;
  translate: 0 28px;
}

.js .uses .bento.is-in .card {
  opacity: 1;
  translate: 0 0;
}

.uses .bento.is-in .card:nth-child(2) { transition-delay: 0.08s; }
.uses .bento.is-in .card:nth-child(3) { transition-delay: 0.16s; }
.uses .bento.is-in .card:nth-child(4) { transition-delay: 0.24s; }

/* Soft glow that follows the pointer */
.uses .card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), rgba(232, 134, 42, 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.uses .card:hover::before {
  opacity: 1;
}

.uses .card:hover {
  border-color: #DCCFBD;
}

.uses .card h3 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.uses .card > p {
  max-width: 460px;
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
}

.uses .stage {
  min-height: 280px;
  margin-top: auto;
  padding: 24px;
  border-radius: 18px;
  background: var(--u-panel);
}

/* 1. Ask */
.uses .q {
  width: fit-content;
  max-width: 85%;
  min-height: 52px;
  margin-left: auto;
  padding: 14px 18px;
  border-radius: 18px 18px 4px 18px;
  background: var(--u-brown);
  font-size: 17px;
  line-height: 1.4;
  color: #F7EFE2;
}

.uses .caret {
  display: inline-block;
  width: 2px;
  height: 18px;
  margin-left: 2px;
  background: #F7EFE2;
  vertical-align: -3px;
  animation: usesBlink 1s steps(1) infinite;
}

@keyframes usesBlink {
  50% { opacity: 0; }
}

.uses .a {
  max-width: 95%;
  min-height: 84px;
  margin-top: 22px;
  padding: 0 2px;
  font-size: 18px;
  line-height: 1.55;
  transition: opacity 0.3s;
}

.js .uses .a {
  opacity: 0;
}

.js .uses .a.on {
  opacity: 1;
}

.uses .think {
  display: inline-flex;
  gap: 5px;
  padding: 6px 0;
}

.uses .think i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: usesHop 1s infinite;
}

.uses .think i:nth-child(2) { animation-delay: 0.15s; }
.uses .think i:nth-child(3) { animation-delay: 0.3s; }

@keyframes usesHop {
  50% { translate: 0 -4px; }
}

.uses .from {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--u-line);
  font-size: 15px;
  color: var(--ink-2);
  transition: opacity 0.4s, translate 0.4s;
}

.js .uses .from {
  opacity: 0;
  translate: 0 6px;
}

.uses .from h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
}

.uses .src {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  font-size: 16px;
  color: var(--ink);
}

.uses .src b {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #D9C7B0;
  text-underline-offset: 4px;
}

.uses .src span {
  color: var(--ink-2);
}

.uses .src i {
  font-style: normal;
  color: var(--u-amber);
}

.js .uses .from.on {
  opacity: 1;
  translate: 0 0;
}

/* 2. Dashboard */
.uses .kpis {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.uses .kpi {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 16px;
  overflow: hidden;
  padding: 14px 18px;
  border: 1px solid var(--u-line);
  border-radius: 14px;
  background: var(--white);
}

.uses .kpi::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--k);
}

.uses .kpi b {
  font-size: 17px;
  font-weight: 500;
}

.uses .kpi span {
  grid-column: 1;
  font-size: 15px;
  color: var(--ink-2);
}

.uses .kpi strong {
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: 34px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

/* 3. Workflow */
.uses .ex {
  margin: 0 0 18px;
  font-size: 15px;
  color: var(--ink-2);
}

.uses .flow {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 0;
}

.uses .rail {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 19px;
  width: 2px;
  background: var(--u-line);
}

.uses .rail i {
  position: absolute;
  inset: 0 0 auto 0;
  height: 0;
  background: var(--u-sage);
  transition: height 0.6s var(--ease);
}

.uses .step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 17px;
}

.uses .dot {
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--u-line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-3);
  transition: background-color 0.35s, border-color 0.35s, color 0.35s, scale 0.35s;
}

.uses .step.done .dot {
  border-color: var(--u-sage);
  background: var(--u-sage);
  color: var(--white);
}

.uses .step.wait .dot {
  border-color: var(--u-amber-2);
  background: var(--u-amber-soft);
  color: var(--u-amber);
  scale: 1.08;
}

.uses .step em {
  margin-left: auto;
  font-size: 15px;
  font-style: normal;
  color: var(--u-amber);
  opacity: 0;
  transition: opacity 0.3s;
}

.uses .step.wait em {
  opacity: 1;
}

/* 4. Site */
.uses .site {
  display: grid;
  grid-template-columns: 1fr 260px;
  align-items: stretch;
  gap: 20px;
}

.uses .map {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 14px;
  background: #F1E7D8;
}

.uses .map .hexes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.uses .pin {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
  transition: left 0.8s var(--ease), top 0.8s var(--ease);
}

.uses .pin b {
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--ink);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--white);
}

.uses .ripple {
  position: absolute;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--u-amber-2);
  border-radius: 50%;
  opacity: 0;
  transition: left 0.8s var(--ease), top 0.8s var(--ease);
  animation: usesRipple 2.4s ease-out infinite;
}

.uses .ripple--b {
  animation-delay: 1.2s;
}

@keyframes usesRipple {
  0%   { opacity: 0.9; scale: 1; }
  100% { opacity: 0; scale: 6; }
}

.uses .score {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.uses .score h4 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.uses .row span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--ink-2);
}

.uses .row span b {
  font-weight: 500;
  color: var(--ink);
}

.uses .meter {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #E9E0D2;
}

.uses .meter i {
  display: block;
  height: 100%;
  border-radius: 4px;
  transform-origin: left;
  transition: transform 0.8s var(--ease);
}

.js .uses .meter i {
  transform: scaleX(0);
}

.uses .verdict {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.4s, color 0.4s;
}

.uses .verdict i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 13px;
  font-style: normal;
  color: var(--white);
}

.uses .verdict.go { background: var(--u-sage-soft); color: var(--u-sage); }
.uses .verdict.go i { background: var(--u-sage); }
.uses .verdict.hold { background: var(--u-amber-soft); color: var(--u-amber); }
.uses .verdict.hold i { background: var(--u-amber); }

@media (max-width: 1100px) {
  .uses .bento {
    grid-template-columns: 1fr 1fr;
  }

  .uses .c-ask,
  .uses .c-site {
    grid-column: span 2;
  }

  .uses .c-dash,
  .uses .c-flow {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .uses {
    padding: 88px 0;
  }

  .uses-head {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 36px;
  }

  .uses .bento {
    grid-template-columns: 1fr;
  }

  .uses .c-ask,
  .uses .c-site,
  .uses .c-dash,
  .uses .c-flow {
    grid-column: auto;
  }

  .uses .card {
    padding: 22px;
  }

  .uses .stage {
    padding: 18px;
  }

  .uses .site {
    grid-template-columns: 1fr;
  }

  .uses .map {
    min-height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .uses *,
  .uses *::before,
  .uses *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .uses .card {
    opacity: 1;
    translate: 0 0;
  }

  .js .uses .a,
  .js .uses .from {
    opacity: 1;
    translate: 0 0;
  }
}

/* ==========================================================================
   02 The next step after digitization — 1970, today, AI-ready

   The rail draws across, each step rises in, 1970 counts up and the dark
   AI-ready panel wipes open; the scattered documents then tidy up
   (js/site.js, initEraTimeline). Without JS or with reduced motion the
   final state shows.
   ========================================================================== */

.era-head {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  align-items: end;
  gap: 56px;
  margin-bottom: 72px;
}

.era-title {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.era-title span {
  color: var(--ink-3);
}

.era-lead {
  max-width: 400px;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink-2);
}

/* Timeline */
.era-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.era-rail {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--ink);
  transform-origin: left;
}

.era-step {
  position: relative;
  min-height: 360px;
  padding: 56px 40px 48px 0;
  border-right: 1px solid var(--line-2);
}

.era-step + .era-step {
  padding-left: 40px;
}

.era-knot {
  position: absolute;
  top: -6px;
  left: 0;
  width: 11px;
  height: 11px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-2);
}

.era-step + .era-step .era-knot {
  left: 40px;
}

.era-step .era-year {
  max-width: none;
  margin: 0 0 28px;
  font-family: var(--sans);
  font-size: clamp(48px, 5.1vw, 74px);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: var(--ink);
}

.era-step p {
  max-width: 330px;
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
}

.era-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-top: 22px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.era-more:hover {
  border-color: var(--signal);
  color: var(--signal);
}

/* Small drawings */
.era-art {
  height: 64px;
  margin-top: 30px;
}

.era-art svg {
  display: block;
  width: auto;
  height: 100%;
  overflow: visible;
}

.era-tbl rect {
  fill: none;
  stroke: var(--ink-3);
}

.era-tbl .key {
  stroke: var(--signal);
}

.era-tbl line {
  stroke: var(--ink-3);
}

.era-docs rect {
  fill: var(--white);
  stroke: var(--ink-3);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 1s var(--ease) 0.9s;
}

.era-docs .d1 { transform: rotate(-10deg) translate(-10px, 4px); }
.era-docs .d2 { transform: rotate(6deg) translate(6px, -2px); }
.era-docs .d3 { transform: rotate(-3deg) translate(14px, 6px); }

.era-docs .person {
  fill: var(--signal);
}

/* The AI-ready panel */
.era-step--ready {
  border-right: 0;
  background: var(--night);
  color: var(--on-night);
}

.era-step--ready .era-knot {
  border-color: var(--tan);
  background: var(--tan);
}

.era-step.era-step--ready .era-year {
  color: var(--tan);
}

.era-step--ready p {
  color: var(--on-night-2);
}

.era-facets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.era-facets span {
  padding: 7px 12px;
  border: 1px solid rgba(226, 194, 154, 0.35);
  font-size: 13px;
  color: var(--on-night);
  transition: background-color 0.25s, border-color 0.25s;
}

.era-facets span:hover {
  border-color: var(--tan);
  background: rgba(226, 194, 154, 0.12);
}

/* Opening sequence — only with JS, so the timeline always shows without it */
.js .era-rail {
  transform: scaleX(0);
  transition: transform 1.6s var(--ease);
}

.js .era-line.is-on .era-rail {
  transform: none;
}

.js .era-step {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
}

.js .era-line.is-on .era-step {
  opacity: 1;
  translate: 0 0;
}

.js .era-line.is-on .era-step:nth-child(2) { transition-delay: 0.15s; }
.js .era-line.is-on .era-step:nth-child(3) { transition-delay: 0.7s; }
.js .era-line.is-on .era-step:nth-child(4) { transition-delay: 1.25s; }

.js .era-knot {
  scale: 0;
  transition: scale 0.4s var(--ease);
}

.js .era-line.is-on .era-knot {
  scale: 1;
}

.js .era-line.is-on .era-step:nth-child(2) .era-knot { transition-delay: 0.2s; }
.js .era-line.is-on .era-step:nth-child(3) .era-knot { transition-delay: 0.75s; }
.js .era-line.is-on .era-step:nth-child(4) .era-knot { transition-delay: 1.3s; }

.js .era-tbl line {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  transition: stroke-dashoffset 0.9s var(--ease) 0.9s;
}

.js .era-line.is-on .era-tbl line {
  stroke-dashoffset: 0;
}

.js .era-step--ready {
  clip-path: inset(0 100% 0 0);
  transition: opacity 0.01s 1.1s, translate 0.01s 1.1s, clip-path 1s var(--ease) 1.1s;
}

/* Opens 12px above the panel too, so the timeline knot isn't clipped */
.js .era-line.is-on .era-step--ready {
  clip-path: inset(-12px 0 0 0);
}

.js .era-facets span {
  opacity: 0;
  translate: 0 8px;
  transition: opacity 0.5s, translate 0.5s, background-color 0.25s, border-color 0.25s;
}

.js .era-line.is-on .era-facets span {
  opacity: 1;
  translate: 0 0;
}

.js .era-line.is-on .era-facets span:nth-child(1) { transition-delay: 1.9s; }
.js .era-line.is-on .era-facets span:nth-child(2) { transition-delay: 2.05s; }
.js .era-line.is-on .era-facets span:nth-child(3) { transition-delay: 2.2s; }
.js .era-line.is-on .era-facets span:nth-child(4) { transition-delay: 2.35s; }

/* Tablet and phone — the rail runs down the left */
@media (max-width: 960px) {
  .era-head {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 48px;
  }

  .era-line {
    grid-template-columns: 1fr;
  }

  .era-rail {
    left: 5px;
    right: auto;
    width: 1px;
    height: 100%;
    transform-origin: top;
  }

  .js .era-rail {
    transform: scaleY(0);
  }

  .era-step,
  .era-step + .era-step {
    min-height: 0;
    padding: 8px 0 48px 36px;
    border-right: 0;
  }

  .era-knot,
  .era-step + .era-step .era-knot {
    top: 14px;
    left: 0;
  }

  .era-step.era-step--ready {
    margin-left: 0;
    padding: 36px 24px 36px 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .era-line *,
  .era-line *::before,
  .era-line *::after {
    transition: none !important;
  }

  .js .era-step {
    opacity: 1;
    translate: 0 0;
  }

  .js .era-step--ready {
    clip-path: none;
  }

  .js .era-rail {
    transform: none;
  }

  .js .era-knot {
    scale: 1;
  }

  .js .era-facets span {
    opacity: 1;
    translate: 0 0;
  }

  .js .era-tbl line {
    stroke-dashoffset: 0;
  }
}

/* ==========================================================================
   05 Industries — a pinned deck of six industry cards

   By default (no JS, small or short screens) the cards stack as sticky
   panels that pile up while scrolling. On large screens with JS the deck
   pins and scrolling lifts each card away to reveal the next
   (js/components/industry-deck.js), with dots to jump between them.
   ========================================================================== */

.ind {
  --card-h: 540px;
  --i-amber-2: #E8A15C;
  padding-top: 128px;
  background: var(--paper-2);
}

.ind-head {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  align-items: end;
  gap: 56px;
}

.ind-title {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.ind-title span {
  color: var(--ink-3);
}

.ind-lead {
  max-width: 400px;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink-2);
}

/* Stacked layout — the default */
.ind-story {
  padding: 40px 0 88px;
}

.ind-card {
  position: sticky;
  top: calc(84px + var(--i) * 14px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 28px;
  padding: 28px;
  border-radius: 28px;
  background: var(--c-bg);
  color: var(--c-ink);
  box-shadow: 0 30px 60px -36px rgba(40, 25, 12, 0.55), 0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

.ind-card[data-tone="light"] { --c-bg: #FFFFFF; --c-ink: #17130F; --c-2: #56504A; --c-line: #E7E1D6; --c-chip: #F6F1E9; --c-q: #5B4130; --c-qt: #F7EFE2; }
.ind-card[data-tone="sand"]  { --c-bg: #F1E6D6; --c-ink: #17130F; --c-2: #5C5249; --c-line: #E1D2BD; --c-chip: #FBF6EE; --c-q: #5B4130; --c-qt: #F7EFE2; }
.ind-card[data-tone="brown"] { --c-bg: #5B4130; --c-ink: #F7EFE2; --c-2: #E3D4BF; --c-line: rgba(247, 239, 226, 0.18); --c-chip: rgba(247, 239, 226, 0.1); --c-q: #F7EFE2; --c-qt: #17130F; }
.ind-card[data-tone="clay"]  { --c-bg: #A0674A; --c-ink: #FFF8EF; --c-2: #FBE6D3; --c-line: rgba(255, 248, 239, 0.25); --c-chip: rgba(255, 248, 239, 0.14); --c-q: #FFF8EF; --c-qt: #17130F; }

.ind .left {
  display: flex;
  flex-direction: column;
}

.ind .tag {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--c-2);
}

.ind .ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: var(--c-chip);
  color: var(--c-ink);
}

.ind-card h3 {
  margin: 28px 0 16px;
  font-family: var(--sans);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.ind-problem {
  max-width: 440px;
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--c-2);
}

.ind .count {
  margin-top: 20px;
  font-size: 15px;
  color: var(--c-2);
}

.ind .count b {
  font-weight: 500;
  color: var(--c-ink);
}

.ind .right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.ind .block h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-2);
}

.ind .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ind .chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-chip);
  font-size: 16px;
  transition: opacity 0.4s var(--ease), translate 0.4s var(--ease);
}

.ind .chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--i-amber-2);
}

.ind .q {
  display: inline-block;
  padding: 14px 18px;
  border-radius: 18px 18px 18px 4px;
  background: var(--c-q);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--c-qt);
}

.ind .measure {
  padding-top: 18px;
  border-top: 1px solid var(--c-line);
  font-size: 17px;
  line-height: 1.5;
}

/* Progress dots — pinned deck only */
.ind .dots {
  display: none;
  align-items: center;
  gap: 8px;
}

.ind .dots button {
  all: unset;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--line-2);
  cursor: pointer;
  transition: width 0.35s var(--ease), background-color 0.35s;
}

.ind .dots button[aria-current="true"] {
  width: 36px;
  background: var(--ink);
}

.ind .dots button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Wider screens: two columns inside each card */
@media (min-width: 961px) {
  .ind-card {
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    padding: 48px;
  }
}

/* Large screens with JS: the pinned deck */
@media (min-width: 961px) and (min-height: 701px) {
  .js .ind-story {
    height: calc(6 * 85vh);
    padding: 0;
  }

  .js .ind-pin {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    height: 100vh;
    min-height: 760px;
    padding-top: 40px;
  }

  .js .ind-deck {
    position: relative;
    width: min(1120px, 100%);
    height: calc(var(--card-h) + 70px);
  }

  .js .ind-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--card-h);
    margin: 0;
    transform-origin: 50% 100%;
    will-change: transform, opacity;
  }

  .js .ind .count {
    margin-top: auto;
  }

  .js .ind .chip {
    opacity: 0;
    translate: 0 8px;
  }

  .js .ind-card.front .chip {
    opacity: 1;
    translate: 0 0;
  }

  .js .ind-card.front .chip:nth-child(2) { transition-delay: 0.06s; }
  .js .ind-card.front .chip:nth-child(3) { transition-delay: 0.12s; }
  .js .ind-card.front .chip:nth-child(4) { transition-delay: 0.18s; }
  .js .ind-card.front .chip:nth-child(5) { transition-delay: 0.24s; }

  .js .ind .dots {
    display: flex;
  }
}

@media (max-width: 960px) {
  .ind {
    padding-top: 88px;
  }

  .ind-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ind *,
  .ind *::before,
  .ind *::after {
    transition: none !important;
  }

  .js .ind .chip {
    opacity: 1;
    translate: 0 0;
  }
}

/* ==========================================================================
   06 Systems we have built — real projects with a conversation player

   Same language as sections 03-05: sans title with a serif lead, warm
   rounded cards, icon tiles, pill tags and brown question bubbles. The
   chat window plays the selected project's sample conversation
   (js/components/project-chats.js).
   ========================================================================== */

.projects {
  --p-panel: #F8F4EE;
  --p-line: #E7E1D6;
  --p-brown: #5B4130;
  --p-cream: #F7EFE2;
  --p-amber: #B45309;
  --p-amber-2: #E8A15C;
  --p-sage: #4F6B52;
  --p-sage-soft: #E3ECE1;

  padding: 128px 0;
  background: var(--paper);
}

.projects-head {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  align-items: end;
  gap: 56px;
  margin-bottom: 56px;
}

.projects-title {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.projects-title span {
  color: var(--ink-3);
}

.projects-lead {
  max-width: 400px;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink-2);
}

.projects-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: stretch;
  gap: 64px;
}

/* Project list — a rail with an active bar, rows share the card's height */
.projects-list {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--p-line);
}

.project {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  width: 100%;
  padding: 20px 0 20px 28px;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--ink-3);
  cursor: pointer;
}

.project::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s var(--ease);
}

.project[aria-selected="true"]::before {
  transform: none;
}

.project:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 14px;
}

.project-ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--p-line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink-3);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.project[aria-selected="true"] .project-ic {
  border-color: var(--p-brown);
  background: var(--p-brown);
  color: var(--p-cream);
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}

.project-name {
  font-family: var(--sans);
  font-size: clamp(20px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--ink-3);
  transition: color 0.3s ease;
}

.project:hover .project-name {
  color: var(--ink-2);
}

.project[aria-selected="true"] .project-name {
  color: var(--ink);
}

.project-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-3);
}

.project-cat::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--p-line);
  transition: background-color 0.3s;
}

.project[aria-selected="true"] .project-cat {
  color: var(--ink-2);
}

.project[aria-selected="true"] .project-cat::before {
  background: var(--p-amber-2);
}

/* The description opens under the selected project */
.project-desc {
  display: grid;
  grid-template-rows: 0fr;
  max-width: 420px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  opacity: 0;
  transition: grid-template-rows 0.5s var(--ease), opacity 0.4s, margin 0.5s;
}

.project-desc span {
  overflow: hidden;
}

.project[aria-selected="true"] .project-desc {
  grid-template-rows: 1fr;
  margin-top: 10px;
  opacity: 1;
}

/* Chat window — a warm card with the conversation in an inner panel */
.chat-window {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 640px;
  padding: 24px;
  border: 1px solid var(--p-line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 30px 60px -36px rgba(40, 25, 12, 0.55);
}

.chat-window-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-window-ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--p-line);
  border-radius: 12px;
  background: var(--p-panel);
}

.chat-window-logo {
  width: 24px;
  height: 24px;
}

.chat-window-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.chat-window-name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.chat-window-channel {
  font-size: 14px;
  color: var(--ink-3);
}

.chat-window-label {
  margin-left: auto;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--p-sage-soft);
  font-size: 13px;
  font-weight: 500;
  color: var(--p-sage);
}

.chat-window-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  overflow-y: auto;
  border-radius: 18px;
  background: var(--p-panel);
  scrollbar-width: thin;
  scrollbar-color: var(--p-line) transparent;
}

.chat-window-log:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.msg {
  max-width: 86%;
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  animation: msgIn 0.45s var(--ease) both;
}

@keyframes msgIn {
  from { opacity: 0; translate: 0 8px; }
  to   { opacity: 1; translate: 0 0; }
}

.msg--user {
  align-self: flex-end;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  background: var(--p-brown);
  color: var(--p-cream);
}

.msg--user:first-child {
  margin-top: 0;
}

.msg--bot {
  align-self: flex-start;
  color: var(--ink);
}

/* Bullet and numbered lines sit tight under the line above */
.msg--list {
  margin-top: -6px;
  color: var(--ink-2);
}

.msg--typing {
  display: inline-flex;
  gap: 5px;
  align-self: flex-start;
  padding: 8px 0;
}

.msg--typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: msgHop 1s infinite;
}

.msg--typing i:nth-child(2) { animation-delay: 0.15s; }
.msg--typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes msgHop {
  50% { translate: 0 -4px; }
}

.chat-window-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
}

.chat-window-status {
  font-size: 14px;
  color: var(--ink-3);
}

.chat-window-replay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: var(--p-brown);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--p-cream);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.chat-window-replay[hidden] {
  display: none;
}

.chat-window-replay:hover {
  background: #4A3426;
}

.chat-window-replay:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (max-width: 1024px) {
  .projects-head {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 40px;
  }

  .projects-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .chat-window {
    height: 560px;
  }
}

@media (max-width: 600px) {
  .projects {
    padding: 88px 0;
  }

  .project {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px;
    padding: 16px 0 16px 20px;
  }

  .project-ic {
    width: 40px;
    height: 40px;
  }

  .chat-window {
    height: 520px;
    padding: 16px;
    border-radius: 20px;
  }

  .chat-window-label {
    display: none;
  }

  .chat-window-log {
    padding: 18px 16px;
  }

  .msg {
    max-width: 92%;
    font-size: 15px;
  }
}

/* ==========================================================================
   07 Governed automation — AI can suggest, your rules decide

   A refund request runs through the business's own checks, outside the AI
   model: every rule passes, an amount over the limit waits for a manager,
   or a repeat refund is stopped (js/components/control-demo.js). The three
   cases cycle while on screen until the visitor picks one.
   ========================================================================== */

.ctl {
  --g-brown: #5B4130;
  --g-cream: #F7EFE2;
  --g-cream-2: #E3D4BF;
  --g-cream-3: #C4AF95;
  --g-paper: #FBF7F0;
  --g-line: #E7DED0;
  --g-sage: #4F6B52;
  --g-sage-soft: #E3ECE1;
  --g-amber: #B45309;
  --g-amber-soft: #FCEBD5;
  --g-red: #9C3B2A;
  --g-red-soft: #F6E1DC;

  padding: 128px 0;
  background: var(--g-brown);
  color: var(--g-cream);
}

.ctl-head {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  align-items: end;
  gap: 56px;
  margin-bottom: 48px;
}

.ctl-title {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.ctl-title span {
  color: var(--g-cream-3);
}

.ctl-lead {
  max-width: 420px;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--g-cream-2);
}

/* Case picker */
.ctl .cases {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.ctl .case {
  all: unset;
  position: relative;
  overflow: hidden;
  padding: 12px 20px;
  border: 1px solid rgba(247, 239, 226, 0.3);
  border-radius: 999px;
  font-size: 16px;
  color: var(--g-cream-2);
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.ctl .case:hover {
  border-color: var(--g-cream);
}

.ctl .case:focus-visible {
  outline: 2px solid var(--g-cream);
  outline-offset: 3px;
}

.ctl .case[aria-checked="true"] {
  border-color: var(--g-cream);
  background: var(--g-cream);
  color: var(--ink);
}

/* Countdown to the next case while the demo cycles */
.ctl .case .t {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--g-amber);
  transform: scaleX(0);
  transform-origin: left;
}

.ctl .case[aria-checked="true"] .t.run {
  animation: ctlFill 7s linear forwards;
}

@keyframes ctlFill {
  to { transform: scaleX(1); }
}

/* Stage */
.ctl-stage {
  display: grid;
  grid-template-columns: 1fr 48px 1.1fr 48px 1fr;
  align-items: stretch;
  padding: 32px;
  border-radius: 28px;
  background: var(--g-paper);
  color: var(--ink);
  box-shadow: 0 40px 80px -40px rgba(20, 10, 4, 0.7);
}

.ctl .col {
  display: flex;
  flex-direction: column;
  min-height: 330px;
}

.ctl .col h3 {
  margin: 0 0 16px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-3);
}

.ctl .arrow {
  display: grid;
  place-items: center;
  color: var(--ink-3);
}

.ctl .arrow svg {
  width: 26px;
  height: 26px;
  opacity: 0.35;
  transition: opacity 0.3s, color 0.3s, translate 0.3s;
}

.ctl .arrow.on svg {
  color: var(--g-amber);
  opacity: 1;
  animation: ctlNudge 1.2s ease-in-out infinite;
}

@keyframes ctlNudge {
  50% { translate: 4px 0; }
}

/* 1. The request */
.ctl .bubble {
  max-width: 95%;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 17px;
  line-height: 1.45;
}

.ctl .bubble small {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--ink-3);
}

.ctl .b-user {
  border: 1px solid var(--g-line);
  border-bottom-left-radius: 4px;
  background: var(--white);
}

.ctl .b-ai {
  margin: 14px 0 0 auto;
  border-bottom-right-radius: 4px;
  background: var(--g-brown);
  color: var(--g-cream);
  transition: opacity 0.4s, translate 0.4s;
}

.js .ctl .b-ai {
  opacity: 0;
  translate: 0 8px;
}

.js .ctl .b-ai.on {
  opacity: 1;
  translate: 0 0;
}

.ctl .b-ai small {
  color: var(--g-cream-3);
}

.ctl .aside {
  margin: auto 0 0;
  padding-top: 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* 2. The rules */
.ctl .rules {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--g-line);
  border-radius: 20px;
  background: var(--white);
}

.ctl .rules::before {
  content: '';
  position: absolute;
  inset: -1px;
  border: 2px solid var(--g-amber);
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s;
}

.ctl .rules.scan::before {
  opacity: 0.6;
}

.ctl .rule {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--g-line);
  font-size: 17px;
}

.ctl .rule:last-child {
  border-bottom: 0;
}

.ctl .mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #F1EBE1;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-3);
  transition: background-color 0.3s, color 0.3s, scale 0.3s;
}

.ctl .rule.pass .mark { background: var(--g-sage); color: var(--white); }
.ctl .rule.hold .mark { background: var(--g-amber); color: var(--white); }
.ctl .rule.fail .mark { background: var(--g-red); color: var(--white); }
.ctl .rule.check .mark { scale: 1.1; background: var(--g-amber-soft); color: var(--g-amber); }

.ctl .rule.skip {
  color: var(--ink-3);
}

.ctl .rule em {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 15px;
  font-style: normal;
  white-space: nowrap;
  color: var(--ink-3);
}

.ctl .rule.hold em { color: var(--g-amber); }
.ctl .rule.fail em { color: var(--g-red); }

.ctl .outside {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--ink-2);
}

/* 3. The result */
.ctl .result {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: 20px;
  background: #F1EBE1;
  transition: background-color 0.4s;
}

.ctl .result .big {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink-3);
  font-size: 26px;
  font-weight: 600;
  color: var(--white);
  opacity: 0.4;
  scale: 0.8;
  transition: background-color 0.4s, scale 0.4s var(--ease), opacity 0.4s;
}

.ctl .result b {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.ctl .result p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

.ctl .result .log {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 15px;
  color: var(--ink-2);
  opacity: 0;
  transition: opacity 0.4s 0.2s;
}

.ctl .result.done .log { opacity: 1; }
.ctl .result.done .big { opacity: 1; scale: 1; }
.ctl .result.ok { background: var(--g-sage-soft); }
.ctl .result.ok .big { background: var(--g-sage); }
.ctl .result.hold { background: var(--g-amber-soft); }
.ctl .result.hold .big { background: var(--g-amber); }
.ctl .result.no { background: var(--g-red-soft); }
.ctl .result.no .big { background: var(--g-red); }

.ctl .approver {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid #F1C894;
  border-radius: 999px;
  background: var(--white);
  font-size: 15px;
}

.ctl .approver[hidden] {
  display: none;
}

.ctl .approver i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--g-brown);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  color: var(--g-cream);
}

.ctl-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 40px;
  margin-top: 28px;
}

.ctl-foot p {
  margin: 0;
  font-size: 20px;
  color: var(--g-cream);
}

.ctl-foot a {
  font-size: 15px;
  color: var(--g-cream-2);
  text-decoration: underline;
  text-decoration-color: rgba(247, 239, 226, 0.4);
  text-underline-offset: 4px;
}

.ctl-foot a:hover {
  color: var(--g-cream);
}

.ctl-foot .ref a {
  color: var(--g-cream-2);
  text-decoration: none;
}

.ctl a:focus-visible {
  outline: 2px solid var(--g-cream);
  outline-offset: 3px;
}

@media (max-width: 1060px) {
  .ctl-stage {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ctl .arrow {
    height: 40px;
  }

  .ctl .arrow svg {
    rotate: 90deg;
  }

  .ctl .arrow.on svg {
    animation: none;
  }

  .ctl .col {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .ctl {
    padding: 88px 0;
  }

  .ctl-head {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 32px;
  }

  .ctl-stage {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ctl *,
  .ctl *::before,
  .ctl *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   08 Discoverability — when people ask AI, your offer should answer

   An assistant answers a traveller's request twice: from messy offer data
   (a list of unconfirmed hotels) and from data Ragioneer keeps accurate (a
   clear best fit with its reasons). The versions alternate while on screen
   until the visitor picks one (js/components/discover-demo.js). Beside it,
   the Adobe statistic and where the approved facts are shared.
   ========================================================================== */

.disc {
  --x-panel: #F8F4EE;
  --x-line: #E2DACD;
  --x-brown: #5B4130;
  --x-cream: #F7EFE2;
  --x-amber: #B45309;
  --x-amber-soft: #FCEBD5;
  --x-sage: #4F6B52;
  --x-sage-soft: #E3ECE1;

  padding: 128px 0;
  background: var(--paper-2);
}

.disc-head {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  align-items: end;
  gap: 56px;
  margin-bottom: 56px;
}

.disc-title {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.disc-title span {
  color: var(--ink-3);
}

.disc-lead {
  max-width: 420px;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink-2);
}

.disc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 20px;
}

/* Assistant demo */
.disc .demo {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--x-line);
  border-radius: 28px;
  background: var(--white);
}

.disc .toggle {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid var(--x-line);
  border-radius: 999px;
  background: var(--x-panel);
}

html:not(.js) .disc .toggle {
  display: none;
}

.disc .toggle button {
  all: unset;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.disc .toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--x-cream);
}

.disc .toggle button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.disc .chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 680px;
  padding: 24px;
  border-radius: 20px;
  background: var(--x-panel);
}

.disc .who {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--ink-3);
}

.disc .q {
  align-self: flex-end;
  max-width: 82%;
  padding: 14px 18px;
  border-radius: 18px 18px 4px 18px;
  background: var(--x-brown);
  font-size: 17px;
  line-height: 1.45;
  color: var(--x-cream);
}

.disc .q .who {
  color: #C9B49A;
}

.disc .a {
  max-width: 94%;
  min-height: 54px;
  font-size: 17px;
  line-height: 1.55;
}

.disc .think {
  display: inline-flex;
  gap: 5px;
  padding: 8px 0;
}

.disc .think i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: discHop 1s infinite;
}

.disc .think i:nth-child(2) { animation-delay: 0.15s; }
.disc .think i:nth-child(3) { animation-delay: 0.3s; }

@keyframes discHop {
  50% { translate: 0 -4px; }
}

/* Results — messy rows, or a clear pick with an alternative */
.disc .results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.disc .row,
.disc .pick,
.disc .alt {
  transition: opacity 0.4s var(--ease), translate 0.4s var(--ease);
}

.js .disc .row,
.js .disc .pick,
.js .disc .alt {
  opacity: 0;
  translate: 0 8px;
}

.js .disc .row.on,
.js .disc .pick.on,
.js .disc .alt.on {
  opacity: 1;
  translate: 0 0;
}

.disc .row {
  display: grid;
  grid-template-columns: 40px 1fr 250px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--x-line);
  border-radius: 12px;
  background: var(--white);
}

.disc .row .ic,
.disc .alt .ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #EFE6D8;
}

.disc .row b {
  font-size: 16px;
  font-weight: 500;
}

.disc .row em {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-style: normal;
  white-space: nowrap;
  color: var(--x-amber);
}

.disc .row em i {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--x-amber-soft);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  color: var(--x-amber);
}

.disc .pick {
  padding: 18px;
  border: 1.5px solid #CFE0CC;
  border-radius: 18px;
  background: var(--white);
}

.disc .pick .top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.disc .pick .ic {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(160deg, #F1E6D6, #E3D2BA);
}

.disc .pick b {
  display: block;
  font-size: 18px;
  font-weight: 500;
}

.disc .pick .tag {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--x-sage);
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
}

.disc .fit {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
}

.disc .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--x-line);
  font-size: 15px;
  color: var(--ink-2);
}

.disc .meta b {
  display: inline;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.disc .why {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.disc .why li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 15px;
  line-height: 1.4;
  transition: opacity 0.3s;
}

.js .disc .why li {
  opacity: 0;
}

.js .disc .why li.on {
  opacity: 1;
}

.disc .why li::before {
  content: '\2713';
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--x-sage-soft);
  font-size: 12px;
  font-weight: 600;
  color: var(--x-sage);
}

.disc .alt {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--x-line);
  border-radius: 14px;
  background: var(--white);
}

.disc .alt b {
  font-size: 16px;
  font-weight: 500;
}

.disc .alt span {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  color: var(--ink-2);
}

.disc .alt small {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px solid var(--x-line);
  border-radius: 999px;
  background: var(--x-panel);
  font-size: 13.5px;
  font-weight: 500;
  vertical-align: 1px;
  color: var(--ink-2);
}

/* Right column */
.disc .side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.disc-stat {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border-radius: 28px;
  background: var(--x-brown);
  color: var(--x-cream);
}

.disc-stat::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 134, 42, 0.28), transparent 65%);
  pointer-events: none;
}

.disc .num {
  font-family: var(--sans);
  font-size: clamp(72px, 7vw, 104px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.05em;
}

.disc .num .pct {
  color: #E8A15C;
}

.disc-stat p {
  max-width: 340px;
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.5;
}

.disc-stat small {
  display: block;
  max-width: 340px;
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.5;
  color: #E3D4BF;
}

.disc-stat a {
  color: var(--x-cream);
  text-underline-offset: 3px;
  text-decoration: underline;
}

.disc-stat a:focus-visible {
  outline: 2px solid var(--x-cream);
  outline-offset: 3px;
}

.disc .feeds {
  flex: 1;
  padding: 28px;
  border: 1px solid var(--x-line);
  border-radius: 28px;
  background: var(--white);
}

.disc .feeds h3 {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.disc .feeds > p {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
}

.disc .out {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.disc .out div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--x-panel);
  font-size: 16px;
}

.disc .out svg {
  flex: 0 0 auto;
  color: var(--x-amber);
}

.disc .out .private {
  border: 1px dashed var(--x-line);
  background: transparent;
  color: var(--ink-2);
}

.disc .out .private svg {
  color: var(--ink-3);
}

@media (max-width: 1000px) {
  .disc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .disc {
    padding: 88px 0;
  }

  .disc-head {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 36px;
  }

  .disc .demo,
  .disc .feeds,
  .disc-stat {
    padding: 22px;
    border-radius: 22px;
  }

  .disc .chat {
    min-height: 0;
    padding: 18px;
  }

  .disc .why {
    grid-template-columns: 1fr;
  }

  .disc .row {
    grid-template-columns: 40px 1fr;
  }

  .disc .row em {
    grid-column: 2;
    min-width: 0;
    margin-top: -6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .disc *,
  .disc *::before,
  .disc *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .disc .row,
  .js .disc .pick,
  .js .disc .why li,
  .js .disc .alt {
    opacity: 1;
    translate: 0 0;
  }
}

/* ==========================================================================
   09 Decision Intelligence — learn from what the foundation shows

   A clinic example: visit length drifts out of the planned range after a
   new protocol, the cause is found, a fix is tested and the plan updated.
   The chart and steps play together while on screen
   (js/components/decision-teaser.js). Without JS or with reduced motion
   the finished story shows.
   ========================================================================== */

.dint {
  --d-brown: #5B4130;
  --d-cream: #F7EFE2;
  --d-cream-2: #E3D4BF;
  --d-cream-3: #C4AF95;
  --d-paper: #FBF7F0;
  --d-line: #E7DED0;
  --d-amber: #B45309;
  --d-sage: #4F6B52;

  padding: 128px 0;
  background: var(--d-brown);
  color: var(--d-cream);
}

.dint-head {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  align-items: end;
  gap: 56px;
  margin-bottom: 48px;
}

.dint-title {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.dint-title span {
  color: var(--d-cream-3);
}

.dint-lead {
  max-width: 420px;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--d-cream-2);
}

.dint-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 28px;
  padding: 32px;
  border-radius: 28px;
  background: var(--d-paper);
  color: var(--ink);
  box-shadow: 0 40px 80px -40px rgba(20, 10, 4, 0.7);
}

/* Chart */
.dint .chart {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 16px;
  border: 1px solid var(--d-line);
  border-radius: 20px;
  background: var(--white);
}

.dint .chart h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
}

.dint .chart .sub {
  margin: 4px 0 14px;
  font-size: 15px;
  color: var(--ink-2);
}

.dint .plot {
  position: relative;
  flex: 1;
  min-height: 260px;
}

.dint .plot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dint .band {
  fill: #F1E7D8;
}

.dint .plan {
  fill: none;
  stroke: var(--d-cream-3);
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.dint .obs {
  fill: none;
  stroke: var(--d-brown);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-dashoffset 2.2s var(--ease);
}

.dint .obs.after {
  stroke: var(--d-sage);
}

.js .dint .obs {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.js .dint .chart.on .obs {
  stroke-dashoffset: 0;
}

.js .dint .chart.on .obs.after {
  transition-delay: 0.2s;
}

.dint .flag {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translate(-50%, -100%);
  transition: opacity 0.4s;
}

.js .dint .flag {
  opacity: 0;
}

.js .dint .flag.show {
  opacity: 1;
}

.dint .flag b {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--d-amber);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--white);
}

.dint .flag i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--d-amber);
  box-shadow: 0 0 0 0 rgba(180, 83, 9, 0.5);
  animation: dintPing 2s infinite;
}

.dint .flag.good b,
.dint .flag.good i {
  background: var(--d-sage);
}

.dint .flag.good i {
  box-shadow: none;
  animation: none;
}

@keyframes dintPing {
  70%  { box-shadow: 0 0 0 10px rgba(180, 83, 9, 0); }
  100% { box-shadow: 0 0 0 0 rgba(180, 83, 9, 0); }
}

.dint .key {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-2);
}

.dint .key span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dint .key i {
  display: inline-block;
  width: 18px;
  height: 10px;
  border-radius: 3px;
}

.dint .months {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding: 0 2px;
  font-size: 14px;
  color: var(--ink-3);
}

/* Steps */
.dint-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dint-steps h3 {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-3);
}

.dint .step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--d-line);
  border-radius: 16px;
  background: var(--white);
  transition: opacity 0.4s, border-color 0.4s, background-color 0.4s;
}

.js .dint .step {
  opacity: 0.5;
}

.js .dint .step.on {
  opacity: 1;
  border-color: #E2C9A6;
  background: #FFFBF5;
}

.js .dint .step.done {
  opacity: 1;
}

.dint .n {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F1EBE1;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background-color 0.3s, color 0.3s;
}

.dint .step.on .n {
  background: var(--d-amber);
  color: var(--white);
}

.dint .step.done .n {
  background: var(--d-sage);
  color: var(--white);
}

.dint .step b {
  display: block;
  font-size: 17px;
  font-weight: 500;
}

.dint .step p {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

.dint-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
  margin-top: 28px;
}

.dint-foot p {
  max-width: 640px;
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--d-cream-2);
}

.dint-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--d-cream);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  transition: background-color 0.2s;
}

.dint-cta:hover {
  background: var(--white);
}

.dint-cta:focus-visible {
  outline: 2px solid var(--d-cream);
  outline-offset: 3px;
}

@media (max-width: 1000px) {
  .dint-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .dint {
    padding: 88px 0;
  }

  .dint-head {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 32px;
  }

  .dint-stage {
    padding: 18px;
    border-radius: 22px;
  }

  .dint .plot {
    min-height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dint *,
  .dint *::before,
  .dint *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .dint .step {
    opacity: 1;
  }
}

/* ==========================================================================
   10 Approach — start with one part of the business

   Three step cards rise in along a line that fills (initApproach in
   js/site.js), then a note on how each next step starts further ahead.
   Without JS or with reduced motion everything shows.
   ========================================================================== */

.ap {
  --a-line: #E2DACD;
  --a-brown: #5B4130;
  --a-cream: #F7EFE2;
  --a-amber: #B45309;
  --a-amber-2: #E8862A;
  --a-amber-soft: #FCEBD5;

  padding: 128px 0;
  background: var(--paper);
}

.ap-head {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  align-items: end;
  gap: 56px;
  margin-bottom: 56px;
}

.ap-title {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.ap-title span {
  color: var(--ink-3);
}

.ap-lead {
  max-width: 420px;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink-2);
}

/* Steps */
.ap-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ap-line {
  position: absolute;
  top: 40px;
  left: 40px;
  right: 40px;
  z-index: 0;
  height: 2px;
  background: var(--a-line);
}

.ap-line i {
  position: absolute;
  inset: 0;
  background: var(--a-amber-2);
  transform-origin: left;
  transition: transform 1.6s var(--ease);
}

.js .ap-line i {
  transform: scaleX(0);
}

.js .ap-steps.in .ap-line i {
  transform: none;
}

.ap .step {
  position: relative;
  z-index: 1;
  padding: 28px;
  border: 1px solid var(--a-line);
  border-radius: 24px;
  background: var(--white);
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.js .ap .step {
  opacity: 0;
  translate: 0 24px;
}

.js .ap-steps.in .step {
  opacity: 1;
  translate: 0 0;
}

.js .ap-steps.in .step:nth-of-type(2) { transition-delay: 0.35s; }
.js .ap-steps.in .step:nth-of-type(3) { transition-delay: 0.7s; }

.ap .step:hover {
  border-color: #D6C8B3;
  box-shadow: 0 24px 40px -28px rgba(53, 38, 27, 0.4);
}

.ap .badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border-radius: 16px;
  background: var(--a-brown);
  font-size: 20px;
  font-weight: 500;
  color: var(--a-cream);
}

.ap .step h3,
.ap .grow h3 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.ap .step p,
.ap .grow p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
}

.ap .step .ex {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--a-line);
  font-size: 15px;
  line-height: 1.5;
}

.ap .ex b {
  font-weight: 500;
  color: var(--ink);
}

/* Every next step starts further ahead: heading left, reason right */
.ap .grow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 32px;
  margin-top: 20px;
  padding: 28px;
  border: 1px solid var(--a-line);
  border-radius: 24px;
  background: var(--white);
}

.ap .grow h3 {
  margin: 0;
}

.ap-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 40px;
}

.ap-cta p {
  margin: 0;
  font-size: 20px;
}

.ap-cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 999px;
  background: var(--ink);
  font-size: 16px;
  font-weight: 500;
  color: var(--a-cream);
  transition: background-color 0.2s;
}

.ap-cta a:hover {
  background: var(--a-brown);
}

.ap-cta a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .ap-steps {
    grid-template-columns: 1fr;
  }

  .ap-line {
    top: 40px;
    bottom: 40px;
    left: 52px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .ap-line i {
    transform-origin: top;
  }

  .js .ap-line i {
    transform: scaleY(0);
  }

  .ap .grow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ap {
    padding: 88px 0;
  }

  .ap-head {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 36px;
  }

  .ap .step,
  .ap .grow {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ap *,
  .ap *::before,
  .ap *::after {
    transition: none !important;
  }

  .js .ap .step {
    opacity: 1;
    translate: 0 0;
  }

  .js .ap-line i {
    transform: none;
  }
}

/* ==========================================================================
   11 Client voices — the teams we build with, in their own words

   One quote at a time on a brown stage: the words fade in, the key phrase
   is underlined and a bar on the chosen client fills while the quote is
   read. The quotes advance while on screen until the visitor picks a client
   or after one full round (js/components/voices.js). Without JS every quote
   shows in a column.
   ========================================================================== */

.vox {
  --v-brown: #5B4130;
  --v-brown-2: #4E3727;
  --v-cream: #F7EFE2;
  --v-cream-2: #E3D4BF;
  --v-cream-3: #D6C4AB;
  --v-amber: #E8862A;

  padding: 128px 0;
  background: var(--v-brown);
  color: var(--v-cream);
}

.vox-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 64px;
}

.vox-title {
  max-width: 19ch;
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--v-cream);
}

.vox-title span {
  color: var(--v-cream-3);
}

.vox-lead {
  max-width: 40ch;
  margin: 20px 0 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.5;
  color: var(--v-cream-2);
}

.vox-arrows {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.vox-arrows button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(247, 239, 226, 0.28);
  border-radius: 50%;
  background: transparent;
  color: var(--v-cream);
  cursor: pointer;
  transition: background-color 0.25s, border-color 0.25s, scale 0.2s;
}

.vox-arrows button:hover {
  border-color: rgba(247, 239, 226, 0.5);
  background: rgba(247, 239, 226, 0.1);
}

.vox-arrows button:active {
  scale: 0.94;
}

.vox button:focus-visible,
.vox-quote:focus-visible {
  outline: 2px solid var(--v-cream);
  outline-offset: 2px;
}

html:not(.js) .vox-arrows {
  display: none;
}

/* Quote stage */
.vox-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 64px;
}

.vox-stage {
  position: relative;
  padding-left: 56px;
}

.vox-mark {
  position: absolute;
  top: -18px;
  left: 0;
  font-family: var(--serif);
  font-size: 120px;
  line-height: 1;
  color: var(--v-amber);
  transition: translate 0.5s var(--ease), opacity 0.5s;
}

.vox-mark.bump {
  opacity: 0.4;
  translate: 0 -10px;
}

.vox-quotes {
  display: grid;
  gap: 56px;
}

.vox-quote {
  margin: 0;
}

.vox-quote blockquote {
  margin: 0;
}

.vox-quote p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 2.7vw, 38px);
  font-weight: 300;
  line-height: 1.32;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.vox .hl {
  background: linear-gradient(var(--v-amber), var(--v-amber)) left 92% / 100% 2px no-repeat;
  color: var(--white);
  transition: background-size 0.8s var(--ease);
}

.vox .by {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}

.vox .by b {
  display: block;
  font-size: 18px;
  font-weight: 500;
}

.vox .by b + span {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  color: var(--v-cream-3);
}

/* One quote at a time once the script runs */
.js .vox-quotes {
  gap: 0;
}

.js .vox-quote {
  grid-area: 1 / 1;
  visibility: hidden;
}

.js .vox-quote.on {
  visibility: visible;
}

.vox .w {
  display: inline-block;
  opacity: 0;
  translate: 0 0.35em;
  filter: blur(4px);
  transition: opacity 0.5s var(--ease), translate 0.5s var(--ease), filter 0.5s var(--ease);
}

.vox-quote.on .w {
  opacity: 1;
  translate: 0 0;
  filter: blur(0);
}

.js .vox .hl {
  background-size: 0% 2px;
}

.js .vox-quote.on .hl {
  background-size: 100% 2px;
}

.js .vox .by {
  opacity: 0;
  translate: 0 8px;
  transition: opacity 0.5s 0.2s, translate 0.5s 0.2s var(--ease);
}

.js .vox-quote.on .by {
  opacity: 1;
  translate: 0 0;
}

/* Client list */
.vox-people {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vox-people button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  overflow: hidden;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s;
}

.vox-people button:hover {
  background: rgba(247, 239, 226, 0.06);
}

.vox-people button[aria-selected="true"] {
  background: rgba(247, 239, 226, 0.1);
}

.vox-people .txt {
  min-width: 0;
}

.vox-people b {
  display: block;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.vox-people .txt span {
  display: block;
  overflow: hidden;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--v-cream-3);
}

.vox-people button[aria-selected="false"] .av {
  opacity: 0.7;
}

.vox-people .bar {
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  height: 2px;
  border-radius: 2px;
  background: rgba(247, 239, 226, 0.12);
  opacity: 0;
  transition: opacity 0.3s;
}

.vox-people .bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--v-amber);
}

.vox-people [aria-selected="true"] .bar {
  opacity: 1;
}

.vox-people.held .bar {
  opacity: 0;
}

.vox .av {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--v-cream-2);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--v-brown-2);
  transition: opacity 0.3s;
}

.vox .by .av {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.vox .av.c2 { background: #EBC9A0; }
.vox .av.c3 { background: #CFDCCB; }
.vox .av.c4 { background: #E8D9C2; }
.vox .av.c5 { background: #F1D3BE; }

@media (max-width: 900px) {
  .vox {
    padding: 88px 0;
  }

  .vox-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 40px;
  }

  .vox-arrows {
    display: none;
  }

  .vox-body {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .vox-stage {
    padding-top: 44px;
    padding-left: 0;
  }

  .vox-mark {
    top: -6px;
    font-size: 88px;
  }

  .vox-quote p {
    font-size: 25px;
  }

  .vox-people {
    flex-direction: row;
    margin: 0 calc(var(--gutter) * -1);
    overflow-x: auto;
    padding: 0 var(--gutter) 4px;
    scroll-padding-left: var(--gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .vox-people::-webkit-scrollbar {
    display: none;
  }

  .vox-people li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .vox-people button {
    width: auto;
    padding: 12px 16px 14px 12px;
    border: 1px solid rgba(247, 239, 226, 0.16);
  }

  .vox-people .txt span {
    max-width: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vox *,
  .vox *::before,
  .vox *::after {
    transition: none !important;
  }

  .vox .w {
    opacity: 1;
    translate: 0 0;
    filter: none;
  }
}

/* ==========================================================================
   Insights — cards rendered by js/components/blog.js
   ========================================================================== */

.ins-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin-bottom: 64px;
  text-align: center;
}

.ins-title {
  max-width: 18ch;
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.ins-title span {
  color: var(--ink-3);
}

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

.insights-grid .blog-card {
  display: flex;
  flex-direction: column;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.insights-grid .blog-card-image {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 22px;
  border-radius: 2px;
  background: var(--paper-2);
}

.insights-grid .blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.insights-grid .blog-card:hover .blog-card-image img {
  transform: scale(1.03);
}

.insights-grid .placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--ink-3);
}

.insights-grid .blog-card-category {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bronze);
}

.insights-grid .blog-card-title {
  margin: 10px 0 12px;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.insights-grid .blog-card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 15px;
  color: var(--ink-2);
}

.insights-grid .blog-card-meta {
  display: flex;
  gap: 18px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}

.insights-grid .blog-empty {
  grid-column: 1 / -1;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  text-align: center;
  color: var(--ink-3);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
  .hero--home .hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 1024px) {
  .hero--home .hero-inner {
    grid-template-columns: 1fr;
    gap: 56px;
    padding-top: 128px;
    padding-bottom: 72px;
  }

  .hero-stack {
    justify-self: stretch;
    max-width: none;
  }

  .hs-layer {
    --w: 100% !important;
  }
}

@media (max-width: 600px) {
  .hero--home .hero-inner {
    padding-top: 112px;
  }

  .hero--home .hero-actions .btn {
    width: 100%;
  }

  .insights-grid {
    grid-template-columns: 1fr;
  }
}
