/* Portfolio — light theme inspired by brandappart reference */

:root {
  --bg: #e8f0fe;
  --bg-img: url("../assets/home-bg-clean.png");
  --blue-scene: #c7dcf8 url("../assets/home-bg-clean.png") center center / cover fixed no-repeat;
  --text: #0f0f11;
  --text-muted: #4a4a55;
  --text-light: #6e6e7a;
  --accent: #ff5c00;
  --accent-hover: #e65300;
  --surface: rgba(255, 255, 255, 0.55);
  --surface-solid: #fff;
  --border: rgba(15, 15, 17, 0.1);
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html.instant-return {
  scroll-behavior: auto;
}

html.lenis,
html.lenis body {
  height: auto;
}

html.lenis {
  scroll-behavior: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

.lenis.lenis-autoToggle {
  transition-property: overflow;
  transition-duration: 1ms;
  transition-behavior: allow-discrete;
}

body {
  background: var(--bg-img), var(--bg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  cursor: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* Custom cursor */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s var(--ease), border 0.25s var(--ease);
  mix-blend-mode: normal;
}

.cursor.hover {
  width: 48px;
  height: 48px;
  background: transparent;
  border: 2px solid var(--accent);
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  z-index: 10000;
}

/* Right side scroll indicator */
.right-nav {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 160px;
  background: var(--border);
  z-index: 1000;
  border-radius: 1px;
}

.right-nav-dot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.15s ease-out;
}

/* Top header */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 4vw 1.5rem calc(4vw + 80px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 1000;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

.top-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: var(--text);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.top-cta svg {
  transition: transform 0.3s var(--ease);
}

.top-cta:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.top-cta:hover svg {
  transform: translate(2px, -2px);
}

/* Left side navigation */
.side-nav {
  position: fixed;
  top: 50%;
  left: 1.5rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1000;
}

.side-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.side-nav-item svg {
  width: 20px;
  height: 20px;
}

.side-nav-item:hover,
.side-nav-item.active {
  background: var(--surface-solid);
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(15, 15, 17, 0.08);
}

.side-nav-item.active {
  color: var(--accent);
}

.side-nav-label {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  padding: 0.35rem 0.75rem;
  background: var(--text);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.side-nav-item:hover .side-nav-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Sections common */
section {
  position: relative;
  width: 100%;
  padding: 8rem 4vw 8rem calc(4vw + 80px);
}

.section-reveal {
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js-enabled .section-reveal {
  opacity: 0;
  transform: translateY(60px);
}

.js-enabled .section-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 3rem;
}

/* Page-stack curtain transition */
.page-stack {
  position: relative;
  height: 320vh;
}

.page-stack > .hero,
.page-stack > #slit-wrapper {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 6rem;
  overflow: hidden;
}

.hero-video-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: url("../assets/home-background-poster.jpg") center / cover no-repeat;
}

.hero-video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body > main {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-video-background video { display: none; }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  opacity: 1;
  transform: translateY(calc(var(--hero-scroll-progress, 0) * -100vh));
  transition: none;
  will-change: transform;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 8.5rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-bottom: 2.5rem;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line > span {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  animation: revealUp 1s var(--ease) forwards;
}

.hero-title .line:nth-child(1) > span {
  animation-delay: 0.2s;
}

.hero-title .line:nth-child(2) > span {
  animation-delay: 0.35s;
}

.hero-title .line-accent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: clamp(2.5rem, 8vw, 7rem);
  animation: none;
  opacity: 1;
  transform: none;
}

.hero-title .line-accent > span {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  animation: revealUp 1s var(--ease) 0.5s forwards;
}

/* React Bits-inspired outline draw, adapted for the static homepage. */
.hero-title.hero-stroke-ready .line {
  overflow: visible;
}

.hero-title.hero-stroke-ready .line:not(.line-accent) > .hero-stroke-target,
.hero-title.hero-stroke-ready .line-accent > .hero-stroke-target {
  animation: none;
  opacity: 1;
  transform: none;
}

.hero-stroke-word {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  vertical-align: baseline;
}

.hero-stroke-word.is-ready .hero-stroke-source {
  color: transparent;
}

.hero-stroke-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.hero-stroke-outline {
  stroke: var(--accent);
  stroke-width: 1.5px;
  paint-order: stroke;
}

.hero-stroke-outline tspan {
  stroke-dasharray: var(--stroke-dash);
  stroke-dashoffset: var(--stroke-dash);
  animation: heroStrokeDraw 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.hero-stroke-fill {
  fill: currentColor;
}

.hero-stroke-wipe {
  transform: scaleX(0);
  transform-box: fill-box;
  transform-origin: left center;
  animation: heroStrokeFill 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

@keyframes heroStrokeDraw {
  to { stroke-dashoffset: 0; }
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-title .line > span {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-height: 800px) {
  .hero {
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero-title {
    margin-bottom: 1rem;
  }

  .hero .portfolio-strip {
    margin-bottom: 1rem;
  }
}

.symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 900;
}

.symbol-circle {
  width: 0.85em;
  height: 0.85em;
  border: 0.08em solid var(--accent);
  border-radius: 50%;
  font-size: 0.45em;
  line-height: 1;
}

.symbol-star {
  font-size: 0.6em;
  transform: translateY(5%);
}

.symbol-arrow {
  font-size: 0.5em;
  transform: translateY(-15%);
}

@keyframes revealUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Portfolio strip */
.portfolio-strip {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  margin: 0 auto 1.75rem;
  width: 100%;
  max-width: 360px;
  mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

.portfolio-lens {
  position: absolute;
  top: 0;
  left: 0;
  width: 90px;
  height: 90px;
  overflow: hidden;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: rgba(232, 240, 254, 0.96);
  box-shadow: 0 14px 36px rgba(15, 15, 17, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.2s ease, transform 0.32s var(--ease);
  z-index: 4;
}

.portfolio-lens.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.portfolio-lens-track {
  position: absolute;
  top: 50%;
  left: 0;
  display: inline-flex;
  align-items: center;
  animation: none;
  transform-origin: 0 50%;
  will-change: transform;
}

.logo-lens-active .cursor {
  opacity: 0;
}

.portfolio-strip-track {
  display: inline-flex;
  align-items: center;
  animation: stripScroll 22s linear infinite;
}

.client-logos {
  height: clamp(40px, 7vw, 72px);
  width: auto;
  object-fit: contain;
  opacity: 0.9;
  filter: drop-shadow(0 4px 12px rgba(15, 15, 17, 0.08));
}

@keyframes stripScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Hero intro */
.hero-intro {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.hero-intro-en {
  font-size: clamp(1.2rem, 2.6vw, 1.75rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  white-space: nowrap;
  text-align: center;
}

.hero-intro-zh {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 400;
  color: var(--text-light);
  line-height: 1.7;
  text-align: center;
}

/* Works scroll stage */
.works-stage {
  position: relative;
  height: 210vh;
  padding: 0;
  background-color: #c7dcf8;
  background-image: linear-gradient(to bottom, #171311 0%, #171311 55%, rgba(23, 19, 17, 0) 85%), url("../assets/home-bg-clean.png");
  background-size: cover;
  background-position: center;
  background-attachment: scroll, fixed;
  pointer-events: none;
}

.works-scene {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #171311;
  color: #fff;
  pointer-events: auto;
  isolation: isolate;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - var(--works-edge-fade, 0vh)), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - var(--works-edge-fade, 0vh)), transparent 100%);
}

.works-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: var(--blue-scene);
  opacity: var(--works-exit-progress, 0);
}

.works-backdrop,
.works-vignette,
.works-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.works-backdrop {
  z-index: -3;
  background-image: var(--works-bg-image);
  background-size: cover;
  background-position: center;
  opacity: var(--works-bg-image-opacity, 1);
  transform: translate3d(var(--works-bg-x, 0vw), var(--works-bg-y, 0vh), 0) scale(var(--works-bg-scale, 1.08));
  will-change: transform, opacity;
}

.works-vignette {
  z-index: -2;
  background:
    radial-gradient(circle at 50% 48%, rgba(23, 19, 17, 0) 0 26%, rgba(23, 19, 17, 0.36) 78%),
    linear-gradient(180deg, rgba(23, 19, 17, 0.06), rgba(23, 19, 17, 0.28));
}

.works-vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(23, 19, 17, var(--works-bg-overlay, 0.46));
}

.works-title {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(78vw, 1100px);
  transform: translate(-50%, calc(-50% + var(--works-title-y, 28px))) scale(var(--works-title-scale, 0.94));
  text-align: center;
  z-index: 3;
  pointer-events: none;
  opacity: var(--works-title-opacity, 0);
  color: rgba(214, 211, 214, 0.69);
  text-shadow: 0 6px 38px rgba(0, 0, 0, 0.42);
  will-change: transform, opacity;
}

.works-title-cn {
  display: block;
}

.works-title-cn {
  margin-top: 0;
  font-size: clamp(2.4rem, 5.6vw, 5.6rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.08em;
  transform: translateX(0.18em);
}

.works-field {
  z-index: 2;
}

.works-float {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--work-size, clamp(120px, 17vw, 300px));
  aspect-ratio: 1 / 1;
  margin: 0;
  border-radius: var(--work-radius, 18%);
  overflow: hidden;
  background: rgba(11, 12, 23, 0.72);
  box-shadow: 0 var(--work-shadow-y, 28px) 75px rgba(0, 0, 0, 0.42);
  opacity: var(--work-opacity, 0);
  will-change: transform, opacity;
  transform: translate(-50%, -50%) translate(var(--work-x, 0vw), var(--work-y, 0vh)) rotate(var(--work-rotation, 0deg)) scale(var(--work-scale, 0.16));
}

.works-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(var(--work-brightness, 1));
}

.works-float-1 { --work-size: clamp(170px, 20vw, 360px); --work-radius: 17%; }
.works-float-2 { --work-size: clamp(135px, 15vw, 275px); --work-radius: 14%; }
.works-float-3 { --work-size: clamp(150px, 18vw, 320px); --work-radius: 21%; }
.works-float-4 { --work-size: clamp(120px, 14vw, 250px); --work-radius: 18%; }
.works-float-5 { --work-size: clamp(125px, 15vw, 270px); --work-radius: 20%; }
.works-float-6 { --work-size: clamp(180px, 21vw, 380px); --work-radius: 15%; }
.works-float-7 { --work-size: clamp(155px, 18vw, 325px); --work-radius: 19%; }
.works-float-8 { --work-size: clamp(165px, 19vw, 345px); --work-radius: 16%; }

.works-float { width: min(var(--work-size), 8vw); }

@media (max-width: 768px) {
  .works-stage {
    height: 190vh;
  }

  .works-title {
    width: 88vw;
  }

  .works-title-cn {
    font-size: clamp(1.65rem, 7.2vw, 2.4rem);
  }

  .works-float {
    width: min(var(--work-size), 16vw);
  }

}

@media (prefers-reduced-motion: reduce) {
  .works-float,
  .works-title {
    transition: none;
  }
}

/* Ship / stacked cards section */
.ship-section {
  background: var(--blue-scene);
  color: #0f0f11;
  padding-bottom: 0;
}

.ship-stage {
  position: relative;
  height: 700vh;
}

.ship-scene {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.ship-title-main {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 0;
  padding: 8vh 5vw 1vh;
  line-height: 1.1;
  color: #0f0f11;
  z-index: 1;
}

.ship-cards-stack {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(86vw, 124vh, 1100px);
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  pointer-events: none;
}

.ship-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translate3d(0, calc(var(--ship-y, 0px) + var(--ship-y-percent, 0%)), var(--ship-z, 0px)) rotateX(var(--ship-rotate, 0deg));
  transform-origin: center top;
  background: transparent;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(28, 54, 99, 0.13), 0 34px 72px rgba(28, 54, 99, 0.16);
  z-index: calc(10 - var(--card-index, 0));
  will-change: transform;
  pointer-events: auto;
  backface-visibility: hidden;
  overflow: hidden;
}

.ship-card-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.ship-card-link {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
}

.ship-card-link:focus-visible {
  outline: 4px solid #fff;
  outline-offset: -7px;
}

.ship-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  object-position: center;
}

@media (max-width: 768px) {
  .ship-stage {
    height: 600vh;
  }

  .ship-title-main {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    padding: 7vh 5vw 1vh;
  }

  .ship-cards-stack {
    width: 92vw;
    top: 50%;
  }

  .ship-card {
    border-radius: 16px;
  }
}

/* Slit curtain transition wrapper */
.slit-wrapper {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}

#slit-wrapper {
  margin-top: -100vh;
}

.slit-window {
  width: var(--curtain-width, 65vw);
  height: var(--curtain-height, 12vh);
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--curtain-radius, 20px);
  background: #0a0a0e;
  opacity: var(--curtain-presence, 0);
  box-shadow: 0 28px 80px rgba(4, 4, 7, calc(var(--curtain-progress, 0) * 0.28));
  will-change: width, height, border-radius, opacity;
}

.top-cta,
.side-nav-item,
.right-nav,
.right-nav-dot {
  transition: color 0.28s ease, background-color 0.28s ease, border-color 0.28s ease, transform 0.3s var(--ease);
}

.curtain-dark .top-cta {
  background: #f5f5f7;
  color: #0a0a0e;
}

.curtain-dark .side-nav-item {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.curtain-dark .side-nav-item.active,
.curtain-dark .side-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.curtain-dark .right-nav {
  background: rgba(255, 255, 255, 0.16);
}

.curtain-dark .right-nav-dot {
  background: #ffffff;
}

.slit-window.is-open {
  pointer-events: auto;
}

.slit-window-2 {
  width: 100%;
  height: 100%;
  border-radius: 0;
  opacity: 1;
  transform: none;
  box-shadow: none;
}

#slit-wrapper-2 {
  position: relative;
  top: auto;
  height: 100vh;
  display: block;
  overflow: hidden;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .hero-content,
  .slit-window,
  #about .about-card,
  #about .about-statement,
  #about .about-thumbs {
    transition: none !important;
  }
}

