/* Realistic CSS-3D laptop + phone for the hero. Screens show the Nguvu Bar site (scrolled by fx.js). */
.hero-art { min-height: 520px; }
.device-stage { position: relative; z-index: 1; width: 100%; perspective: 1700px; perspective-origin: 50% 30%; }
.device-link { display: block; color: inherit; border-radius: 20px; }
.device-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 6px; }
.dev-rig { position: relative; width: 100%; aspect-ratio: 1 / .82; transform-style: preserve-3d; transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); }

/* ---------- laptop ---------- */
.laptop3d {
  position: absolute; left: 6%; top: 6%; width: 74%; aspect-ratio: 16 / 10.2;
  transform-style: preserve-3d; transform: rotateX(16deg) rotateY(-24deg) rotateZ(1deg);
}
.lid { position: absolute; inset: 0; transform-origin: 50% 100%; transform: rotateX(var(--lid, 12deg)); transform-style: preserve-3d; }
.lid-front, .lid-back { position: absolute; inset: 0; border-radius: 16px 16px 6px 6px; backface-visibility: hidden; }
.lid-front { background: linear-gradient(160deg, #26221E, #0B0A09); padding: 2.6% 2.6% 3.4%; box-shadow: inset 0 0 0 1.5px #5D5349, inset 0 0 0 4px #181613; }
.lid-back { transform: rotateY(180deg); background: linear-gradient(130deg, #F8F3EB 0%, #D2CCC5 45%, #B9AFA5 100%); box-shadow: inset 0 0 0 1px #ffffff90; display: grid; place-items: center; }
.lid-logo { width: 16%; height: 16%; color: #ffffffcc; stroke-width: 1.6; }
.bezel { position: relative; width: 100%; height: 100%; border-radius: 6px; background: #000; overflow: hidden; }
.cam { position: absolute; z-index: 3; top: -2.1%; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #3C3630; box-shadow: 0 0 0 1px #141210; }
.screen, .ph-screen { position: absolute; inset: 0; overflow: hidden; background: #0F2943; }
.screen { border-radius: 3px; }
.scroller { display: block; width: 100%; height: auto; will-change: transform; transform: translateY(0); }
.hero-art .device-stage img.scroller { position: static; mix-blend-mode: normal; object-fit: initial; height: auto; }
.glare { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, #ffffff38 0%, #ffffff10 28%, transparent 46%, transparent 70%, #ffffff12 100%); mix-blend-mode: screen; }
.deck {
  position: absolute; left: -7%; right: -7%; top: 100%; height: 70%; transform-origin: 50% 0; transform: rotateX(90deg);
  border-radius: 4px 4px 18px 18px; background: linear-gradient(180deg, #EDE1D0 0%, #D0CAC3 60%, #C4BCB4 100%);
  box-shadow: inset 0 2px 0 #ffffffa0, inset 0 -3px 6px #8a94a040;
}
.keys {
  position: absolute; left: 9%; right: 9%; top: 8%; height: 46%; border-radius: 6px; background-color: #28241F;
  background-image: linear-gradient(90deg, transparent 0 88%, #D0CAC3 88% 100%), linear-gradient(0deg, transparent 0 84%, #D0CAC3 84% 100%);
  background-size: 6.2% 17%; box-shadow: inset 0 0 0 2px #D0CAC3;
}
.trackpad { position: absolute; left: 34%; right: 34%; top: 60%; height: 32%; border-radius: 8px; background: linear-gradient(#DAD6D1, #D3CEC8); box-shadow: inset 0 0 0 1px #B9B0A7, inset 0 1px 0 #ffffffb0; }
.deck-front { position: absolute; left: -7%; right: -7%; top: 100%; height: 5px; transform-origin: 50% 0; transform: translateZ(calc(70% * 1)) rotateX(0deg); display: none; }
.floor-shadow { position: absolute; left: -12%; right: -12%; top: 100%; height: 80%; transform-origin: 50% 0; transform: rotateX(90deg) translateZ(-2px); background: radial-gradient(closest-side, #0e203a55, transparent 75%); filter: blur(10px); pointer-events: none; }

/* ---------- phone ---------- */
.phone3d {
  position: absolute; right: 3%; bottom: 2%; width: 25%; aspect-ratio: 9 / 19.3;
  transform-style: preserve-3d; transform: translateZ(80px) rotateX(10deg) rotateY(-30deg) rotateZ(-5deg);
}
.ph-layer, .ph-front { position: absolute; inset: 0; border-radius: 15% / 7%; }
.ph-layer { background: linear-gradient(90deg, #A4988B, #F0E7D9 40%, #AFA499); }
.ph-l1 { transform: translateZ(-2px); } .ph-l2 { transform: translateZ(-4px); } .ph-l3 { transform: translateZ(-6px); }
.ph-l4 { transform: translateZ(-8px); background: linear-gradient(140deg, #F5EEE4, #C9C2BB); box-shadow: 0 30px 40px -12px #0e203a70; }
.ph-front { transform: translateZ(0); background: #05070a; padding: 4.5%; box-shadow: inset 0 0 0 1.5px #6F6357, inset 0 0 0 3px #110F0D; }
.ph-screen { position: absolute; inset: 4.5%; border-radius: 12% / 5.6%; }
.island { position: absolute; z-index: 3; top: 5.6%; left: 50%; width: 30%; height: 3.4%; margin-left: -15%; border-radius: 20px; background: #000; }
.ph-btn { position: absolute; right: -2px; width: 3px; border-radius: 2px; background: #AFA499; transform: translateZ(-4px) rotateY(90deg); transform-origin: left; }
.ph-btn.b1 { top: 22%; height: 9%; } .ph-btn.b2 { top: 34%; height: 13%; } .ph-btn.b3 { top: 49%; height: 13%; }
.ph-shadow { position: absolute; left: 10%; right: -30%; bottom: -10%; height: 20%; background: radial-gradient(closest-side, #0e203a55, transparent); filter: blur(8px); transform: translateZ(-40px); }

/* badges sit above the devices */
.hero-art .experience, .hero-art .test-badge { z-index: 4; }
.hero-art .hero-blob { z-index: 0; }

@media (max-width: 1000px) { .hero-art { min-height: 440px; } }
@media (max-width: 700px) {
  .hero-art { min-height: 0; padding: 12px 0 34px; }
  .device-stage { width: 104%; margin-left: -2%; }
  .phone3d { width: 26%; right: 2%; }
}
@media (prefers-reduced-motion: reduce) { .scroller { transform: none !important; } }

/* ---------- fx layer (fx.js) ---------- */
.fx-progress { position: fixed; left: 0; top: 0; z-index: 90; height: 3px; width: 100%; background: linear-gradient(90deg, var(--yellow), #ff8a00); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.fx-preloader { position: fixed; inset: 0; z-index: 200; background: #14385C; color: #fff; display: grid; place-items: center; clip-path: inset(0 0 0 0); }
.fx-pre-inner { position: relative; display: flex; align-items: flex-start; gap: 6px; overflow: hidden; padding: 10px 16px; }
.fx-pre-logo { font: 400 clamp(56px, 9vw, 96px)/1 "Yellowtail", cursive; letter-spacing: -2px; }
.fx-pre-sun { width: 44px; height: 44px; color: var(--yellow); stroke-width: 2.2; margin-top: 2px; }
.fx-pre-n { position: fixed; right: 32px; bottom: 26px; font: 800 14px "DM Sans", sans-serif; letter-spacing: .1em; opacity: .8; font-variant-numeric: tabular-nums; }
.ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.ln-i { display: inline-block; }
.section-intro h2 .ln { display: block; }
.brands.is-marquee { display: block; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.fx-marquee { display: flex; width: max-content; gap: 72px; padding: 22px 0; }
.fx-marquee > div { white-space: nowrap; font-size: 22px !important; }
.project-card { position: relative; transform-style: preserve-3d; will-change: transform; }
.fx-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; mix-blend-mode: soft-light; z-index: 3; }
.fx-dot, .fx-ring { position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity .2s; }
.fx-cursor .fx-dot, .fx-cursor .fx-ring { opacity: 1; }
.fx-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--blue); }
.fx-ring { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1.5px solid #1263dc80; transition: opacity .2s, width .25s, height .25s, margin .25s, background .25s, border-color .25s; }
.fx-ring.is-hover { width: 58px; height: 58px; margin: -29px 0 0 -29px; border-color: var(--yellow); background: #ffbf0022; }
.fx-ring.is-card { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: #ffbf00cc; border-color: transparent; }
.fx-ring.is-card::after { content: "View"; position: absolute; inset: 0; display: grid; place-items: center; font: 800 12px "DM Sans", sans-serif; letter-spacing: .08em; color: #201B16; text-transform: uppercase; }
.button, .plan-button, .circle-arrow, .circle-ctl { will-change: transform; }
@media (pointer: coarse) { .fx-dot, .fx-ring { display: none; } }
/* tuning after round 1 */
.laptop3d { left: 4%; top: 8%; width: 70%; transform: rotateX(12deg) rotateY(-17deg) rotateZ(.5deg); }
.deck { height: 62%; }
.phone3d { width: 22%; right: 4%; bottom: 9%; transform: translateZ(90px) rotateX(8deg) rotateY(-26deg) rotateZ(-4deg); }
.hero-art .test-badge { right: auto; left: 2%; bottom: 6%; }
.hero-art .experience { top: 2%; right: 2%; }
.brands.is-marquee { display: block !important; grid-template-columns: none !important; min-height: 0; padding: 0; }
.brands.is-marquee .fx-marquee > div { display: block; text-align: left; }
.brands.is-marquee .fx-marquee { display: flex !important; flex-direction: row; }
/* timed carousel */
.projects { scroll-snap-type: x mandatory; }
.project-card { transition: box-shadow .4s, transform .4s; }
.project-card.is-current { box-shadow: 0 14px 30px #1c354326; }
.play-toggle .i-play { display: none; }
.play-toggle.is-paused .i-play { display: block; }
.play-toggle.is-paused .i-pause { display: none; }
.play-toggle svg { width: 15px; height: 15px; }
.dots button[aria-current="true"]::before { overflow: hidden; }
.dots.is-playing.tick button[aria-current="true"]::after { content: ""; position: absolute; left: 50%; top: 50%; height: 9px; margin: -4.5px 0 0 -11px; border-radius: 6px; background: var(--yellow); width: 0; animation: dotfill var(--dur, 3800ms) linear forwards; }
@keyframes dotfill { to { width: 22px; } }
/* WebGL devices (devices3d.js) replace the CSS ones when available */
.device-link { position: relative; }
.gl-canvas { position: absolute; left: -10%; top: -12%; width: 120%; height: 124%; display: block; pointer-events: none; }
.device-stage.gl-on .dev-rig { visibility: hidden; }
/* pricing + promise cards stay straight (template hover rotated them) */
.plan:hover { transform: translateY(-8px); }
.plan { transition: transform .3s, box-shadow .3s; }
.brands.is-marquee .fx-marquee { gap: 64px !important; } .fx-marquee > div::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 64px; border-radius: 50%; background: var(--yellow); vertical-align: middle; }

/* Poster: a real render of the 3D laptop + phone, shown at once (no waiting for three.js).
   Same box as the WebGL canvas, so the swap is seamless. The drawn CSS devices stay in the layout but hidden. */
.device-poster { position: absolute; left: -10%; top: -12%; width: 120%; height: 124%; pointer-events: none; z-index: 0; }
.device-poster img { width: 100%; height: 100%; object-fit: contain; display: block; }
.device-stage .dev-rig { visibility: hidden; }
.gl-canvas { z-index: 1; }
.device-stage.gl-on .device-poster { opacity: 0; }
.device-stage.gl-late .device-poster { transition: opacity .7s ease .1s; }
.hero-art .device-stage .device-poster img { position: static; inset: auto; mix-blend-mode: normal; object-fit: contain; width: 100%; height: 100%; }
