/* motion.css — shared motion layer styles */

/* ── No-JS safety: hidden states only apply when html.sw-js is present ───── */
html.sw-js [data-reveal="up"],
html.sw-js [data-reveal="scale"] {
  opacity: 0;
}

html.sw-js [data-reveal="clip"] {
  clip-path: inset(100% 0% 0% 0%);
  overflow: hidden;
}

html.sw-js [data-reveal-stagger] > * {
  opacity: 0;
}

html.sw-js [data-split="lines"] .sw-line-inner {
  display: inline-block;
  transform: translateY(110%);
}

/* ── Line split structure ─────────────────────────────────────────────────── */
.sw-line {
  display: block;
  overflow: hidden;
  /* room for descenders (g, y, p) and the italic .hl slab: the mask clipped them */
  padding: 0.06em 0.08em 0.2em;
  margin: -0.06em -0.08em -0.2em;
}

.sw-line-inner {
  display: inline-block;
}

/* ── Custom cursor ────────────────────────────────────────────────────────── */
.sw-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f6f2ec;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              mix-blend-mode 0s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sw-cursor--large {
  width: 88px;
  height: 88px;
  background: #ff7a2f;
  mix-blend-mode: normal;
}

.sw-cursor--hidden {
  opacity: 0;
}

.sw-cursor__label {
  font-family: 'Satoshi', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #111;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.sw-cursor--large .sw-cursor__label {
  opacity: 1;
}

/* ── Page transition curtain ──────────────────────────────────────────────── */
.sw-curtain {
  position: fixed;
  inset: 0;
  background: #17130f;
  z-index: 9999;
  pointer-events: none;
  transform: translateY(-100%);
}

/* ── #close — hl slab override for the real span ─────────────────────────── */
/* Hide the pseudo-element when sw-js is active, only inside #close */
html.sw-js #close .hl::before {
  display: none;
}

#close .hl {
  position: relative;
}

#close .hl__slab {
  position: absolute;
  inset: 0;
  background: #ff7a2f;
  z-index: -1;
  transform-origin: left center;
  transform: scaleX(0);
}

/* ── Reduced motion: expose everything ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .sw-cursor { display: none; }
  .sw-curtain { display: none; }
  html.sw-js [data-reveal="up"],
  html.sw-js [data-reveal="scale"],
  html.sw-js [data-reveal="clip"] {
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
  }
  html.sw-js [data-reveal-stagger] > * {
    opacity: 1 !important;
  }
  html.sw-js [data-split="lines"] .sw-line-inner {
    transform: none !important;
  }
}

/* ── Graystone tile crop fix ──────────────────────────────────────────────── */
#identity a:first-child .tile__media img {
  object-position: center;
  object-fit: contain;
  background: #ffffff;
}

/* ── Glass top bar (.nav--glass; homepage) ────────────────────────────────── */
/* A floating pill. The glass and the ring are pseudo-elements, never ancestors of the links:
   backdrop-filter on an ancestor would trap the kit's fixed phone sheet inside the pill. */
