/* ============ SMOOTH — Monks seams + entrances (2026-11-30; lag fix 2026-12-01) ============
   Page-level layer added on top of the confirmed sections:
   0) Page background #050505 (neutral; invisible wherever sections
      cover the page edge to edge);
   1) Monks-style entrances for the shared data-reveal system:
      fade + rise + blur-to-sharp, once, under a second;
   2) Section geometry. Every section stacks as a plain full-width
      panel: the hero stands alone at full width and full height with
      NOTHING overlapping it, About is a plain panel directly under it
      (no gap, no radius, no overlap), and Work, FAQ and the footer
      keep the Monks rounded-top panel overlap. Services is a full
      canvas panel (fix round 2, 2026-12-01: square corners and a
      translucent fill). SEAM (2026-12-01, final settlement): Work
      is a FULL-WIDTH static-gradient panel (no side margins, 32px
      radius on all corners) sitting OUTSIDE the #silkWrap wrapper
      on the black page canvas; the silk canvas spans Services
      alone, and the Work -> Services seam is a plain black gap
      exactly equal to the AI CTA -> Work gap (84px desktop /
      64px mobile), with Services' top edge square — no overlap
      tricks at this seam. (All earlier seam experiments — full
      canvas, sliver, blend, slide-over — were dropped at Sami's
      order.)
      Studio's 1440px
      box geometry stays GONE (Studio is full width), and only two
      WebGL shader canvases exist on the page (the shared silk + FAQ's
      waves);
   3) the official Lenis recommended CSS;
   4) parallax scale buffer (the shared loop in index.html writes
      the hero video's translate; the scale here guarantees no
      background edge shows).
   Everything here is wrapper-level geometry on the section elements
   (plus the shared reveal rule); no section's internal design is
   touched. */

