/* Pixeloddity's motion layer: one sculptural pixel, then quieter spatial cues. */
.hero-art {
  position: absolute;
  width: 59%;
  height: 650px;
  right: -3%;
  top: 135px;
  pointer-events: none;
  contain: layout paint;
}
.hero-art canvas { display: block; width: 100%; height: 100%; }
.hero-art.is-ready .cube-fallback { display: none; }
.pixel-scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; contain: strict; }
.pixel-scene canvas { display: block; width: 100%; height: 100%; }
.pixel-scene canvas[hidden] { display: none; }
body.has-pixel-scene .contact-sculpture { display: none; }
.hero-headline, .hero-subheading, .hero-meta, .hero-bottom, .scroll-hint { position: relative; z-index: 1; }
.hero-subheading { color: var(--ink-80); }
.hero-headline .word { opacity: 1; transform: none; }
.hero.three-ready .hero-cubes-layer, .hero.three-ready .hero-overlay { display: none; }
.hero .hero-actions { display: flex; }
.hero-bottom { position: relative; margin-top: 64px; }
.hero-inner { isolation: isolate; }
.hero-headline { pointer-events: none; }
.motion-toggle {
  position: absolute;
  right: 40px;
  top: 744px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-80);
  font: 10px var(--mono);
  cursor: pointer;
}
.motion-toggle { display: none !important; }
.motion-toggle[hidden] { display: none; }
.motion-toggle .ms-icon { font-size: 16px; }
.motion-toggle:hover { color: var(--red); border-color: currentColor; }
:where(a, button):focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
section[id] { scroll-margin-top: 90px; }
.nav a[aria-current="location"] { color: var(--red); background: var(--ink-10); }
.reading-progress { position: fixed; inset: 0 0 auto; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left; z-index: 400; pointer-events: none; }

