/* ==========================================================================
   UPGRADE LAYER — type system, texture, motion (Awwwards Pack patterns)
   Loaded after styles.css on every page.
   ========================================================================== */

/* ---------- Type ---------- */
body{font-family:var(--body);letter-spacing:-0.006em}
h1,h2,h3{letter-spacing:-0.035em;text-wrap:balance}
h1{line-height:.95}
p{text-wrap:pretty}

/* Accent words stay in the italic serif — chunky grotesk + soft italic contrast */
h1 em,h2 em,h3 em,.serif em,.bg-paths-title em,.hero-header h1 em{
  font-family:var(--serif)!important;font-style:italic;font-weight:400!important;
  font-stretch:normal!important;letter-spacing:-0.01em;padding-right:.04em;
}

/* Spec-sheet labels */
.eyebrow,.hero-eyebrow,.bg-paths-eyebrow,.story-eyebrow,.ct-eyebrow,.fp-eyebrow,
.bg-paths-tagline,.hero-social p,.review-when,.hero-meta .l,.svc-num,.num,.tag{
  font-family:var(--mono)!important;font-weight:500;
  font-size:11px!important;letter-spacing:.14em!important;text-transform:uppercase;
}
.hero-meta .k{font-family:var(--display);font-weight:600;font-stretch:90%;letter-spacing:-0.03em}

::selection{background:var(--accent);color:#fff}


/* ---------- Scroll progress ---------- */
.up-progress{
  position:fixed;top:0;left:0;right:0;height:2px;z-index:9997;pointer-events:none;
  background:var(--accent);transform-origin:0 50%;transform:scaleX(0);
}

/* ---------- Buttons: arrow nudge + magnetic smoothing ---------- */
.cta,.btn,.bg-paths-cta,.hero-trust{will-change:transform}
.cta svg,.bg-paths-cta .arr{transition:transform .35s cubic-bezier(.2,.8,.2,1)}
.cta:hover svg,.bg-paths-cta:hover .arr{transform:translateX(4px)}
.btn{position:relative;overflow:hidden;isolation:isolate}
.btn-primary::before{
  content:"";position:absolute;inset:0;z-index:-1;background:var(--accent);
  transform:translateY(101%);transition:transform .45s cubic-bezier(.7,0,.2,1);
}
.btn-primary:hover::before{transform:translateY(0)}

/* Images: slow cinematic zoom on hover */
.svc-card img,.project-card img,.proj img,.card img,.gallery img{transition:transform 1.1s cubic-bezier(.2,.8,.2,1)}
.svc-card:hover img,.project-card:hover img,.proj:hover img,.card:hover img,.gallery a:hover img{transform:scale(1.045)}

/* ---------- Scroll-scrubbed text fill (Text Animations / On-Scroll Text Motion) ---------- */
.fill-word{opacity:.16;transition:none}
.no-st .fill-word{opacity:1}

/* ---------- Cursor (Mouse Effects) — fine pointers only ---------- */
.up-cursor,.up-cursor-ring{position:fixed;top:0;left:0;z-index:9999;pointer-events:none;border-radius:50%;
  transform:translate3d(-100px,-100px,0);opacity:0;transition:opacity .3s}
.up-cursor{width:6px;height:6px;margin:-3px 0 0 -3px;background:var(--accent)}
.up-cursor-ring{width:38px;height:38px;margin:-19px 0 0 -19px;border:1px solid rgba(234,88,12,.55);
  transition:opacity .3s,width .35s cubic-bezier(.2,.8,.2,1),height .35s cubic-bezier(.2,.8,.2,1),margin .35s cubic-bezier(.2,.8,.2,1),background .35s}
.up-cursor-on .up-cursor,.up-cursor-on .up-cursor-ring{opacity:1}
.up-cursor-hover .up-cursor-ring{width:70px;height:70px;margin:-35px 0 0 -35px;background:rgba(234,88,12,.12);border-color:transparent}
@media (hover:none),(pointer:coarse){.up-cursor,.up-cursor-ring{display:none}}

/* ---------- Page transition (Page Transitions / Layers Animation with Clip-path) ---------- */
.pt{position:fixed;inset:0;z-index:10000;pointer-events:none}
.pt-layer{position:absolute;inset:0;clip-path:inset(100% 0 0 0);will-change:clip-path}
.pt-layer:nth-child(1){background:var(--accent)}
.pt-layer:nth-child(2){background:#3a2414}
.pt-layer:nth-child(3){background:var(--ink);display:grid;place-items:center}
.pt-mark{
  font-family:var(--display);font-weight:600;font-stretch:90%;color:var(--bg);
  font-size:clamp(3rem,10vw,9rem);letter-spacing:-0.05em;line-height:1;
  opacity:0;transform:translateY(30px);transition:opacity .4s,transform .6s cubic-bezier(.2,.8,.2,1);
}
.pt-mark em{font-family:var(--serif);font-weight:400;font-style:italic;color:var(--accent);font-stretch:normal}
.pt.is-in{pointer-events:all}
.pt.is-in .pt-layer{clip-path:inset(0 0 0 0);transition:clip-path .75s cubic-bezier(.76,0,.24,1)}
.pt.is-in .pt-layer:nth-child(2){transition-delay:.08s}
.pt.is-in .pt-layer:nth-child(3){transition-delay:.16s}
.pt.is-in .pt-mark{opacity:1;transform:none;transition-delay:.45s}
/* arriving: start covered, then wipe off the top */
.pt.is-covered .pt-layer{clip-path:inset(0 0 0 0)}
.pt.is-covered .pt-mark{opacity:1;transform:none}
.pt.is-out .pt-layer{clip-path:inset(0 0 100% 0);transition:clip-path .8s cubic-bezier(.76,0,.24,1)}
.pt.is-out .pt-layer:nth-child(1){transition-delay:.16s}
.pt.is-out .pt-layer:nth-child(2){transition-delay:.08s}
.pt.is-out .pt-mark{opacity:0;transform:translateY(-30px)}

@media (prefers-reduced-motion:reduce){
  .pt{display:none}
  .fill-word{opacity:1}
}

/* Word-mask reveal: room for grotesk descenders at the tighter leading */
.word-mask{padding-bottom:.2em!important;margin-bottom:-.2em!important}
/* Pull-quotes read better in the italic serif */
.svc-quote p,.svc-quote span,blockquote,.quote p{font-family:var(--serif)!important;font-weight:400!important;font-style:italic;font-stretch:normal!important;letter-spacing:-0.005em}

/* ---------- Performance ---------- */
/* Background line art: static, no per-frame stroke animation */
.bg-paths-svg path{animation:none!important;will-change:auto!important;stroke-dasharray:none!important;opacity:var(--op-hi,.4)!important}
/* Fixed nav: backdrop blur is expensive on phones while scrolling */
@media (max-width:900px),(pointer:coarse){
  nav.top{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:rgba(250,246,239,.97)!important}
  body.home nav.top.scrolled,body.home nav.top.solid{background:rgba(250,246,239,.97)!important}
  .hero-trust{-webkit-backdrop-filter:none;backdrop-filter:none;background:rgba(25,15,7,.7)}
  #waves{display:none!important}
}
/* Skip rendering work for long below-the-fold sections until they're near */
.pj-list .pj,.svc-grid,.reviews,footer{content-visibility:auto;contain-intrinsic-size:auto 900px}
