/* ==========================================================================
   Journey — The Blueprint Build (section 07). 3D stage primary, SVG fallback.
   ========================================================================== */
.jd{position:relative;background:
  linear-gradient(rgba(29,59,90,.05) 1px,transparent 1px),
  linear-gradient(90deg,rgba(29,59,90,.05) 1px,transparent 1px),
  linear-gradient(var(--blu-t) 0%,var(--blu-t) 90%,var(--w) 100%);
  background-size:44px 44px,44px 44px,100% 100%}
.jd .jin{min-height:80vh;display:flex;flex-direction:column;justify-content:center;
  padding:clamp(55px,8vh,85px) var(--gut) 40px;position:relative}
.jd .jin .lbl{margin-bottom:34px}
.jd .jin h2{font-family:var(--f-disp);font-weight:370;letter-spacing:-.02em;line-height:1.02;
  font-size:clamp(2.6rem,7vw,6.6rem);max-width:16ch}
.jd .jin h2 em{font-style:italic;color:var(--tr)}
body.lang-ne .jd .jin h2{line-height:1.28}
.jd .jin p{margin-top:30px;max-width:44ch;color:var(--gr);font-size:1.05rem}
.jd .jin .jin-cue{margin-top:44px;display:flex;align-items:center;gap:14px;
  font-family:var(--f-mono);font-size:.62rem;letter-spacing:.18em;text-transform:uppercase;color:var(--gr)}
.jd .jin .jin-cue::before{content:"";width:44px;height:1px;background:var(--tr)}

/* pinned viewport */
.jd-pin{height:100vh;display:flex;align-items:center;overflow:hidden;position:relative}
.jd-intro{position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;justify-content:center;padding:0 var(--gut);max-width:64%;pointer-events:none;will-change:opacity}
.jd-intro .lbl{margin-bottom:30px}
.jd-intro-h{font-family:var(--f-disp);font-weight:370;letter-spacing:-.02em;line-height:1.0;font-size:clamp(2.25rem,5.55vw,5.55rem);text-shadow:0 2px 30px rgba(255,255,255,.55)}
.jd-intro-h em{font-style:normal;font-family:var(--f-dev);font-weight:600;color:var(--tr);padding:0 .04em}
.jd-intro-h .hw{font-size:.72em}   /* "Build with" reads smaller than the त्रेता brand word */
body.lang-ne .jd-intro-h{line-height:1.3}
.jd-intro-p{margin-top:26px;color:var(--gr);font-size:1.06rem;max-width:34ch;text-shadow:0 1px 18px rgba(255,255,255,.55)}
.jd-intro-cue{margin-top:40px;display:inline-flex;align-items:center;gap:14px;font-family:var(--f-mono);font-size:.62rem;letter-spacing:.18em;text-transform:uppercase;color:var(--gr)}
.jd-intro-cue::before{content:"";width:44px;height:1px;background:var(--tr)}
@media (max-width:840px){
  .jd-intro{max-width:100%;justify-content:flex-end;padding-bottom:17vh}
  .jd-intro-h{font-size:clamp(1.8rem,7.5vw,2.7rem)}
}
.no-motion .jd-intro{position:static;max-width:none;padding:36px var(--gut) 8px}
.jd-frame{width:100%;display:grid;grid-template-columns:minmax(240px,340px) minmax(0,1fr);
  gap:clamp(20px,3vw,50px);align-items:center;padding:0 var(--gut)}

/* HUD */
.jd-hud .jd-n{font-family:var(--f-mono);line-height:1;display:flex;align-items:baseline;gap:6px}
.jd-hud .jd-n span{font-size:clamp(4rem,8vw,7.5rem);letter-spacing:-.04em;
  color:transparent;-webkit-text-stroke:1.5px var(--tr)}
.jd-hud .jd-n i{font-style:normal;font-size:.85rem;color:var(--gr);letter-spacing:.1em}
.jd-hud h3{font-family:var(--f-disp);font-weight:410;letter-spacing:-.015em;line-height:1.05;
  font-size:clamp(1.7rem,3vw,2.7rem);margin-top:18px;min-height:2.2em}
