:root {
  /* Premium display serif for headlines, clean grotesque for everything
     else — kept strictly black/white/gray throughout, no color. */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

html, body {
  width: 100%;
  background: #000;
  overflow-x: hidden;
  font-family: var(--font-body);
}

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

#reel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* subtle cinematic vignette so the frame edges melt into the black frame */
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%);
}

/* faint film grain / texture overlay, kept quiet so it never competes with the footage */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Hero brand mark: logo + wordmark, top of the hero ------------------ */
.site-logo {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translate(-50%, -24px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  will-change: transform;
}

.site-logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.site-logo span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  text-transform: uppercase;
}

/* ---- Hero copy: headline + subtitle, layered over the reel ------------- */
.hero-copy {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(90vw, 900px);
  text-align: center;
  z-index: 2;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.1rem;
}

.headline {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5.6vw, 4.8rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
}

.headline span {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(90deg, #fff, #d4d4d8 55%, #e4e4e7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem 0.6rem;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
}

.subtitle i {
  font-style: normal;
  color: rgba(255, 255, 255, 0.3);
}

/* ---- Hero CTA: appears once the reel finishes ("website opens") -------- */
.hero-cta {
  position: absolute;
  left: 50%;
  bottom: 14%;
  transform: translate(-50%, 16px);
  display: flex;
  gap: 1rem;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.btn {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-solid {
  background: #fff;
  color: #0a0a0a;
}

.btn-solid:hover {
  background: #e9e9e9;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* thin scroll-progress rail, bottom edge — the only "chrome" on the page */
.progress-rail {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.12);
  z-index: 3;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: rgba(255,255,255,0.85);
  transform-origin: left;
  will-change: width;
}

/* ============================================================
   SECTION 2 — added below the hero reel
   3D perspective flip-in title + dual-direction velocity marquee.
   Accent color matches the hero's headline gradient (cyan/blue)
   instead of the reference sample's magenta, so it reads as one
   continuous brand rather than a separate demo block.
   ============================================================ */

.reveal-section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #000;
  padding: 4rem 1.5rem;
}

.reveal-section .label {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #e4e4e7;
  margin-bottom: 2rem;
}

/* ---- 3D character flip-in title ---- */
.perspective-container {
  perspective: 1000px;
  perspective-origin: 50% 50%;
}

.perspective-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 600;
  font-style: italic;
  text-transform: uppercase;
  text-align: center;
  line-height: 1;
  color: #fff;
  transform-style: preserve-3d;
}

.perspective-title .char {
  display: inline-block;
  transform-origin: 50% 50% -100px;
  will-change: transform, opacity;
}

.section-copy {
  max-width: 640px;
  margin-top: 2.2rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 400;
}

/* ---- Section 2 supporting highlight row (added below section-copy) ---- */
.section2-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem 0.7rem;
  max-width: 720px;
  margin-top: 1.8rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  will-change: transform;
}

.section2-highlights i {
  font-style: normal;
  color: rgba(255, 255, 255, 0.28);
}

/* ---- Velocity-driven kinetic marquee ---- */
.marquee-wrapper {
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
}

.marquee-text {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  padding-right: 2rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.marquee-text.stroke-text {
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.4);
}

/* ============================================================
   SECTION 3 — second pinned scroll reel (humanoid footage)
   Same base .hero canvas layout, but with its own overlay layers
   for a visibly different transition language: a diagonal wipe
   that peels open on entry, a warmer vignette, and a clip-path
   text reveal instead of the hero's opacity/translate fade.
   ============================================================ */

.hero-alt {
  background: #050505;
}

#reel2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Diagonal wipe that covers the canvas at rest and peels open
   (via clip-path, animated in JS) as the section scrolls into pin. */
.wipe-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #050505;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  pointer-events: none;
}

.vignette-alt {
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(5,5,5,0.7) 100%);
}

/* ---- Section 3 copy: clip-path reveal instead of fade/translate ----
   Palette: black (#050505) / white / electric blue (#71717a), set on
   a frosted "glass" panel with a chrome-style reflective highlight. */
