/* Hero — two columns, ambient mint glow, shimmering highlight word,
   browser-frame showcase with crossfading screenshots. */

.apw-hero {
	position: relative;
	overflow: hidden;
	padding-block: var(--apw-section);
	font-family: var(--apw-font);
	color: var(--apw-navy);
	background: var(--apw-paper);
}

.apw-hero__glow {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(480px circle at 0% 0%, rgb(33 214 133 / 0.13), transparent 62%);
}

.apw-hero__grid {
	position: relative;
	display: grid;
	gap: 3rem;
	align-items: center;
}

@media (min-width: 1024px) {
	.apw-hero__grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

.apw-hero__eyebrow { margin-bottom: 1.25rem; }

.apw-hero__caret {
	display: inline-block;
	width: 2px;
	height: 0.9em;
	margin-left: 2px;
	background: var(--apw-brand-deep);
	vertical-align: -0.1em;
	animation: apw-caret 1s steps(1) infinite;
}

@keyframes apw-caret {
	50% { opacity: 0; }
}

.apw-hero__title {
	margin: 0;
	font-size: var(--apw-text-display);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.apw-hero__hl {
	background: linear-gradient(100deg, var(--apw-brand-deep) 25%, #7fd6ae 50%, var(--apw-brand-deep) 75%);
	background-size: 220% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: apw-shimmer 7s linear infinite;
}

@keyframes apw-shimmer {
	to { background-position: 220% center; }
}

.apw-hero__lead {
	margin: 1.25rem 0 0;
	max-width: 36rem;
	font-size: var(--apw-text-lead);
	line-height: 1.6;
	color: var(--apw-ink-soft);
}

.apw-hero__cta { margin-top: 2rem; }

.apw-hero__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin: 2rem 0 0;
	padding: 0;
	list-style: none;
}

.apw-hero__chip {
	background: var(--apw-mist);
	border-radius: var(--apw-radius-pill);
	padding: 0.375rem 1rem;
	font-size: var(--apw-text-small);
	font-weight: 500;
	color: var(--apw-ink-soft);
}

/* Browser frame + showcase */
.apw-frame {
	background: var(--apw-paper);
	border: 1px solid var(--apw-border);
	border-radius: 0.9rem;
	box-shadow: var(--apw-shadow-lift);
	overflow: hidden;
}

.apw-frame__bar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.625rem 1rem;
	background: rgb(243 244 246 / 0.6);
	border-bottom: 1px solid var(--apw-border);
}

.apw-frame__dots {
	display: inline-flex;
	gap: 0.375rem;
}

.apw-frame__dots i {
	width: 0.625rem;
	height: 0.625rem;
	border-radius: 9999px;
	background: rgb(47 56 70 / 0.25);
}

.apw-frame__dots i:last-child { background: rgb(33 214 133 / 0.7); }

.apw-frame__tab {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	background: rgb(47 56 70 / 0.06);
	border-radius: 9999px;
	padding: 0.2rem 0.75rem;
	font-size: 0.72rem;
	color: var(--apw-ink-soft);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.apw-frame__body {
	position: relative;
	aspect-ratio: 5 / 4;
	background: var(--apw-mist);
}

.apw-frame__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	opacity: 0;
	transition: opacity var(--apw-duration-slow) var(--apw-ease-in-out);
}

.apw-frame__img.is-active { opacity: 1; }

.apw-frame__empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	text-align: center;
	color: var(--apw-ink-soft);
}

.apw-frame__lock { display: inline-flex; color: var(--apw-ink-soft); }

/* Interactive dot grid (canvas, driven by hero.js) — the portfolio's
   Ramp-style background: sage dots every 20px that shy away from the
   cursor. Static frame when JS or motion is unavailable. */
.apw-hero__dots {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* Showcase — diagonal fan of browser frames, mint orb above */
.apw-hero__showcase {
	position: relative;
	width: 100%;
	max-width: 40rem;
	margin-inline: auto;
}

.apw-fan {
	position: relative;
	aspect-ratio: 10 / 8;
}

.apw-fan__card {
	position: absolute;
	left: 0;
	bottom: 9%;
	width: 86%;
	transition: transform 700ms cubic-bezier(0.22, 0.68, 0.32, 1),
		opacity 700ms var(--apw-ease-out);
	will-change: transform;
}

.apw-fan__card .apw-frame {
	border-radius: 1rem;
	box-shadow: var(--apw-shadow-card);
}

.apw-fan__card[data-offset="0"] .apw-frame {
	box-shadow: 0 28px 60px -16px rgb(24 34 50 / 0.3);
}

.apw-frame__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--apw-mist);
}

.apw-frame__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.apw-fan__nav {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1.25rem;
}

.apw-fan__dot {
	position: relative;
	width: 0.55rem;
	height: 0.55rem;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background: rgb(47 56 70 / 0.25);
	cursor: pointer;
	transition: background-color var(--apw-duration-fast) ease-out;
}

.apw-fan__dot.is-active {
	background: var(--apw-brand-deep);
}

.apw-hero__orb {
	position: absolute;
	top: -2.75rem;
	right: -1.5rem;
	z-index: 60;
	width: 7rem;
	height: 7rem;
	pointer-events: none;
}

@media (min-width: 640px) {
	.apw-hero__orb { width: 9rem; height: 9rem; right: -2.5rem; }
}

.apw-hero__orb-core {
	position: absolute;
	inset: 0;
	border-radius: 9999px;
	background: radial-gradient(circle, rgb(33 214 133 / 0.28) 0%, transparent 68%);
	animation: apw-orb-pulse 6s ease-in-out infinite;
}

