/* Hello World Scaffolding — "filled" look + motion layer (Darab, 2026-11-13)
   Everything here rests when the visitor asks for reduced motion. */

/* ---------- Cloudy, filled grounds ---------- */
.bg-clouds { position: relative; isolation: isolate; background: #dbeafe url(/assets/img/photos/sky.webp) center / cover no-repeat; }
.bg-clouds::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(243,248,255,.72) 0%, rgba(243,248,255,.5) 45%, rgba(243,248,255,.82) 100%); }
.bg-deep { position: relative; isolation: isolate; color: #d6e2f7; background: linear-gradient(160deg, #0a2352 0%, #0f3a86 55%, #1663ec 100%); overflow: hidden; }
.bg-deep::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url(/assets/img/photos/sky.webp) center / cover no-repeat; opacity: .16; mix-blend-mode: screen; }
.bg-deep h2, .bg-deep h3 { color: #fff; }
.bg-deep .eyebrow { color: #9cc3ff; }
.bg-deep .lead { color: #c5d6f2; }
.bg-grid { position: relative; isolation: isolate; background-color: #fff; }
.bg-grid::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55;
  background-image: linear-gradient(rgba(22,99,236,.07) 2px, transparent 2px), linear-gradient(90deg, rgba(22,99,236,.07) 2px, transparent 2px), linear-gradient(rgba(22,99,236,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(22,99,236,.035) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 100%); mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 100%); }

/* Glass diagonal panes (reference look) */
.glass-panes { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.glass-panes i { position: absolute; top: -10%; bottom: -10%; display: block; border-left: 1px solid rgba(255,255,255,.35);
  background: linear-gradient(160deg, rgba(22,99,236,.38), rgba(10,35,82,.55)); backdrop-filter: blur(3px); transform: skewX(-14deg); }
.glass-panes i:nth-child(1) { right: -6%; width: 30%; }
.glass-panes i:nth-child(2) { right: 18%; width: 9%; background: linear-gradient(160deg, rgba(255,255,255,.18), rgba(22,99,236,.18)); }
.glass-panes i:nth-child(3) { right: 28.5%; width: 2.2%; background: rgba(255,255,255,.22); }

/* ---------- Hero slider ---------- */
.hero--slider { min-height: min(820px, calc(100svh - 128px)); }
.hero--slider .hero-bg { overflow: hidden; }
.hero--slider .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 900ms ease; }
.hero--slider .slide img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 40%; transform: scale(1.08); transition: transform 7000ms linear; }
.hero--slider .slide.is-active { opacity: 1; }
.hero--slider .slide.is-active img { transform: scale(1); }
.hero--slider .wrap { position: relative; z-index: 2; }
.slide-copies { display: grid; }
.slide-copy { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); filter: blur(4px); pointer-events: none; transition: opacity 500ms ease, transform 600ms var(--ease-out), filter 500ms ease; }
.slide-copy.is-active { opacity: 1; transform: none; filter: none; pointer-events: auto; transition-delay: 150ms; }
.hero-side { display: flex; flex-direction: column; gap: 22px; align-items: flex-end; }
.hero--slider .hero-panel { background: linear-gradient(160deg, rgba(15,47,107,.62), rgba(10,35,82,.72)); backdrop-filter: blur(14px) saturate(1.3); width: 320px; }
.slider-ctrl { display: flex; align-items: center; gap: 12px; }
.slider-ctrl button { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(10,35,82,.55); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(8px); transition: transform 160ms var(--ease-out), background-color 200ms ease; }
.slider-ctrl button svg { width: 22px; height: 22px; }
.slider-ctrl button:active { transform: scale(.94); }
@media (hover: hover) { .slider-ctrl button:hover { background: var(--blue); } }
.slider-dots { display: flex; gap: 8px; margin-right: 6px; }
.slider-dots button { width: 34px; height: 6px; border-radius: 3px; border: 0; padding: 0; background: rgba(255,255,255,.45); backdrop-filter: none; cursor: pointer; position: relative; overflow: hidden; }
.slider-dots button::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.slider-dots button.is-active::after { animation: dot-fill var(--dur, 6500ms) linear forwards; }
.hero--slider.is-paused .slider-dots button.is-active::after { animation: none; transform: scaleX(1); }
@keyframes dot-fill { to { transform: scaleX(1); } }
.slider-dots button { width: 34px; height: 6px; }
.slider-dots { padding: 19px 0; }

/* Floating scaffolding parts */
.floaters { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.floaters img { position: absolute; width: var(--w, 120px); height: auto; filter: drop-shadow(0 18px 24px rgba(10,35,82,.22)); animation: float var(--t, 7s) ease-in-out infinite alternate; animation-delay: var(--d, 0s); opacity: .95; }
@keyframes float { from { transform: translate3d(0, -10px, 0) rotate(var(--r1, -6deg)); } to { transform: translate3d(0, 14px, 0) rotate(var(--r2, 6deg)); } }
.section > .wrap { position: relative; z-index: 1; }

/* Scroll reveal (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms ease, transform 800ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.from-left { transform: translateX(-48px); }
.js .reveal.from-right { transform: translateX(48px); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Marquee strip of parts */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: #fff; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; padding: 16px 0; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee a { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; color: var(--ink); white-space: nowrap; background: #fff; transition: border-color 160ms ease, transform 160ms var(--ease-out); }
.marquee a img { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; background: #fff; }
@media (hover: hover) { .marquee a:hover { border-color: var(--blue); transform: translateY(-2px); } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Scaffolding builds itself ---------- */
.build { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.build-steps { display: grid; gap: 14px; margin: 30px 0 0; padding: 0; list-style: none; }
.build-steps li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); transition: background-color 400ms ease, border-color 400ms ease, transform 500ms var(--ease-out); }
.build-steps li b { display: block; color: #fff; font-size: 18px; }
.build-steps li span.n { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #0a2352; background: #9cc3ff; }
.build-steps li small { color: #c5d6f2; font-size: 15px; }
.is-built .build-steps li { animation: step-on 600ms var(--ease-out) both; }
.is-built .build-steps li:nth-child(1) { animation-delay: .2s; }
.is-built .build-steps li:nth-child(2) { animation-delay: 1.6s; }
.is-built .build-steps li:nth-child(3) { animation-delay: 3.0s; }
@keyframes step-on { 0% { background: rgba(255,255,255,.05); } 40% { background: rgba(156,195,255,.22); border-color: rgba(156,195,255,.6); transform: translateX(6px); } 100% { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); transform: none; } }
.scene { position: relative; aspect-ratio: 6 / 5.2; }
.scene svg { width: 100%; height: 100%; overflow: visible; }
/* initial (unbuilt) states */
.js .scene .tower { transform: scaleY(0); transform-origin: 50% 100%; transform-box: fill-box; }
.js .scene .std { transform: scaleY(0); transform-origin: 50% 100%; transform-box: fill-box; }
.js .scene .ledger, .js .scene .brace { stroke-dasharray: 400; stroke-dashoffset: 400; }
.js .scene .plank { opacity: 0; transform: translateX(-60px); }
.js .scene .worker, .js .scene .tag, .js .scene .truck { opacity: 0; }
.js .scene .truck { transform: translateX(-140px); }
/* built */
.is-built .scene .tower { animation: grow 900ms var(--ease-out) forwards; }
.is-built .scene .truck { animation: drive 1100ms var(--ease-out) .2s forwards; }
.is-built .scene .std { animation: grow 520ms var(--ease-out) forwards; animation-delay: calc(1.1s + var(--i) * 90ms); }
.is-built .scene .ledger { animation: draw 600ms ease-out forwards; animation-delay: calc(1.8s + var(--i) * 140ms); }
.is-built .scene .brace { animation: draw 700ms ease-out forwards; animation-delay: calc(2.6s + var(--i) * 140ms); }
.is-built .scene .plank { animation: slide 560ms var(--ease-out) forwards; animation-delay: calc(2.4s + var(--i) * 160ms); }
.is-built .scene .worker { animation: pop 500ms var(--ease-out) 3.4s forwards; }
.is-built .scene .tag { animation: pop 500ms var(--ease-out) 3.8s forwards; }
@keyframes grow { to { transform: scaleY(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes slide { to { opacity: 1; transform: none; } }
@keyframes drive { to { opacity: 1; transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: translateY(8px) scale(.9); } 100% { opacity: 1; transform: none; } }
.scene .tag, .scene .worker { transform-box: fill-box; transform-origin: 50% 100%; }
.scene-photo { position: absolute; right: -4%; bottom: 6%; width: 38%; border-radius: 18px; overflow: hidden; border: 4px solid #fff; box-shadow: 0 20px 50px rgba(0,0,0,.35); transform: rotate(3deg); }
.js .scene-photo { opacity: 0; transform: translateX(60px) rotate(8deg); transition: opacity 700ms ease 4.1s, transform 900ms var(--ease-out) 4.1s; }
.is-built .scene-photo { opacity: 1; transform: rotate(3deg); }
.replay { margin-top: 18px; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 10px; min-height: 44px; padding: 0 16px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.replay svg { width: 18px; height: 18px; }

/* Responsive */
@media (max-width: 980px) {
  .build { grid-template-columns: 1fr; }
  .hero-side { display: none; }
  .glass-panes i:nth-child(1) { width: 38%; right: -18%; }
  .glass-panes i:nth-child(2), .glass-panes i:nth-child(3) { display: none; }
  .floaters img.hide-sm { display: none; }
}
@media (max-width: 640px) {
  .hero--slider .slide img { object-position: 62% 100%; }
  .mobile-ctrl { display: flex !important; margin-top: 22px; }
  .floaters img { --w: 70px !important; opacity: .6; }
  .scene-photo { width: 44%; right: 0; }
}
.mobile-ctrl { display: none; }
.mobile-ctrl .slider-dots button { background: rgba(10,35,82,.25); }
.mobile-ctrl .slider-dots button::after { background: var(--blue); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .scene .tower, .js .scene .std, .js .scene .plank, .js .scene .worker, .js .scene .tag, .js .scene .truck, .js .scene-photo { opacity: 1 !important; transform: none !important; }
  .js .scene .ledger, .js .scene .brace { stroke-dashoffset: 0 !important; }
  .scene-photo { transform: rotate(3deg) !important; }
  .hero--slider .slide img { transform: none !important; }
  .marquee-track { animation: none !important; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-track a[aria-hidden="true"] { display: none; }
  .floaters img { animation: none !important; }
}

/* Soft blue ground for reviews */
.bg-soft { position: relative; isolation: isolate; background: radial-gradient(ellipse 70% 60% at 85% 10%, rgba(22,99,236,.14), transparent 60%), linear-gradient(180deg, #eaf3ff 0%, #f6faff 100%); overflow: hidden; }
.glass-panes.soft i:nth-child(1) { background: linear-gradient(160deg, rgba(22,99,236,.12), rgba(22,99,236,.04)); border-left-color: rgba(22,99,236,.18); backdrop-filter: none; }
.glass-panes.soft i:nth-child(2) { background: linear-gradient(160deg, rgba(22,99,236,.08), transparent); }
.glass-panes.soft i:nth-child(3) { background: rgba(22,99,236,.08); }
.bg-clouds#quote .cta { box-shadow: 0 30px 80px rgba(10,35,82,.35); }
.h1 { font-weight: 800; color: var(--ink); letter-spacing: -.035em; }
.hero--slider .slide:nth-child(3) img { object-position: 85% 45%; }
main, .footer { overflow-x: clip; }

/* ---------- Performance pass (2026-11-13): smooth on phones ----------
   Live blurs, masks over moving content and blend modes are re-drawn every frame on phone GPUs.
   Same look, cheaper paint. */
.header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,.97); }
.glass-panes i { backdrop-filter: none; }
.glass-panes i:nth-child(1) { background: linear-gradient(160deg, rgba(22,99,236,.5), rgba(10,35,82,.66)); }
.hero--slider .hero-panel, .hero-panel { backdrop-filter: none; background: linear-gradient(160deg, rgba(15,47,107,.86), rgba(10,35,82,.92)); }
.slider-ctrl button { backdrop-filter: none; background: rgba(10,35,82,.72); }
.bg-deep::before { mix-blend-mode: normal; opacity: .12; }
.slide-copy { filter: none !important; transition: opacity 450ms ease, transform 550ms var(--ease-out); }
/* only the visible slide is a moving layer */
.hero--slider .slide { will-change: opacity; contain: paint; }
.hero--slider .slide.is-active img { will-change: transform; }
.hero--slider .slide img { transform: scale(1.05); }
.hero.is-off .slide img, .hero.is-off .slider-dots button::after { transition: none !important; animation-play-state: paused !important; }
/* parts strip: edge fade drawn on top instead of a mask over moving content */
.marquee { -webkit-mask-image: none; mask-image: none; position: relative; contain: paint; }
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 8%; z-index: 1; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, #fff, rgba(255,255,255,0)); }
.marquee::after { right: 0; background: linear-gradient(270deg, #fff, rgba(255,255,255,0)); }
.marquee-track { will-change: transform; }
/* floating parts: one layer each, shadow baked into a cheap blurred copy-free box-shadow-less style */
.floaters { contain: paint; }
.floaters img { will-change: transform; filter: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 1100px) { .floaters img { filter: drop-shadow(0 18px 24px rgba(10,35,82,.22)); } }
/* phones: calmer — no slow zoom, fewer floaters, slower strip */
@media (max-width: 640px), (pointer: coarse) {
  .hero--slider .slide img, .hero--slider .slide.is-active img { transform: none !important; transition: none; will-change: auto; }
  .floaters img:not(:first-child) { display: none; }
  .marquee-track { animation-duration: 70s; }
  .bg-clouds { background-image: url(/assets/img/photos/sky-sm.webp); }
}
@media (max-width: 640px), (pointer: coarse) {
  .js .reveal, .js .reveal.from-left, .js .reveal.from-right { transform: translateY(16px); transition-duration: 450ms, 500ms; transition-delay: 0ms; }
  .js .reveal.is-in { transform: none; }
}

/* Lenis eased scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Reduced motion: parts strip = ONE row, each item once, swipe/scroll sideways, no auto-scroll
   (Rulebook: "Always test with reduce animations on" — never let loop copies or wrapped rows show) */
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; }
  .marquee::-webkit-scrollbar { display: none; }
  .marquee::before, .marquee::after { display: none; }
  .marquee-track { animation: none !important; flex-wrap: nowrap !important; width: max-content !important; justify-content: flex-start !important; padding-inline: var(--gut); }
  .marquee-track a { scroll-snap-align: start; }
  .marquee-track a[aria-hidden="true"] { display: none !important; }
}
