:root {
  --bg: #0c0e0d;
  --panel: #151915;
  --accent: #dcfc77;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
body { overflow-x: clip }
.header { position: relative; z-index: 3; background: #0d100e }
.page-progress { display: none }
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(49rem, calc(100svh - 5rem));
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0;
  align-items: center;
  padding-block: 0;
}
.hero-copy { position: relative; z-index: 2; padding-block: 4.5rem }
.hero h1 { font-size: clamp(3rem, 7.3vw, 7.1rem); letter-spacing: -.077em; line-height: .96 }
.title-line { display: block; padding: 0 .11em .13em 0; margin-bottom: -.13em; overflow: clip }
.title-line > span { display: block }
.hero-photo {
  isolation: isolate;
  position: absolute;
  inset: 0 min(-2.5rem, (76rem - 100vw) / 2) 0 33%;
  min-height: auto;
  border-radius: 0;
  background: #1b221b;
}
.hero-image, .hero-image img { position: absolute; inset: 0; width: 100%; height: 100% }
.hero-image img { object-position: 54% 37%; filter: saturate(.72) contrast(1.05) }
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #0c0e0d 0%, #0c0e0dbb 15%, transparent 58%),
              linear-gradient(0deg, #0c0e0d 0%, transparent 38%, transparent 82%, #0c0e0d4f 100%);
}
.hero-photo figcaption { z-index: 2; left: auto; right: 3rem; bottom: 1.85rem; width: auto; padding: .5rem 1rem; text-align: right; background: #0c0e0db8; backdrop-filter: blur(8px); border-right: 1px solid var(--accent) }
.hero-haze {
  position: absolute;
  z-index: -1;
  inset: 0 13% 0 -20%;
  background: radial-gradient(ellipse at 42% 52%, #2f401e6b, transparent 57%);
  pointer-events: none;
}
.hero-atmosphere { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; pointer-events: none; display: none }
.hero-beam, .frame-lines { position: absolute; pointer-events: none }
.hero-beam { display: none }
.frame-lines { z-index: 1; inset: 2.2rem 2.8rem; border: 1px solid #e6ffc329; mask-image: radial-gradient(ellipse at center, transparent 52%, #000 93%) }
.button { position: relative; isolation: isolate; overflow: hidden }
.button-accent { box-shadow: 0 0 2.6rem #a7df3028 }
.equipment { position: relative; background: #0c0e0d }
.equipment-still { min-height: min(71svh, 45rem); display: grid; align-items: end; position: relative; isolation: isolate; overflow: clip; background: #161e16 }
.equipment-still > img { position: absolute; z-index: -3; inset: 0 0 0 auto; width: 77%; height: 100%; object-fit: cover; object-position: 50% 49%; filter: saturate(.55) brightness(.77) }
.equipment-shade { position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, #0c0e0d 12%, #0c0e0dbc 37%, transparent 75%), linear-gradient(0deg,#0c0e0d,transparent 58%) }
.equipment-light { position: absolute; z-index: -1; inset: 0; background: linear-gradient(105deg, transparent 38%, #d7ff671b 48%, #deff9239 50%, transparent 62%); opacity: 0 }
.equipment-content { padding-bottom: clamp(2.5rem, 7vw, 6rem) }
.equipment-content h2 { font-size: clamp(4.1rem, 10.3vw, 10rem); color: #eef5e5; text-wrap: initial; margin-bottom: 1rem }
.equipment-content p:last-child { color: #d3ddc9; margin: 0; font-size: 1.1rem }
@media (max-width: 54rem) {
  .hero { min-height: min(42rem, calc(100svh - 5rem)) }
  .hero-photo { right: -1.5rem; left: 27% }
  .hero h1 { font-size: clamp(3rem, 8.6vw, 5.2rem) }
}
@media (max-width: 41rem) {
  .hero { display: flex; flex-direction: column; min-height: auto; align-items: stretch }
  .hero-copy { align-self: stretch; padding-block: 2.35rem 1.55rem }
  .hero h1 { font-size: clamp(2.78rem, 11.6vw, 4.45rem) }
  .hero-photo { position: relative; inset: auto; align-self: stretch; aspect-ratio: 1.05; margin-inline: -1rem }
  .hero-photo::after { background: linear-gradient(0deg,#0c0e0d 0%, transparent 35%, transparent 79%,#0c0e0d 100%) }
  .hero-image img { object-position: 53% 32% }
  .hero-photo figcaption { right: 1rem; bottom: 1rem; font-size: 1rem }
  .frame-lines { inset: 1rem 1rem 1.4rem }
  .equipment-still { min-height: min(67svh, 37rem) }
  .equipment-still > img { width: 100%; object-position: center 43% }
  .equipment-shade { background: linear-gradient(90deg,#0c0e0d9c,transparent 72%), linear-gradient(0deg,#0c0e0d 0%,#0c0e0d94 34%,transparent 77%) }
}
@media (prefers-reduced-motion: no-preference) {
  .page-progress { display: block; position: fixed; top: 0; left: 0; z-index: 8; width: 100%; height: 2px; pointer-events: none; background: var(--accent); transform-origin: left; transform: scaleX(var(--page-progress, 0)); box-shadow: 0 0 10px #d7fa6b }
  .hero-atmosphere { display: block }
  .hero-beam {
    display: block; z-index: 1; width: 34%; height: 160%; top: -30%; left: -40%;
    transform: translateX(0) skewX(-17deg);
    background: linear-gradient(90deg, transparent, #bce76610 38%, #cfff7046 65%, #eaffbaec 69%, #dfff982c 71%, transparent 78%);
    mix-blend-mode: screen;
    filter: blur(1px);
    animation: beam-pass 2s .26s var(--ease-out) both;
  }
  .hero-image img { animation: camera-in 2.7s var(--ease-out) both }
  .hero-photo .frame-lines { animation: frame-in 1.2s .3s ease both }
  .hero-photo figcaption { animation: fade-up .75s .64s var(--ease-out) both }
  .hero-copy > .eyebrow { animation: fade-up .75s .12s var(--ease-out) both }
  .hero-copy > .intro { animation: fade-up .7s .52s var(--ease-out) both }
  .hero-copy > .actions { animation: fade-up .65s .62s var(--ease-out) both }
  .hero-copy:focus-within > .actions { animation: none }
  .title-line > span { animation: title-in 1s .15s var(--ease-out) both }
  .title-line:nth-child(2) > span { animation-delay: .27s }
  .title-line:nth-child(3) > span { animation-delay: .40s }
  .hero-copy em { animation: ink-light 1.4s .38s ease-out both }
  .hero-image { transform: translate3d(var(--camera-x, 0px), var(--camera-y, 0px), 0) scale(1.035); transition: transform .75s var(--ease-out) }
  .motion-enter { opacity: 0; transform: translateY(28px) }
  .motion-enter.is-visible, .motion-enter:focus-within { opacity: 1; transform: none; transition: opacity .73s ease, transform .82s var(--ease-out); transition-delay: var(--enter-delay, 0ms) }
  .motion-enter:focus-within { transition: none }
  .motion-live .equipment-still > img { transform: scale(1.11) translateY(var(--equipment-pan, 0px)); transition: transform .15s linear }
  .motion-live .equipment-light { opacity: var(--equipment-glow, 0); transform: translateX(var(--equipment-light, -80%)) }
  .button-accent::after {
    content: ""; z-index: -1; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, #fff9 50%, transparent 65%);
    transform: translateX(-110%); transition: transform .65s var(--ease-out);
  }
  .button-accent:hover::after, .button-accent:focus-visible::after { transform: translateX(110%) }
  @keyframes beam-pass { 0% { opacity: 0; transform: translateX(0) skewX(-17deg) } 23% { opacity: .8 } 70% { opacity: .58 } 100% { opacity: 0; transform: translateX(435%) skewX(-17deg) } }
  @keyframes camera-in { from { transform: scale(1.19); opacity: .25; filter: saturate(.35) contrast(1.15) brightness(.47) } to { transform: scale(1); opacity: 1 } }
  @keyframes frame-in { from { opacity: 0; transform: scale(1.06) } to { opacity: 1; transform: scale(1) } }
  @keyframes title-in { from { transform: translate3d(0,106%,0) skewY(4deg) } to { transform: none } }
  @keyframes fade-up { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: none } }
  @keyframes ink-light { 0% { color: #f0f3ea; text-shadow: none } 45% { color: #dfff84; text-shadow: 0 0 .32em #b8ff6b85 } 100% { text-shadow: none } }
}
@media (min-width: 41.01rem) {
  .hero-copy { grid-column: 1 / -1; width: min(68%, 53rem) }
}
@media (max-width: 24rem) {
  .hero h1 { font-size: clamp(2.42rem, 11vw, 2.85rem) }
}

.chapter-frame {
  position: relative;
  display: flow-root;
  background: var(--bg);
}
.chapter--services > .chapter-frame { background: #101410 }
.chapter--work > .chapter-frame { background: #101510 }
.chapter--paper > .chapter-frame { background: var(--paper); --cut-ink: #232e1a }
.chapter--accent > .chapter-frame { background: var(--accent); --cut-ink: #344419 }

@media (prefers-reduced-motion: no-preference) {
  .motion-live main { --chapter-overlap: clamp(10rem, 34svh, 22rem) }
  .motion-live .chapter { position: relative; isolation: isolate }
  .motion-live .chapter:not(:last-child)::after { content: ""; display: block; height: var(--chapter-overlap); pointer-events: none }
  .motion-live .chapter + .chapter { margin-top: calc(-1 * var(--chapter-overlap)) }
  .motion-live .chapter:not(:last-child) > .chapter-frame {
    position: sticky;
    top: min(0px, calc(100svh - var(--frame-height, 100svh)));
  }

  .motion-live .chapter:has(:focus-visible) > .chapter-frame { position: relative; top: auto }
  .chapter-frame::after,
  .chapter + .chapter > .chapter-frame::before {
    content: "";
    position: absolute;
    z-index: 4;
    pointer-events: none;
    left: 0;
    right: 0;
  }
  .chapter-frame::after {
    bottom: 0;
    height: clamp(5rem, 23svh, 16rem);
    background: linear-gradient(transparent, #080d08 80%);
    opacity: calc(var(--cut-exit, 0) * .32);
  }
  .chapter + .chapter > .chapter-frame::before {
    top: 0;
    height: clamp(.85rem, 3svh, 1.8rem);
    opacity: var(--cut-edge, 0);
    background: linear-gradient(90deg, transparent, var(--cut-ink, #ddfc8d) 40%, transparent) top / 100% 1px no-repeat,
                radial-gradient(ellipse at 42% 0%, #c3f56a55, transparent 70%);
    box-shadow: 0 -18px 46px #0a110baa;
  }
  .chapter--intro .hero-photo { transform: scale(calc(1 - var(--cut-exit, 0) * .025)); transform-origin: 78% 50% }
  .chapter--equipment .equipment-still > img { filter: saturate(.55) brightness(calc(.77 - var(--cut-exit, 0) * .22)) }
  @media (max-width: 41rem) {
    .motion-live main { --chapter-overlap: clamp(5.5rem, 20svh, 9.5rem) }
  }
  @media (max-height: 30rem) {
    .motion-live main { --chapter-overlap: clamp(3rem, 20svh, 6rem) }
  }
}

@media (min-width: 41.01rem) and (prefers-reduced-motion: no-preference) {
  .motion-live .hero { min-height: max(min(49rem, calc(100svh - 5rem)), calc(100svh - 9.5rem)) }
}

@media (min-width: 41.01rem) and (prefers-reduced-motion: no-preference) {
  .motion-live .chapter-frame {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100svh;
  }
}
