/* ==========================================
   PORTFOLIO DETAIL PAGE — PREMIUM STYLES
   ==========================================
   Scoped under .pw- prefix (portfolio-work)
   to avoid conflicts with other page styles.
   ========================================== */

/* ---- Header ---- */
.pw-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border-bottom: 1px solid var(--border-light);
	transition: all 0.35s ease;
}

/* ── HERO — CINEMATIC FULL-BLEED ── */
.pw-hero {
	position: relative;
	padding: 10rem 0 0;
	overflow: hidden;
	background: var(--bg-primary);
}

.pw-hero-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.pw-hero-gradient {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 80% 60% at 20% 30%, rgba(251, 191, 36, 0.08), transparent),
		radial-gradient(ellipse 60% 50% at 80% 70%, rgba(252, 211, 77, 0.06), transparent);
}

.pw-hero-noise {
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
	background-size: 200px 200px;
	mix-blend-mode: overlay;
	opacity: 0.4;
}

.pw-hero-inner {
	position: relative;
	z-index: 2;
	max-width: 800px;
	text-align: center;
	margin: 0 auto;
}

/* Meta tags strip */
.pw-hero-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.pw-tag {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 1rem;
	border-radius: 50px;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	background: rgba(251, 191, 36, 0.1);
	color: var(--brand-primary-hover);
	border: 1px solid rgba(251, 191, 36, 0.2);
}

.pw-tag-cat {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 1rem;
	border-radius: 50px;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	background: var(--bg-secondary);
	color: var(--text-secondary);
	border: 1px solid var(--border-light);
}

.pw-separator {
	color: var(--text-muted);
	font-size: 0.7rem;
}

/* Hero Title */
.pw-hero-title {
	font-size: clamp(2.5rem, 6vw, 4.5rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.03em;
	margin-bottom: 1.5rem;
	color: var(--text-primary);
}

/* Hero Description */
.pw-hero-desc {
	font-size: 1.15rem;
	color: var(--text-secondary);
	line-height: 1.7;
	margin-bottom: 2.5rem;
	max-width: 620px;
	margin-left: auto;
	margin-right: auto;
}

/* CTA Buttons */
.pw-hero-actions {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 4rem;
}

/* ── HERO SHOWCASE — Browser Frame ── */
.pw-hero-showcase {
	position: relative;
	z-index: 2;
	padding-bottom: 4rem;
}

.pw-showcase-frame {
	position: relative;
	border-radius: 20px;
	overflow: hidden;
	background: var(--bg-dark-primary);
	box-shadow:
		0 30px 80px rgba(0, 0, 0, 0.15),
		0 0 0 1px rgba(0, 0, 0, 0.05),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
	border: 1px solid var(--border-light);
}

/* Browser dots header */
.pw-showcase-frame::before {
	content: '';
	display: block;
	height: 44px;
	background: var(--bg-secondary);
	border-bottom: 1px solid var(--border-light);
	position: relative;
}

.pw-showcase-frame::after {
	content: '';
	position: absolute;
	top: 16px;
	left: 20px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #ef4444;
	box-shadow:
		20px 0 0 #f59e0b,
		40px 0 0 #22c55e;
}

.pw-showcase-frame img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	object-position: top;
	max-height: 600px;
}

/* ── VITALS STRIP ── */
.pw-vitals {
	background: var(--bg-secondary);
	border-top: 1px solid var(--border-light);
	border-bottom: 1px solid var(--border-light);
	padding: 2.5rem 0;
}

.pw-vitals-grid {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 2rem;
	flex-wrap: wrap;
}

.pw-vital {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	text-align: center;
	flex: 1;
	min-width: 120px;
	position: relative;
}

.pw-vital:not(:last-child)::after {
	content: '';
	position: absolute;
	right: -1rem;
	top: 10%;
	height: 80%;
	width: 1px;
	background: var(--border-light);
}

.pw-vital-label {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: var(--text-muted);
}

.pw-vital-value {
	font-size: 1rem;
	font-weight: 700;
	color: var(--text-primary);
}