/* About — reference layout */
#about {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: url("../assets/about-bg-dark.jpg") center center / cover no-repeat, #0a0a0e;
  color: #f5f5f7;
  overflow: hidden;
  padding: 5rem 4vw 5rem calc(4vw + 80px);
}

#about::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5vh;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 10, 14, 0), #0a0a0e);
}

/* About dark variant */
.about-page--dark {
  background: url("../assets/about-bg-dark.jpg") center center / cover no-repeat, #0a0a0e !important;
  color: #f5f5f7;
}

#about .about-statement {
  opacity: var(--about-content-progress, 0);
  transform: translateY(calc((1 - var(--about-content-progress, 0)) * 28px));
  transition: none;
}

#about .about-thumbs {
  opacity: var(--about-thumbs-progress, 0);
  transform: translate(-50%, calc((1 - var(--about-content-progress, 0)) * 28px));
  transition: none;
}

#about.is-revealed .about-statement {
  opacity: var(--about-content-progress, 0);
  transform: translateY(calc((1 - var(--about-content-progress, 0)) * 28px));
}

#about.is-revealed .about-thumbs {
  opacity: var(--about-thumbs-progress, 0);
  transform: translate(-50%, calc((1 - var(--about-content-progress, 0)) * 28px));
}

#about .about-statement {
  opacity: var(--about-statement-progress, 0);
}