/* Static geometry also provides an immediate, script-independent first frame. */
.cube-fallback { position: absolute; left: 50%; top: 47%; width: 150px; height: 150px; transform-style: preserve-3d; transform: translate(-50%, -50%) rotateX(-25deg) rotateY(-35deg); }
.cube-fallback i { position: absolute; inset: 0; border: 1px solid #a5090c; background: #d6080c; }
.cube-fallback i:nth-child(1) { transform: translateZ(75px); }
.cube-fallback i:nth-child(2) { transform: rotateY(90deg) translateZ(75px); background: #92080b; }
.cube-fallback i:nth-child(3) { transform: rotateX(90deg) translateZ(75px); background: #f04446; }

.process-grid { position: relative; perspective: 1200px; }
.process-grid::before { content: ""; position: absolute; inset: -1px 0 auto; height: 2px; background: var(--red); transform: scaleX(var(--process-progress, 0)); transform-origin: left; z-index: 2; }
.step .s-num { transition: color 240ms ease; }
.step.is-current .s-num { color: var(--red); }
.step.is-current { background: color-mix(in oklab, var(--bg) 65%, white); }
.depth-card {
  transform: perspective(1200px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), background 300ms ease;
}
.depth-card .s-icon { transition: transform 400ms var(--ease); }
.depth-card:hover .s-icon { transform: translateY(-4px) rotate(-8deg); }
.process-devices { overflow: hidden; }
.process-devices img { transform-origin: center; }
.section-head h2 { text-wrap: balance; }
.section-head .idx { color: var(--ink-60); }
.hero-meta .meta-col .label, .hero-meta .meta-col > span:not(.label) { color: var(--ink-60); }
.step .s-body, .service .s-body { color: var(--ink-80); }
.contact { position: relative; overflow: hidden; isolation: isolate; }
.contact .contact-big, .contact .contact-row { position: relative; z-index: 1; }
.contact-sculpture { position: absolute; right: 4%; top: 12%; width: 30%; height: 330px; pointer-events: none; z-index: 0; opacity: 0.85; }
.contact-sculpture .cube-fallback { width: 120px; height: 120px; }
.contact-sculpture .cube-fallback i:nth-child(1) { transform: translateZ(60px); }
.contact-sculpture .cube-fallback i:nth-child(2) { transform: rotateY(90deg) translateZ(60px); }
.contact-sculpture .cube-fallback i:nth-child(3) { transform: rotateX(90deg) translateZ(60px); }
[data-mode="dark"] .step.is-current { background: #242423; }
[data-mode="dark"] .logo img { filter: grayscale(1) brightness(0) invert(1); }
[data-mode="dark"] .s-bg-num, [data-mode="dark"] .s-bg-icon { color: #292928; }

@media (min-width: 1600px) { .hero-art { right: 0; } }
@media (max-width: 1000px) and (min-width: 721px) {
  .hero-art { width: 54%; right: -5%; top: 155px; height: 590px; }
  .hero-headline.display { font-size: clamp(64px, 11vw, 110px); }
  .motion-toggle { top: 692px; }
}
@media (max-width: 720px) {
  .hero { padding-bottom: 64px; }
  .hero-inner.pad { padding-inline: var(--pad); }
  .hero-meta { grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 48px; }
  .hero-meta .meta-col.center { grid-column: 1 / -1; grid-row: 2; }
  .hero-meta .meta-col.right { text-align: right; }
  .hero-headline.display { font-size: clamp(64px, 17vw, 110px); }
  .hero-art { position: relative; inset: auto; width: calc(100% + 40px); margin: 12px -20px 0; height: 340px; }
  .motion-toggle { position: relative; inset: auto; margin: -12px 0 20px auto; display: flex; }
  .scroll-hint { margin-top: 12px; }
  .hero-bottom { margin-top: 32px; gap: 24px; }
  .hero-actions { gap: 10px; }
  .btn-line, .btn-fill { padding: 13px 18px; }
  .contact-sculpture { right: -38px; top: 40px; opacity: 0.14; width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .depth-card { transform: none; }
  .motion-toggle { display: none; }
  .hero-headline .word { opacity: 1; transform: none; }
}
html.motion-paused *, html.motion-paused *::before, html.motion-paused *::after { animation-play-state: paused !important; }

/* Alternating content and sculpture lanes keep motion outside readable copy. */
.journey-section {
  margin-top: 560px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 4vw, 64px);
  align-items: stretch;
  overflow: visible;
}
.journey-content { min-width: 0; position: relative; z-index: 1; }
.sculpture-rail { min-width: 0; position: relative; }
.sculpture-slot { position: sticky; top: 120px; height: min(440px, 58vh); width: 100%; }
.journey-section[data-content-side="left"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.journey-section[data-content-side="left"] .journey-content { grid-column: 1; grid-row: 1; }
.journey-section[data-content-side="left"] .sculpture-rail { grid-column: 2; grid-row: 1; }
.journey-section .section-head { grid-template-columns: 1fr; gap: 20px; }
.journey-section h2.section { font-size: clamp(32px, 3.8vw, 58px); overflow-wrap: anywhere; }
.journey-section .about-body { grid-template-columns: 1fr; gap: 32px; }
.journey-section .process-grid, .journey-section .paths-grid { grid-template-columns: 1fr; }
.journey-section .step, .journey-section .path-card { border-right: 0; border-bottom: 1px solid var(--line); }
.journey-section .services-grid, .journey-section .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.journey-section .service { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.journey-section .service:nth-child(2n), .journey-section .stat:nth-child(2n) { border-right: 0; }
.journey-section .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.journey-section .work-row { grid-template-columns: 24px minmax(0, 1fr) 42px 24px; gap: 12px; }
.journey-section .work-row .w-client { display: block; grid-column: 2; grid-row: 2; }
.journey-section .work-row .w-tags { display: flex; grid-column: 2 / -1; grid-row: 3; }
.journey-section .work-row .w-year { grid-column: 3; grid-row: 1; }
.journey-section .work-row .w-arrow { grid-column: 4; grid-row: 1; }
.has-pixel-scene .sculpture-slot .cube-fallback { display: none; }
.journey-section .contact-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.journey-section .contact-row a { overflow-wrap: anywhere; }
.journey-section .contact-big { font-size: clamp(38px, 4.5vw, 64px); }
.journey-section .testimonial-mark { display: none; }

@media (min-width: 1001px) {
  .hero-art { width: calc(50% - 24px); right: 10%; top: 170px; height: 560px; }
  .hero-headline.display { font-size: clamp(64px, 7.4vw, 112px); max-width: 50%; }
  .hero-subheading { max-width: 48%; }
  .hero-bottom { margin-top: 100px; max-width: 50%; grid-template-columns: 1fr; gap: 24px; }
  .hero-actions { justify-content: flex-start; }
  .journey-content .pad, .journey-content .section-head, .journey-content .about-body { padding-inline: 24px; }
  .journey-section .section-head { margin-bottom: 96px; }
  .journey-section .about-body { gap: 56px; }
}
@media (min-width: 1001px) and (max-width: 1300px) {
  .journey-section .services-grid { grid-template-columns: minmax(0, 1fr); }
  .journey-section .service { border-right: 0; }
}
@media (max-width: 1000px) {
  .journey-section, .journey-section[data-content-side="left"] { grid-template-columns: 108px minmax(0, 1fr); column-gap: 16px; margin-top: 240px; padding-inline: 16px; }
  .journey-section[data-content-side="left"] { grid-template-columns: minmax(0, 1fr) 108px; }
  .sculpture-slot { position: relative; top: auto; height: 90px; width: 100%; }
  .journey-content .pad, .journey-content .section-head, .journey-content .about-body { padding-inline: 0; }
  .hero-art { position: relative; inset: auto; width: 100%; height: 340px; margin: 32px 0; }
  .hero-headline.display { font-size: clamp(58px, 12vw, 100px); }
  .motion-toggle { position: relative; inset: auto; margin: 0 0 24px auto; display: flex; }
  .motion-toggle[hidden] { display: none; }
  .journey-section h2.section { font-size: clamp(32px, 6vw, 58px); }
}
@media (max-width: 560px) {
  .journey-section .services-grid, .journey-section .contact-row, .journey-section .stats-grid { grid-template-columns: minmax(0, 1fr); }
  .journey-section .service { border-right: 0; }
  .journey-section .step, .journey-section .service, .journey-section .path-card, .journey-section .stat { padding-inline: 12px; }
  .journey-section .contact-big { font-size: clamp(32px, 9vw, 48px); }
}

/* Mobile reading flow: the sculpture gets its own full-width stage, then copy. */
@media (max-width: 720px) {
  .hero-inner.pad { padding-inline: 20px; }
  .hero-meta { grid-template-columns: 1fr 1fr; margin-bottom: 32px; }
  .hero-headline.display { font-size: clamp(54px, 16vw, 86px); line-height: 0.88; }
  .hero-subheading { max-width: 26ch; margin-top: 20px; }
  .hero-art { height: 310px; width: calc(100% + 32px); margin: 22px -16px 0; }
  .hero-bottom { margin-top: 26px; }
  .hero-desc { max-width: 31ch; font-size: 17px; }
  .journey-section,
  .journey-section[data-content-side="left"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 18px;
    margin-top: 150px;
    padding-inline: 20px;
  }
  .journey-section .sculpture-rail,
  .journey-section[data-content-side="left"] .sculpture-rail {
    grid-column: 1;
    grid-row: 1;
    min-height: 240px;
  }
  .journey-section .journey-content,
  .journey-section[data-content-side="left"] .journey-content {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }
  .sculpture-slot {
    position: relative;
    top: auto;
    width: min(88vw, 420px);
    height: 240px;
    margin: 0 auto;
  }
  .journey-section .section-head,
  .journey-section .about-body,
  .journey-content .pad { padding-inline: 0; }
  .journey-section .section-head { margin-bottom: 42px; gap: 12px; }
  .journey-section h2.section { font-size: clamp(34px, 10vw, 54px); line-height: 0.96; }
  .journey-section .about-body { gap: 28px; }
  .journey-section .about-body .lead { font-size: 23px; }
  .journey-section .process-grid,
  .journey-section .services-grid,
  .journey-section .paths-grid,
  .journey-section .stats-grid,
  .journey-section .contact-row { grid-template-columns: 1fr; }
  .journey-section .step,
  .journey-section .service,
  .journey-section .path-card,
  .journey-section .stat { border-right: 0; padding-inline: 0; }
  .journey-section .work-row { grid-template-columns: 24px minmax(0, 1fr) 42px 24px; padding-block: 22px; }
  .journey-section .contact-big { font-size: clamp(38px, 11vw, 58px); }
  .journey-section .contact-row { gap: 22px; }
  .pixel-scene { overflow: hidden; }
}
@media (max-width: 420px) {
  .hero-meta { font-size: 10px; }
  .hero-art { height: 270px; }
  .journey-section { margin-top: 110px; }
  .journey-section .sculpture-rail { min-height: 210px; }
  .sculpture-slot { height: 210px; }
  .journey-section h2.section { font-size: clamp(31px, 10vw, 44px); }
}

/* Consistent semibold hierarchy across the page headings. */
h1, h2 { font-weight: 700; }