.apw-hero__orb-ring {
	position: absolute;
	inset: -0.75rem;
	border: 1px dashed rgb(33 214 133 / 0.3);
	border-radius: 9999px;
	animation: apw-orbit 26s linear infinite;
}

.apw-hero__orb-ring--rev {
	inset: -1.75rem;
	border: 1px solid rgb(33 214 133 / 0.15);
	animation: apw-orbit-rev 38s linear infinite;
}

.apw-hero__orb-ring--rev i {
	position: absolute;
	top: 0.25rem;
	left: 50%;
	transform: translateX(-50%);
	width: 0.375rem;
	height: 0.375rem;
	border-radius: 9999px;
	background: var(--apw-brand);
	opacity: 0.7;
}

@keyframes apw-orbit {
	to { transform: rotate(360deg); }
}

@keyframes apw-orbit-rev {
	to { transform: rotate(-360deg); }
}

@keyframes apw-orb-pulse {
	0%, 100% { opacity: 0.55; transform: scale(1); }
	50% { opacity: 0.85; transform: scale(1.06); }
}

.apw-fan__dot::after {
	content: "";
	position: absolute;
	inset: -10px;
}

/* Blinking caret after the hero role line (the Next.js hero has a
   "|" caret in brand green after the professional title). */
.apw-hero__caret-char {
	display: inline-block;
	margin-left: 0.15em;
	font-weight: 700;
	color: var(--apw-brand-deep);
	animation: apw-caret 1s steps(1) infinite;
}

/* Showcase — the Next.js fan: frames are 86% wide, anchored
   bottom-left inside a 10/8 stage box, fanning up and to the
   right behind the active frame. */
.apw-show__stage-wrap {
	aspect-ratio: 10 / 8;
}

.apw-show__stage {
	position: absolute;
	left: 0;
	bottom: 9%;
	width: 86%;
	z-index: 2;
	aspect-ratio: 16 / 11;
}

.apw-show__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--apw-duration-slow) var(--apw-ease-in-out), visibility 0s linear var(--apw-duration-slow);
}

.apw-show__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--apw-duration-slow) var(--apw-ease-in-out);
}

.apw-show__slide .apw-frame {
	height: 100%;
	display: flex;
	flex-direction: column;
	border-radius: 1rem;
	box-shadow: 0 28px 60px -16px rgb(24 34 50 / 0.3);
}

.apw-show__slide .apw-frame__media {
	flex: 1;
	aspect-ratio: auto;
}

/* Caption row: title + meta stacked left, progress dots right. */
.apw-show__bar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.5rem;
	position: relative;
	z-index: 5;
}

.apw-show__caption {
	min-width: 0;
	color: var(--apw-ink-soft);
}

.apw-show__caption strong {
	display: block;
	font-size: var(--apw-text-lead);
	color: var(--apw-navy);
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.apw-show__meta {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

/* The showcase stack: real frames behind + orbit rings (Next.js). */
.apw-show { position: relative; }

.apw-show__stage-wrap { position: relative; }

.apw-show__ghost-frame {
	position: absolute;
	left: 0;
	bottom: 9%;
	width: 86%;
	aspect-ratio: 16 / 11;
	pointer-events: none;
}

.apw-show__ghost-frame--1 {
	transform: translate(10%, -11%) scale(0.91);
	opacity: 0.85;
	z-index: 1;
}

.apw-show__ghost-frame--2 {
	transform: translate(20%, -20%) scale(0.82);
	opacity: 0.75;
	z-index: 0;
}

.apw-show__ghost-frame .apw-frame {
	height: 100%;
	display: flex;
	flex-direction: column;
	border-radius: 1rem;
}

.apw-show__ghost-frame .apw-frame__media {
	flex: 1;
}

.apw-show__ghost-frame .apw-frame__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.apw-show__orbit {
	position: absolute;
	inset: -0.75rem;
	border: 1px dashed rgb(33 214 133 / 0.3);
	border-radius: 9999px;
	pointer-events: none;
	animation: apw-orbit 46s linear infinite;
}

.apw-show__orbit--rev {
	inset: -1.75rem;
	border: 1px solid rgb(33 214 133 / 0.15);
	animation: apw-orbit-rev 64s linear infinite;
}

.apw-show__orbit--rev i {
	position: absolute;
	top: 0.25rem;
	left: 50%;
	width: 0.375rem;
	height: 0.375rem;
	margin-left: -0.1875rem;
	border-radius: 9999px;
	background: var(--apw-brand);
	opacity: 0.7;
}

@keyframes apw-orbit {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

@keyframes apw-orbit-rev {
	from { transform: rotate(360deg); }
	to { transform: rotate(0deg); }
}

.apw-show__stage { z-index: 2; }

/* Progress dots (Next.js hero). */
.apw-show__dots {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	flex: none;
	padding-bottom: 0.25rem;
}

.apw-show__dot {
	width: 0.5rem;
	height: 0.5rem;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background: rgb(47 56 70 / 0.2);
	cursor: pointer;
	transition: width var(--apw-duration-base) ease-out, background-color var(--apw-duration-fast) ease-out;
}

.apw-show__dot:hover { background: rgb(47 56 70 / 0.4); }

.apw-show__dot.is-active {
	width: 1.5rem;
	background: var(--apw-brand);
}

@media (prefers-reduced-motion: reduce) {
	.apw-show__slide { transition: none; }
	.apw-hero__caret-char { animation: none; }
	.apw-show__orbit, .apw-show__orbit--rev { animation: none; }
	.apw-cta__badge { animation: none; }
}
