/* Punarjanma Nepal: homepage. */

/* ───── 1 · hero: the logo snap, then the hills rise behind it */
.hero { position: relative; margin-top: -71px; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: linear-gradient(#0F7FBA 0%, #3E9CC4 30%, #C9C6B6 56%, #6B3424 72%, #0E3326 100%); }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; transform: translate3d(calc(var(--mx, 0) * 6px), calc(var(--sy, 0) * .22px), 0); will-change: transform; }
.hero-copy { transform: translate3d(calc(var(--mx, 0) * 3px), calc(var(--sy, 0) * .12px), 0); opacity: clamp(0, calc(1 - var(--sy, 0) / var(--fd, 300)), 1); }
/* the photo: sky behind, peaks in front, each moving at its own speed */
.scape { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.par { position: absolute; inset: -4% -2% 0; transform: translate3d(calc(var(--mx, 0) * var(--m) * 1px), calc(var(--sy, 0) * var(--k) * 1px), 0); will-change: transform; }
.ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% 100%; }
.ph-sky { animation: skyin 2.8s cubic-bezier(.2,.7,.2,1) both; }
@keyframes skyin { from { transform: scale(1.12); filter: brightness(1.12) saturate(.7); } }
.ph-peaks { transform-origin: 50% 100%; animation: peaksin 1.7s cubic-bezier(.16,1,.3,1) 1.15s both; }
@keyframes peaksin { from { transform: translateY(22%) scale(1.04); opacity: 0; } 35% { opacity: 1; } }
.par-sky::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 64% 60% at 50% 33%, rgba(246,248,250,.72), rgba(246,248,250,.3) 46%, rgba(246,248,250,0) 74%); }   /* soft light behind the logo and words so they read on the deep blue */
.par-peaks { transform: translate3d(calc(var(--mx, 0) * var(--m) * 1px), calc(var(--sy, 0) * var(--k) * 1px + var(--drop, 0px)), 0); }
.par-peaks::after { content: ""; position: absolute; left: 0; right: 0; top: 99.5%; height: 70%; background: #0E3326; }   /* ground below the peaks as they rise on scroll */
.scape-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 24%; background: linear-gradient(rgba(14,51,38,0) 0%, rgba(14,51,38,.55) 45%, rgba(14,51,38,.9) 75%, #0E3326 94%); }
@keyframes fadein { from { opacity: 0; } }

.hero-copy { position: absolute; z-index: 3; left: 0; right: 0; top: 46%; padding: 0 var(--gut); text-align: center; }
.slogan { margin: 0 0 .7em; font: 800 clamp(30px, 3.4vw, 54px)/1 var(--display); letter-spacing: -.003em; color: var(--text); animation: heroin .8s cubic-bezier(.16,1,.3,1) 1.15s both; }
/* the line that keeps turning one thing into another */
.morph { margin: 0 auto; font: 400 clamp(19px, 1.65vw, 27px)/1.55 var(--body); color: var(--text); }
.morph-row { display: block; white-space: nowrap; animation: heroin .7s cubic-bezier(.16,1,.3,1) 1.35s both; }
.morph-row:last-child { animation-delay: 1.47s; }
.mw { position: relative; display: inline-block; vertical-align: bottom; padding: 0 .06em .24em; margin-bottom: -.24em; clip-path: inset(0); text-align: left; transition: width .55s cubic-bezier(.65,0,.35,1); }
.mw-in { display: inline-block; white-space: nowrap; font: 700 1.3em/1 var(--display); letter-spacing: .01em; }
.mw-from .mw-in { color: var(--c, var(--blue)); }
.mw-from::after { content: ""; position: absolute; left: .08em; right: .08em; bottom: .3em; height: 2px; border-radius: 1px; background: var(--c, var(--blue)); opacity: .5; }
/* the one small button, right where the eye lands after reading */
.hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-btn { display: inline-flex; align-items: center; padding: 10px 20px 9px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 16px/1 var(--body); text-decoration: none; letter-spacing: .005em; box-shadow: 0 6px 18px -8px rgba(14,51,38,.55); transition: background .2s, transform .25s cubic-bezier(.2,.9,.3,1.4); animation: heroin .7s cubic-bezier(.16,1,.3,1) 1.65s both; }
.hero-btn:hover { background: #0B2A1F; transform: translateY(-2px); }
.hero-arr { width: 15px; height: 15px; margin-left: 8px; flex: none; transition: transform .2s; }
.hero-btn:hover .hero-arr { transform: translateX(3px); }
.hero-btn-2 { background: rgba(255,255,255,.55); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(20,64,47,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation-delay: 1.75s; }
.hero-btn-2:hover { background: rgba(255,255,255,.85); }
.hero-btn:active { transform: translateY(0) scale(.97); }
.hero-btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; box-shadow: 0 0 0 5px var(--ink); }
.mw-to .mw-in { color: var(--ink); }
.mw-to::after { content: ""; position: absolute; left: .08em; right: .08em; bottom: .26em; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--red) 0 22%, var(--blue) 22% 45%, var(--yellow) 45% 70%, var(--teal) 70%); transform: scaleX(var(--press, 1)); transform-origin: left; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.mw .mw-in.leave { animation: mwout .42s cubic-bezier(.7,0,.84,0) forwards; }
.mw .mw-in.enter { animation: mwin .6s cubic-bezier(.16,1,.3,1) both; }
@keyframes mwout { to { transform: translateY(-110%) rotate(-4deg); opacity: 0; } }
@keyframes mwin { from { transform: translateY(110%) rotate(5deg); opacity: 0; } }
@keyframes heroin { from { opacity: 0; transform: translateY(.5em); } to { opacity: 1; transform: none; } }
.scroll-cue { opacity: clamp(0, calc(1 - var(--sy, 0) / 90), 1); position: absolute; z-index: 3; left: 50%; bottom: 10px; width: 44px; height: 80px; margin-left: -22px; display: block; animation: fadein .6s 2.4s both; }
.scroll-cue svg { display: block; width: 100%; height: 100%; overflow: visible; }
.scroll-cue:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; border-radius: 12px; }
/* one bottle per 2.4s: falls (.6s), pressed flat in a blink, sits as a plank, fades; the colour moves on each time */
.sc-bottle { transform-box: fill-box; transform-origin: 50% 100%; color: var(--blue); animation: sc-drop 2.4s cubic-bezier(.5,0,.75,0) infinite, sc-hue 9.6s step-end infinite; }
.sc-body { fill: currentColor; }
.sc-band { fill: rgba(247,245,240,.5); }
.sc-cap { fill: var(--paper); }
.sc-base { stroke: rgba(247,245,240,.45); stroke-width: 1.5; stroke-linecap: round; fill: none; }
.sc-chev { stroke: var(--paper); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; fill: none; animation: sc-bob 2.4s ease-in-out infinite; }
@keyframes sc-drop {
  0%   { transform: translateY(-12px) rotate(-14deg); opacity: 0; }
  8%   { opacity: 1; }
  30%  { transform: translateY(22px) rotate(6deg); animation-timing-function: cubic-bezier(.2,.8,.3,1); }
  36%  { transform: translateY(22px) scale(1.5, .14); }
  70%  { transform: translateY(22px) scale(1.5, .14); opacity: 1; }
  82%, 100% { transform: translateY(22px) scale(1.5, .14); opacity: 0; }
}
@keyframes sc-hue { 0% { color: var(--blue); } 25% { color: var(--red); } 50% { color: var(--yellow); } 75% { color: var(--teal); } }
@keyframes sc-bob { 0%, 100% { transform: translateY(0); opacity: .55; } 50% { transform: translateY(3px); opacity: 1; } }

/* ───── 2 · live waste, on dark green so the plastic colours carry it */
.waste { position: relative; background: var(--deep); color: var(--paper); overflow: hidden; }
.waste-grid { width: 100%; max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: minmax(300px, 40fr) 60fr; align-items: center; gap: clamp(20px, 3.4vw, 56px); padding: clamp(28px, 4vh, 48px) var(--gut) clamp(48px, 7vh, 88px); }
.waste-copy { max-width: 32em; align-self: start; padding-top: clamp(0px, 3vh, 32px); }
.lede { font: 800 clamp(30px, 3vw, 50px)/1 var(--display); margin: 0; max-width: 13em; text-wrap: balance; }
.counter { margin: .12em 0 .35em; font: 800 calc(clamp(80px, 9.6vw, 168px) * var(--fit, 1))/.9 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; display: flex; flex-wrap: nowrap; align-items: baseline; gap: .14em; color: var(--yellow); }
.counter #kg { white-space: nowrap; }
.counter.stack { flex-wrap: wrap; row-gap: .12em; }
.counter.stack small { flex-basis: 100%; }
.counter small { font: 600 clamp(17px, 1.4vw, 22px)/1.2 var(--body); letter-spacing: 0; color: var(--paper); }
.waste-why { margin: 0 0 1.1em; max-width: 34em; font-size: 1.02em; line-height: 1.5; color: rgba(247,245,240,.86); }
.facts { list-style: none; margin: .4em 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(247,245,240,.22); }
.facts li { display: grid; gap: 5px; align-content: start; padding: 16px 14px 0 0; }
.facts li + li { padding-left: 14px; border-left: 1px solid rgba(247,245,240,.22); }
.facts b { font: 800 clamp(23px, 1.9vw, 32px)/1 var(--display); color: var(--paper); white-space: nowrap; }
.facts span { font-size: .88em; line-height: 1.35; color: rgba(247,245,240,.72); }
.src { margin: 14px 0 0; font-size: .78em; color: rgba(247,245,240,.68); }
.waste-fig { margin: 0; align-self: stretch; display: grid; grid-template-rows: 1fr auto; gap: 14px; min-height: 64vh; }
.waste-field { position: relative; min-height: 0; border-bottom: 1px solid rgba(247,245,240,.22); }
#waste-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5em 2em; font-size: .92em; color: rgba(247,245,240,.78); }
.legend li { display: flex; align-items: center; gap: .55em; }
.waste .legend { justify-content: space-between; }
.legend .lg-rec { margin-left: auto; text-align: right; }   /* sits right under the recycled stack at the canvas's right edge */
.sw { display: inline-block; width: 1.4em; height: .8em; border-radius: 2px; }
.sw-mix { background: linear-gradient(90deg, var(--red) 0 25%, var(--blue) 25% 50%, var(--yellow) 50% 75%, var(--teal) 75%); }
.sw-rec { background: var(--bone); }

/* ───── 3 · collect, recycle, make */
.flow { padding: clamp(56px, 7vw, 100px) 0 clamp(20px, 2.6vw, 36px); }
.flow-h { font-size: clamp(36px, 4.4vw, 68px); margin-bottom: clamp(22px, 3vw, 44px); }
.flow-steps { list-style: none; counter-reset: fs; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3.4vw, 56px); }
.flow-steps li { counter-increment: fs; position: relative; display: grid; gap: 8px; align-content: start; container-type: inline-size; }
.flow-steps li + li::before { content: ""; position: absolute; left: calc(clamp(20px, 3.4vw, 56px) * -.5 - 7px); top: calc(37.5cqi - 6px); width: 12px; height: 12px; border-top: 2px solid var(--ink-3); border-right: 2px solid var(--ink-3); transform: rotate(45deg); }
.flow-img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: clamp(12px, 1.2vw, 18px); background: #E8E4DC; margin-bottom: 10px; }
.flow-steps b { display: flex; align-items: baseline; gap: .4em; font: 800 clamp(26px, 2.3vw, 36px)/1 var(--display); color: var(--text); }
.flow-steps b::before { content: counter(fs); font-size: .9em; color: var(--ink); opacity: .5; }
.flow-steps span { color: var(--text-2); max-width: 26em; }

