/* =====================================================================
   MOTION LAYER for Viram Mariv (GSAP + ScrollTrigger + SplitText + Lenis, see motion.js)
   Everything here degrades to a static, fully visible page without JS
   or when the visitor prefers reduced motion.
   ===================================================================== */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Pre-animation states: only while motion is booting (failsafe removes .motion after 4s) */
html.motion:not(.motion-ready) .ha,
html.motion:not(.motion-ready) .split-hero { opacity: 0; }
.line-mask { padding-bottom: .08em; margin-bottom: -.08em; }

/* Brand curtain: intro + page transitions */
.curtain { position: fixed; inset: 0; z-index: 1000; pointer-events: none; display: none; overflow: hidden; }
html.motion .curtain { display: block; }
.curtain span { position: absolute; top: -10%; bottom: -10%; transform: skewX(-14deg); }
.curtain span:nth-child(1) { left: -20%; width: 60%; background: var(--red); }
.curtain span:nth-child(2) { left: 32%; width: 30%; background: var(--teal); }
.curtain span:nth-child(3) { left: 55%; width: 75%; background: var(--charcoal); }
.curtain img { position: absolute; left: 50%; top: 50%; width: 150px; height: auto; transform: translate(-50%, -50%); }

/* Scroll progress bar */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 150; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--red), var(--teal)); pointer-events: none; }

