/* HEARTBIT — editorial motion layer for the chapters below the room. */
#hb-agence-sections {
  --hb-accent: #8d88ff;
  --hb-pink: #f10087;
  --hb-blue: #246dff;
  --hb-pointer-x: 50%;
  --hb-pointer-y: 50%;
}

#hb-agence-sections > section {
  isolation: isolate;
  overflow: clip;
  min-height: 105vh;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at var(--hb-pointer-x) var(--hb-pointer-y), rgba(98, 105, 255, 0.1), transparent 25%),
    #09090b;
}

#hb-agence-sections > section:nth-child(even) {
  background:
    radial-gradient(circle at var(--hb-pointer-x) var(--hb-pointer-y), rgba(241, 0, 135, 0.09), transparent 25%),
    #111115;
}

#hb-agence-sections > section::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -15%;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: clamp(5rem, 8vw, 9rem) clamp(5rem, 8vw, 9rem);
  transform: translateY(calc(var(--hb-progress, 0) * -4rem));
}

#hb-agence-sections > section::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(58vw, 52rem);
  aspect-ratio: 1;
  right: -24vw;
  top: 12%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 8vw rgba(255, 255, 255, 0.018),
    0 0 0 16vw rgba(255, 255, 255, 0.012);
  transform: translateY(calc(var(--hb-progress, 0) * 5rem));
}

.hb-scene-number {
  position: absolute;
  z-index: -1;
  right: 1.5vw;
  top: 0.02em;
  font-size: clamp(11rem, 29vw, 32rem);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.1em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.055);
  user-select: none;
  transform: translateY(calc(var(--hb-progress, 0) * -3rem));
}

.hb-ambient-line {
  position: absolute;
  z-index: -1;
  left: 6vw;
  right: 6vw;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  transform: scaleX(var(--hb-line-scale, .25));
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(.2,.8,.2,1);
}

.hb-inview .hb-ambient-line { --hb-line-scale: 1; }

.hb-motion-ready #hb-agence-sections [data-hb-reveal] {
  opacity: 0;
  transform: translateY(3rem);
  filter: blur(7px);
  transition:
    opacity .85s ease var(--hb-delay, 0ms),
    transform 1s cubic-bezier(.2,.8,.2,1) var(--hb-delay, 0ms),
    filter .85s ease var(--hb-delay, 0ms);
}
.hb-motion-ready #hb-agence-sections .hb-inview [data-hb-reveal] {
  opacity: 1;
  transform: none;
  filter: none;
}

#hb-agence-sections h2 {
  position: relative;
  max-width: 14ch;
}
#hb-agence-sections h2 .hb-muted {
  background: linear-gradient(90deg, #fff 0%, #f10087 48%, #246dff 100%);
  -webkit-background-clip: text;
  color: transparent;
}
#hb-agence-sections .hb-tag {
  color: rgba(255,255,255,.62);
}

/* 01 — manifesto */
#hb-agence-sections > .hb-intro {
  min-height: 125vh;
  background:
    radial-gradient(circle at 78% 24%, rgba(66, 83, 255, .19), transparent 26%),
    radial-gradient(circle at 20% 90%, rgba(241, 0, 135, .12), transparent 28%),
    #08080a;
}
.hb-intro .hb-native {
  width: max-content;
  padding: .7rem 1rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  backdrop-filter: blur(12px);
}
.hb-intro .hb-native::before {
  box-shadow: 0 0 1.2rem #fff;
  animation: hb-pulse 1.8s ease-in-out infinite;
}
@keyframes hb-pulse { 50% { opacity: .35; transform: scale(.7); } }
.hb-intro .hb-columns {
  max-width: 72rem;
  margin-top: clamp(3rem, 7vh, 6rem);
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.2);
}
.hb-intro .hb-opening {
  margin-left: auto;
  margin-top: clamp(3rem, 7vh, 6rem);
}
.hb-intro .hb-sentence {
  position: relative;
  max-width: 28ch;
  margin-left: auto;
  padding: 2rem;
  border: 0;
  background: linear-gradient(135deg, rgba(241,0,135,.13), rgba(36,109,255,.16));
}