/* Keep the container still: the lanyard's physics owns the entire entrance. */
#about .about-card,
#about.is-revealed .about-card {
  position: relative;
  flex: 0 0 clamp(280px, 29vw, 390px);
  width: clamp(280px, 29vw, 390px);
  height: 600px;
  visibility: hidden;
  opacity: 1;
  transform: none;
  transition: none;
}

#about.is-scene-complete .about-card {
  visibility: visible;
}

#about .about-card > img {
  position: absolute;
  z-index: 1;
  width: min(100%, 310px);
  height: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

#about .about-card.is-fallback > img {
  opacity: 1;
}

html:not(.js-enabled) #about .about-card {
  visibility: visible;
}

html:not(.js-enabled) #about .about-card > img {
  opacity: 1;
}

.about-lanyard {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(900px, 100vw);
  transform: translateX(-50%);
  pointer-events: auto;
}

.about-card.has-lanyard .about-lanyard {
  pointer-events: auto;
}

.about-card-hint {
  position: absolute;
  z-index: 3;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(245, 245, 247, 0.48);
  font-size: 11px;
  letter-spacing: 0.16em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.about-card.has-lanyard .about-card-hint {
  opacity: 1;
  transition-delay: 1.4s;
}

#about .about-thumbs,
#about.is-revealed .about-thumbs {
  opacity: 1;
  transform: translateX(-50%);
}