/* Custom cursor (fine pointers only) */
.cursor { position: fixed; left: 0; top: 0; z-index: 400; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--red); pointer-events: none; opacity: 0; display: grid; place-items: center; transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s, opacity .3s; }
.cursor span { font-family: var(--head); font-weight: 700; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; opacity: 0; transition: opacity .2s; }
.cursor.on { opacity: 1; }
.cursor.link { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: rgba(201, 30, 67, .16); }
.cursor.view { width: 88px; height: 88px; margin: -44px 0 0 -44px; background: var(--red); }
.cursor.view span { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* Header hides on scroll down, returns on scroll up */
.site-header { transition: transform .45s var(--ease), box-shadow .25s; }
.site-header.hide { transform: translateY(-100%); }

/* Hero upgrades */
.hero { min-height: min(92vh, 920px); display: flex; align-items: center; }
.hero > .wrap { width: min(var(--wrap), 100% - 40px); }
.hero h1 { font-size: clamp(2.5rem, 6vw, 5.2rem); letter-spacing: -.025em; max-width: 14ch; }
.hero-media { overflow: hidden; }
.hero-media img { transform-origin: 60% 50%; will-change: transform; }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-family: var(--head); font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; }
.scroll-cue i { width: 1px; height: 48px; background: rgba(255, 255, 255, .25); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%; background: #fff; animation: cue 1.8s cubic-bezier(.7, 0, .3, 1) infinite; }
.scroll-cue:hover { color: #7fd6ea; }
@keyframes cue { to { top: 100%; } }
@media (max-width: 760px) { .scroll-cue { display: none; } }

/* Velocity ticker band */
.ticker { background: #0b0f14; color: #fff; overflow: hidden; padding: 26px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.ticker-track { display: flex; width: max-content; will-change: transform; }
.ticker-row { display: flex; align-items: center; flex: none; }
.ticker span { font-family: var(--head); font-weight: 800; font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1.05; letter-spacing: -.02em; text-transform: uppercase; padding: 0 .35em; white-space: nowrap; }
.ticker span.o { color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .6); }
.ticker i { display: block; width: clamp(1rem, 2.4vw, 2rem); height: clamp(1rem, 2.4vw, 2rem); flex: none; background: var(--red); transform: skewX(-14deg); }
.ticker i:nth-of-type(3n+2) { background: var(--teal); }
.ticker i:nth-of-type(3n) { background: #fff; }
html:not(.motion-ready) .ticker-track { animation: tick 40s linear infinite; }
@keyframes tick { to { transform: translateX(-50%); } }

/* Interactive services list with floating preview */
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--slate-300); }
.svc-list li { border-bottom: 1px solid var(--slate-300); }
.svc-list a { position: relative; display: grid; grid-template-columns: 70px 1fr 56px; gap: 20px; align-items: center; padding: 26px 16px; text-decoration: none; color: var(--ink); overflow: hidden; isolation: isolate; }
.svc-list a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--charcoal); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .5s var(--ease); }
.svc-list .n { font-family: var(--head); font-weight: 800; color: var(--slate-500); font-size: 1rem; transition: color .3s; }
.svc-list b { display: block; font-family: var(--head); font-weight: 800; font-size: clamp(1.25rem, 2.6vw, 2.1rem); letter-spacing: -.015em; line-height: 1.15; transition: transform .5s var(--ease), color .3s; }
.svc-list small { display: block; max-width: 70ch; color: var(--slate-600); font-size: .95rem; margin-top: 4px; transition: color .3s, transform .5s var(--ease); }
.svc-list .go { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--slate-300); display: grid; place-items: center; transition: background .3s, border-color .3s, color .3s; }
.svc-list .go svg { width: 20px; height: 20px; transition: transform .4s var(--ease); }
.svc-list a:hover::before, .svc-list a:focus-visible::before { transform: scaleY(1); }
.svc-list a:hover b, .svc-list a:focus-visible b { color: #fff; transform: translateX(14px); }
.svc-list a:hover small, .svc-list a:focus-visible small { color: #b8c2cd; transform: translateX(14px); }
.svc-list a:hover .n, .svc-list a:focus-visible .n { color: #ff6d8d; }
.svc-list a:hover .go, .svc-list a:focus-visible .go { background: var(--red); border-color: var(--red); color: #fff; }
.svc-list a:hover .go svg { transform: rotate(-45deg); }
.svc-preview { position: fixed; left: 0; top: 0; z-index: 60; width: 320px; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; pointer-events: none; opacity: 0; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); }
.svc-preview img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none), (pointer: coarse), (max-width: 900px) { .svc-preview { display: none; } }
@media (max-width: 640px) { .svc-list a { grid-template-columns: 34px 1fr 40px; gap: 12px; padding: 20px 6px; } .svc-list .go { width: 40px; height: 40px; } .svc-list small { display: none; } }

/* Pinned horizontal projects (desktop + motion only; otherwise a normal grid) */
.hs-meta { display: none; }
.hscroll.is-pinned { padding: 0; }
.hscroll.is-pinned .hs-inner { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 80px 0 50px; }
.hscroll.is-pinned .section-head { margin-bottom: 30px; max-width: none; display: grid; grid-template-columns: 1fr auto; column-gap: 40px; align-items: end; }
.hscroll.is-pinned .section-head > * { grid-column: 1; }
.hscroll.is-pinned .section-head p { max-width: 62ch; margin: 0; }
.hscroll.is-pinned .hs-meta { display: flex; grid-column: 2; grid-row: 2 / span 2; align-items: center; gap: 18px; font-family: var(--head); color: #8794a3; font-size: .95rem; }
.hs-meta b { color: #fff; }
.hs-bar { width: 160px; height: 2px; background: rgba(255, 255, 255, .15); position: relative; overflow: hidden; display: block; }
.hs-bar i { position: absolute; inset: 0; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }
.hscroll.is-pinned .hs-track { display: flex; gap: 26px; width: max-content; will-change: transform; }
.hscroll.is-pinned .hs-track > .card { width: clamp(340px, 29vw, 430px); flex: none; }
.hs-end { background: var(--red) !important; border-color: var(--red) !important; color: #fff; }
.hs-end .body { justify-content: flex-end; padding: 34px; }
.hs-end h3 { color: #fff !important; font-size: 1.6rem; }
.hs-end p { color: #ffe1e8 !important; }
.hs-end .tag, .hs-end .link-arrow { color: #fff !important; }
.hscroll:not(.is-pinned) .hs-end { grid-column: 1 / -1; }

/* Client marquee */
.logo-marquee { overflow: hidden; padding: 7px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.lm-track { display: flex; gap: 14px; width: max-content; animation: lm 45s linear infinite; }
.logo-marquee.rev .lm-track { animation-direction: reverse; animation-duration: 55s; }
.logo-marquee:hover .lm-track { animation-play-state: paused; }
.lm-track span { flex: none; padding: 22px 34px; border: 1px solid var(--slate-200); border-radius: 999px; font-family: var(--head); font-weight: 800; font-size: clamp(1rem, 1.6vw, 1.35rem); color: var(--slate-600); letter-spacing: -.01em; white-space: nowrap; background: #fff; transition: color .3s, border-color .3s, background .3s; }
.lm-track span:hover { color: #fff; background: var(--charcoal); border-color: var(--charcoal); }
.logo-marquee.rev .lm-track span { background: var(--paper); }
@keyframes lm { to { transform: translateX(calc(-50% - 7px)); } }

/* Process progress line */
.steps-wrap { position: relative; padding-top: 24px; }
.steps-line { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--slate-200); border-radius: 3px; overflow: hidden; }
.steps-line i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--red), var(--teal)); transform-origin: 0 50%; }
html.motion-ready .steps-line i { transform: scaleX(0); }
@media (max-width: 1000px) { .steps-line { display: none; } .steps-wrap { padding-top: 0; } }

/* Cards: cursor spotlight */
.card, .icon-card { --mx: 50%; --my: 50%; position: relative; }
.card::after, .icon-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(12, 150, 183, .13), transparent 45%); }
.card:hover::after, .icon-card:hover::after { opacity: 1; }

/* Buttons: shine sweep + magnetic */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .3) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn svg { transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

/* WhatsApp float pulse */
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #1f9d55; z-index: -1; animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(1.7); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .ticker-track, .lm-track, .scroll-cue i::after, .wa-float::before { animation: none !important; }
  .logo-marquee { overflow-x: auto; }
}

/* Phones & tablets: projects become a swipeable carousel */
@media (max-width: 1099px) {
  .hscroll:not(.is-pinned) .hs-viewport { margin-right: -20px; }
  .hscroll:not(.is-pinned) .hs-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 20px 18px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .hscroll:not(.is-pinned) .hs-track::-webkit-scrollbar { display: none; }
  .hscroll:not(.is-pinned) .hs-track > .card { flex: 0 0 min(82vw, 360px); scroll-snap-align: start; }
  .hscroll:not(.is-pinned) .hs-end { grid-column: auto; }
  .hscroll:not(.is-pinned) .section-head::after { content: "Swipe to see more \2192"; display: block; margin-top: 10px; font-family: var(--head); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6fd3ea; }
}

/* The header's blur effect would trap the fixed mobile drawer inside the header bar */
@media (max-width: 1100px) { .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; } }
/* Keep the dim backdrop behind the header (the drawer lives inside the header's stacking layer) */
.scrim { z-index: 99 !important; }

/* ---- Curtain logo: solid white, revealed with a wipe and a loading line ---- */
.curtain .curtain-logo { position: absolute; left: 50%; top: 50%; width: clamp(180px, 32vw, 230px); transform: translate(-50%, -50%); }
.curtain .curtain-logo img { position: static; width: 100%; height: auto; transform: none; display: block; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .25)); }
.curtain .curtain-logo i { display: block; height: 3px; margin-top: 18px; background: #fff; border-radius: 3px; transform-origin: 0 50%; transform: scaleX(0); }

/* ---- Phones & tablets: projects pinned and moved sideways by scrolling ---- */
@media (max-width: 1099px) {
  .hscroll.is-pinned .hs-inner { min-height: 100vh; min-height: 100svh; padding: 64px 0 24px; }
  .hscroll.is-pinned .section-head { display: block; margin-bottom: 18px; }
  .hscroll.is-pinned .section-head p:not(.eyebrow) { display: none; }
  .hscroll.is-pinned .section-head .eyebrow { margin-bottom: 8px; }
  .hscroll.is-pinned .section-head h2 { font-size: clamp(1.5rem, 6vw, 2rem); margin-bottom: 0; }
  .hscroll.is-pinned .hs-meta { display: flex; margin-top: 12px; }
  .hscroll.is-pinned .hs-track { gap: 16px; }
  .hscroll.is-pinned .hs-track > .card { width: min(80vw, 380px); }
  .hscroll.is-pinned .card .body { padding: 18px 20px; }
  .hscroll.is-pinned .card .body p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
  .hscroll.is-pinned .hs-end .body { padding: 24px; }
}
.curtain .curtain-logo img { animation: vmLogoIn .9s cubic-bezier(.2, .7, .2, 1) .05s both; }
.curtain .curtain-logo i { animation: vmBarIn 1s cubic-bezier(.7, 0, .3, 1) .1s both; }
@keyframes vmLogoIn { from { clip-path: inset(0 100% 0 0); transform: scale(.92) translateY(8px); } to { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes vmBarIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
html.from-nav .curtain .curtain-logo img, html.from-nav .curtain .curtain-logo i { animation: none; }
html.from-nav .curtain .curtain-logo i { transform: scaleX(1); }

/* Client names that open a project page */
.lm-track a { flex: none; padding: 22px 34px; border: 1px solid rgba(201, 30, 67, .35); border-radius: 999px; font-family: var(--head); font-weight: 800; font-size: clamp(1rem, 1.6vw, 1.35rem); letter-spacing: -.01em; white-space: nowrap; background: #fff; color: var(--red); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; transition: color .3s, border-color .3s, background .3s; }
.lm-track a::after { content: ""; width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.lm-track a:hover, .lm-track a:focus-visible { color: #fff; background: var(--red); border-color: var(--red); }
.logo-marquee:focus-within .lm-track { animation-play-state: paused; }
.pills a { color: var(--red); font-weight: 600; text-decoration: none; }
.pills a:hover { text-decoration: underline; }

/* Footer: Google rating + social icons */
.g-rating { display: inline-flex; align-items: center; gap: 6px; color: #fff !important; }
.g-rating svg { width: 16px; height: 16px; color: #fbbc04; }
.socials { display: flex; gap: 10px; margin-top: 6px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .18); color: #fff; transition: background .25s, border-color .25s, transform .25s; }
.socials a:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-2px); }
.socials svg { width: 19px; height: 19px; }
.topbar .tb-right { gap: 18px; }
