/* ===========================================================
   KD THEME - home.css (front-page only)
   =========================================================== */

/* ══════════════════════════════════════════════════
   SECTION 1 — HERO  (100vh, video bg, no scroll)

   Exact dimensions:
   — 100vh height, video fills it completely
   — "Creatively Addicted" centered H+V
   — Font: Bebas Neue, 70vw across two lines
   — On scroll: shrinks + moves to 20px below nav

   GSAP plan:
   Phase A (load): CA scales from .8 → 1, opacity 0→1
   Phase B (scroll 0→600px): CA scale 1→.2, top 50%→navH+20px
   Video: stays fixed only for section 1, then position:absolute
══════════════════════════════════════════════════ */

/* Video — fixed only during hero, GSAP switches to absolute */
#vid {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  height: 100vh;
}

#vid video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#vid::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 90% at 50% 40%, transparent 20%, rgba(8, 15, 15, .6) 100%),
    linear-gradient(to top, rgba(8, 15, 15, .95) 0%, transparent 55%);
}

.vmob {
  display: none;
}

@media(max-width:1024px) {
  .vdesk {
    display: none;
  }

  .vmob {
    display: block;
  }
}

/* Hero wrapper — centers CA, 100vh */
#hero {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: none;
}

/* CA floating element — GSAP controls position after scroll */
#ca-block {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  /* above circle(3), chapters(4), stage(5) — always visible */
  text-align: center;
  pointer-events: none;
  will-change: transform;

}

/* Ensure the elements start in their exact initial animation state */
#caC, #caA {
    opacity: 0;
    transform: scale(0.85) translateY(24px);
    transform-origin: center top;
    will-change: transform, opacity; /* Optimizes performance during the jump */
}

#sc {
    opacity: 0;
}

.ca {
  display: block;
  font-family: var(--fd);
  /* 70vw: Bebas Neue is condensed so at 70vw each word fits on one line */
  /* font-size: min(42vw, calc(70vw / 5.2)); */
  /* "Creatively" = ~10 chars, "Addicted." = ~9 chars
     at Bebas Neue char width ≈ 0.55em → 10×0.55 = 5.5em
     so font-size = 70vw / 5.5 ≈ 12.7vw. Use clamp for safety. */
  font-size: clamp(8rem, 25vw, 34rem);
  line-height: .88;
  letter-spacing: .04em;
  color: var(--fg);
  white-space: nowrap;
  transform-origin: center top;
}

.ca-acc {
  color: var(--acc);
}

/* Scroll cue */
#sc {
  position: fixed;
  bottom: 5vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
}

.sc-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, var(--acc), transparent);
  animation: scpulse 2.4s ease-in-out infinite;
}

@keyframes scpulse {

  0%,
  100% {
    transform: scaleY(0);
    transform-origin: top;
  }

  45% {
    transform: scaleY(1);
    transform-origin: top;
  }

  55% {
    transform: scaleY(1);
    transform-origin: bottom;
  }

  99% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

.sc-txt {
  font-family: var(--fb);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--mut);
}

/* ══════════════════════════════════════════════════
   SECTION 2 — CINEMATIC STORY  (black bg, pinned)

   Immediately after the 100vh hero.
   Background: var(--bg) — solid dark, video gone.
   All chapters are position:fixed, z:4.
   Stage is 100vh, pinned by GSAP for full scroll distance.
══════════════════════════════════════════════════ */
#cin-wrap {
  position: relative;
  z-index: 3;
  background: var(--bg);
}

#stage {
  width: 100vw;
  height: 100vh;
  position: relative;
  z-index: 3;
  background: var(--bg);
}

/* Subtle grid on stage */
.sgrid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--dim) 1px, transparent 1px);
  background-size: var(--gc) var(--gc);
}

/* ── INTRO BLOCK (#s1): "The Visual Storyteller" ──
   Left-docked, vertical rule, slides from left.
   t1: "The Visual"    — Bebas Neue, 70vw
   t2: "Storyteller."  — Bebas Neue, 70vw, accent
   sub: DM Sans, ~35vw (50% of t1 size), --mut color
   When scrolled: fades + moves left until gone.
── */
#s1 {
  position: absolute;
  left: 5vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  opacity: 0;
  will-change: transform, opacity;
}