.alt-copy {
  /* Visible copy block — opacity/clip-path are driven by reel2.js as the
     section scrubs, so it starts at 0 here and reveals on scroll rather
     than being permanently hidden. */
  top: 40%;
}

.alt-copy .eyebrow {
  color: #71717a;
}

.alt-copy .headline {
  color: #fff;
}

.alt-copy .headline span {
  /* chrome-reflection style: white highlight sweeping into electric blue */
  background: linear-gradient(180deg, #ffffff 0%, #f4f4f5 35%, #71717a 70%, #3f3f46 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(200, 200, 205, 0.35);
}

.alt-copy .subtitle {
  color: rgba(255, 255, 255, 0.78);
}

.alt-copy .subtitle i {
  color: rgba(200, 200, 205, 0.55);
}

.alt-rail {
  background: rgba(255, 255, 255, 0.1);
}

.alt-rail .progress-fill {
  background: linear-gradient(90deg, #71717a, #ffffff);
  box-shadow: 0 0 12px rgba(200, 200, 205, 0.6);
}

/* ---- Section 3 one-by-one dropping card stack ----
   Each .s3-chip starts hidden (opacity 0, translated up) and is dropped
   into place individually by reel2.js's updateChips(), keyed to its own
   scroll window — so cards reveal one after another, not all at once,
   and stay fully visible once revealed. */
.s3-chip-stack {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: min(90vw, 460px);
  pointer-events: none;
}

.s3-chip {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  background: rgba(15, 15, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-40px);
  will-change: opacity, transform;
}

.s3-chip-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.4);
}

.s3-chip-text {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
}

@media (max-width: 640px) {
  .s3-chip-stack {
    bottom: 6%;
  }
  .s3-chip {
    padding: 0.7rem 0.9rem;
  }
}

/* ============================================================
   SECTION 4 — 3D layered parallax (pinned, no gap before/after)
   Cards rise out of deep 3D perspective space around a centered,
   per-character animated heading. Pinned the same way as every
   other section on the page, so its own pin-spacer sits flush
   against the marquee above and the humanoid reel below — no
   dead scroll space anywhere in between.
   ============================================================ */

