/* =====================================================================
   Banuma Construction — enhancement layer (loaded after style.css)
   ===================================================================== */

/* ---------- Film grain over everything ---------- */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 900;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 2%); } 100% { transform: translate(0, 0); }
}

/* ---------- Loader counter ---------- */
.loader__pct {
  position: absolute;
  right: clamp(20px, 4vw, 48px);
  bottom: clamp(20px, 4vw, 40px);
  font-family: var(--serif);
  font-size: clamp(64px, 10vw, 140px);
  line-height: .8;
  color: rgba(255, 255, 255, .1);
  letter-spacing: -.02em;
}

/* ---------- Hero: curtain reveal on load ---------- */
.js .hero__slides { clip-path: inset(0 0 100% 0); }
.js body.is-ready .hero__slides,
body.is-ready .hero__slides {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.5s var(--ease-io) .15s;
}
.js .hero__slide.is-active img { transform: scale(1.25); }
body.is-ready .hero__slide.is-active img { transform: scale(1); transition: transform 7s cubic-bezier(.2, .7, .2, 1); }
.hero__h { text-shadow: 0 2px 40px rgba(0, 0, 0, .25); }
.hero__h em {
  background: linear-gradient(100deg, #e8cfa6 0%, #b8895a 45%, #f0dcb8 60%, #b8895a 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 6s ease-in-out infinite;
  padding-right: .06em;
}
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

/* ---------- Split-word headings ---------- */
.js .h2.is-split[data-reveal],
.js .h2.is-split { opacity: 1; transform: none; }
.h2.is-split .wm {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .12em;
  margin-bottom: -.12em;
}
.h2.is-split .wm > span {
  display: inline-block;
  transform: translateY(110%) rotate(4deg);
  transform-origin: left bottom;
  transition: transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.h2.is-split.is-in .wm > span,
.h2.is-split.is-go .wm > span { transform: none; }

/* ---------- Marquee: two rows + velocity skew ---------- */
.marquee { padding-block: 22px; display: grid; gap: 10px; }
.marquee__track { transform: skewX(var(--skew, 0deg)); }
.marquee__track--rev { animation-direction: reverse; animation-duration: 46s; }
.marquee__track--rev span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(214, 180, 138, .7);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: clamp(30px, 3.2vw, 40px);
}
.marquee__track--rev span:hover { color: var(--brass-2); -webkit-text-stroke-color: transparent; }
.marquee__track--rev b { color: rgba(214, 180, 138, .5); }

/* ---------- Intro: stats tiles get a brass sweep line ---------- */
.stat::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  height: 2px; width: 100%;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease) .2s;
}
.stat.is-in::before { transform: scaleX(.35); }
.stat:hover::before { transform: scaleX(1); transition-delay: 0s; }

/* ---------- Layered dark sections (rounded overlap) ---------- */
.sec--dark, .feat {
  position: relative;
  z-index: 1;
  border-radius: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 0 0;
  margin-top: calc(clamp(24px, 4vw, 48px) * -1);
}
.sec--dark + .feat, .feat + .sec { margin-top: 0; }
.ftr { margin-top: 0; }

/* ---------- Services: background image crossfade ---------- */
.services { overflow: hidden; isolation: isolate; }
.svc__bgs { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.svc__bgs img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.12);
  filter: saturate(.7);
  transition: opacity 1s var(--ease), transform 2.4s var(--ease);
}
.svc__bgs img.is-on { opacity: .16; transform: scale(1); }
.svc__bgs::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 70% 40%, rgba(18, 26, 36, 0) 0%, rgba(18, 26, 36, .85) 75%);
}
.svc__t { transition: transform .6s var(--ease), color .4s, letter-spacing .6s var(--ease); }
.svc__btn:hover .svc__t { letter-spacing: .01em; }

/* ---------- Featured: pinned horizontal scroll ---------- */
.feat {
  background: var(--ink);
  color: var(--white);
}
.feat__pin {
  position: relative;
  padding-block: clamp(80px, 9vw, 120px);
  overflow: hidden;
}
.feat__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.feat .h2 { color: var(--white); }
.feat .h2 em { color: var(--brass-2); }
.feat .eyebrow { color: var(--brass-2); }
.feat__meta { display: flex; align-items: center; gap: 18px; color: var(--muted-l); font-size: 12px; letter-spacing: .14em; }
.feat__bar { width: 160px; height: 2px; background: rgba(255, 255, 255, .15); overflow: hidden; border-radius: 2px; }
.feat__bar i { display: block; height: 100%; background: var(--brass); transform: scaleX(var(--fp, .2)); transform-origin: left; }

