/* =========================================================================
   VZN homepage journey.
   Default rules = stacked layout (phones, reduced motion, no JS).
   html.is-journey = desktop pinned 3D journey (added by journey.js).
   ========================================================================= */

:root { --card-w: min(78vw, 320px); --card-h: calc(var(--card-w) * 1.42); }
.is-journey { --card-w: clamp(250px, 20.5vw, 340px); }

/* ---------- J1: hero card → 3D service ring → portal ---------- */
.j1 { position: relative; }
.j1-stage { position: relative; padding: var(--gutter); display: flex; flex-direction: column; }
.j1-stage .hero-card { order: -1; } /* stacked layout: hero first, then marquee + cards */

.hero-card {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  min-height: calc(100svh - 2 * var(--gutter));
  display: flex; flex-direction: column;
  background: var(--gloss);
  box-shadow: 0 40px 100px -40px rgba(4, 50, 42, .6), inset 0 1px 0 rgba(255,255,255,.2);
  color: #fff;
}
.hero-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3; border-radius: inherit;
  background: var(--sheen), radial-gradient(60% 40% at 50% 120%, rgba(111,245,220,.35), transparent 70%); }
.hc-copy { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; padding: 96px clamp(20px, 3.4vw, 52px) clamp(20px, 3vw, 40px); }
.hc-copy h1 { font-family: var(--f-display); font-weight: 500; font-size: clamp(2.9rem, 6.1vw, 6.6rem); letter-spacing: -.05em; line-height: .92; max-width: 62%; }
.hc-copy h1 .rv-line { padding-right: .08em; } /* room for the last glyph so the mask never shaves it */
.hc-copy h1 .rv-line > span { text-wrap: balance; }
.hc-sub, .hc-ctas { position: relative; }
@media (max-width: 899px) { .hc-copy h1 { max-width: 100%; } }
.hc-copy h1 .l2 { color: rgba(255,255,255,.5); }
.hc-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; padding-top: 2rem; }
.hc-sub { max-width: 27rem; color: rgba(255,255,255,.78); font-size: 15px; line-height: 1.5; }
.hc-ctas { display: flex; gap: 10px; margin-top: 18px; }
/* The photo sits in a portrait frame on the right (30% × 73% of the card ≈ 2:3, like the photo),
   so the whole picture shows. One variable --p (0 → 1) drives BOTH the frame and the photo box
   as scrolling opens it to the full card. calc() does the maths in CSS, so GSAP only tweens a
   plain number (no % conversions — those went wrong when the parent card was resizing). */
.hc-img { --p: 0; position: absolute; inset: 0; z-index: 1; overflow: hidden;
  clip-path: inset(calc(14% * (1 - var(--p))) calc(4% * (1 - var(--p))) calc(13% * (1 - var(--p))) calc(66% * (1 - var(--p))) round 20px); }
.hc-img img { position: absolute; max-width: none; object-fit: cover; object-position: 50% 50%;
  /* box = frame + ~1% margin (room for the small pointer drift) */
  left: calc(65.2% * (1 - var(--p))); top: calc(13% * (1 - var(--p)));
  width: calc(31.6% + 68.4% * var(--p)); height: calc(75% + 25% * var(--p)); }
@media (max-width: 899px) {
  .hc-img { position: relative; inset: auto; clip-path: none; border-radius: var(--r-lg); aspect-ratio: 4 / 5; height: auto; margin: 0 20px 20px; order: 2; }
  .hc-img img { left: 0; top: 0; width: 100%; height: 100%; }
  .hc-copy { padding-top: 84px; }
  .hc-bottom { flex-direction: column; align-items: flex-start; }
}

/* giant marquee text behind the ring */
.marquee-big { overflow: hidden; white-space: nowrap; padding: 40px 0 10px; pointer-events: none; }
.mb-track { display: inline-flex; font-family: var(--f-display); font-weight: 500; letter-spacing: -.05em; font-size: clamp(3.4rem, 8vw, 8.6rem); line-height: 1; color: var(--ink); will-change: transform; }
.mb-track span { padding-right: .35em; }
.mb-track i { font-style: normal; font-size: .35em; vertical-align: middle; color: var(--teal-500); padding: 0 .55em; }