/* 3D Scroll Section */
    .parallax-section {
      width: 100vw;
      height: 100vh;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      perspective: 1200px; /* Enables 3D perspective space */
      overflow: hidden;
    }

    /* Central Heading */
    .section-title {
      position: absolute;
      z-index: 10;
      text-align: center;
      pointer-events: none;
    }

    .section-title h2 {
      font-size: clamp(3rem, 8vw, 8rem);
      font-weight: 900;
      letter-spacing: -2px;
      text-transform: uppercase;
      background: linear-gradient(180deg, #ffffff 0%, #52525b 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    /* 3D Floating Image Container */
    .cards-container {
      position: relative;
      width: 100%;
      height: 100%;
      transform-style: preserve-3d;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .card {
      position: absolute;
      width: clamp(240px, 22vw, 380px);
      height: clamp(320px, 30vw, 500px);
      border-radius: 20px;
      overflow: hidden;
      box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
      will-change: transform, opacity;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .card img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    /* Card Positions Relative to Center */
    .card-1 { top: 15%; left: 10%; }
    .card-2 { top: 55%; left: 18%; }
    .card-3 { top: 20%; right: 12%; }
    .card-4 { top: 60%; right: 20%; }
/* ============================================================
   SECTION 5 — WebGL infinite tunnel (Three.js)
   Canvas is absolutely positioned to fill the pinned section;
   overlay text sits above it with pointer-events disabled so
   clicks/drags pass through to the mouse-look listener on canvas.
   ============================================================ */
 /* WebGL Canvas Container */
.webgl-section {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

#webgl-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Sticky Floating UI Overlay */
.overlay-content {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Allows mouse interactions to pass through to canvas */
    text-align: center;
}

.overlay-content h2 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffffff 0%, #aaaaaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    will-change: transform, opacity;
}

.overlay-content p {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: #cccccd;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 1.5rem;
    will-change: transform, opacity;
}

/* ============================================================
   SECTION 6 — pinned full-screen image reveal
   Card starts small/rounded and expands edge-to-edge as the
   section is pinned and scrubbed by ScrollTrigger. Kept strictly
   monochrome, same as the rest of the page.
   ============================================================ */
.reveal-expand-section {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  background: #000;
}

.reveal-expand-wrapper {
  position: relative;
  width: 50vw;
  height: 50vh;
  border-radius: 24px;
  overflow: hidden;
  will-change: transform, width, height, border-radius;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.reveal-expand-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* filter: grayscale(1) contrast(1.05); */
  transform: scale(1.3);
  will-change: transform;
}

.reveal-expand-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.reveal-expand-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 6rem);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  will-change: transform, opacity;
}

/* ------------------------------------------------------------
   SECTION 6 — mobile / tablet
   The pinned expand animation itself works fine on touch
   devices, but object-fit: cover combined with the desktop
   zoom (scale 1.3 → 1) crops the image at every step. Below
   768px we switch to object-fit: contain and drop the zoom so
   the full image is always visible, letterboxed on black
   instead of cropped.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .reveal-expand-wrapper {
    width: 80vw;
    height: 42vh;
  }

  .reveal-expand-wrapper img {
    object-fit: contain;
    background: #000;
    transform: scale(1);
  }
}

@media (max-width: 480px) {
  .reveal-expand-wrapper {
    width: 88vw;
    height: 36vh;
  }
}

/* ============================================================
   SECTION 7 — pinned 3D tech-cube assembly, cubes drop one by
   one into a grid that spells the letter "G". Sits directly
   after Section 6 with no dead scroll space in between.
   Kept strictly monochrome (black/white/gray) to match the
   rest of the page — the four "categories" are told apart by
   opacity/brightness tiers instead of hue.
   ============================================================ */
.cube-assembly-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cube-assembly-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.55) contrast(1.1);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.cube-assembly-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.9) 100%);
  z-index: 1;
  pointer-events: none;
}

.cube-assembly-section .label {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  z-index: 5;
}

.cube-grid-viewport {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.cube-grid {
  display: grid;
  grid-template-columns: repeat(6, 52px);
  grid-template-rows: repeat(7, 52px);
  gap: 10px;
  justify-content: center;
  align-content: center;
  perspective: 1000px;
}

.cube-wrapper {
  width: 52px;
  height: 52px;
  perspective: 800px;
  opacity: 0;
  transform: scale(0);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.25), opacity 0.35s ease;
}

.cube-wrapper.dropped {
  opacity: 1;
  transform: scale(1);
}

.cube-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}

.cube-3d .face {
  position: absolute;
  width: 52px;
  height: 52px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.12);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.cube-3d .face-text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.6rem;
  color: #ffffff;
  text-align: center;
  user-select: none;
  pointer-events: none;
  word-break: break-word;
  padding: 2px;
}

.cube-3d .face.front  { transform: rotateY(0deg) translateZ(26px); }
.cube-3d .face.back   { transform: rotateY(180deg) translateZ(26px); }
.cube-3d .face.right  { transform: rotateY(90deg) translateZ(26px); }
.cube-3d .face.left   { transform: rotateY(-90deg) translateZ(26px); }
.cube-3d .face.top    { transform: rotateX(90deg) translateZ(26px); }
.cube-3d .face.bottom { transform: rotateX(-90deg) translateZ(26px); }

/* Category tiers — monochrome brightness/opacity instead of color */
.cube-3d.tier-1 .face {
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.3);
}

.cube-3d.tier-2 .face {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
}

.cube-3d.tier-3 .face {
  border-color: rgba(200, 200, 200, 0.45);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.12);
}

.cube-3d.tier-4 .face {
  border-color: rgba(150, 150, 150, 0.4);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.08);
}