.jd-hud h3 .ne{display:block;font-family:var(--f-dev);font-weight:600;font-size:.62em;color:var(--blu);margin-top:8px}
body.lang-ne .jd-hud h3 .ne{display:none}
.jd-hud p{margin-top:14px;color:var(--gr);font-size:.92rem;max-width:34ch;min-height:4.2em}
.jd-ticks{display:flex;gap:7px;margin-top:26px}
.jd-ticks i{width:16px;height:2px;background:var(--gr2);transition:background .3s,width .3s var(--ease)}
.jd-ticks i.on{background:var(--tr);width:28px}
.jd-ticks i.done{background:var(--ink2)}

/* sheet */
.jd-sheet{position:relative;background:rgba(255,255,255,.72);backdrop-filter:blur(2px);
  border:1px solid var(--hl);box-shadow:0 30px 80px -40px rgba(29,59,90,.25);
  padding:clamp(10px,1.6vw,26px)}
.jd-corner{position:absolute;color:var(--gr2);font-weight:300;font-size:1.1rem;line-height:1;font-family:var(--f-body)}
.jd-corner.tl{top:6px;left:8px}.jd-corner.tr{top:6px;right:8px}
.jd-corner.bl{bottom:6px;left:8px}.jd-corner.br{bottom:6px;right:8px}
.jd-svg{width:100%;height:auto;display:block;max-height:78vh}