.pw-vital-link {
	color: var(--brand-primary-hover) !important;
	text-decoration: none;
	transition: color 0.3s ease;
}

.pw-vital-link:hover {
	color: var(--brand-primary) !important;
}

/* ── OVERVIEW — Challenge / Solution Split ── */
.pw-overview {
	padding: 6rem 0;
}

.pw-overview-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: start;
}

.pw-overview-block {
	padding: 2.5rem;
	background: var(--bg-secondary);
	border: 1px solid var(--border-light);
	border-radius: 24px;
	transition: all 0.4s ease;
}

.pw-overview-block:hover {
	border-color: var(--brand-primary);
	box-shadow: 0 12px 48px var(--shadow-sm);
	transform: translateY(-4px);
}

.pw-eyebrow {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: var(--brand-primary-hover);
	margin-bottom: 1rem;
}

.pw-overview-block h2 {
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.2;
	margin-bottom: 1.25rem;
	color: var(--text-primary);
}

.pw-overview-block p {
	font-size: 0.95rem;
	color: var(--text-secondary);
	line-height: 1.75;
	margin-bottom: 1rem;
}

.pw-overview-block p:last-child {
	margin-bottom: 0;
}

/* ── FEATURE CARDS ── */
.pw-features {
	padding: 5rem 0;
	background: var(--bg-secondary);
}

.pw-features-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
}

.pw-feature-card {
	background: var(--bg-primary);
	border: 1px solid var(--border-light);
	border-radius: 20px;
	padding: 2rem 1.5rem;
	transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
	position: relative;
	overflow: hidden;
}

.pw-feature-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.4s ease;
}

.pw-feature-card:hover::before {
	transform: scaleX(1);
}

.pw-feature-card:hover {
	border-color: var(--brand-primary);
	box-shadow: 0 16px 48px var(--shadow-md);
	transform: translateY(-6px);
}

.pw-feature-icon {
	width: 52px;
	height: 52px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	color: var(--brand-primary);
	background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.04));
	margin-bottom: 1.25rem;
	transition: all 0.3s ease;
}

.pw-feature-card:hover .pw-feature-icon {
	background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
	color: var(--text-inverse);
	transform: scale(1.1);
}

.pw-feature-card h3 {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--text-primary);
	margin-bottom: 0.5rem;
}

.pw-feature-card p {
	font-size: 0.85rem;
	color: var(--text-secondary);
	line-height: 1.6;
}

/* ── GALLERY — Masonry-ish ── */
.pw-gallery {
	padding: 5rem 0;
}

.pw-gallery-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-auto-rows: 280px;
	gap: 1.5rem;
}

.pw-gallery-item {
	border-radius: 20px;
	overflow: hidden;
	position: relative;
	border: 1px solid var(--border-light);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
	transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.pw-gallery-item:hover {
	box-shadow: 0 20px 60px var(--shadow-lg);
	transform: translateY(-4px);
	border-color: var(--brand-primary);
}

.pw-gallery-tall {
	grid-row: span 2;
}

.pw-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.pw-gallery-item:hover img {
	transform: scale(1.06);
}

/* ── TESTIMONIAL ── */
.pw-testimonial {
	padding: 5rem 0;
	background: var(--bg-secondary);
}

.pw-testimonial-card {
	max-width: 720px;
	margin: 0 auto;
	text-align: center;
	padding: 3rem;
	background: var(--bg-primary);
	border: 1px solid var(--border-light);
	border-radius: 28px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.04);
	position: relative;
}

.pw-quote-mark {
	width: 48px;
	height: 48px;
	color: var(--brand-primary);
	opacity: 0.3;
	margin-bottom: 1.5rem;
}

.pw-testimonial-card blockquote {
	font-size: 1.15rem;
	font-style: italic;
	color: var(--text-primary);
	line-height: 1.8;
	margin-bottom: 2rem;
	font-weight: 400;
}