/* the label that travels to become the next heading */
.mp-ghost { position: fixed; left: 0; top: 0; z-index: 30; margin: 0; pointer-events: none; transform-origin: 0 0; white-space: nowrap; will-change: transform; }
.mp-moving .mp-src { visibility: hidden; }
.mp-src::before { visibility: visible; }

/* ───── 4 · products: boxes until the photos come */
.mp { padding: clamp(36px, 4.4vw, 64px) 0 clamp(24px, 3vw, 40px); }
.mp-more { margin: clamp(26px, 3vw, 40px) 0 0; text-align: center; }
.mp-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(22px, 3vw, 40px); }
.mp-title { margin: 0; font-size: clamp(38px, 4.2vw, 66px); line-height: .95; color: var(--text); white-space: nowrap; }
.mp-wait .mp-title { visibility: hidden; }
.mp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(22px, 2.4vw, 36px) clamp(12px, 1.4vw, 22px); }
.mp-box { display: grid; gap: 10px; text-decoration: none; color: var(--text); }
.mp-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: #ECE8E0; }
.mp-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.mp-media svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mp-flecks { opacity: .35; }
.mp-shape { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.2,.9,.3,1.3); }
.mp-box:hover .mp-shape { transform: translateY(-6px) scale(1.04); }
.mp-box:hover .mp-media img { transform: scale(1.04); }
.mp-txt { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-top: 1.5px solid var(--text); padding-top: 9px; }
.mp-txt b { font: 800 clamp(19px, 1.5vw, 24px)/1 var(--display); }
.mp-box:hover .mp-txt b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.mp-txt small { font-size: .84em; color: var(--text-2); white-space: nowrap; }

