/* ==========================================================================
   Jack — 3D Creator — global styles + Hero section
   Sections are added incrementally; keep each section's rules grouped
   under its own banner comment so this stays easy to extend.
   ========================================================================== */

:root {
	--color-bg: #0C0C0C;
	--color-text-light: #D7E2EA;
	--color-white: #FFFFFF;

	--breakpoint-sm: 640px;
	--breakpoint-md: 768px;
	--breakpoint-lg: 1024px;
}

/* ---- Reset --------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	background: var(--color-bg);
	min-height: 100%;
}

body {
	font-family: 'Kanit', sans-serif;
	color: var(--color-text-light);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

ul {
	list-style: none;
}

button {
	font-family: inherit;
}

/* ---- Wrapper --------------------------------------------------------
   Matches the React build's #root / main wrapper: dark bg, clipped
   horizontal overflow (so full-bleed / off-canvas elements in later
   sections — e.g. the marquee — never cause a page-wide scrollbar). */

#root,
.site-main {
	background: var(--color-bg);
	overflow-x: clip;
}

/* ---- Shared gradient heading text ----------------------------------
   Reused by every big section heading (Hero, About, Services, Project). */

.hero-heading {
	background: linear-gradient(180deg, #646973 0%, #BBCCD7 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
	width: 100%;
	padding: 1.5rem 1.5rem 0;
}

@media (min-width: 768px) {
	.navbar {
		padding: 2rem 2.5rem 0;
	}
}

.navbar__list {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.navbar__link {
	display: inline-block;
	color: var(--color-text-light);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 0.875rem;
	transition: opacity 200ms ease;
}

.navbar__link:hover,
.navbar__link:focus-visible {
	opacity: 0.7;
}

@media (min-width: 768px) {
	.navbar__link {
		font-size: 1.125rem;
	}
}

@media (min-width: 1024px) {
	.navbar__link {
		font-size: 1.4rem;
	}
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
	position: relative;
	height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: clip;
}

.hero__heading-wrap {
	overflow: hidden;
	width: 100%;
	margin-top: 1.25rem;
}

@media (min-width: 640px) {
	.hero__heading-wrap {
		margin-top: 1rem;
	}
}

@media (min-width: 768px) {
	.hero__heading-wrap {
		margin-top: 0.5rem;
	}
}

/* Two stacked lines ("Hi," / "I'm Khurram"). Sized with clamp() rather
   than pure vw so it scales down on small screens but is capped on large
   ones — a straight vw value here gets absurdly large on wide viewports
   once the heading isn't a single short nowrap word. */

.hero__heading {
	display: flex;
	flex-direction: column;
	text-align: center;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -0.02em;
	line-height: 0.92;
	width: 100%;
	font-size: clamp(2.75rem, 12vw, 6.5rem);
}

.hero__heading-line {
	display: block;
	white-space: nowrap;
}

@media (min-width: 640px) {
	.hero__heading {
		font-size: clamp(3.25rem, 11vw, 7.5rem);
	}
}

@media (min-width: 768px) {
	.hero__heading {
		font-size: clamp(3.75rem, 10vw, 8.5rem);
	}
}

@media (min-width: 1024px) {
	.hero__heading {
		font-size: clamp(4.5rem, 9vw, 10rem);
	}
}

/* ---- Portrait (magnetic hover target) ---- */

.hero__portrait {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 10;
	width: 280px;
	will-change: transform;
}

@media (min-width: 640px) {
	.hero__portrait {
		top: auto;
		bottom: 0;
		transform: translateX(-50%);
		width: 360px;
	}
}

@media (min-width: 768px) {
	.hero__portrait {
		width: 440px;
	}
}

@media (min-width: 1024px) {
	.hero__portrait {
		width: 520px;
	}
}

.hero__portrait-img {
	display: block;
	margin: 0 auto;
	width: auto;
	height: auto;
	max-width: 100%;
	/* Caps the portrait's height against the viewport, not just its
	   width, so on short/wide windows it shrinks instead of growing tall
	   enough to collide with the two-line heading above it. */
	max-height: 46vh;
}

/* ---- Bottom bar: tagline + contact button ---- */

.hero__bottom {
	position: relative;
	z-index: 20;
	margin-top: auto;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	padding: 0 1.5rem 1.75rem;
}

@media (min-width: 640px) {
	.hero__bottom {
		padding: 0 2rem 2rem;
	}
}

@media (min-width: 768px) {
	.hero__bottom {
		padding: 0 2.5rem 2.5rem;
	}
}

.hero__tagline {
	color: var(--color-text-light);
	font-weight: 300;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	line-height: 1.375;
	font-size: clamp(0.75rem, 1.4vw, 1.5rem);
	max-width: 160px;
}

@media (min-width: 640px) {
	.hero__tagline {
		max-width: 220px;
	}
}

@media (min-width: 768px) {
	.hero__tagline {
		max-width: 260px;
	}
}

/* ==========================================================================
   Contact button (pill, gradient)
   ========================================================================== */

.btn-contact {
	display: inline-block;
	border-radius: 9999px;
	background: linear-gradient(123deg, #18011F 7%, #B600A8 37%, #7621B0 72%, #BE4C00 100%);
	box-shadow:
		0px 4px 4px rgba(181, 1, 167, 0.25),
		inset 4px 4px 12px #7721B1;
	outline: 2px solid var(--color-white);
	outline-offset: -3px;
	color: var(--color-white);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 0.75rem;
	padding: 0.75rem 2rem;
	transition: transform 200ms ease, opacity 200ms ease;
}

.btn-contact:hover {
	opacity: 0.9;
}

@media (min-width: 640px) {
	.btn-contact {
		font-size: 0.875rem;
		padding: 0.875rem 2.5rem;
	}
}

@media (min-width: 768px) {
	.btn-contact {
		font-size: 1rem;
		padding: 1rem 3rem;
	}
}

/* ==========================================================================
   Marquee / "elastic gallery" — one row of hover/tap-to-expand panels.
   The active panel (.gallery__item.is-active, toggled by initGallery() in
   assets/js/main.js) grows via flex-grow while its siblings collapse to a
   thin strip showing a vertical title. Pure CSS transitions — nothing here
   is scroll-driven.
   ========================================================================== */

.gallery {
	background: var(--color-bg);
	padding: 5rem 0;
}

@media (min-width: 768px) {
	.gallery {
		padding: 7rem 0;
	}
}

.gallery__row {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	height: 620px;
}

@media (min-width: 640px) {
	.gallery__row {
		padding: 0 2rem;
	}
}

@media (min-width: 768px) {
	.gallery__row {
		flex-direction: row;
		gap: 1rem;
		height: 560px;
	}
}

.gallery__item {
	position: relative;
	overflow: hidden;
	border-radius: 1.25rem;
	border: 1px solid rgba(215, 226, 234, 0.12);
	cursor: pointer;
	flex: 1 1 0%;
	filter: brightness(0.55);
	transition: flex-grow 700ms cubic-bezier(0.25, 1, 0.5, 1), filter 700ms cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery__item:hover,
.gallery__item:focus-visible,
.gallery__item.is-active {
	filter: brightness(1);
}

.gallery__item.is-active {
	flex-grow: 4;
}

.gallery__media {
	position: absolute;
	inset: 0;
}

.gallery__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.1);
	transition: transform 1000ms ease;
}

.gallery__item.is-active .gallery__img {
	transform: scale(1);
}

.gallery__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.25) 60%, transparent 100%);
	opacity: 0;
	transition: opacity 500ms ease;
}