/* 02 — the two disciplines become two doors. */
#hb-agence-sections .hb-jobs {
  gap: 1rem;
  margin-top: clamp(3rem, 7vh, 6rem);
  border: 0;
}
#hb-agence-sections .hb-job {
  position: relative;
  min-height: clamp(12rem, 19vw, 18rem);
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 3rem);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.025);
  transition: transform .4s ease, border-color .4s ease, background .4s ease;
}
#hb-agence-sections .hb-job + .hb-job { border-left: 1px solid rgba(255,255,255,.14); }
#hb-agence-sections .hb-job::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(145deg, rgba(241,0,135,.58), rgba(36,109,255,.62));
  transform: translateY(102%);
  transition: transform .55s cubic-bezier(.2,.8,.2,1);
}
#hb-agence-sections .hb-job:hover {
  border-color: rgba(255,255,255,.38);
  box-shadow: 0 1.25rem 3.5rem rgba(32,50,155,.2);
}
#hb-agence-sections .hb-job[aria-selected="true"] {
  border-color: rgba(255,255,255,.7);
  color: #fff;
}
#hb-agence-sections .hb-job[aria-selected="true"]::before { transform: translateY(0); }
#hb-agence-sections .hb-job strong {
  position: absolute;
  left: clamp(1.5rem, 3vw, 3rem);
  bottom: clamp(1.5rem, 3vw, 3rem);
  max-width: 13ch;
  font-size: clamp(1.8rem, 4vw, 4.5rem);
  line-height: .95;
}
#hb-agence-sections .hb-job-panel {
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: clamp(2rem, 7vw, 7rem);
  align-items: end;
  min-height: 17rem;
  padding: clamp(1.5rem, 4vw, 4rem);
  border: 1px solid rgba(255,255,255,.13);
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
}
#hb-agence-sections .hb-job-panel .hb-large { font-size: clamp(1.8rem, 3.5vw, 3.8rem); }
#hb-agence-sections .hb-job-panel.is-switching > * { animation: hb-copy-in .55s cubic-bezier(.2,.8,.2,1); }
@keyframes hb-copy-in {
  from { opacity: 0; transform: translateY(1rem); filter: blur(5px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* 03 — process as a live timeline. */
#hb-agence-sections .hb-workflow {
  position: relative;
  margin-top: clamp(3rem, 7vh, 6rem);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.018);
}
#hb-agence-sections .hb-workflow::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 25%;
  height: 3px;
  background: linear-gradient(90deg, var(--hb-pink), var(--hb-blue));
  transform: translateX(calc(var(--hb-step, 0) * 100%));
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
#hb-agence-sections .hb-step {
  min-height: 9rem;
  padding: 1.5rem;
  border-right: 1px solid rgba(255,255,255,.1);
  border-bottom: 0;
  transition: background .35s ease, color .35s ease;
}
#hb-agence-sections .hb-step:last-child { border-right: 0; }
#hb-agence-sections .hb-step[aria-selected="true"] {
  border-bottom: 0;
  background: rgba(255,255,255,.065);
}
#hb-agence-sections .hb-step span { font-size: clamp(1.1rem, 2vw, 2rem); }
#hb-agence-sections .hb-stage {
  position: relative;
  min-height: clamp(18rem, 30vw, 28rem);
  padding: clamp(2rem, 5vw, 5rem);
  align-content: end;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgba(36,109,255,.2), transparent 26%),
    linear-gradient(135deg, rgba(116,16,84,.28), rgba(25,54,135,.24));
}
#hb-agence-sections .hb-stage::before {
  content: attr(data-stage-number);
  position: absolute;
  right: -.04em;
  top: -.22em;
  font-size: clamp(11rem, 25vw, 27rem);
  font-weight: 700;
  line-height: 1;
  color: rgba(255,255,255,.035);
}
#hb-agence-sections .hb-stage strong { font-size: clamp(2rem, 4vw, 4.6rem); }
#hb-agence-sections .hb-stage.is-switching > * { animation: hb-copy-in .55s cubic-bezier(.2,.8,.2,1); }

/* 04 — trust architecture */
#hb-agence-sections > .hb-security {
  background:
    radial-gradient(circle at 50% 48%, rgba(42,73,255,.2), transparent 31%),
    #09090c;
}
#hb-agence-sections .hb-boundary {
  position: relative;
  overflow: hidden;
  min-height: 22rem;
  display: grid;
  align-content: center;
  padding: clamp(2rem, 5vw, 5rem);
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.025);
}
#hb-agence-sections .hb-boundary::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px dashed rgba(129,123,255,.33);
  border-radius: 50%;
  transform: scale(1.25, .75) rotate(calc(var(--hb-progress, 0) * 12deg));
}
#hb-agence-sections .hb-system { position: relative; z-index: 2; }
#hb-agence-sections .hb-system span {
  padding: clamp(1rem, 3vw, 2.5rem) .5rem;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(8,8,12,.82);
  backdrop-filter: blur(10px);
}
.hb-data-dot {
  position: absolute;
  z-index: 1;
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--hb-accent);
  box-shadow: 0 0 1.2rem var(--hb-accent);
  animation: hb-data-travel var(--duration) linear infinite;
  animation-delay: var(--delay);
}
@keyframes hb-data-travel {
  0% { left: 12%; top: 70%; opacity: 0; }
  15% { opacity: 1; }
  50% { left: 50%; top: 30%; }
  85% { opacity: 1; }
  100% { left: 88%; top: 66%; opacity: 0; }
}
#hb-agence-sections .hb-security details {
  transition: background .35s ease, padding .35s ease;
}
#hb-agence-sections .hb-security details[open] {
  padding-inline: 1.5rem;
  background: linear-gradient(90deg, rgba(74,85,255,.13), transparent);
}