.pw-testimonial-author {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.pw-author-name {
	font-size: 1rem;
	font-weight: 700;
	color: var(--text-primary);
}

.pw-author-role {
	font-size: 0.8rem;
	color: var(--text-muted);
	font-weight: 500;
}

/* ── RESULTS — Metric Cards ── */
.pw-results {
	padding: 5rem 0;
}

.pw-results-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
}

.pw-result-card {
	text-align: center;
	padding: 2.5rem 1.5rem;
	background: var(--bg-secondary);
	border: 1px solid var(--border-light);
	border-radius: 20px;
	transition: all 0.4s ease;
}

.pw-result-card:hover {
	border-color: var(--brand-primary);
	transform: translateY(-4px);
	box-shadow: 0 12px 40px var(--shadow-sm);
}

.pw-result-number {
	display: block;
	font-size: 2.5rem;
	font-weight: 800;
	background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 0.5rem;
	line-height: 1;
}

.pw-result-label {
	font-size: 0.85rem;
	color: var(--text-secondary);
	font-weight: 500;
}

/* ── CTA ── */
.pw-cta {
	padding: 8rem 0;
	background: var(--bg-primary);
	position: relative;
	overflow: hidden;
}

.pw-cta-inner {
	max-width: 840px;
	margin: 0 auto;
	text-align: center;
	padding: 5rem 3rem;
	background: var(--bg-dark-primary);
	border: 1px solid var(--border-dark-theme);
	border-radius: 32px;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
	position: relative;
	overflow: hidden;
}

.pw-cta-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.pw-cta-glow {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.15), transparent 70%);
}

.pw-cta-noise {
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
	background-size: 200px 200px;
	mix-blend-mode: overlay;
}

.pw-cta-content {
	position: relative;
	z-index: 1;
}

.pw-cta-content h2 {
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 800;
	margin-bottom: 1.25rem;
	color: #ffffff;
	letter-spacing: -0.02em;
}

.pw-cta-content p {
	font-size: 1.15rem;
	color: rgba(255, 255, 255, 0.7);
	line-height: 1.7;
	margin-bottom: 2.5rem;
	max-width: 540px;
	margin-left: auto;
	margin-right: auto;
}

.pw-cta-actions {
	display: flex;
	gap: 1.25rem;
	justify-content: center;
	flex-wrap: wrap;
}

.btn-secondary-outline {
	background: transparent;
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.2);
	transition: all 0.3s ease;
}

.btn-secondary-outline:hover {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.4);
}

/* ══════════════════════════════
   RESPONSIVE
   ══════════════════════════════ */
@media (max-width: 1024px) {
	.pw-features-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.pw-results-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.pw-hero {
		padding: 7rem 0 0;
	}

	.pw-hero-title {
		font-size: clamp(2rem, 8vw, 2.8rem);
	}

	.pw-hero-desc {
		font-size: 1rem;
	}

	.pw-hero-actions {
		flex-direction: column;
		align-items: stretch;
		margin-bottom: 2.5rem;
	}

	.pw-hero-actions .btn {
		justify-content: center;
	}

	.pw-showcase-frame img {
		max-height: 300px;
	}

	.pw-vitals-grid {
		flex-direction: column;
		gap: 1.5rem;
	}

	.pw-vital:not(:last-child)::after {
		display: none;
	}

	.pw-vital {
		flex-direction: row;
		gap: 1rem;
		text-align: left;
		width: 100%;
		justify-content: space-between;
		padding-bottom: 1rem;
		border-bottom: 1px solid var(--border-light);
	}

	.pw-overview-grid {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.pw-overview-block {
		padding: 1.75rem;
	}

	.pw-features-grid {
		grid-template-columns: 1fr;
	}

	.pw-gallery-grid {
		grid-template-columns: 1fr;
		grid-auto-rows: 220px;
	}

	.pw-gallery-tall {
		grid-row: span 1;
	}

	.pw-results-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.pw-testimonial-card {
		padding: 2rem 1.5rem;
	}

	.pw-cta-inner {
		padding: 2.5rem 1.5rem;
	}

	.pw-cta-actions {
		flex-direction: column;
	}
}