/* Animated vertical rule */
#s1::before {
  content: '';
  position: absolute;
  left: -2vw;
  top: 5%;
  bottom: 5%;
  width: 1.5px;
  background: linear-gradient(to bottom, transparent, var(--acc) 25%, var(--acc) 75%, transparent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .8s var(--eout);
}

#s1.on::before {
  transform: scaleY(1);
}

/* Eyebrow — same style as old hero kicker */
.s1-eye {
  font-family: var(--fb);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--acc);
  opacity: .8;
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1.8rem;
}

.s1-eye::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--acc);
  flex-shrink: 0;
}

/* "The Visual" */
.s1-t1 {
  display: block;
  font-family: var(--fd);
  font-size: clamp(6rem, 16vw, 34rem);
  line-height: .86;
  letter-spacing: .03em;
  color: var(--fg);
  white-space: nowrap;
}

/* "Storyteller." */
.s1-t2 {
  display: block;
  font-family: var(--fd);
  font-size: clamp(6rem, 16vw, 34rem);
  line-height: .86;
  letter-spacing: .03em;
  color: var(--acc);
  white-space: nowrap;
}

/* Sub — 50% of headline size */
.s1-sub {
  display: block;
  font-family: var(--fb);
  font-size: clamp(2rem, 2.4vw, 4rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--mut);
  max-width: 52ch;
  margin-top: 2.2rem;
}

/* ── SHARED CHAPTER BASE ──
   All chapters: position:fixed, centered H+V, z:4.
   All start opacity:0 — GSAP controls everything.
── */
.ch {
  position: fixed;
  top: 50%;
  left: 50%;
  /* NO CSS transform — GSAP owns all transforms to avoid conflicts */
  z-index: 4;
  opacity: 0;
  text-align: center;
  pointer-events: none;
  user-select: none;
  max-width: 92vw;
  box-sizing: border-box;
}

/* c1: "The Challenge." — Bebas Neue, screen-centered */
#c1 {
  font-family: var(--fd);
  font-size: clamp(4.5rem, 12vw, 21rem);
  line-height: .85;
  letter-spacing: .04em;
  color: var(--fg);
}

/* ── CIRCLE — creative upgrade ──
   Uses clip-path: circle() instead of scale
   so the green expands as a sharp geometric disc
   from the exact center, more surgical & cinematic.
   Grain overlay adds tactile depth.
── */
#circ {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3;
  pointer-events: none;
  /* clip-path starts at 0%, expands to 150% (covers corners) */
  clip-path: circle(0% at 50% 50%);
  background: var(--acc);
  will-change: clip-path;
}

/* Grain texture on circle */
#circ::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ── c2: "The Creativity Gap in Communication."
   On green circle. Dark text. 2 lines.
   Bebas Neue, large. Slides R→C→L.
── */
#c2 {
  font-family: var(--fd);
  font-size: clamp(3rem, 7vw, 13rem);
  line-height: .92;
  letter-spacing: .03em;
  color: var(--bg);
  /* No max-width — Bebas Neue condensed, text flows to natural line breaks */
  max-width: 90vw;
  word-break: balance;
  text-wrap: balance;
}

/* ── c3, c4: body sentences on circle. DM Sans.
   Max 3 lines. Slides R→C→L.
── */
#c3,
#c4 {
  font-family: var(--fb);
  font-size: clamp(2rem, 4vw, 6rem);
  font-weight: 500;
  line-height: 1;
  color: var(--bg);
  max-width: 80vw;
  text-wrap:balance;
  /* wide enough for natural 2-3 line flow, no forced wrapping */
  text-align: center;
}

/* ── c5: "Bridging the Gap." — screen centered, fg ── */
#c5 {
  font-family: var(--fd);
  font-size: clamp(4rem, 14vw, 19rem);
  line-height: .85;
  letter-spacing: .04em;
  color: var(--fg);
}

