/* Tokens: see ../docs/brand-guidelines.md */
:root {
  --ink: #3e4095;
  --ink-deep: #1b1c4b;
  --magenta: #c8145a;
  --magenta-dark: #a30f49;
  --yellow: #ffcb05;
  --cyan: #00a3da;
  --paper: #fff;
  --stock: #eef0f8;
  --line: #d6d9ea;
  --muted: #4c4e70;
  --display: 'Poppins', system-ui, sans-serif;
  --text: 'Roboto', 'Poppins', system-ui, sans-serif; /* Roboto has no Devanagari; Poppins covers Nepali */
  --gutter: max(1.25rem, calc((100vw - 74rem) / 2));
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.125rem/1.6 var(--text); color: var(--ink-deep); background: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-underline-offset: .18em; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
:lang(ne) h2 { line-height: 1.4; }
h1 { font-size: clamp(2.25rem, 5.2vw, 4rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: .25em; }
p { margin: 0 0 1em; max-width: 62ch; }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; background: var(--paper); padding: .75rem 1rem; }

/* CMYK control strip, as printed on the edge of a press sheet */
.strip { height: 8px; background: linear-gradient(90deg, var(--cyan) 0 25%, var(--magenta) 0 50%, var(--yellow) 0 75%, var(--ink-deep) 0); transform-origin: left; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1.5rem; padding: .6rem var(--gutter); }
.brand img { width: 210px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .25rem; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .65rem; font-weight: 500; text-decoration: none; background: linear-gradient(var(--magenta), var(--magenta)) left .65rem bottom 8px / 0 2px no-repeat; transition: background-size .3s var(--ease); }
.nav a:hover, .nav a[aria-current] { background-size: calc(100% - 1.3rem) 2px; }

@media (max-width: 30rem) {
  .brand img { width: 180px; }
  .nav { width: 100%; justify-content: space-between; }
  .nav a { padding: 0 .25rem; font-size: 1rem; background-position: left .25rem bottom 8px; }
  .nav a:hover, .nav a[aria-current] { background-size: calc(100% - .5rem) 2px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 52px; padding: .6rem 1.6rem; border: 2px solid var(--magenta); border-radius: 6px; background: var(--magenta); color: #fff; font: 700 1.0625rem var(--text); text-decoration: none; cursor: pointer; box-shadow: 0 0 0 0 var(--ink-deep); transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s; }
.btn:hover { background: var(--magenta-dark); border-color: var(--magenta-dark); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink-deep); }
.btn:active { transform: none; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--stock); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.75rem; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter); scroll-margin-top: 4.5rem; }
.stock { background: var(--stock); }
.dark { background: var(--ink-deep); color: #e3e4f5; }
.dark h2, .dark h3 { color: #fff; }
.dark a { color: #fff; }

/* Hero */
.hero { display: grid; gap: 3rem; align-items: center; padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(3.5rem, 7vw, 6rem); overflow: hidden; }
.hero p { font-size: 1.25rem; color: var(--muted); }
@media (min-width: 62rem) { .hero { grid-template-columns: 1.1fr .9fr; } }

/* Headline settles into register, the one orchestrated moment */
.register { animation: register 1.1s var(--ease) both; }
@keyframes register {
  from { text-shadow: -.09em .035em 0 rgb(0 163 218 / .75), .09em -.035em 0 rgb(200 20 90 / .7), 0 .08em 0 rgb(255 203 5 / .85); opacity: .2; }
  60% { opacity: 1; }
  to { text-shadow: 0 0 0 transparent, 0 0 0 transparent, 0 0 0 transparent; opacity: 1; }
}
.strip.run { animation: run .9s var(--ease) both; }
@keyframes run { from { transform: scaleX(0); } }

/* Fanned stack of real jobs */
.stack { position: relative; width: min(100%, 30rem); aspect-ratio: 1; margin: 0 auto; }
.stack img { position: absolute; width: 74%; border: 6px solid #fff; box-shadow: 0 18px 40px rgb(27 28 75 / .22); animation: deal .8s var(--ease) both; transition: translate .5s var(--ease); }
.stack img:nth-child(1) { left: 0; top: 4%; rotate: -8deg; animation-delay: .15s; }
.stack img:nth-child(2) { right: 0; top: 0; rotate: 7deg; animation-delay: .3s; }
.stack img:nth-child(3) { left: 13%; bottom: 0; rotate: -1deg; animation-delay: .45s; }
.stack img { translate: calc(var(--mx, 0) * var(--depth) * 1px) calc(var(--my, 0) * var(--depth) * 1px); }
.stack img:nth-child(1) { --depth: -22; }
.stack img:nth-child(2) { --depth: -12; }
.stack img:nth-child(3) { --depth: 26; }
@keyframes deal { from { transform: translateY(40px) scale(.96); } }

/* Services: a job sheet, one row per service */
.jobs { list-style: none; margin: 2.5rem 0 0; padding: 0; border-top: 2px solid var(--ink); }
.jobs li { position: relative; display: grid; gap: .25rem 2rem; padding: 1.35rem 0; border-bottom: 1px solid var(--line); isolation: isolate; }
.jobs li::before { content: ''; position: absolute; inset: 0 -1rem; z-index: -1; background: var(--stock); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.jobs li:hover::before, .jobs li:focus-within::before { transform: none; }
.jobs h3, .jobs p { margin: 0; }
.jobs p { color: var(--muted); }
.jobs h3 a { text-decoration: none; }
.jobs h3 a::after { content: ''; position: absolute; inset: 0; }
.jobs h3 a:hover { text-decoration: underline; }
@media (min-width: 48rem) { .jobs li { grid-template-columns: 22rem 1fr; align-items: baseline; } }

/* Work gallery */
.gallery { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); margin-top: 2.5rem; }
.gallery figure { margin: 0; }
.gallery figure > a { display: block; overflow: hidden; border-radius: 4px; background: #fff; }
.gallery img { width: 100%; transition: scale .6s var(--ease); }
.gallery figure > a:hover img { scale: 1.045; }
.gallery figcaption { padding-top: .55rem; font-size: 1rem; color: var(--muted); }
.gallery figcaption a { display: inline-flex; min-height: 44px; align-items: center; }
.gallery .wide { grid-column: 1 / -1; width: 100%; max-width: 52rem; justify-self: center; }
@media (min-width: 62rem) {
  /* seven squares and one landscape fill three even rows */
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery .wide { grid-column: span 2; max-width: none; }
  .gallery .wide img { aspect-ratio: 2.02; object-fit: cover; }
}

/* Order steps: a real sequence, so numbered */
.steps { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); margin: 2.5rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; border-top: 4px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(step); font: 700 3rem/1 var(--display); color: var(--magenta); }
.steps h3 { margin-top: .4rem; }

/* Service page */
.crumbs { padding: 1rem var(--gutter) 0; font-size: 1rem; }
.page-hero figure { margin: 0; text-align: center; }
.page-hero figcaption { margin-top: .5rem; font-size: .9rem; color: var(--muted); }
.page-hero img { width: min(100%, 34rem); margin: 0 auto; box-shadow: 0 18px 40px rgb(27 28 75 / .18); }
.page-hero h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
.points { display: grid; gap: 1.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); margin-top: 2rem; }
.points div { border-left: 4px solid var(--yellow); padding-left: 1rem; }
.points p { margin: 0; }

/* FAQ */
.faq { max-width: 52rem; margin-top: 2rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 56px; cursor: pointer; font: 600 1.125rem var(--display); color: var(--ink); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.75rem; color: var(--magenta); transition: rotate .25s var(--ease); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details[open] > p { animation: open .3s var(--ease); }
.faq details p { margin: 0 0 1.25rem; }
@keyframes open { from { opacity: 0; translate: 0 -6px; } }

/* Contact */
.contact { display: grid; gap: 3rem; }
@media (min-width: 52rem) { .contact { grid-template-columns: 1fr 1.15fr; } }
.contact address { font-style: normal; }
.contact address strong { display: block; color: var(--yellow); }
.contact address a { display: inline-flex; align-items: center; min-height: 36px; }
.orderbox { padding: clamp(1.25rem, 3vw, 2rem); background: #fff; color: var(--ink-deep); border-radius: 6px; align-self: start; }
.dark .orderbox h3 { color: var(--ink); }
.dark .orderbox a:not(.btn) { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.dark .chips a { display: inline-flex; align-items: center; min-height: 48px; padding: .5rem 1.1rem; border: 2px solid var(--line); border-radius: 999px; font-weight: 500; text-decoration: none; transition: translate .18s var(--ease), border-color .18s, background-color .18s; }
.dark .chips a:hover { translate: 0 -3px; border-color: #0b6b3a; background: #e9f7ef; }
.orderbox .btn.big { width: 100%; background: #0b6b3a; border-color: #0b6b3a; text-align: center; }
.orderbox .or { margin: 1.25rem 0 .6rem; font-weight: 700; }
.orderbox .alt { margin: 0; font-size: 1rem; }

/* Footer */
.foot { padding: 3rem var(--gutter) 6.5rem; background: var(--ink); color: #e3e4f5; }
.foot a { color: #fff; display: inline-flex; align-items: center; min-height: 36px; }
.foot .cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-bottom: 2rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot img { width: 220px; }

/* Always-reachable WhatsApp */
.wa { position: fixed; right: 1rem; bottom: 1rem; z-index: 9; box-shadow: 0 8px 24px rgb(27 28 75 / .35); background: #0b6b3a; border-color: #fff; animation: deal .6s var(--ease) 1.2s both; }
.wa:hover { background: #08532d; border-color: #fff; }

/* Reveal on scroll. The class is only added by site.js, so content never depends on it. */
.reveal { opacity: 0; translate: 0 22px; transition: opacity .6s var(--ease), translate .6s var(--ease); transition-delay: var(--delay, 0ms); }
.reveal.in { opacity: 1; translate: none; }

/* Headline: words rise off the sheet, one after another */
.w { display: inline-block; overflow: clip; vertical-align: top; padding: 0 .06em .08em; margin: 0 -.06em -.08em; }
.w > span { display: inline-block; animation: rise .8s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes rise { from { translate: 0 110%; rotate: 6deg; } }

/* Headings get a four-colour rule that prints in as they arrive */
.section h2::after { content: ''; display: block; width: 6rem; height: 6px; margin-top: .45rem; background: linear-gradient(90deg, var(--cyan) 0 25%, var(--magenta) 0 50%, var(--yellow) 0 75%, var(--ink) 0); transform-origin: left; transition: transform .8s var(--ease) .15s; }
.section h2.wait::after { transform: scaleX(0); }

/* Gallery: squeegee wipe in, then a lamination gloss that follows the pointer */
.gallery figure > a { position: relative; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s var(--ease), clip-path .9s var(--ease), box-shadow .25s; cursor: zoom-in; clip-path: inset(0); }
.gallery figure > a:hover { box-shadow: 0 22px 44px rgb(27 28 75 / .24); }
.gallery figure > a::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgb(255 255 255 / .55), transparent 45%); mix-blend-mode: soft-light; transition: opacity .3s; }
.gallery figure > a:hover::after { opacity: 1; }
.gallery figure.reveal { opacity: 1; translate: none; }
.gallery figure.reveal > a { clip-path: inset(0 0 100% 0); }
.gallery figure.reveal.in > a { clip-path: inset(0); }

/* Job sheet rows: a proof of the job floats beside the pointer */
.peek { position: fixed; left: 0; top: 0; z-index: 8; width: 15rem; aspect-ratio: 1; object-fit: cover; border: 5px solid #fff; box-shadow: 0 18px 40px rgb(27 28 75 / .3); pointer-events: none; opacity: 0; scale: .6; rotate: -6deg; transition: opacity .2s, scale .35s var(--ease), rotate .35s var(--ease), translate .18s ease-out; }
.peek.on { opacity: 1; scale: 1; rotate: 3deg; }

/* Order steps: rule draws, number lands like a stamp */
.steps li { position: relative; border-top-color: var(--line); }
.steps li::after { content: ''; position: absolute; left: 0; right: 0; top: -4px; height: 4px; background: var(--ink); transform-origin: left; transition: transform .8s var(--ease) var(--delay, 0ms); }
.steps li.reveal:not(.in)::after { transform: scaleX(0); }
.steps li::before { display: inline-block; transition: scale .5s var(--ease) calc(var(--delay, 0ms) + .3s), rotate .5s var(--ease) calc(var(--delay, 0ms) + .3s); }
.steps li.reveal:not(.in)::before { scale: 2.2; rotate: -18deg; }

/* Full-size viewer */
.viewer { padding: 0; border: 0; background: none; max-width: 94vw; max-height: 92vh; overflow: visible; }
.viewer::backdrop { background: rgb(27 28 75 / .9); }
.viewer img { max-width: 94vw; max-height: 82vh; width: auto; border: 6px solid #fff; }
.viewer form { display: flex; justify-content: center; padding: .75rem 0 0; background: none; }

/* Type band that is pushed along by scrolling, never on its own */
.ticker { overflow: hidden; background: var(--ink); color: #fff; padding: 1rem 0; rotate: -1.5deg; scale: 1.03; }
.ticker p { display: flex; gap: 2.5rem; width: max-content; max-width: none; margin: 0; font: 700 clamp(1.75rem, 5vw, 3.5rem)/1.2 var(--display); white-space: nowrap; }
.ticker span:nth-child(even) { color: var(--yellow); }

/* Reading progress in magenta under the header */
.progress { position: absolute; left: 0; bottom: -1px; width: 100%; height: 3px; background: var(--magenta); transform-origin: left; transform: scaleX(0); }

@supports (animation-timeline: view()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
  .ticker p { animation: slide linear both; animation-timeline: view(); }
  @keyframes slide { from { translate: 0; } to { translate: -45% 0; } }
  /* Hero sheets fan apart as you scroll past them */
  .stack img:nth-child(1) { animation: deal .8s var(--ease) .15s both, fan-a linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 600px; }
  .stack img:nth-child(2) { animation: deal .8s var(--ease) .3s both, fan-b linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 600px; }
  @keyframes fan-a { from { rotate: -8deg; } to { rotate: -20deg; transform: translateX(-12%); } }
  @keyframes fan-b { from { rotate: 7deg; } to { rotate: 19deg; transform: translateX(12%); } }
}

/* Between pages: the new sheet is pulled across, and the job image travels with you */
@view-transition { navigation: auto; }
.top { view-transition-name: header; }
::view-transition-new(root) { animation: pull .55s var(--ease) both; }
::view-transition-old(root) { animation: fade .55s ease both; }
::view-transition-group(*) { animation-duration: .55s; animation-timing-function: var(--ease); }
@keyframes pull { from { clip-path: polygon(0 0, 0 0, -20% 100%, -20% 100%); } to { clip-path: polygon(0 0, 120% 0, 100% 100%, -20% 100%); } }
@keyframes fade { to { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
  .gallery figure > a { transform: none; }
  .ticker { rotate: none; scale: none; }
}

/* the tilted type band must not widen the page */
main { overflow-x: clip; }

/* on narrow screens the fanned sheets would leave the page, so they stay stacked */
@media (max-width: 61.99rem) {
  .stack img:nth-child(1) { animation: deal .8s var(--ease) .15s both; }
  .stack img:nth-child(2) { animation: deal .8s var(--ease) .3s both; }
}
