/* ==========================================================================
   PrimeWeb — premium layer
   Loaded after main.css. Pure CSS, no extra requests beyond one display font.
   Principles: one serif voice for headlines, hairline borders, lime used
   sparingly, slow deliberate motion, and full reduced-motion support.
   ========================================================================== */

:root {
	--pw-font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
	--pw-hairline: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.04) 40%, rgba(217,244,95,0.22));
	--pw-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Typography: serif display, sans body ---------- */
h1, h2, .pw-section-title, .pw-stat__num, .pw-price__amount, .pw-float strong {
	font-family: var(--pw-font-display);
	font-weight: 400;
	letter-spacing: -0.015em;
	line-height: 1.04;
}
h1 { font-size: clamp(2.8rem, 6.4vw, 5.2rem); }
h2, .pw-section-title { font-size: clamp(2.1rem, 4.4vw, 3.5rem); }
h3, h4 { letter-spacing: -0.02em; }
h1 em, h2 em, .pw-section-title em { font-style: italic; color: var(--pw-accent); }
body { font-size: 17px; line-height: 1.7; font-feature-settings: "kern", "liga", "ss01"; }
.pw-lede, .pw-section-sub { color: #c4c4c0; line-height: 1.65; }
.pw-lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 56ch; }

/* ---------- Rhythm ---------- */
.pw-dc-section, .pw-related, .pw-faq, .pw-reviews, .pw-stack { padding-block: clamp(4rem, 8vw, 7rem); }
.pw-section-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); }

/* ---------- Eyebrow: small caps with a refined rule ---------- */
.pw-eyebrow { font-size: 0.72rem; letter-spacing: 0.22em; color: var(--pw-accent); }
.pw-eyebrow::before { width: 34px; height: 1px; background: linear-gradient(90deg, var(--pw-accent), transparent); }

/* ---------- Header ---------- */
.pw-header {
	background: rgba(10,10,10,0.72);
	-webkit-backdrop-filter: saturate(160%) blur(18px);
	backdrop-filter: saturate(160%) blur(18px);
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pw-menu a { position: relative; }
.pw-menu a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
	background: var(--pw-accent); transform: scaleX(0); transform-origin: left;
	transition: transform 0.45s var(--pw-ease-out);
}
.pw-menu a:hover::after, .pw-menu .current-menu-item > a::after { transform: scaleX(1); }

/* ---------- Hero: atmospheric depth + fine grain ---------- */
.pw-hero { position: relative; isolation: isolate; }
.pw-hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(60% 50% at 85% 0%, rgba(217,244,95,0.10), transparent 70%),
		radial-gradient(50% 40% at 0% 100%, rgba(135,192,61,0.08), transparent 70%);
}
.pw-hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
	mix-blend-mode: overlay;
}
.pw-hero__panel {
	background: linear-gradient(160deg, rgba(36,36,36,0.85), rgba(18,19,16,0.9));
	border: 1px solid transparent;
	border-radius: var(--pw-radius-lg);
	box-shadow: 0 40px 80px -30px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
	-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}

/* ---------- Cards, tiles, plans: gradient hairline + lift ---------- */
.pw-tile, .pw-card, .pw-price, .pw-quote, .pw-related__item {
	position: relative;
	border-color: transparent;
	background-clip: padding-box;
	box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 24px 48px -32px rgba(0,0,0,0.8);
	transition: transform 0.6s var(--pw-ease-out), box-shadow 0.6s var(--pw-ease-out), background-color 0.4s;
}
.pw-tile::before, .pw-card::before, .pw-price::before, .pw-quote::before, .pw-related__item::before {
	content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
	background: var(--pw-hairline);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor; mask-composite: exclude;
	pointer-events: none; opacity: 0.55; transition: opacity 0.5s;
}
.pw-tile:hover, .pw-card:hover, .pw-price:hover, .pw-quote:hover, .pw-related__item:hover {
	transform: translateY(-6px);
	box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 40px 70px -30px rgba(0,0,0,0.9), 0 0 0 1px rgba(217,244,95,0.08);
}
.pw-tile:hover::before, .pw-card:hover::before, .pw-price:hover::before,
.pw-quote:hover::before, .pw-related__item:hover::before { opacity: 1; }
.pw-price--featured { background: linear-gradient(170deg, rgba(217,244,95,0.07), rgba(26,26,26,1) 55%); }
.pw-tile__icon { border-radius: 14px; background: rgba(217,244,95,0.08); box-shadow: inset 0 0 0 1px rgba(217,244,95,0.18); }