.nav.nav--glass {
  --glass-blur: 18px;
  --glass-bg: linear-gradient(100deg, rgba(255,180,106,.10), rgba(255,122,47,.16) 34%, rgba(23,19,15,.42) 70%, rgba(246,242,236,.06));
  --glass-ink: #f6f2ec;
  position: fixed; inset: 14px 0 auto 0; margin-inline: auto; z-index: 60;
  width: min(840px, calc(100% - 24px)); height: 56px; box-sizing: border-box; padding: 1px;
  border: 0; border-radius: 20px; background: none; color: var(--glass-ink);
  transition: height .4s cubic-bezier(.65, 0, .35, 1), color .4s cubic-bezier(.65, 0, .35, 1);
}
.nav.nav--glass::before {
  content: ""; position: absolute; inset: 1px; z-index: -1; border-radius: 19px; pointer-events: none;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%); backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,0,0,.25), 0 12px 40px -14px rgba(0,0,0,.55);
  transition: -webkit-backdrop-filter .4s, backdrop-filter .4s;
}
/* the light glass sits on its own layer and fades in: a gradient cannot be transitioned */
.nav.nav--glass .nav__bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 19px; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, rgba(255,255,255,.55), rgba(255,180,106,.22) 40%, rgba(246,242,236,.6));
  transition: opacity .4s cubic-bezier(.65, 0, .35, 1);
}
/* the 1px gradient ring */
.nav.nav--glass::after {
  content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 1px; pointer-events: none;
  background: linear-gradient(100deg, rgba(255,180,106,.75), rgba(255,122,47,.8) 34%, rgba(246,242,236,.22) 66%, rgba(255,180,106,.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.nav--glass .nav__bar {
  position: relative; width: 100%; height: 100%; margin: 0; box-sizing: border-box; padding: 0 8px 0 20px; gap: 12px; border-radius: 19px;
}
/* the sheen follows the pointer; the orange line is the page's scroll progress */
.nav--glass .nav__bar::after {
  content: ""; position: absolute; inset: 0; border-radius: 19px; pointer-events: none;
  background:
    linear-gradient(100deg, #ffb46a, #ff8a3d, #ff6a2e) 0 100% / calc(100% * var(--sp, 0)) 2px no-repeat,
    radial-gradient(120px 60px at var(--mx, 50%) 0%, rgba(255,255,255,.28), transparent 70%);
  background-origin: content-box, border-box; padding: 0 20px 1px; box-sizing: border-box;
}
.nav--glass .nav__logo { position: relative; font-size: 18px; color: inherit; }
.nav--glass .nav__links { position: relative; }
.nav--glass .nav__link { height: 40px; font: 500 15px/1 var(--font-text); color: inherit; opacity: .78; background: none; transition: opacity .3s; }
.nav--glass .nav__link:hover, .nav--glass .nav__link:focus-visible { opacity: 1; }
.nav--glass .nav__link::before { height: 1px; bottom: 8px; }
.nav--glass .nav__actions { position: relative; }
.nav--glass .nav__actions .btn--primary {
  height: 40px; padding-inline: 18px; border: 0; border-radius: 14px; font-size: 15px;
  background: linear-gradient(100deg, #ffb46a, #ff8a3d, #ff6a2e); color: #111;
  transition: transform .2s cubic-bezier(.16, 1, .3, 1), filter .3s;
}
.nav--glass .nav__actions .btn--primary:hover { background: linear-gradient(100deg, #ffb46a, #ff8a3d, #ff6a2e); filter: brightness(1.06); }
.nav--glass .nav__actions .btn--primary:active { transform: scale(.97); }
.nav--glass .nav__toggle { position: relative; width: 40px; height: 40px; border-radius: 14px; border-color: color-mix(in srgb, currentColor 26%, transparent); color: inherit; }
/* past 120px of scroll: a little smaller, a little more blur; it never hides */
.nav.nav--glass.is-compact { height: 50px; --glass-blur: 24px; }
.nav--glass.is-compact .nav__actions .btn--primary, .nav--glass.is-compact .nav__toggle { height: 36px; }
/* over a light section */
.nav.nav--glass.is-light:not(.is-open) { --glass-ink: #17130f; }
.nav--glass.is-light:not(.is-open) .nav__bar::before { opacity: 1; }
@media (max-width: 1023px) {
  /* the kit's sheet, under the pill: the pill stays glass over the sheet's dark ground */
  .nav.nav--glass.is-open { --glass-ink: #f6f2ec; }
  .nav--glass.is-open .nav__links { top: 0; z-index: -2; padding-top: 92px; background: #17130f; }
  .nav--glass.is-open .nav__link { opacity: 1; font-size: 20px; height: 56px; }
  .nav--glass.is-open .nav__actions { background: #17130f; }
  .nav--glass.is-open .nav__actions .btn--primary { height: 48px; }
}
@media (max-width: 639px) {
  .nav--glass .nav__bar { padding-left: 16px; }
  .nav--glass .nav__logo { font-size: 16px; }
  .nav--glass:not(.is-open) .nav__actions .btn--primary { height: 40px; padding-inline: 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .nav.nav--glass, .nav.nav--glass::before, .nav--glass .nav__bar::before { transition: none; } }

/* ── The bottom of the screen blurs, content clears as it rises (html[data-edge-blur]) ── */
.sw-edge-blur { position: fixed; inset: auto 0 0 0; height: 140px; z-index: 40; pointer-events: none; transition: opacity .5s cubic-bezier(.65, 0, .35, 1), visibility 0s; }
/* hidden, not only transparent, once the fade ends: a see-through backdrop blur is still worked out every frame */
.sw-edge-blur.is-off, .sw-edge-blur.is-wall { opacity: 0; visibility: hidden; transition: opacity .5s cubic-bezier(.65, 0, .35, 1), visibility 0s .5s; }
.sw-edge-blur > i { position: absolute; inset: 0; }
@media (max-width: 639px) { .sw-edge-blur { height: 100px; } }
@media print { .sw-edge-blur { display: none; } }

/* the brief-02 connector crossed unlit steps diagonally; the lit steps draw their own top line instead */
.flow__connector { display: none; }

/* process (Shresht, 28 Nov): the text column was small with empty space under it; larger type, centred on the card */
@media (min-width: 1024px) {
  #process.is-live .mo-pc__text { align-self: center; gap: var(--s-7); }
  #process .mo-pc__steps { gap: var(--s-6); }
  #process .mo-pc__step { padding-left: var(--s-6); gap: var(--s-3); }
  #process .mo-pc__step h3 { font-size: clamp(24px, 2.05vw, 32px); line-height: 1.2; }
  #process .mo-pc__step p { font-size: clamp(17px, 1.3vw, 20px); line-height: 1.5; max-width: 40ch; }
}


/* hover jitter fix (Shresht, 28 Nov): GSAP moves these every frame, so a CSS transform transition on them
   (the kit's 3% photo zoom) restarted on each frame and shook. Only opacity, shadow and filter transition here. */
:is(#selected, #identity) .tile,
:is(#selected, #identity) .tile__media > img,
#selected .develop > img,
.hero .ad, .hero .ad img { transition-property: opacity, box-shadow, filter !important; }

/* the two small endless rows get their own layer so they glide (not the river: its rows are 9,500px wide) */
.logoband__track, .close__roll-track { will-change: transform; }