.gallery__item.is-active .gallery__scrim {
	opacity: 1;
}

.gallery__content {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 1.25rem;
}

@media (min-width: 768px) {
	.gallery__content {
		padding: 2rem;
	}
}

.gallery__active-content {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	opacity: 0;
	transform: translateY(3rem);
	transition: opacity 500ms ease, transform 500ms ease;
}

.gallery__item.is-active .gallery__active-content {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 200ms;
}

.gallery__tag {
	align-self: flex-start;
	font-size: 0.65rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--color-white);
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 9999px;
	padding: 0.3rem 0.75rem;
}

.gallery__title {
	font-weight: 900;
	text-transform: uppercase;
	line-height: 1;
	color: var(--color-white);
	font-size: 1.5rem;
}

@media (min-width: 768px) {
	.gallery__title {
		font-size: 2.75rem;
	}
}

.gallery__cta {
	margin-top: 0.4rem;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: rgba(255, 255, 255, 0.85);
}

.gallery__cta svg {
	width: 14px;
	height: 14px;
}

@media (min-width: 768px) {
	.gallery__cta {
		font-size: 0.8rem;
	}

	.gallery__cta svg {
		width: 16px;
		height: 16px;
	}
}

.gallery__inactive-content {
	position: absolute;
	left: 50%;
	bottom: 1.25rem;
	transform: translateX(-50%) scale(1);
	opacity: 1;
	transition: opacity 500ms ease, transform 500ms ease;
	transition-delay: 500ms;
}