/* ---------- Buttons ---------- */
.pw-btn { letter-spacing: 0; font-weight: 600; transition: transform 0.5s var(--pw-ease-out), box-shadow 0.5s var(--pw-ease-out), background-color 0.3s, color 0.3s, border-color 0.3s; }
.pw-btn--primary { box-shadow: 0 0 0 1px rgba(217,244,95,0.5), 0 10px 30px -10px rgba(217,244,95,0.45); }
.pw-btn--primary:hover { box-shadow: 0 0 0 1px #fff, 0 18px 44px -12px rgba(217,244,95,0.55); }
.pw-btn--ghost { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.14); }
.pw-arrow { transition: transform 0.4s var(--pw-ease-out), color 0.2s; }
a:hover > .pw-arrow, .pw-arrow:hover { transform: translateX(4px); }

/* ---------- Chips ---------- */
.pw-chip { border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.02); transition: border-color 0.3s, color 0.3s, background 0.3s, transform 0.4s var(--pw-ease-out); }
.pw-chip:hover { border-color: var(--pw-accent); color: var(--pw-accent); background: rgba(217,244,95,0.06); transform: translateY(-2px); }

/* ---------- FAQ ---------- */
.pw-faq__item { border-radius: 16px; transition: border-color 0.4s, background 0.4s; }
.pw-faq__item[open] { background: linear-gradient(180deg, rgba(217,244,95,0.04), transparent); }
.pw-faq__item summary { font-weight: 600; }

/* ---------- Marquee: faded edges ---------- */
.pw-marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }

/* ---------- CTA band ---------- */
.pw-cta-band h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }

/* ---------- Accessibility: visible, elegant focus ---------- */
:focus-visible { outline: 2px solid var(--pw-accent); outline-offset: 3px; border-radius: 6px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }

/* ---------- Scrollbar + selection ---------- */
html { scrollbar-color: #2e2f2a #0a0a0a; scrollbar-width: thin; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
	h1 { font-size: clamp(2.4rem, 11vw, 3.2rem); }
	.pw-tile:hover, .pw-card:hover, .pw-price:hover, .pw-quote:hover, .pw-related__item:hover { transform: none; }
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
	.pw-tile:hover, .pw-card:hover, .pw-price:hover, .pw-quote:hover, .pw-related__item:hover { transform: none; }
}


/* ---------- Answer-first box (AEO) ---------- */
.pw-answer { padding-block: clamp(2rem, 4vw, 3rem) 0; }
.pw-answer__box {
	position: relative; padding: 1.4rem 1.6rem 1.2rem 1.8rem; border-radius: 18px;
	background: linear-gradient(160deg, rgba(217,244,95,0.07), rgba(255,255,255,0.02));
	box-shadow: inset 0 0 0 1px rgba(217,244,95,0.18);
}
.pw-answer__box::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--pw-accent); }
.pw-answer__label { display: block; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--pw-accent); font-weight: 700; margin-bottom: 0.4rem; }
.pw-answer__box p { margin: 0; font-size: 1.12rem; line-height: 1.6; color: #f1f1ec; }
.pw-answer__meta { display: block; margin-top: 0.7rem; font-size: 0.78rem; color: #8d8d88; }


/* ---------- Project cards: separate links (case study + live site) ---------- */
.pw-card--project { display: flex; flex-direction: column; overflow: hidden; }
.pw-card__media-link { display: block; }
.pw-card__body h3 a { color: inherit; text-decoration: none; }
.pw-card__body h3 a:hover { color: var(--pw-accent); }
.pw-card__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-top: 0.6rem; }
.pw-card__links .pw-arrow { margin: 0; }
.pw-live-link { color: var(--pw-accent); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }


/* ==========================================================================
   Motion system (pairs with assets/js/motion.js)
   Hidden states only exist while JS is running, so nothing is ever stuck
   invisible. Everything is disabled under prefers-reduced-motion.
   ========================================================================== */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 6rem; }

/* Reveal variants */
html.pw-motion .pw-m { opacity: 0; transition: opacity 0.8s var(--pw-ease-out), transform 0.9s var(--pw-ease-out); transition-delay: var(--m-delay, 0ms); will-change: opacity, transform; }
html.pw-motion .pw-m[data-m="up"]    { transform: translate3d(0, 26px, 0); }
html.pw-motion .pw-m[data-m="left"]  { transform: translate3d(28px, 0, 0); }
html.pw-motion .pw-m[data-m="scale"] { transform: scale(0.96) translate3d(0, 14px, 0); }
html.pw-motion .pw-m[data-m="pop"]   { transform: scale(0.85); }
html.pw-motion .pw-m.is-in { opacity: 1; transform: none; will-change: auto; }

/* Spotlight that follows the pointer */
.pw-tile, .pw-card, .pw-price, .pw-quote, .pw-related__item, .pw-author-card, .pw-aside-cta { --mx: 50%; --my: 0%; }
.pw-tile::after, .pw-card::after, .pw-price::after, .pw-quote::after, .pw-related__item::after, .pw-author-card::after, .pw-aside-cta::after {
	content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
	background: radial-gradient(420px circle at var(--mx) var(--my), rgba(217,244,95,0.09), transparent 55%);
	opacity: 0; transition: opacity 0.5s;
}
.pw-tile:hover::after, .pw-card:hover::after, .pw-price:hover::after, .pw-quote:hover::after,
.pw-related__item:hover::after, .pw-author-card:hover::after, .pw-aside-cta:hover::after { opacity: 1; }
.pw-author-card, .pw-aside-cta { position: relative; }