#about .about-thumbs img {
  opacity: 0;
  transform: translate3d(0, 54px, 0) rotate(-3deg) scale(0.92);
  transition: opacity 0.7s ease, transform 1.05s cubic-bezier(0.2, 0.85, 0.16, 1);
}

#about.is-scene-complete .about-thumbs img {
  opacity: 0.84;
  transform: translate3d(0, 0, 0) rotate(0) scale(1);
}

#about .about-thumbs img:nth-child(1) { transition-delay: 0.18s; }
#about .about-thumbs img:nth-child(2) { transition-delay: 0.27s; }
#about .about-thumbs img:nth-child(3) { transition-delay: 0.36s; }
#about .about-thumbs img:nth-child(4) { transition-delay: 0.45s; }
#about .about-thumbs img:nth-child(5) { transition-delay: 0.54s; }

#about.is-scene-complete .about-thumbs img:hover {
  opacity: 1;
  transform: translate3d(0, -5px, 0) scale(1.04);
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  #about .about-card,
  #about .about-thumbs img {
    transition: none !important;
  }
}

/* Third page — Think / Create */
.page-third {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: url("../assets/home-bg-clean.png") center center / cover no-repeat, var(--bg, #e8f0fe);
  color: var(--text, #0f0f11);
  overflow: hidden;
  padding: 5rem 4vw 5rem calc(4vw + 80px);
}

.page-third-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
}

.page-third-line {
  font-size: clamp(2.75rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: 0.2em;
}

.page-third-line:last-of-type {
  margin-bottom: 0.45em;
}

.page-third-zh {
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted, #4a4a55);
}

.page-third--featured {
  background: url("../assets/home-bg-clean.png") center center / cover no-repeat, var(--bg, #e8f0fe);
  color: var(--text, #0f0f11);
}

.page-third--featured::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: clamp(120px, 22vh, 260px);
  pointer-events: none;
  background: linear-gradient(180deg, #0a0a0e 0%, rgba(10, 10, 14, 0.72) 32%, rgba(10, 10, 14, 0) 100%);
}

.page-third--featured::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 10, 20, 0) var(--create-reveal-inset, 100%), #080a14 100%);
  clip-path: inset(var(--create-reveal-inset, 100%) 0 0);
}

.featured-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.82;
  margin-bottom: 1.75rem;
}

/* Only chapters without an existing line animation opt into this reveal. */
.type-motion-enabled [data-type-reveal] {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 720ms ease, transform 900ms cubic-bezier(.18,.72,.2,1);
}

.type-motion-enabled [data-type-reveal].is-type-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.type-motion-enabled .featured-desc[data-type-reveal],
.type-motion-enabled .film-section-title[data-type-reveal] {
  transition-delay: 120ms;
}

.type-motion-enabled .featured-title[data-type-reveal] > span,
.type-motion-enabled .film-section-title[data-type-reveal] > span {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 620ms ease, transform 800ms cubic-bezier(.18,.72,.2,1);
}

.type-motion-enabled .featured-title[data-type-reveal].is-type-visible > span,
.type-motion-enabled .film-section-title[data-type-reveal].is-type-visible > span {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.type-motion-enabled .featured-title[data-type-reveal] > span:last-child,
.type-motion-enabled .film-section-title[data-type-reveal] > span:last-child {
  transition-delay: 140ms;
}

@media (prefers-reduced-motion: reduce) {
  .type-motion-enabled [data-type-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .type-motion-enabled .featured-title[data-type-reveal] > span,
  .type-motion-enabled .film-section-title[data-type-reveal] > span {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.featured-title-main {
  font-size: clamp(4.2rem, 12vw, 10.5rem);
  font-weight: 900;
  letter-spacing: -0.045em;
}

.featured-title-sub {
  font-size: clamp(3.2rem, 9vw, 7.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #a0a0a0;
  margin-top: -0.18em;
}

.featured-arrow {
  display: flex;
  justify-content: center;
  margin: 0 auto 2rem;
  color: #0f0f11;
  animation: floatArrow 1.8s ease-in-out infinite;
}

.featured-arrow svg {
  width: 26px;
  height: 26px;
}

@keyframes floatArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.featured-desc {
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.65;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  color: #4a4a55;
}

#create .page-third-content {
  opacity: calc(1 - var(--create-exit-progress, 0));
  transform: none;
  transition: none;
}

#create.is-revealed .page-third-content {
  opacity: calc(1 - var(--create-exit-progress, 0));
  transform: translateY(0);
}

.about-page--dark .about-corner-title,
.about-page--dark .about-corner-sub,
.about-page--dark .about-corner-tr span,
.about-page--dark .about-index-num,
.about-page--dark .about-index-line,
.about-page--dark .about-keywords span,
.about-page--dark .about-statement-zh {
  color: rgba(245, 245, 247, 0.7);
}

.about-page--dark .about-card img {
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.45));
}

.about-corner,
.about-index,
.about-keywords {
  display: none;
}

.about-thumbs {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  width: max-content;
  max-width: calc(100vw - 160px);
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 2;
}

.about-thumbs img {
  height: clamp(64px, 10vh, 92px);
  width: auto;
  object-fit: cover;
  border-radius: 0.4rem;
  opacity: 0.8;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.about-thumbs img:hover {
  opacity: 1;
  transform: translateY(-4px) scale(1.04);
}

.about-bg-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  padding: 5vh 5vw;
}

.about-bg-logo img {
  max-width: 92%;
  max-height: 92%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.28;
  filter: invert(1);
}

.about-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 2;
}

.about-corner-tl {
  top: 2.5rem;
  left: calc(4vw + 80px);
}

.about-corner-tr {
  top: 2.5rem;
  right: 4vw;
  text-align: right;
  max-width: 220px;
}

.about-corner-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text);
}