/* 05 — beliefs as three planes. */
#hb-agence-sections .hb-values {
  gap: 1rem;
  margin-top: clamp(3rem, 7vh, 6rem);
  perspective: 1000px;
}
#hb-agence-sections .hb-value {
  --hb-card-shift: 0rem;
  position: relative;
  min-height: 20rem;
  padding: clamp(1.5rem, 3vw, 3rem);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.025);
  transform: translateY(var(--hb-card-shift));
  transition: border-color .45s ease, background .45s ease, box-shadow .45s ease;
}
#hb-agence-sections .hb-value:nth-child(2) { --hb-card-shift: 2.5rem; }
#hb-agence-sections .hb-value:nth-child(3) { --hb-card-shift: 5rem; }
#hb-agence-sections .hb-value:hover {
  border-color: var(--hb-accent);
  background: rgba(87,91,255,.1);
  box-shadow: 0 1.25rem 3.5rem rgba(48,55,175,.2);
}
#hb-agence-sections .hb-value strong {
  margin-top: 5rem;
  font-size: clamp(1.8rem, 3.2vw, 3.5rem);
}
#hb-agence-sections .hb-signature {
  margin-top: clamp(6rem, 13vh, 11rem);
  font-size: clamp(2.4rem, 5vw, 5.8rem);
  background: linear-gradient(90deg, #fff, #f10087 55%, #246dff);
  -webkit-background-clip: text;
  color: transparent;
}

/* 06 — closing scene */
#hb-agence-sections > .hb-close {
  min-height: 100vh;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 55%, rgba(101,99,255,.38), transparent 23%),
    radial-gradient(circle at 55% 55%, rgba(241,0,135,.2), transparent 42%),
    #09090b;
}
#hb-agence-sections .hb-close h2,
#hb-agence-sections .hb-close p { margin-inline: auto; }
#hb-agence-sections .hb-cta {
  --cta-x: 50%;
  --cta-y: 50%;
  display: grid;
  place-items: center;
  width: clamp(11rem, 18vw, 16rem);
  aspect-ratio: 1;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  font-size: clamp(1.15rem, 1.8vw, 1.7rem);
  line-height: 1.08;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: transform .25s ease, background .35s ease, color .35s ease;
}
#hb-agence-sections .hb-cta:hover {
  background:
    radial-gradient(circle at var(--cta-x) var(--cta-y), rgba(255,255,255,.28), rgba(241,0,135,.12) 30%, rgba(36,109,255,.12) 62%, transparent 78%);
  color: #fff;
}

.hb-progress {
  position: fixed;
  z-index: 35;
  left: clamp(.65rem, 1.5vw, 1.5rem);
  top: 50%;
  display: grid;
  gap: .75rem;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.shell[data-world="center"] .hb-progress.is-active { opacity: 1; pointer-events: auto; }
.hb-progress button {
  display: flex;
  align-items: center;
  gap: .55rem;
  border: 0;
  padding: 0;
  background: none;
  color: rgba(255,255,255,.42);
}
.hb-progress button::before {
  content: "";
  width: .45rem;
  height: .45rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: transform .3s ease, background .3s ease;
}
.hb-progress button span {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: max-width .35s ease, opacity .35s ease;
}
.hb-progress button:hover span,
.hb-progress button[aria-current="true"] span { max-width: 9rem; opacity: 1; }
.hb-progress button[aria-current="true"] { color: #fff; }
.hb-progress button[aria-current="true"]::before {
  border-color: var(--hb-accent);
  background: var(--hb-accent);
  transform: scale(1.55);
  box-shadow: 0 0 1rem var(--hb-accent);
}

@media (max-width: 800px) {
  #hb-agence-sections .hb-job-panel { grid-template-columns: 1fr; }
  .hb-progress { display: none; }
}

@media (max-width: 720px) {
  #hb-agence-sections > section { min-height: auto; }
  #hb-agence-sections > section::after { display: none; }
  #hb-agence-sections .hb-job strong { position: static; display: block; margin-top: 3rem; }
  #hb-agence-sections .hb-job { min-height: 12rem; }
  #hb-agence-sections .hb-workflow { grid-template-columns: repeat(2, 1fr); }
  #hb-agence-sections .hb-workflow::before { display: none; }
  #hb-agence-sections .hb-stage { min-height: 22rem; }
  #hb-agence-sections .hb-value,
  #hb-agence-sections .hb-value:nth-child(n) { min-height: auto; transform: none; }
  #hb-agence-sections .hb-value strong { margin-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hb-data-dot,
  .hb-intro .hb-native::before { animation: none; }
  .hb-motion-ready #hb-agence-sections [data-hb-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}