/* Hero: floating proof chips bob gently, each out of phase */
@keyframes pw-bob { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -8px, 0); } }
html.pw-motion .pw-float { animation: pw-bob 6.5s ease-in-out infinite; }
html.pw-motion .pw-float--stat { animation-delay: -2.2s; animation-duration: 7.5s; }
html.pw-motion .pw-float--cert { animation-delay: -4.1s; animation-duration: 8s; }
html.pw-motion .pw-hero__glow { will-change: transform; }

/* Process: each step lights up as you arrive; finished steps stay lit */
.pw-process__list li { position: relative; overflow: hidden; transition: border-color 0.5s, background 0.5s, transform 0.6s var(--pw-ease-out); }
.pw-process__list li::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--pw-accent), transparent); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--pw-ease-out); }
.pw-process__num { transition: color 0.5s, text-shadow 0.5s, transform 0.6s var(--pw-ease-out); }
html.pw-motion .pw-process__list li { opacity: 0.55; }
html.pw-motion .pw-process__list li.is-active, html.pw-motion .pw-process__list li.is-done { opacity: 1; }
.pw-process__list li.is-active { border-color: rgba(217,244,95,0.55); background: linear-gradient(120deg, rgba(217,244,95,0.06), transparent 60%); transform: translateX(6px); }
.pw-process__list li.is-active .pw-process__num { text-shadow: 0 0 22px rgba(217,244,95,0.55); transform: scale(1.12); }
.pw-process__list li.is-active::after, .pw-process__list li.is-done::after { transform: scaleX(1); }
.pw-process__list li.is-done { border-color: rgba(217,244,95,0.22); }
.pw-process__list li.is-done .pw-process__num::after { content: " ✓"; font-size: 0.6em; }

/* Stats: the number is the hero of the strip */
.pw-stat__num { font-variant-numeric: tabular-nums; }

/* FAQ: answer fades in when opened */
@keyframes pw-fade-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.pw-faq__item[open] .pw-faq__answer { animation: pw-fade-down 0.45s var(--pw-ease-out); }

/* Header: tightens once you scroll */
.pw-header { transition: background 0.4s, border-color 0.4s, padding 0.4s, box-shadow 0.4s; }
.pw-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,0.9); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	html.pw-motion .pw-m { opacity: 1; transform: none; transition: none; }
	html.pw-motion .pw-float { animation: none; }
	.pw-process__list li.is-active { transform: none; }
	.pw-process__list li, .pw-process__list li::after { transition: none; }
}


/* ---------- Map: fluid at every width ---------- */
.pw-map { margin: 0; width: 100%; max-width: 100%; }
.pw-map__frame { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--pw-radius-lg, 20px); overflow: hidden; background: #14150f; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 30px 60px -34px rgba(0,0,0,0.9); }
.pw-map__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.pw-map__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.2rem; padding: 0.85rem 0.25rem 0; font-size: 0.9rem; color: var(--pw-text-dim); }
.pw-map__addr { flex: 1 1 18rem; line-height: 1.5; }
.pw-map__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.pw-map__links a { color: var(--pw-accent); text-underline-offset: 3px; font-weight: 600; }
@media (max-width: 900px) { .pw-map__frame { aspect-ratio: 4 / 3; } }
@media (max-width: 560px) { .pw-map__frame { aspect-ratio: 1 / 1; min-height: 20rem; } .pw-map__links { width: 100%; } }

/* ---------- USA pages: "based in Kolkata, India" origin banner ---------- */
.pw-origin { padding-block: clamp(1.25rem, 3vw, 2rem) 0; }
.pw-origin__box { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem 1.5rem; align-items: center; padding: 1.4rem 1.6rem; border-radius: 22px; background: linear-gradient(135deg, rgba(217,244,95,0.09), rgba(255,255,255,0.02) 60%); box-shadow: inset 0 0 0 1px rgba(217,244,95,0.22); }
.pw-origin__pin { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: rgba(217,244,95,0.12); box-shadow: inset 0 0 0 1px rgba(217,244,95,0.35); font-size: 1.5rem; }
.pw-origin__title { margin: 0; font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 700; line-height: 1.3; }
.pw-origin__text { margin: 0.35rem 0 0; color: var(--pw-text-dim); line-height: 1.6; }
.pw-origin__facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.pw-origin__facts li { padding: 0.4rem 0.85rem; border-radius: 999px; font-size: 0.84rem; color: #e6e6e0; background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); }
@media (max-width: 560px) { .pw-origin__box { grid-template-columns: 1fr; padding: 1.2rem; } }