/* ── c6 + c7: "Strategic Vision." + "Impactful Design."
   Same frame, stacked vertically with gap.
   Both fg. Bebas Neue large.
   They share a wrapper so they move together.
── */
#c67 {
  position: fixed;
  top: 50%;
  left: 50%;
  /* NO CSS transform — GSAP owns transforms */
  z-index: 4;
  opacity: 0;
  text-align: center;
  pointer-events: none;
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 1.5vw;
}

.c67-line {
  font-family: var(--fd);
  font-size: clamp(3rem, 9vw, 12rem);
  line-height: .88;
  letter-spacing: .03em;
  color: var(--fg);
  display: block;
  will-change: transform, opacity;
  opacity: 0;
}

.c67-acc {
  color: var(--acc);
}

/* ── c8: "I'm the visionary…" — bottom→center→top
   DM Sans, 3 lines max, fg.
── */
#c8 {
  font-family: var(--fb);
  font-size: clamp(2rem, 4vw, 6rem);
  font-weight: 500;
  line-height: 1;
  color: var(--fg);
  max-width: 70vw;
  text-align: center;
}

/* ── c9: "I create user experiences…" — 2 lines, same anim ── */
#c9 {
  font-family: var(--fb);
  font-size: clamp(2rem, 4vw, 6rem);
  font-weight: 500;
  line-height: 1;
  color: var(--fg);
  max-width: 70vw;
  text-align: center;
}

/* ══════════════════════════════════════════════════
   POST-CINEMATIC (marquee → footer)
══════════════════════════════════════════════════ */
.marquee {
  position: relative;
  overflow: hidden;
  z-index: 10;
  background: var(--bg);
  border-top: 1px solid var(--dimb);
  border-bottom: 1px solid var(--dimb);
}

.marquee .g {
  opacity: .5;
}

.marquee__row {
  display: flex;
  overflow: hidden;
  padding: 1.4rem 0;
  position: relative;
  z-index: 1;
}

.marquee__row+.marquee__row {
  border-top: 1px solid var(--dim);
}

.marquee__track {
  display: flex;
  flex-shrink: 0;
  white-space: nowrap;
  animation: mroll 30s linear infinite;
}

.marquee__row:nth-child(2) .marquee__track {
  animation-direction: reverse;
  animation-duration: 24s;
}

@keyframes mroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.m-item {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0 2.5rem;
  font-family: var(--fb);
  font-size: clamp(.85rem, 1.3vw, 1.2rem);
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--fg);
}

.m-item::after {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--acc);
  border-radius: 50%;
  flex-shrink: 0;
}

.expertise {
  position: relative;
  overflow: hidden;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--dimb);
  border-bottom: 1px solid var(--dimb);
}

@media(max-width:768px) {
  .expertise {
    grid-template-columns: 1fr;
  }
}

.exp {
  background: var(--bg);
  position: relative;
  overflow: hidden;
  padding: 5vw 3.5vw 4vw;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  transition: background .4s;
}

.exp::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--acc);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--eout);
}

.exp:hover::after {
  transform: scaleX(1);
}

.exp:hover {
  background: color-mix(in srgb, var(--bg) 91%, var(--acc) 9%);
}

.exp .g {
  opacity: 0;
  background-size: 40px 40px;
  transition: opacity .5s;
}

.exp:hover .g {
  opacity: 1;
}

.exp__ghost {
  position: absolute;
  bottom: -.1em;
  right: .05em;
  font-family: var(--fd);
  font-size: clamp(8rem, 18vw, 24rem);
  line-height: 1;
  letter-spacing: .04em;
  color: var(--dimb);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transition: color .4s, transform .5s var(--eout);
}

.exp:hover .exp__ghost {
  color: color-mix(in srgb, var(--acc) 14%, transparent);
  transform: scale(1.07) translateY(-8px);
}

.exp__num {
  font-family: var(--fb);
  font-size: 4.5rem;
  font-weight: 900;
  color: var(--acc);
  position: relative;
  z-index: 1;
}

.exp__title {
  font-family: var(--fd);
  font-size: clamp(2.7rem, 4vw, 6rem);
  line-height: 1;
  color: var(--fg);
  position: relative;
  z-index: 1;
  letter-spacing: .03em;
}