/* stroke system */
.jd-svg path,.jd-svg circle,.jd-svg rect{stroke:var(--ink2);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.jd-svg .lt{stroke:#B9C2CC;stroke-width:1.1}
.jd-svg .rd{stroke:var(--tr)}
.jd-svg .bl{stroke:var(--blu)}
.jd-svg .am{stroke:var(--amb)}
.jd-svg .gn{stroke:#5E7D64}
.jd-svg .th{stroke-width:3.4}
.jd-svg .dsh{stroke-dasharray:6 6}
.jd-svg .gd{stroke:#CBD6E2;stroke-width:.8}
.jd-svg .gh{stroke:#C7CDD4;stroke-width:1}
.jd-svg .ff{stroke:none}
.jd-svg .gl{fill:var(--amb-l);opacity:.4}
.jd-svg .rf{fill:var(--tr);opacity:.08}
.jd-svg text{font-family:var(--f-mono);font-size:10.5px;letter-spacing:.14em;fill:var(--gr);stroke:none}
.jd-svg text.bl,.jd-svg .ann.bl{fill:var(--blu)}
.jd-svg text.rd,.jd-svg .ann.rd{fill:var(--tr)}
.jd-svg .stamp circle{stroke:var(--tr);stroke-width:1.6;fill:none}
.jd-svg .stamp text{fill:var(--tr);font-size:8.5px;letter-spacing:.16em}
.jd-svg .sig{font-family:var(--f-disp);font-style:italic;font-size:24px;fill:var(--ink2);letter-spacing:0}
.jd-svg .sig .tr-ne{font-family:var(--f-dev);font-style:normal}

/* static fallback list */
.jd-static{display:none;padding:20px var(--gut) 60px;grid-template-columns:repeat(3,1fr);gap:22px}
.jd-static .js-row{border-top:1px solid var(--hl);padding-top:14px}
.jd-static .js-row b{font-family:var(--f-mono);font-size:.62rem;letter-spacing:.16em;color:var(--tr)}
.jd-static .js-row h4{font-family:var(--f-disp);font-weight:410;font-size:1.15rem;margin:8px 0 6px}
.jd-static .js-row p{font-size:.82rem;color:var(--gr)}
.no-motion .jd-static{display:grid}
.no-motion .jd-pin{height:auto;padding:30px 0}
.no-motion .jd-hud{display:none}
.no-motion .jd-frame{grid-template-columns:1fr}
@media (max-width:840px){.jd-static{grid-template-columns:1fr 1fr}}

/* handover CTA */
.jd-end{padding:clamp(70px,11vh,140px) var(--gut) clamp(90px,13vh,160px);text-align:center}
.jd-end h3{font-family:var(--f-disp);font-weight:370;letter-spacing:-.02em;line-height:1;
  font-size:clamp(1.8rem,4.8vw,4.35rem);margin-top:26px}
.jd-end h3.tr-ne{font-size:clamp(1.62rem,4.32vw,3.92rem)}   /* NE 10% smaller */
.jd-end h3 em{font-style:italic;color:var(--tr)}
body.lang-ne .jd-end h3{line-height:1.26}
.jd-cta{display:inline-block;margin-top:44px;border:1.5px solid var(--ink2);border-radius:99px;
  padding:20px 52px;font-family:var(--f-mono);font-size:.7rem;letter-spacing:.22em;text-transform:uppercase;
  color:var(--ink2);transition:background .4s var(--ease),color .4s,border-color .4s}
.jd-cta:hover{border-color:var(--tr);color:#fff}
.jd-cta:not(.bfill):hover{background:var(--tr)}
.jd-cta:active{background:var(--tr);border-color:var(--tr);color:#fff}

/* mobile pinned layout: drawing on top, HUD condensed below */
@media (max-width:840px){
  .jd-frame{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;gap:14px;align-content:center}
  .jd-sheet{order:0}
  .jd-hud{order:1;display:grid;grid-template-columns:auto 1fr;gap:4px 16px;align-items:start}
  .jd-hud .jd-n span{font-size:2.6rem}
  .jd-hud h3{font-size:1.25rem;margin-top:0;min-height:0;grid-column:2}
  .jd-hud .jd-n{grid-row:1/3}
  .jd-hud p{font-size:.8rem;margin-top:4px;min-height:0;grid-column:2;max-width:none}
  .jd-ticks{grid-column:1/3;margin-top:10px}
  .jd-svg{max-height:52vh}
}

/* ---- 3D stage (primary experience) ---- */
.jd-stage{display:none;position:relative;height:min(82vh,780px)}
.jd-stage canvas{position:absolute;inset:0;width:100%!important;height:100%!important;display:block}
.jd.webgl3d .jd-stage{display:block}
.jd.webgl3d .jd-sheet{display:none}
@media (max-width:840px){.jd-stage{height:52vh}}

/* ---- click-driven navigation (WebGL engine only) ----
   The scroll driver is gone: Explore starts the build, the edge arrows step
   through the nine stages, and both extremes return to the Explore intro. */

/* Explore — a centred, filled, gently pulsing CTA that invites the first tap */
@keyframes jdPulse{
  0%{box-shadow:0 0 0 0 rgba(140,16,20,.45)}
  70%{box-shadow:0 0 0 20px rgba(140,16,20,0)}
  100%{box-shadow:0 0 0 0 rgba(140,16,20,0)}
}
.jd-explore{display:none}
.jd.webgl3d .jd-intro-cue{display:none}          /* the passive "Scroll to begin" cue belongs to the fallback */
/* shrink the intro to the headline so the centred CTA lines up under it, not
   in the wider 64% column (kept symmetrical with "Build with त्रेता") */
.jd.webgl3d .jd-intro{width:fit-content}
/* the description drops down to sit centred just above the CTA (grouped, away
   from the headline) — centred under the headline exactly like the button */
.jd.webgl3d .jd-intro-p{align-self:center;text-align:center;max-width:none;margin-top:clamp(48px,10vh,120px)}
.jd.webgl3d .jd-explore{display:inline-flex;align-self:center;align-items:center;gap:14px;margin-top:22px;
  background:var(--tr);border:0;border-radius:99px;padding:21px 56px;cursor:pointer;
  font-family:var(--f-mono);font-size:.75rem;letter-spacing:.22em;text-transform:uppercase;color:#fff;
  pointer-events:none;filter:drop-shadow(0 14px 26px rgba(140,16,20,.42));
  animation:jdPulse 2.4s var(--ease) infinite;
  transition:transform .3s var(--ease),background .35s var(--ease)}
.jd.webgl3d:not(.exploring) .jd-explore{pointer-events:auto}   /* clickable only while the intro owns the screen */
.jd.webgl3d .jd-explore::after{content:"";width:26px;height:1px;background:currentColor;transition:width .3s var(--ease)}
.jd.webgl3d .jd-explore:hover{background:#a3151a;transform:translateY(-3px) scale(1.03)}
.jd.webgl3d .jd-explore:hover::after{width:42px}
@media (prefers-reduced-motion: reduce){.jd.webgl3d .jd-explore{animation:none}}

/* edge arrows — mirrored right-trapezoids (a directional wedge, tall on the
   outer edge). clip-path clips a border, so depth comes from a drop-shadow. */
.jd-nav{display:none}
.jd.webgl3d .jd-nav{display:grid;place-items:center;position:absolute;top:50%;z-index:7;border:0;padding:0;
  width:clamp(58px,5.4vw,82px);height:clamp(50px,4.4vw,66px);
  background:rgba(255,255,255,.82);backdrop-filter:blur(3px);color:var(--ink2);cursor:pointer;
  opacity:0;pointer-events:none;filter:drop-shadow(0 10px 22px rgba(29,59,90,.18));
  transition:opacity .4s var(--ease),transform .3s var(--ease),background .3s,color .3s}
.jd.webgl3d.exploring .jd-nav{opacity:1;pointer-events:auto}
.jd.webgl3d .jd-prev{left:clamp(6px,1.6vw,26px);transform:translateY(-50%);
  clip-path:polygon(0% 0%,100% 22%,100% 78%,0% 100%)}
.jd.webgl3d .jd-next{right:clamp(6px,1.6vw,26px);transform:translateY(-50%);
  clip-path:polygon(0% 22%,100% 0%,100% 100%,0% 78%)}
.jd.webgl3d .jd-nav svg{width:34%;height:34%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.jd.webgl3d .jd-nav:hover{background:var(--tr);color:#fff}
.jd.webgl3d.exploring .jd-prev:hover{transform:translateY(-50%) translateX(-3px)}
.jd.webgl3d.exploring .jd-next:hover{transform:translateY(-50%) translateX(3px)}
/* push the HUD in from the left so the stage number/title clear the left arrow */
.jd.webgl3d .jd-hud{padding-left:clamp(46px,4vw,72px)}

/* horizontal swipes navigate; vertical still scrolls the page */
.jd.webgl3d .jd-stage{touch-action:pan-y}

/* "Swipe to explore" — sits above the house while a stage is on screen */
.jd-hint{position:absolute;top:12px;left:50%;z-index:5;display:flex;align-items:center;gap:10px;
  pointer-events:none;opacity:0;transform:translateX(-50%) translateY(-6px);
  font-family:var(--f-mono);font-size:.6rem;letter-spacing:.18em;text-transform:uppercase;color:var(--gr);
  transition:opacity .5s var(--ease),transform .5s var(--ease)}
.jd-hint::before,.jd-hint::after{content:"";width:16px;height:1px;background:var(--gr2)}
.jd.webgl3d.exploring .jd-hint{opacity:1;transform:translateX(-50%) translateY(0)}

@media (max-width:840px){
  .jd.webgl3d .jd-nav{width:52px;height:46px}
  .jd.webgl3d .jd-prev{left:6px}
  .jd.webgl3d .jd-next{right:6px}
  .jd.webgl3d .jd-hud{padding-left:0}   /* mobile HUD sits below the stage — no arrow to clear */
  /* intro: title centred at the top; description + CTA grouped at the bottom, below the house */
  .jd.webgl3d .jd-intro{width:auto;max-width:100%;align-items:center;text-align:center;
    padding-top:11vh;padding-bottom:8vh}
  .jd.webgl3d .jd-intro-p{max-width:34ch;margin-top:auto}   /* drop to the bottom, just above the CTA */
  .jd.webgl3d .jd-explore{margin-top:18px}
}