/* ───── 5 · clients */
.clients { padding: clamp(48px, 6vw, 88px) 0; border-top: 1px solid var(--line-n); border-bottom: 1px solid var(--line-n); overflow: hidden; }
.cl-h { font: 700 1em/1.2 var(--body); letter-spacing: 0; color: var(--text-2); margin: 0 0 clamp(20px, 2.6vw, 34px); text-align: center; }
.marquee { display: flex; width: max-content; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-row { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex: none; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-row { animation-play-state: paused; }
.marquee-row li { flex: none; padding: 0 clamp(22px, 3vw, 48px); }
.marquee-row a, .marquee-row li > span { display: grid; place-items: center; height: 64px; text-decoration: none; color: var(--text-2); }
.marquee-row img { max-height: 56px; max-width: 170px; width: auto; height: auto; filter: grayscale(1); opacity: .72; transition: filter .3s, opacity .3s; }
.marquee-row a:hover img { filter: none; opacity: 1; }
.cl-name { display: inline-block; padding: 10px 18px; border: 1.5px dashed rgba(30,37,34,.25); border-radius: 10px; font: 700 18px/1 var(--display); letter-spacing: .02em; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ───── 6 · ways in: three compact doors */
.ways { padding: clamp(20px, 2.4vw, 32px) 0 clamp(48px, 6vw, 88px); }
.ways-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(10px, 1.3vw, 18px); }
.way { display: flex; flex-direction: column; gap: 8px; padding: clamp(20px, 2vw, 28px); border-radius: var(--r-m); text-decoration: none; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.way:hover { transform: translateY(-3px); }
.way-k { font-size: .84em; font-weight: 600; opacity: .85; }
.way b { font: 800 clamp(22px, 1.8vw, 28px)/1.02 var(--display); max-width: 16em; }
.way .link { margin-top: 10px; align-self: flex-start; font-size: .92em; }
.way-blue { background: var(--blue); color: var(--paper); }
.way-yellow { background: var(--yellow); color: var(--text); }
.way-green { background: var(--ink); color: var(--paper); }

/* ───── smaller screens */
@media (max-width: 1000px) {
  .mp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .waste-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 28px; padding-bottom: 40px; }
  .waste-fig { min-height: 46vh; }
  .flow-steps { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .flow-steps li + li::before { left: 50%; top: -26px; margin-left: -9px; transform: rotate(135deg); }
  .flow-img { aspect-ratio: 4 / 3; }
  .flow-steps li { container-type: normal; }
}
@media (max-width: 700px) {
  .hero { min-height: 560px; }
  .hero { margin-top: -63px; }
  .hero-copy { top: 40%; }
  .ph { object-position: 52% 100%; }
  .facts { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .facts li, .facts li + li { grid-template-columns: 6.6em minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 10px 0; border-left: 0; border-top: 1px solid rgba(247,245,240,.22); }
  .facts b { font-size: 24px; }
  .mp-title { font-size: clamp(34px, 10vw, 48px); }
  .mp-txt { flex-direction: column; gap: 4px; }
}
@media (max-height: 680px) and (min-width: 701px) { .hero-copy { top: 39%; } .slogan { font-size: 34px; } }

@media (prefers-reduced-motion: reduce) {
  .ph-sky, .ph-peaks, .slogan, .morph-row, .scroll-cue, .hero-btn { animation: none !important; }
  .par, #hero-canvas, .hero-copy { transform: none !important; }
  .sc-bottle, .sc-chev { animation: none; }
  .marquee { width: auto; flex-wrap: wrap; justify-content: center; -webkit-mask-image: none; mask-image: none; }
  .marquee-row { animation: none; flex-wrap: wrap; justify-content: center; row-gap: 16px; }
  .marquee-row[aria-hidden] { display: none; }
}
.way-soon { display: inline-block; margin-left: 6px; padding: 3px 7px 2px; border-radius: 999px; background: var(--yellow); color: var(--deep); font: 700 11px/1 var(--body); font-style: normal; vertical-align: 1px; }

/* what we do: smaller, the three photos sit in a narrower band */
.flow { padding: clamp(48px, 5.4vw, 80px) 0 clamp(16px, 2vw, 28px); }
.flow-h { font-size: clamp(32px, 3.4vw, 52px); }
.flow-steps { max-width: 1040px; gap: clamp(18px, 2.6vw, 44px); }
.flow-img { aspect-ratio: 4 / 3; border-radius: 14px; }
.flow-steps b { font-size: clamp(22px, 1.9vw, 30px); }
.flow-steps span { font-size: .95em; }
@media (max-width: 860px) { .flow-steps { max-width: 520px; } .flow-img { aspect-ratio: 16 / 10; } }

/* what we do: same picture size, spread across the full width so the row lines up with the products below; the arrows sit in the middle of each gap */
.flow-steps { --fc: min(340px, calc((100cqw - 96px) / 3)); max-width: none; container-type: inline-size; grid-template-columns: repeat(3, min(340px, calc((100% - 96px) / 3))); justify-content: space-between; gap: 0; }
.flow-steps li { container-type: normal; }
.flow-steps li + li::before { display: none; }
.flow-steps li:not(:last-child)::after { content: ""; position: absolute; left: calc(100% + (100cqw - 3 * var(--fc)) / 4 - 7px); top: calc(var(--fc) * .375 - 6px); width: 12px; height: 12px; border-top: 2px solid var(--ink-3); border-right: 2px solid var(--ink-3); transform: rotate(45deg); }
.flow-steps b::before { content: attr(data-n); }
@media (max-width: 860px) {
  .flow-steps { grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 34px; max-width: 520px; container-type: normal; }
  .flow-steps li:not(:last-child)::after { display: none; }
  .flow-steps li + li::before { display: block; }
}

/* keep the drawn logo sharp: the canvas only ever moves by whole pixels (a part-pixel shift makes the browser blur the whole picture) */
@supports (width: round(1.5px, 1px)) {
  #hero-canvas { transform: translate3d(round(calc(var(--mx, 0) * 6px), 1px), round(calc(var(--sy, 0) * .22px), 1px), 0); }
}