/* service cards */
.ring-wrap { padding: 10px 0 30px; }
.ring { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px var(--gutter) 24px; scrollbar-width: none; }
.ring::-webkit-scrollbar { display: none; }
.svc-card {
  position: relative; flex: none; width: var(--card-w); height: var(--card-h); scroll-snap-align: center;
  border-radius: 22px; overflow: hidden; color: #fff; isolation: isolate;
  background: #041a17;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.1);
  display: flex; flex-direction: column; padding: 18px;
  transition: box-shadow .4s;
}
.svc-card:hover { box-shadow: 0 30px 70px -26px rgba(16,185,155,.65), inset 0 0 0 1px rgba(62,232,200,.5); }
.sc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease-expo); }
.svc-card:hover .sc-img { transform: scale(1.06); }
.sc-shade { position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(2,10,9,.55) 0%, rgba(2,10,9,.05) 32%, rgba(2,10,9,.15) 55%, rgba(4,40,34,.92) 100%),
    radial-gradient(90% 50% at 50% 115%, rgba(62,232,200,.55), transparent 70%); }
.svc-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: var(--sheen); }
.sc-top { display: flex; justify-content: space-between; align-items: center; }
.sc-icon { width: 30px; height: 30px; border-radius: 8px; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.sc-icon svg { width: 18px; }
.sc-pill { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px 11px 16px; border-radius: 18px;
  background: rgba(10,16,15,.55); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.sc-pill small { display: block; font-size: 11px; color: rgba(255,255,255,.6); }
.sc-pill b { display: block; font-weight: 500; font-size: 15px; letter-spacing: -.01em; }
.sc-pill i { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 18px; background: rgba(255,255,255,.12); transition: background .3s, color .3s, transform .5s var(--ease-expo); }
.svc-card:hover .sc-pill i { background: var(--teal); color: #03201b; transform: rotate(90deg); }
.sc-title { margin-top: auto; font-family: var(--f-display); font-size: clamp(1.7rem, 2.3vw, 2.25rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 400; }
.sc-title b { font-weight: 600; }
.ring-cta { display: flex; justify-content: center; padding-bottom: 30px; }
.portal, .eye-glyph { display: none; }

/* ---------- J2: dark world (particles + "Trust your vision.") ---------- */
.world { position: relative; margin: var(--gutter); border-radius: var(--r-xl); background: var(--night); color: #fff; overflow: hidden; min-height: 100svh; }
.world-stage { position: relative; min-height: 100svh; }
.world canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.w-glyph { position: absolute; left: 50%; top: 50%; width: 46px; transform: translate(-50%,-50%); color: #fff; filter: drop-shadow(0 0 16px rgba(62,232,200,.9)); z-index: 2; }
.w-t1, .w-t2 { position: absolute; z-index: 2; font-family: var(--f-display); font-weight: 500; letter-spacing: -.06em; line-height: .85; font-size: clamp(3.6rem, 11vw, 12.5rem); }
.w-t1 { left: clamp(16px, 3vw, 44px); top: clamp(70px, 9vh, 110px); }
.w-t2 { right: clamp(16px, 3vw, 44px); bottom: clamp(16px, 4vh, 44px); background: linear-gradient(180deg, #fff 30%, rgba(62,232,200,.9)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.w-copy { position: absolute; z-index: 2; left: clamp(16px, 3vw, 44px); bottom: clamp(24px, 6vh, 64px); max-width: 26rem; font-size: 14px; color: rgba(255,255,255,.72); display: grid; gap: 12px; }
@media (max-width: 899px) {
  /* phones: sphere in the top 70%, words on its edges, paragraph BELOW it (never on top of the dots) */
  .world canvas { height: 70vh; }
  .w-glyph { top: 35vh; }
  .w-t1 { top: 84px; }
  .w-t2 { top: calc(70vh - 0.9em); bottom: auto; }
  .w-copy { position: relative; left: auto; bottom: auto; padding: calc(70vh + 4.5rem) 20px 36px; }
}

/* ---------- J3: projects (horizontal on desktop) ---------- */
.projects { position: relative; margin: var(--gutter); border-radius: var(--r-xl); background: var(--night); color: #fff; overflow: hidden; }
.pj-track { display: flex; flex-direction: column; gap: 14px; padding: 90px 14px 14px; }
.pj-intro { padding: 10px 10px 30px; display: grid; gap: 16px; align-content: center; }
.pj-intro h2 { font-family: var(--f-display); font-weight: 500; letter-spacing: -.05em; line-height: .92; font-size: clamp(2.8rem, 5.4vw, 5.8rem); }
.pj-intro h2 .dim { color: rgba(255,255,255,.42); }
.pj-intro p { color: rgba(255,255,255,.65); max-width: 22rem; font-size: 15px; }
.pj { position: relative; flex: none; height: 78vh; min-height: 460px; border-radius: 22px; overflow: hidden; isolation: isolate; display: block; }
.pj-bg { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; z-index: -2; transition: scale 1.4s var(--ease-expo); } /* GSAP drives transform (parallax); hover uses `scale` */
.pj::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,0) 30%, rgba(0,0,0,.05) 60%, rgba(0,0,0,.7)); }
.pj::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: var(--sheen); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.pj-meta { position: absolute; top: 22px; left: 26px; right: 26px; display: flex; gap: 14px; font-size: 13px; color: rgba(255,255,255,.85); }
.pj-meta i { font-style: normal; opacity: .5; }
.pj-shot { position: absolute; right: 7%; top: 18%; width: 52%; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; transform: perspective(1400px) rotateY(-14deg) rotateX(6deg) rotateZ(2deg);
  box-shadow: 0 50px 90px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.18); transition: scale 1s var(--ease-expo); }
.pj-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pj:hover .pj-shot { scale: 1.04; }
.pj:hover .pj-bg { scale: 1.05; }
.pj-name { position: absolute; left: 26px; bottom: 18px; font-family: var(--f-display); font-weight: 500; letter-spacing: -.055em; line-height: .9; font-size: clamp(3rem, 7vw, 7.4rem); }
.pj-visit { position: absolute; right: 26px; bottom: 30px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--pill); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(10px); font-size: 13px; transition: background .3s, color .3s; }
.pj:hover .pj-visit { background: var(--teal); color: #03201b; }
@media (max-width: 899px) {
  .pj-meta { flex-wrap: wrap; row-gap: 2px; font-size: 12px; left: 20px; right: 20px; }
  .pj-shot { width: 84%; right: 8%; top: 26%; }
  .pj-visit { bottom: auto; top: 76px; left: 20px; right: auto; }
  .pj-name { left: 20px; }
}

/* ---------- J4: fly-through gallery + CTA ---------- */
.fly { position: relative; margin: var(--gutter); border-radius: var(--r-xl); background: var(--night); overflow: hidden; color: #fff; }
.fly-stage { position: relative; padding: 90px 14px 14px; }
.fly-label { text-align: center; padding: 10px 0 30px; }
.fly-label h2 { font-family: var(--f-display); font-weight: 500; letter-spacing: -.05em; line-height: .95; font-size: clamp(2.4rem, 5vw, 5rem); }
.fly-label h2 .dim { color: rgba(255,255,255,.42); }
.fly-label p { color: rgba(255,255,255,.6); margin-top: 12px; font-size: 14px; }
.fly-cam { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fly-item { position: relative; border-radius: 14px; overflow: hidden; background: #0c1513; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); }
.fly-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/4; }
.fly-item span { position: absolute; left: 10px; top: 10px; font-size: 11px; font-weight: 500; letter-spacing: .02em; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.fly-item.wide img { aspect-ratio: 4/3; }
.cta-card { display: none; }

.cta-full { margin: var(--gutter); border-radius: var(--r-xl); min-height: calc(100svh - 2 * var(--gutter)); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.cta-full .cta-copy { position: relative; z-index: 2; padding: clamp(28px, 5vw, 80px); }
.cta-full h2 { font-family: var(--f-display); font-weight: 500; letter-spacing: -.055em; line-height: .9; font-size: clamp(3.2rem, 7.4vw, 8rem); }
.cta-full h2 .dim { color: rgba(255,255,255,.55); }
.cta-full p { margin-top: 22px; max-width: 26rem; color: rgba(255,255,255,.78); }
.cta-full .cta-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.cta-full .cta-art { position: relative; z-index: 1; height: 100%; min-height: 50vh; }
.cta-full .cta-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: screen; opacity: .95;
  -webkit-mask-image: radial-gradient(70% 70% at 55% 50%, #000 40%, transparent 75%); mask-image: radial-gradient(70% 70% at 55% 50%, #000 40%, transparent 75%); }
@media (max-width: 899px) { .cta-full { grid-template-columns: 1fr; } .cta-full .cta-art { min-height: 40vh; order: -1; } }

/* =========================================================================
   Desktop journey (html.is-journey): pinned 100vh stages, absolute layers
   ========================================================================= */
.is-journey .j1-stage { display: block; height: 100vh; padding: 0; overflow: hidden; background: var(--paper); perspective: 1600px; }
.is-journey .hero-card {
  position: absolute; left: 50%; top: 50%; min-height: 0;
  width: calc(100vw - 2 * var(--gutter)); height: calc(100vh - 2 * var(--gutter));
  z-index: 5; will-change: transform, width, height; /* centring transform is set by GSAP (xPercent/yPercent) */
}
.is-journey .marquee-big { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); padding: 0; z-index: 1; }
.is-journey .ring-wrap { position: absolute; inset: 0; padding: 0; z-index: 3; display: grid; place-items: center; transform-style: preserve-3d; perspective: 1500px; }
.is-journey .ring { position: relative; display: block; overflow: visible; padding: 0; width: var(--card-w); height: var(--card-h); transform-style: preserve-3d; }
.is-journey .svc-card { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: visible; }
.is-journey .ring-cta { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 6; padding: 0; }
.is-journey .portal { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 8; pointer-events: none; }
.is-journey .eye-glyph { display: block; position: absolute; left: 50%; top: 50%; width: 120px; z-index: 7; color: #fff; filter: drop-shadow(0 0 24px rgba(62,232,200,.9)); pointer-events: none; }

.is-journey .world { margin: 0; border-radius: 0; }
.is-journey .world-stage { height: 100vh; }
.is-journey .w-copy { position: absolute; padding: 0; }

.is-journey .projects { margin: 0; border-radius: 0; }
.is-journey .pj-track { flex-direction: row; height: 100vh; align-items: center; padding: 0 3vw; gap: 2vw; width: max-content; }
.is-journey .pj-intro { width: 30vw; padding: 0 2vw 0 0; }
.is-journey .pj { width: 62vw; height: 76vh; }

.is-journey .fly { margin: 0; border-radius: 0; }
.is-journey .fly-stage { height: 100vh; padding: 0; perspective: 700px; overflow: hidden; }
.is-journey .fly-label { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 4; padding: 0; pointer-events: none; text-shadow: 0 6px 40px rgba(0,0,0,.85); }
.is-journey .fly-cam { display: block; position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.is-journey .fly-item { position: absolute; left: var(--x); top: var(--y); width: var(--w); transform: translate(-50%, -50%) translateZ(var(--z)); }
.is-journey .fly-item img { aspect-ratio: auto; height: auto; }
.is-journey .cta-card { display: block; position: absolute; left: 50%; top: 50%; width: 30vw; height: 30vh; transform: translate(-50%, -50%); border-radius: 22px; overflow: hidden; z-index: 5; opacity: 0; background: var(--gloss); }
.is-journey .cta-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: screen; opacity: .9; }
.is-journey .cta-full { margin: 0; border-radius: 0; min-height: 100vh; }