.about-corner-sub,
.about-corner-tr span {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
}

.about-bg-letters {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2vw;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-letter {
  font-size: clamp(12rem, 42vw, 36rem);
  font-weight: 900;
  line-height: 0.8;
  color: rgba(255, 255, 255, 0.18);
  text-transform: uppercase;
  user-select: none;
}

.bg-letter-y {
  transform: translateX(-8%);
}

.bg-letter-c {
  transform: translateX(8%);
}

.about-index {
  position: absolute;
  top: 12vh;
  right: 4vw;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 2;
}

.about-index-num {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.about-index-line {
  width: 80px;
  height: 1px;
  background: var(--text-light);
}

.about-showcase {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6vw;
  width: 100%;
  max-width: 1200px;
  min-height: 60vh;
}

.about-card {
  flex: 0 1 300px;
  transition: transform 1s var(--ease), opacity 1s var(--ease);
}

.js-enabled .about-card {
  transform: translateX(-60px) rotateY(12deg);
  opacity: 0;
}

.js-enabled .about-card.is-visible {
  transform: translateX(0) rotateY(0);
  opacity: 1;
}

.about-card img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 60px rgba(15, 15, 17, 0.12));
}

.about-statement {
  flex: 0 1 420px;
  transition: transform 1s var(--ease) 0.2s, opacity 1s var(--ease) 0.2s;
}

.js-enabled .about-statement {
  transform: translateX(60px);
  opacity: 0;
}

.js-enabled .about-statement.is-visible {
  transform: translateX(0);
  opacity: 1;
}

.about-statement img {
  width: 100%;
  height: auto;
}

.about-statement-en {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.02em;
}

.about-statement-en em {
  font-style: italic;
  font-weight: 600;
}

.about-statement-zh {
  margin-top: 1.5rem;
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.about-page--dark .about-statement-en {
  color: #ffffff;
}

/* Works gallery page */
.works-gallery-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #0a0a0e;
  color: #f5f5f7;
  padding: 5rem 4vw 2rem calc(4vw + 80px);
  overflow: hidden;
}

.works-gallery-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.works-gallery-hint {
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.35);
}

.works-gallery-track {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 1rem;
  scrollbar-width: none;
}

.works-gallery-track::-webkit-scrollbar {
  display: none;
}

.works-thumb {
  flex: 0 0 auto;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  opacity: 0.7;
}