.gallery__item.is-active .gallery__inactive-content {
	opacity: 0;
	transform: translateX(-50%) scale(0.5);
	transition-delay: 0ms;
}

.gallery__vertical-label {
	display: none;
	white-space: nowrap;
	writing-mode: vertical-rl;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	font-size: 1.1rem;
	color: var(--color-white);
}

@media (min-width: 768px) {
	.gallery__vertical-label {
		display: block;
	}
}

.gallery__mobile-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--color-white);
}

@media (min-width: 768px) {
	.gallery__mobile-label {
		display: none;
	}
}

/* ==========================================================================
   About — centered heading + scroll-revealed paragraph, 4 corner accents.
   .js-scroll-fade elements start hidden via JS (initScrollFadeIns in
   main.js sets opacity/offset with gsap.set), not CSS — so the section
   still reads fine if JS fails to load.
   ========================================================================== */

.about {
	position: relative;
	min-height: 100vh;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5rem 1.25rem;
}

@media (min-width: 640px) {
	.about {
		padding: 5rem 2rem;
	}
}

@media (min-width: 768px) {
	.about {
		padding: 5rem 2.5rem;
	}
}

.about__deco {
	position: absolute;
	display: block;
	width: clamp(80px, 11vw, 210px);
}

.about__deco svg {
	width: 100%;
	height: auto;
	display: block;
}

.about__deco--tl { top: 4%; left: 3%; }
.about__deco--tr { top: 4%; right: 3%; width: clamp(80px, 11vw, 210px); }
.about__deco--bl { bottom: 8%; left: 4%; width: clamp(70px, 9vw, 180px); }
.about__deco--br { bottom: 8%; right: 4%; width: clamp(80px, 10vw, 220px); }

@media (min-width: 768px) {
	.about__deco--tl { left: 4%; }
	.about__deco--tr { right: 4%; }
	.about__deco--bl { left: 10%; }
	.about__deco--br { right: 10%; }
}

.about__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 2.5rem;
	max-width: 640px;
}

@media (min-width: 768px) {
	.about__inner {
		gap: 3.5rem;
	}
}

.about__heading {
	font-weight: 900;
	text-transform: uppercase;
	line-height: 1;
	letter-spacing: -0.02em;
	font-size: clamp(3rem, 12vw, 10rem);
}

.about__text {
	color: var(--color-text-light);
	font-weight: 500;
	text-align: center;
	line-height: 1.6;
	max-width: 560px;
	font-size: clamp(1rem, 2vw, 1.35rem);
	margin-top: -1rem;
}

.about__text span {
	transition: opacity 150ms ease;
}

/* ==========================================================================
   Services — white section, numbered offering list.
   ========================================================================== */

.services {
	background: var(--color-white);
	color: var(--color-bg);
	border-radius: 2.5rem 2.5rem 0 0;
	padding: 5rem 1.25rem;
}

@media (min-width: 640px) {
	.services {
		padding: 6rem 2rem;
		border-radius: 3.125rem 3.125rem 0 0;
	}
}

@media (min-width: 768px) {
	.services {
		padding: 8rem 2.5rem;
		border-radius: 3.75rem 3.75rem 0 0;
	}
}

.services__heading {
	color: var(--color-bg);
	font-weight: 900;
	text-transform: uppercase;
	text-align: center;
	line-height: 1;
	font-size: clamp(3rem, 12vw, 10rem);
	margin-bottom: 4rem;
}

@media (min-width: 768px) {
	.services__heading {
		margin-bottom: 6rem;
	}
}

.services__list {
	max-width: 64rem;
	margin: 0 auto;
}

.services__item {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding: 2rem 0;
	border-bottom: 1px solid rgba(12, 12, 12, 0.15);
}

@media (min-width: 768px) {
	.services__item {
		gap: 2rem;
		padding: 3rem 0;
	}
}

.services__item:last-child {
	border-bottom: none;
}

.services__number {
	flex-shrink: 0;
	color: var(--color-bg);
	font-weight: 900;
	line-height: 1;
	font-size: clamp(2.5rem, 9vw, 8rem);
}