/* ---------- 0) Page background ---------- */
body{background:#050505}

/* ---------- 1) Entrances (motion.js / the inline observer add .in) ----------
   Monks recipe: start slightly blurred (~6px) with a soft ghost,
   fade + rise 26px, sharpen as it settles. ~0.7s, ease-out, once.
   Light stagger comes from data-reveal-delay where present
   (motion.js caps it at 120ms). */
.js [data-reveal]{
  opacity:0;
  transform:translateY(26px);
  filter:blur(6px);
  transition:opacity .7s ease-out,transform .7s cubic-bezier(.22,1,.36,1),filter .7s ease-out;
}
.js [data-reveal].in{opacity:1;transform:none;filter:blur(0)}
@media (prefers-reduced-motion:reduce){
  .js [data-reveal]{opacity:1;transform:none;filter:none;transition:none}
}

/* ---------- 2) Section geometry ----------
   z-index grows with document order so each panel lies over what
   came before it; the hero stays at the base and is never covered. */

/* Silk canvas wrapper: wraps #services ALONE, as in PR #18.
   Final seam settlement (2026-12-01): the wrapper carries NO
   pull — margin-top 0 — so the black gap between the Work
   panel's bottom edge and the Services panel's top edge is
   exactly the Work panel's own bottom margin (84px desktop /
   64px mobile, matching the measured AI CTA -> Work gap). The
   canvas still covers the panel's box exactly (top aligned,
   height equal), so the silk script computes the identical
   PR #18 field. The wrapper carries NO z-index (no
   stacking context), so the canvas (z-index 0), Work (z-index
   2) and Services (z-index 3) still order against each other
   directly. Opacity .8 = the role the retired per-section
   waves/silk canvases had, so the panel stays readable over
   the flow. */
.silkwrap{position:relative;display:flow-root;margin-top:0}
.silkwrap-bg{
  position:absolute;inset:0;width:100%;height:100%;
  z-index:0;pointer-events:none;display:block;opacity:.8;
}
.scrapbook{
  position:relative;z-index:1;overflow:clip;
  /* Hero -> About: PLAIN STACK (scope correction). No gap, no top
     radius, no shadow, no overlap: the full-height hero ends and the
     About panel begins edge to edge, exactly the pre-PR#14 stacking
     (the hero keeps its full 100svh; About never intrudes into it). */
  margin-top:0;
}
.workx-feat{
  position:relative;z-index:2;overflow:clip;
  /* Work is a FULL-WIDTH PANEL (final settlement, 2026-12-01):
     no side margins or crop anywhere — the section spans the
     viewport edge to edge, with the same 32px radius on all
     four corners (the black page canvas #050505 shows only in
     the corner cut-outs). The -28px top margin keeps the Monks
     overlap seam over the AI section. The 84px bottom margin is
     the black gap down to the Services panel, set equal to the
     measured AI CTA -> Work gap (84px at 1440). The panel's own
     backdrop stays the static gradient in the silk palette
     (workx.css); no shader runs behind the panel's own box, and
     its soft shadow falls on the black around it, like a box
     resting on the page. */
  border-radius:32px;
  margin:-28px 0 84px;
  box-shadow:0 -18px 40px rgba(0,0,0,.35),0 30px 60px rgba(0,0,0,.40);
}
.svcx-section{
  position:relative;z-index:3;
  /* Services is a full CANVAS PANEL (Sami, 2026-12-01): the panel's
     translucent dim fill (services-v6.css, rgba(10,10,11,.66)) runs
     edge to edge over its silk canvas, so the silk glows dimly
     through the whole Services stretch. Seam (final settlement,
     2026-12-01): the panel's TOP edge is SQUARE (the PR #18
     treatment) — no radius, no overlap; above it sits a plain
     black gap equal to the Work panel's 84px bottom margin. The
     panel's own margin stays 0, so the canvas covers its box
     exactly as in PR #18. The bottom corners stay square: Studio
     (keeping its own rounded top corners) is laid over the
     panel's bottom edge. */
  border:1px solid rgba(249,249,249,.08);
  /* No top border (Sami, 2026-12-01): the box's top edge line read
     as a stray divider across the bottom of Featured Work. */
  border-top:none;
  border-top-left-radius:0;
  border-top-right-radius:0;
  border-bottom-left-radius:0;
  border-bottom-right-radius:0;
  margin:0;
  box-shadow:0 -18px 40px rgba(0,0,0,.35),0 24px 60px rgba(0,0,0,.45);
  /* The seam shadow rides the panel's top edge, so the clip-path
     opens at the top (-60px) instead of cutting it; below the
     panel the shadow falls under Studio, which overlaps the
     panel's bottom edge (see the #studio rule below). The -100px
     bottom allowance preserves the float shadow under the panel. */
  clip-path:inset(-60px 0 -100px 0);
}
#studio.studiox-section{
  position:relative;z-index:3;
  /* Studio OVERLAPS the Services panel (Sami, 2026-12-01): the bright
     silk strip that showed in the gap below the box read as a stray
     glowing bar between two dark sections. The section stays FULL
     WIDTH (studiox.css's width:100%, background and overflow:hidden
     stand, internal content untouched), its top corners stay rounded
     40px, and a -16px top margin pulls it up over the panel's bottom
     edge (the panel now has NO bottom margin — fix round 2 — so the
     full -16px is actual overlap), so no silk shows at the boundary
     and the panel's bottom shadow falls UNDER Studio.
     The standard seam shadow (same as Work/FAQ/footer) sits on
     Studio's top edge. */
  border-top-left-radius:40px;
  border-top-right-radius:40px;
  margin-top:-16px;
  box-shadow:0 -18px 40px rgba(0,0,0,.35);
}
.faqx-section{
  position:relative;z-index:5;
  border-top-left-radius:28px;
  border-top-right-radius:28px;
  margin-top:-28px;
  box-shadow:0 -18px 40px rgba(0,0,0,.35);
}
footer.bwf{
  position:relative;z-index:6;
  border-top-left-radius:28px;
  border-top-right-radius:28px;
  margin-top:-28px;
  box-shadow:0 -18px 40px rgba(0,0,0,.35);
}
@media (max-width:768px){
  .faqx-section,footer.bwf{
    border-top-left-radius:20px;
    border-top-right-radius:20px;
    margin-top:-20px;
  }
  /* Work panel, mobile: same full-width geometry, scaled — no
     side margins, 20px radius on all corners, and a 64px bottom
     margin (the measured mobile AI CTA -> Work gap) forming the
     black gap down to Services. */
  .workx-feat{
    border-radius:20px;
    margin:-20px 0 64px;
  }
  /* Mobile Work -> Services seam (final settlement, 2026-12-01):
     plain black gap, no overlap — the wrapper carries no pull
     and the Services panel's top edge is square, exactly like
     desktop. The panel's own margin stays 0, so the canvas
     covers its box exactly. The clip-path's top allowance stays
     so the panel's top shadow can fall in the gap instead of
     being cut. */
  .silkwrap{margin-top:0}
  .svcx-section{
    border-top-left-radius:0;
    border-top-right-radius:0;
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
    margin:0;
    z-index:3;
    box-shadow:0 -18px 40px rgba(0,0,0,.35),0 24px 60px rgba(0,0,0,.45);
    clip-path:inset(-60px 0 -100px 0);
  }
  /* Mobile seam: same overlap, scaled (panel has no margin, so the
     full -8px is actual overlap over the panel's edge). */
  #studio.studiox-section{
    border-top-left-radius:20px;
    border-top-right-radius:20px;
    margin-top:-8px;
  }
}

/* ---------- 3) Lenis recommended CSS (official, lenis 1.1.14) ----------
   Lenis adds .lenis / .lenis-smooth to <html> itself when it starts.
   scroll-behavior:auto !important is the load-bearing rule: it stands
   index.css's html{scroll-behavior:smooth} down while Lenis is active,
   so CSS smoothing and Lenis never fight over the same wheel input.
   When Lenis is off (reduced motion / load failure) none of these
   classes exist and the page keeps its native behaviour. */
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}

/* ---------- 4) Parallax scale buffer ---------- */
/* The shared loop translates the hero background ±28-44px against the
   scroll; the scale keeps a margin of background beyond every edge.
   (The Services silk buffer went with the silk canvas in the
   2026-12-01 lag fix.) */
#home .herox-screen .herox-background{transform:scale(1.14)}
@media (prefers-reduced-motion:reduce){
  #home .herox-screen .herox-background{transform:none}
}