.works-thumb:hover,
.works-thumb.active {
  opacity: 1;
  transform: translateY(-8px) scale(1.02);
}

.works-thumb img {
  display: block;
  height: clamp(120px, 18vh, 200px);
  width: auto;
  max-width: none;
  object-fit: cover;
}

.about-keywords {
  position: absolute;
  bottom: 3rem;
  right: 4vw;
  display: flex;
  gap: 2.5rem;
  z-index: 2;
}

.about-keywords span {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light);
}

/* Process */
.process-list {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.process-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: color 0.3s var(--ease);
}

.process-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--text);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s var(--ease);
  z-index: -1;
  border-radius: 1rem;
}

.process-item:hover {
  color: #fff;
}

.process-item:hover::before {
  transform: scaleY(1);
}

.process-num {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--accent);
  transition: color 0.3s var(--ease);
  min-width: 3rem;
}

.process-item:hover .process-num {
  color: #fff;
}

.process-name {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.process-desc {
  max-width: 320px;
  font-size: 0.9rem;
  color: var(--text-light);
  transition: color 0.3s var(--ease);
}

.process-item:hover .process-desc {
  color: rgba(255, 255, 255, 0.75);
}

/* Footer / Contact */
.footer {
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 4vw 8rem calc(4vw + 80px);
  background: var(--blue-scene);
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 12vh;
  pointer-events: none;
  background: linear-gradient(180deg, #c7dcf8, rgba(199, 220, 248, 0));
}

.footer-cta {
  font-size: clamp(3rem, 12vw, 10rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text);
  text-decoration: none;
  position: relative;
  display: inline-block;
  margin-bottom: 3rem;
  transition: color 0.3s var(--ease);
}

.footer-cta::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 12px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}

.footer-cta:hover {
  color: var(--accent);
}

.footer-cta:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.footer-email {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 3rem;
  transition: color 0.3s var(--ease);
}

.footer-email:hover {
  color: var(--accent);
}

.socials {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.socials a {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  position: relative;
}

.socials a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}

.socials a:hover::after {
  width: 100%;
}

.footer-copy {
  margin-top: 5rem;
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Bottom info bar */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 4vw 1.25rem calc(4vw + 80px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 900;
  pointer-events: none;
}

.bottom-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.bottom-left span:first-child {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
}

.bottom-left span:last-child {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.bottom-right {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 1024px) {
  .works-grid {
    gap: 1.5rem;
  }

  .work-card:nth-child(2),
  .work-card:nth-child(3) {
    transform: translateY(0);
  }

  .films-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  .cursor {
    display: none;
  }

  .top-header {
    padding: 1rem 5vw;
  }

  .side-nav,
  .right-nav {
    display: none;
  }

  section {
    padding: 5rem 5vw;
  }

  .hero {
    padding-top: 5rem;
  }

  .hero-intro-en {
    white-space: normal;
  }

  .hero-title .line-accent {
    gap: 0.5rem;
  }

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

  .work-card {
    grid-column: span 1;
  }

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

  #about {
    padding: 6rem 5vw;
    min-height: auto;
  }

  .about-corner-tl {
    top: 1.5rem;
    left: 5vw;
  }

  .about-corner-tr {
    display: none;
  }

  .about-index {
    top: 1.5rem;
    right: 5vw;
  }

  .about-index-line {
    width: 40px;
  }

  .about-showcase {
    flex-direction: column;
    gap: 0.8rem;
    min-height: auto;
    margin-top: 0;
  }

  #about .about-card,
  #about.is-revealed .about-card {
    flex: 0 0 auto;
    width: min(48vw, 230px);
    height: min(42vh, 310px);
  }

  #about .about-card > img {
    width: min(47vw, 220px);
  }

  .about-card-hint {
    display: none;
  }

  #about .about-thumbs img {
    height: clamp(42px, 7vh, 60px);
  }

  .about-card,
  .about-statement {
    flex: 0 1 auto;
    max-width: 320px;
  }

  .bg-letter {
    font-size: 10rem;
  }

  .about-keywords {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 2.5rem;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .about-thumbs {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: 2.5rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  #about .about-thumbs,
  #about.is-revealed .about-thumbs {
    width: 100%;
    max-width: 100%;
    transform: translateY(calc((1 - var(--about-content-progress, 0)) * 28px));
  }

  .about-thumbs img {
    height: 72px;
  }

  .process-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.75rem 0;
  }

  .process-desc {
    max-width: none;
  }

  .bottom-bar {
    padding: 1rem 5vw;
  }

  .works-gallery-page {
    padding: 6rem 5vw 1.5rem;
  }

  .works-thumb img {
    height: 110px;
  }

  .footer {
    padding: 6rem 5vw;
  }
}

/* Moving image — fan of four real project covers */
.film-section {
  position: relative;
  min-height: 110vh;
  padding: clamp(64px, 7vh, 100px) 5vw clamp(80px, 12vh, 150px);
  background: var(--blue-scene);
  color: #0f0f11;
  overflow: hidden;
}

.film-section-inner {
  width: min(100%, 1320px);
  margin-inline: auto;
}

