/* Founder experience: precision typography and section continuity.
   Progressive enhancement. Original approved layout, palette, and copy are unchanged. */

/* Letters remain part of the natural text flow; only their paint transform moves. */
.hero-name-line .kinetic-letter,
.contact-section h2 em .kinetic-letter {
  display: inline-block;
  position: relative;
  transform-origin: 50% 55%;
  transform: translate3d(var(--kx, 0px), var(--ky, 0px), 0)
             rotateZ(var(--kr, 0deg));
  will-change: auto;
  backface-visibility: hidden;
  transition: color .22s ease-out;
}
.hero-name-line .kinetic-letter.is-in-motion,
.contact-section h2 em .kinetic-letter.is-in-motion { will-change: transform, color; }
.hero-name-line .kinetic-letter.is-near,
.contact-section h2 em .kinetic-letter.is-near {
  color: var(--accent);
}
/* The original coloured period is part of the word, not a separate animated emoji. */
.hero-name-line .big-period { display: inline-block; }

/* An ultra-thin line follows the actual crossing between two sections. It never
   blocks interaction or reading, and disappears entirely outside the boundary. */
.chapter-continuity {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  overflow: hidden;
  contain: layout style;
  opacity: 0;
  visibility: hidden;
}
.chapter-continuity.is-active { visibility: visible; }
.chapter-continuity .continuity-stroke {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  transform-origin: var(--edge-origin, 0%) 50%;
  transform: translate3d(0, var(--edge-y, -4px), 0) scaleX(var(--edge-scale, 0));
  background: var(--edge-colour, var(--accent));
  box-shadow: 0 0 0 1px rgba(0,0,0,.025);
}
.chapter-continuity .continuity-notch {
  position: absolute;
  width: 10px;
  height: 10px;
  top: 0;
  left: var(--notch-x, 8%);
  background: var(--edge-colour, var(--accent));
  transform: translate3d(0, calc(var(--edge-y, -4px) - 4px), 0) rotate(45deg) scale(var(--notch-scale, 0));
}

/* The founder wordmark recedes naturally as the first dark chapter enters.
   It stays completely static for the entire first impression. */
.hero-name-wrap {
  transform-origin: left center;
  transform: translate3d(0, calc(var(--hero-depart, 0) * -31px), 0)
             scale(calc(1 - var(--hero-depart, 0) * .045));
}

/* Scroll-linked typographic storytelling. These custom properties are driven
   by actual section geometry; no timers, page-wide fades, or forced scrolling. */
.manifesto-words p {
  translate: 0 calc((1 - var(--manifesto-arrive, 1)) * 26px);
}
.work-introduction h2 em {
  -webkit-text-stroke: 1.8px var(--accent);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: linear-gradient(90deg, var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: left center;
  background-size: calc(var(--work-word-fill, 1) * 100%) 100%;
}
.company-map {
  position: relative;
}
.company-map::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--company-underline, 1));
  pointer-events: none;
}
.contact-section h2 em {
  position: relative;
  display: inline-block;
}
.contact-section h2 em::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.028em;
  width: 100%;
  height: .047em;
  min-height: 3px;
  background: currentColor;
  transform: scaleX(var(--contact-line, 0));
  transform-origin: left;
  pointer-events: none;
}

/* Editorial underline alignment repair, 2026-10-08.
   Use the real highlighted word width; keep the stroke between letterforms and
   the following line at every breakpoint rather than overprinting "TO DO.". */
.outline-highlight::after {
  width: 100%;
  bottom: 14%;
  height: clamp(3px, .036em, 7px);
  transform-origin: left center;
  transform: scaleX(var(--manifesto-rule, 1));
}
/* Negative title tracking makes the inline box slightly shorter than the
   visible final period. Allow the stroke to reach that ink, but sit below it. */
.contact-section h2 em::after {
  width: calc(100% + .07em);
  bottom: -.082em;
  height: clamp(3px, .025em, 7px);
  min-height: 3px;
}

/* We only run cursor physics on devices with an actual hover pointer. */
@media (hover: none), (pointer: coarse), (max-width: 800px) {
  .hero-name-line .kinetic-letter,
  .hero-name-line .kinetic-letter.is-in-motion,
  .contact-section .kinetic-letter,
  .contact-section .kinetic-letter.is-in-motion {will-change: auto;}
}
@media (prefers-reduced-motion: reduce) {
  .hero-name-line .kinetic-letter,
.contact-section h2 em .kinetic-letter {
    transform: none !important;
    color: inherit !important;
    will-change: auto !important;
  }
  .chapter-continuity {display: none !important;}
  .hero-name-wrap { transform:none !important; }
  .manifesto-words p {translate:none !important;}
  .work-introduction h2 em {background-size: 100% 100% !important;}
  .company-map::before {transform:scaleX(1) !important;}
  .contact-section h2 em::after {display:none !important;}
}