.services__copy {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.services__name {
	color: var(--color-bg);
	font-weight: 500;
	text-transform: uppercase;
	font-size: clamp(1rem, 2.2vw, 2.1rem);
}

.services__description {
	color: var(--color-bg);
	opacity: 0.6;
	font-weight: 300;
	line-height: 1.6;
	max-width: 42rem;
	font-size: clamp(0.85rem, 1.6vw, 1.25rem);
}

/* ==========================================================================
   Ghost pill — "Live Project" (see template-parts/live-project-button.php)
   ========================================================================== */

.btn-ghost {
	display: inline-block;
	flex-shrink: 0;
	border-radius: 9999px;
	border: 2px solid var(--color-text-light);
	color: var(--color-text-light);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 0.8rem;
	padding: 0.7rem 1.75rem;
	transition: background-color 200ms ease;
}

.btn-ghost:hover {
	background: rgba(215, 226, 234, 0.1);
}

@media (min-width: 640px) {
	.btn-ghost {
		font-size: 0.9rem;
		padding: 0.8rem 2rem;
	}
}

/* ==========================================================================
   Projects — sticky-stacking cards. Scale-down transform is set by JS
   (initProjectStack, GSAP ScrollTrigger scrub) directly via inline
   transform — not a CSS transition — driven by scroll position, not time.
   ========================================================================== */

.projects {
	position: relative;
	z-index: 10;
	background: var(--color-bg);
	border-radius: 2.5rem 2.5rem 0 0;
	margin-top: -2.5rem;
	padding: 5rem 1.25rem 2rem;
}

@media (min-width: 640px) {
	.projects {
		border-radius: 3.125rem 3.125rem 0 0;
		margin-top: -3rem;
		padding: 6rem 2rem 2rem;
	}
}

@media (min-width: 768px) {
	.projects {
		border-radius: 3.75rem 3.75rem 0 0;
		margin-top: -3.5rem;
		padding: 7rem 2.5rem 2rem;
	}
}

.projects__heading {
	text-align: center;
	font-weight: 900;
	text-transform: uppercase;
	line-height: 1;
	font-size: clamp(3rem, 12vw, 10rem);
	margin-bottom: 3rem;
}

@media (min-width: 768px) {
	.projects__heading {
		margin-bottom: 5rem;
	}
}

.project-card-wrap {
	position: relative;
	height: 85vh;
	margin-bottom: 2rem;
}

.project-card {
	position: sticky;
	top: calc(6rem + var(--stack-offset, 0px));
	height: 72vh;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	border: 2px solid var(--color-text-light);
	border-radius: 2.5rem;
	background: var(--color-bg);
	padding: 1rem;
	transform-origin: top center;
	will-change: transform;
}

@media (min-width: 640px) {
	.project-card {
		border-radius: 3.125rem;
		padding: 1.5rem;
	}
}

@media (min-width: 768px) {
	.project-card {
		top: calc(8rem + var(--stack-offset, 0px));
		border-radius: 3.75rem;
		padding: 2rem;
	}
}

.project-card__top {
	flex-shrink: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
}

.project-card__number {
	color: var(--color-text-light);
	font-weight: 900;
	line-height: 1;
	font-size: clamp(2.5rem, 8vw, 6rem);
}

.project-card__heading-group {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	flex: 1 1 auto;
	min-width: 160px;
}

.project-card__category {
	color: var(--color-text-light);
	opacity: 0.65;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 0.75rem;
	font-weight: 500;
}

.project-card__name {
	color: var(--color-text-light);
	text-transform: uppercase;
	font-weight: 500;
	line-height: 1.1;
	font-size: clamp(1.25rem, 3vw, 2.25rem);
}

.project-card__grid {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	gap: 0.75rem;
}

.project-card__col {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.project-card__col--1 {
	flex: 2;
}

.project-card__col--2 {
	flex: 3;
}

.project-card__detail {
	flex: 1;
	min-height: 0;
	border-radius: 1.75rem;
	overflow: hidden;
}

.project-card__detail--top {
	flex: 0 0 38%;
}

.project-card__detail--bottom {
	flex: 1;
}

.project-card__col--2 {
	border-radius: 1.75rem;
	overflow: hidden;
}

.project-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

@media (min-width: 768px) {
	.project-card__detail,
	.project-card__col--2 {
		border-radius: 2.25rem;
	}
}

/* ==========================================================================
   Closing contact strip — gives the navbar's "Contact" link and every
   ContactButton an actual id="contact" to land on.
   ========================================================================== */

.contact-cta {
	background: var(--color-bg);
	min-height: 50vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	padding: 4rem 1.25rem;
	text-align: center;
}

.contact-cta__heading {
	font-weight: 900;
	text-transform: uppercase;
	line-height: 1;
	font-size: clamp(2.5rem, 10vw, 7rem);
}