.film-section-eyebrow {
  margin: 0 0 1.3rem 7%;
  color: #61718b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.film-section-title {
  position: relative;
  z-index: 1;
  margin: 0 0 0.25em 7%;
  font-size: clamp(3.2rem, 8.3vw, 8.5rem);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.film-section-title span:last-child {
  color: #7686a0;
}

.film-deck {
  position: relative;
  width: min(calc(100% - 90px), 1120px);
  height: clamp(450px, 48vw, 660px);
  margin-left: 90px;
}

.film-card {
  position: absolute;
  left: var(--film-left);
  top: var(--film-top);
  display: block;
  width: clamp(180px, 25vw, 330px);
  aspect-ratio: 4 / 5;
  color: inherit;
  border-radius: 22px;
  opacity: var(--film-opacity, 1);
  transform: translateY(var(--film-y, 0px)) rotate(var(--film-rotate, 0deg));
  z-index: calc(4 + var(--film-index));
  text-decoration: none;
  outline-offset: 8px;
  will-change: transform, opacity;
}

.film-card:hover,
.film-card:focus-visible {
  z-index: 20;
}

.film-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #b8cfea;
  box-shadow: 0 28px 65px rgba(31, 56, 101, 0.22);
  transform: rotate(var(--film-tilt));
  transition: transform 0.48s cubic-bezier(0.2, 0.75, 0.2, 1), box-shadow 0.48s ease;
}

.film-card:hover .film-card-inner,
.film-card:focus-visible .film-card-inner {
  transform: translateY(-25px) rotate(0deg) scale(1.055);
  box-shadow: 0 45px 90px rgba(31, 56, 101, 0.32);
}

.film-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.film-card:first-child img {
  object-position: left center;
}

.film-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(58px, 5.7vw, 78px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0f0f11;
  box-shadow: 0 10px 35px rgba(5, 15, 40, 0.2);
  transform: translate(-50%, -50%);
  transition: transform 0.35s ease, background-color 0.35s ease;
}

.film-card:hover .film-play,
.film-card:focus-visible .film-play {
  transform: translate(-50%, -50%) scale(1.1);
  background: #fff;
}

.film-play svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
  fill: currentColor;
}