.feat__track {
  display: flex;
  gap: clamp(20px, 3vw, 44px);
  padding-inline: max(clamp(20px, 4vw, 48px), calc((100vw - 1320px) / 2 + 48px));
  will-change: transform;
}
.fp { flex: 0 0 auto; width: min(62vw, 980px); }
.fp__img {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  height: min(58vh, 560px);
  background: var(--ink-2);
}
.fp__img img {
  position: absolute;
  top: 0;
  left: -12%;
  width: 124%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  transform: translateX(var(--ix, 0%)) scale(1.04);
  transition: scale .9s var(--ease), filter .6s;
}
.fp__img:hover img { scale: 1.05; }
.fp__img::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  pointer-events: none;
}
.fp__meta {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin-top: 22px;
}
.fp__n {
  font-family: var(--serif);
  font-size: 64px;
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1px var(--brass-2);
}
.fp h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.1; margin: 0 0 6px; }
.fp p { margin: 0; color: var(--muted-l); font-size: 15px; }
.fp--end {
  width: min(40vw, 520px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  padding-right: 6vw;
}
.fp .fp__end {
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(48px, 5.5vw, 88px);
  line-height: .95;
  margin: 0;
}
.fp__end em { color: var(--brass-2); }

/* pinned mode (JS adds .is-pinned on desktop) */
.feat.is-pinned .feat__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 0;
}
.feat.is-pinned .fp__img { height: min(56vh, 540px); }

/* swipe mode (mobile / reduced motion) */
.feat:not(.is-pinned) .feat__track {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.feat:not(.is-pinned) .feat__track::-webkit-scrollbar { display: none; }
.feat:not(.is-pinned) .fp { scroll-snap-align: center; width: 84vw; }
.feat:not(.is-pinned) .fp__img { height: 62vw; max-height: 460px; }
.feat:not(.is-pinned) .fp--end { width: 76vw; padding-right: 0; }
@media (max-width: 860px) {
  .feat__head { flex-direction: column; align-items: flex-start; }
  .fp__n { font-size: 46px; }
}

/* ---------- Portfolio: wipe-in tiles ---------- */
.js .tile:not(.is-shown) { clip-path: inset(100% 0 0 0 round 16px); }
.js .tile:not(.is-shown) img { transform: scale(1.35); }
.js .tile {
  transition: clip-path 1.2s var(--ease-io);
  transition-delay: var(--td, 0s);
}
.tile.is-shown { clip-path: inset(0 0 0 0 round 16px); }
.tile.is-shown img { transition: transform 1.6s var(--ease), filter .6s; transition-delay: var(--td, 0s); }
.tile.is-shown:hover img { transition-delay: 0s; }

/* ---------- Image mask reveal for about / drawer imgs ---------- */
.js .about__img--a { clip-path: inset(0 0 100% 0 round 20px); transition: clip-path 1.4s var(--ease-io) .1s; }
.about__media.is-in .about__img--a { clip-path: inset(0 0 0 0 round 20px); }

/* ---------- Footer giant wordmark ---------- */
.ftr__word {
  font-family: var(--serif);
  font-size: clamp(64px, 16.5vw, 270px);
  line-height: .8;
  letter-spacing: -.035em;
  white-space: nowrap;
  text-align: center;
  padding: 20px 0 0;
  margin-bottom: -0.16em;
  background: linear-gradient(180deg, rgba(214, 180, 138, .9) 0%, rgba(214, 180, 138, .12) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}
.ftr__word .ch {
  display: inline-block;
  transform: translateY(70%);
  opacity: 0;
  transition: transform 1.2s var(--ease), opacity 1.2s var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms);
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
}
.ftr__word.is-in .ch { transform: none; opacity: 1; }
html:not(.js) .ftr__word .ch { transform: none; opacity: 1; }

/* ---------- Buttons: subtle shine pass ---------- */
.btn--brass { overflow: hidden; }
.btn--brass::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  animation: shine 5s ease-in-out infinite 2s;
  pointer-events: none;
}
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .js .hero__slides { clip-path: none; }
  .h2.is-split .wm > span, .ftr__word .ch { transform: none !important; opacity: 1 !important; transition: none; }
  .js .tile:not(.is-shown), .js .about__img--a { clip-path: none; }
  .js .tile:not(.is-shown) img { transform: none; }
  .hero__h em, .btn--brass::after { animation: none; }
  .marquee__track { transform: none; }
}