.exp__body {
  font-family: var(--fb);
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 300;
  line-height: 1.72;
  color: var(--mut);
  flex: 1;
  position: relative;
  z-index: 1;
}

.exp__tags {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.exp__tag {
  font-family: var(--fb);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--acc);
  border: 1px solid var(--dimb);
  padding: .28em .85em;
  align-self: flex-start;
  transition: border-color .3s;
}

.exp:hover .exp__tag {
  border-color: color-mix(in srgb, var(--acc) 50%, transparent);
}

.process {
  position: relative;
  z-index: 10;
  background: var(--bg);
  padding: 10vh 4vw;
  border-bottom: 1px solid var(--dimb);
}

.process .g {
  opacity: .35;
}

.process__head {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  margin-bottom: 6vh;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.process__eye {
  font-family: var(--fb);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--acc);
}

.process__title {
  font-family: var(--fd);
  font-size: clamp(5rem, 14vw, 18rem);
  line-height: 1;
  color: var(--fg);
  letter-spacing: .04em;
}

.process__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--dimb);
}

@media(max-width:900px) {
  .process__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:560px) {
  .process__grid {
    grid-template-columns: 1fr;
  }
}

.step {
  background: var(--bg);
  padding: 3.5vw 2.5vw;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  opacity: 0;
  transform: translateY(28px);
  transition: background .4s;
}

.step:hover {
  background: color-mix(in srgb, var(--bg) 93%, var(--acc) 7%);
}

.step__num {
  font-family: var(--fb);
  font-size: 4.5rem;
  font-weight: 500;
  letter-spacing: .28em;
  color: var(--acc);
}

.step__title {
  font-family: var(--fd);
  font-size: clamp(2.7rem, 4vw, 6rem);
  line-height: 1;
  color: var(--fg);
  letter-spacing: .03em;
}

.step__body {
  font-family: var(--fb);
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 300;
  line-height: 1.72;
  color: var(--mut);
}

.step__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: auto;
}

.step__tag {
  font-family: var(--fb);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--acc);
  border: 1px solid var(--dimb);
  padding: .22em .75em;
  transition: border-color .3s;
}

.step:hover .step__tag {
  border-color: color-mix(in srgb, var(--acc) 45%, transparent);
}

.port-intro {
  position: relative;
  overflow: hidden;
  z-index: 10;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 6vw;
  gap: 2.5rem;
}

.port-intro .g {
  opacity: .4;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 15% 50%, black 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 80% at 15% 50%, black 20%, transparent 75%);
}

.port-intro__kicker {
  font-family: var(--fb);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--acc);
  position: relative;
  z-index: 1;
  opacity: 0;
}

.port-intro__heading {
  font-family: var(--fd);
  font-size: clamp(7.5rem, 21vw, 27rem);
  line-height: .85;
  letter-spacing: .03em;
  color: var(--fg);
  max-width: 12ch;
  position: relative;
  z-index: 1;
  opacity: 0;
}

.port-intro__cta {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  font-family: var(--fb);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--fg);
  border-bottom: 1px solid var(--acc);
  padding-bottom: .25em;
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: color .3s;
}

.port-intro__cta::after {
  content: '→';
  display: inline-block;
  transition: transform .4s var(--eout);
}

.port-intro__cta:hover {
  color: var(--acc);
}

.port-intro__cta:hover::after {
  transform: translateX(8px);
}

.p-card {
  width: 100vw;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.p-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.p-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 15, 15, .8) 0%, transparent 55%);
  z-index: 1;
}

.p-card .g {
  z-index: 2;
  opacity: .5;
  -webkit-mask-image: linear-gradient(to top, black 0%, transparent 35%);
  mask-image: linear-gradient(to top, black 0%, transparent 35%);
}

.p-card__meta {
  position: absolute;
  bottom: 4vw;
  left: 5vw;
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  opacity: 0;
}

.p-card__idx {
  font-family: var(--fb);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--acc);
}

.p-card__name {
  font-family: var(--fd);
  font-size: clamp(1.5rem, 3.5vw, 5rem);
  letter-spacing: .03em;
  color: var(--fg);
}