@media (max-width: 760px) {
  .film-section {
    padding: 64px 6vw 110px;
  }

  .film-section-eyebrow,
  .film-section-title {
    margin-left: 0;
  }

  .film-section-title {
    font-size: clamp(3.1rem, 12vw, 5.8rem);
    margin-bottom: 3rem;
  }

  .film-deck {
    width: 100%;
    margin-left: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .film-card {
    position: relative;
    left: auto;
    top: auto;
    width: min(76vw, 420px);
    margin-top: -25px;
  }

  .film-card:first-child {
    margin-top: 0;
  }

  .film-card:nth-child(even) {
    align-self: flex-end;
  }
}

/* Portfolio closing statement — a distinct page between films and contact. */
.portfolio-statement {
  min-height: 110vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: clamp(120px, 16vh, 190px) max(8vw, 105px);
  overflow: hidden;
  color: #f5f4f3;
  background-color: #c7dcf8;
  background-image:
    linear-gradient(180deg, rgba(199, 220, 248, 0) 0%, #1c2540 19%, #090b16 32%, #090b16 72%, #c7dcf8 96%, #c7dcf8 100%),
    url("../assets/home-bg-clean.png");
  background-position: center center;
  background-size: 100% 100%, cover;
  background-attachment: scroll, fixed;
  background-repeat: no-repeat;
}

.portfolio-statement-inner {
  width: min(100%, 1120px);
  margin-inline: auto;
}

.portfolio-statement-kicker {
  margin-bottom: clamp(30px, 6vh, 70px);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #b4c0d4;
}

.portfolio-statement-title {
  font-size: clamp(4.6rem, 10vw, 10rem);
  line-height: 0.91;
  font-weight: 800;
  letter-spacing: -0.075em;
}

.portfolio-statement-title span {
  display: block;
}

.portfolio-statement-title span + span {
  color: #aab9da;
}

.portfolio-statement-description {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(30px, 6vw, 100px);
  max-width: 1050px;
  margin-top: clamp(56px, 10vh, 110px);
  padding-top: 28px;
  border-top: 1px solid rgba(235, 240, 250, 0.35);
}

.portfolio-statement-cn {
  font-size: clamp(1.25rem, 2vw, 1.9rem);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.portfolio-statement-copy {
  max-width: 40em;
  color: #c3c9d8;
  font-size: clamp(1rem, 1.23vw, 1.18rem);
  line-height: 1.9;
}

.portfolio-statement [data-statement-line] {
  opacity: var(--statement-opacity, 1);
  transform: translateY(var(--statement-y, 0px));
  will-change: transform, opacity;
}

@media (max-width: 760px) {
  .portfolio-statement {
    min-height: 100vh;
    padding: 130px 7vw 150px calc(7vw + 30px);
  }

  .portfolio-statement-title {
    font-size: clamp(3.2rem, 14.5vw, 6rem);
  }

  .portfolio-statement-description {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 55px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-statement [data-statement-line] {
    opacity: 1;
    transform: none;
    will-change: auto;
  }
}

/* One quiet moving canvas behind the homepage's formerly flat section fills. */
.page-third,
.page-third--featured,
.works-stage,
.works-scene,
.ship-section,
.film-section,
.footer {
  background: transparent;
}

#slit-wrapper-2 .slit-window {
  background: transparent;
}

.portfolio-statement {
  background: linear-gradient(180deg,
    rgba(9, 11, 22, 0.18) 0%,
    rgba(9, 11, 22, 0.82) 30%,
    rgba(9, 11, 22, 0.82) 72%,
    rgba(9, 11, 22, 0.2) 100%);
}

.footer::before {
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .film-card,
  .film-card-inner,
  .film-play {
    transition: none !important;
  }
}

/* Moving image detail */
.film-detail-body {
  min-height: 100vh;
  background: #c7dcf8;
  color: #0f0f11;
  cursor: auto;
}

.film-detail-page {
  min-height: 100vh;
  padding: clamp(28px, 4vw, 72px);
}

.film-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.film-back:hover,
.film-back:focus-visible {
  color: #f56a13;
}

.film-detail {
  width: min(100%, 1120px);
  margin: clamp(50px, 8vh, 110px) auto 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(30px, 6vw, 100px);
}

.film-detail-heading {
  align-self: center;
}

.film-detail-kicker,
.film-not-found > p {
  margin: 0 0 1.3rem;
  color: #586982;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.film-detail-heading h1,
.film-not-found h1 {
  margin: 0;
  font-size: clamp(3.2rem, 6vw, 7rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: pretty;
}

.film-detail-media {
  position: relative;
  width: 100%;
  aspect-ratio: var(--film-media-aspect, 4 / 5);
  overflow: hidden;
  border-radius: 24px;
  background: #a9c4e9;
  box-shadow: 0 35px 80px rgba(25, 51, 93, 0.25);
}

.film-detail-media img,
.film-detail-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.film-detail-media video { object-fit: cover; }

.film-detail--has-story {
  grid-template-columns: 1fr;
  gap: clamp(26px, 4vw, 48px);
  margin-top: clamp(44px, 7vh, 84px);
}

.film-detail--has-story .film-detail-heading h1 {
  font-size: clamp(3rem, 6vw, 6.5rem);
}

.film-detail--has-story .film-detail-media {
  aspect-ratio: var(--film-media-aspect, 16 / 9);
  border-radius: 18px;
  background: #1c2c24;
}

.film-detail--portrait .film-detail-media {
  width: min(100%, 480px);
  aspect-ratio: var(--film-media-aspect, 9 / 16);
  justify-self: center;
}

.film-detail-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.film-detail-choices[hidden] { display: none; }

.film-detail-choice {
  min-height: 68px;
  padding: 14px 18px;
  border: 1px solid rgba(22, 42, 62, .3);
  border-radius: 12px;
  background: rgba(255,255,255,.28);
  color: #203149;
  font-family: inherit;
  font-size: clamp(.85rem, 1.2vw, 1rem);
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}

.film-detail-choice:hover,
.film-detail-choice:focus-visible { background: rgba(255,255,255,.7); transform: translateY(-3px); }
.film-detail-choice[aria-pressed="true"] { border-color: #f56a13; background: #fff4e9; color: #b74606; }
.film-detail-choice:focus-visible { outline: 2px solid #0f345f; outline-offset: 3px; }

.film-detail-story {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(30px, 5vw, 64px) 0 50px;
  border-top: 1px solid rgba(22, 42, 62, 0.24);
}

.film-detail-story[hidden] {
  display: none;
}

.film-detail-story-label {
  margin: 0;
  color: #586982;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.film-detail-story-copy h2 {
  margin: 0 0 1.4rem;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.film-detail-story-copy > p {
  max-width: 45em;
  margin: 0;
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.95;
}

.film-detail-story-copy .film-detail-story-tagline {
  margin-top: 2rem;
  color: #2c6247;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.film-detail[hidden],
.film-detail-media img[hidden],
.film-detail-placeholder[hidden],
.film-not-found[hidden] {
  display: none;
}

.film-detail-placeholder {
  position: absolute;
  right: 20px;
  bottom: 20px;
  padding: 0.75rem 1rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f0f11;
  font-size: 0.84rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.film-not-found {
  width: min(100%, 900px);
  margin: 20vh auto 0;
}

.film-not-found a {
  display: inline-flex;
  margin-top: 2rem;
  color: inherit;
  font-weight: 700;
}

@media (max-width: 700px) {
  .film-detail {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .film-detail-media {
    width: min(100%, 500px);
    align-self: center;
  }

  .film-detail--has-story .film-detail-media {
    width: 100%;
  }

  .film-detail--portrait .film-detail-media { width: min(100%, 420px); }

  .film-detail-choices { grid-template-columns: 1fr; }

  .film-detail-story {
    grid-template-columns: 1fr;
  }
}
