/* AlphaSoft "Space" — home page (front-page.html). Tokens/components come from space.css. */

/* ---------- Shared bits ---------- */

.home-hero em,
.home-contact__title em {
	font-family: var(--serif);
	font-style: italic;
	font-weight: 400;
	letter-spacing: -0.02em;
	color: var(--indigo-pale);
}

/* ---------- Hero ---------- */

.home-hero {
	position: relative;
	min-height: 100vh;
	padding: 150px var(--gutter) 40px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 40px;
	overflow: hidden;
}

.home-hero__planet {
	position: absolute;
	left: 50%;
	top: 74vh;
	width: 170vw;
	height: 170vw;
	transform: translateX(-50%);
	border-radius: 50%;
	background: var(--bg);
	box-shadow: inset 0 2px 0 rgb(139 144 255 / 55%), 0 -40px 140px rgb(81 87 232 / 22%);
	pointer-events: none;
}

.home-hero__orbit {
	position: absolute;
	right: -6vw;
	top: 16vh;
	width: 62vw;
	height: 46vh;
	max-width: none;
	opacity: 0.5;
	pointer-events: none;
}

.home-hero__rocket {
	display: none;
	position: absolute;
	left: 0;
	top: 0;
	width: 22px;
	height: 22px;
	opacity: 0;
	pointer-events: none;
	will-change: transform, opacity;
}

.js .home-hero__rocket {
	display: block;
}

.home-hero__meta {
	position: relative;
	display: flex;
	justify-content: space-between;
	gap: 12px 24px;
	flex-wrap: wrap;
}

.home-hero__meta p {
	display: flex;
	gap: 6px 18px;
	flex-wrap: wrap;
}

.home-hero__sep {
	color: #33333b;
}

.home-hero__text {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 40px;
	will-change: transform, opacity;
}

.home-hero__title {
	font-size: clamp(52px, 9.2vw, 148px);
	font-weight: 600;
	line-height: 0.95;
	letter-spacing: -0.045em;
	text-wrap: initial;
}

.home-hero__bottom {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 32px;
	flex-wrap: wrap;
}

.home-hero__lead {
	max-width: 440px;
}

.home-hero__actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.home-hero__cue {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--muted-2);
}

.home-hero__cue-line {
	position: relative;
	width: 64px;
	height: 1px;
	overflow: hidden;
	background: #33333b;
}

.home-hero__cue-line span {
	position: absolute;
	top: 0;
	left: 0;
	width: 20px;
	height: 1px;
	background: var(--indigo-light);
	animation: home-cue 1.4s linear infinite;
}

@keyframes home-cue {
	from {
		transform: translateX(-20px);
	}

	to {
		transform: translateX(64px);
	}
}

@media (max-width: 759px) {
	.home-hero {
		min-height: 100svh;
		padding-top: calc(var(--header-h) + 40px);
		padding-bottom: 28px;
	}

	.home-hero__title {
		font-size: clamp(40px, 11.4vw, 52px);
	}

	/* Horizon sits under the CTAs, behind the scroll cue, whatever the phone height. */
	.home-hero__planet {
		top: calc(100% - 96px);
	}

	.home-hero__orbit {
		top: 22vh;
		width: 90vw;
		height: 30vh;
		right: -24vw;
	}

	.home-hero__text {
		gap: 28px;
	}

	.home-hero__meta p {
		gap: 6px 12px;
	}

	.home-hero__meta p + p {
		display: none;
	}

	.home-hero__lead {
		font-size: 16px;
	}
}

/* Tablets: the copy wraps to more lines, so anchor the horizon to the hero
   bottom (between the CTAs and the scroll cue) rather than to 74vh. */
@media (min-width: 760px) and (max-width: 1279px) {
	.home-hero__planet {
		top: max(74vh, calc(100% - 160px));
	}
}

/* Short landscape phones: horizon under the copy, hero sized by its content. */
@media (max-height: 560px) {
	.home-hero {
		min-height: 0;
	}

	.home-hero__planet {
		top: calc(100% - 90px);
	}
}

/* ---------- Marquee ---------- */

.home-marquee {
	position: relative;
	padding: 22px 0;
	overflow: hidden;
	border-top: 1px solid var(--line-soft);
	border-bottom: 1px solid var(--line-soft);
	background: rgb(7 7 10 / 60%);
}

.home-marquee__track {
	display: flex;
	width: max-content;
	will-change: transform;
}

.home-marquee__group {
	display: flex;
	flex: none;
	gap: 40px;
	padding-right: 40px;
	font-size: clamp(28px, 3.6vw, 52px);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.home-marquee__group .serif {
	color: inherit;
}

.home-marquee__star {
	color: var(--indigo);
}

/* ---------- Selected work ---------- */

.home-work {
	position: relative;
}

/* Static layout: no JS, < 760px, or reduced motion. */
.home-work__sticky {
	padding: 100px var(--gutter) 80px;
}

.home-work__track {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 20px;
}

.home-work__intro {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	gap: 22px;
	max-width: 640px;
	margin-bottom: 28px;
}

.home-card {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 20px;
	min-width: 0;
}

.home-card__meta {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: var(--muted-3);
}

.home-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--bg-card);
}

.home-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.home-card__placeholder {
	display: flex;
	align-items: flex-end;
	height: 100%;
	padding: 14px;
	font-size: 11px;
	color: var(--muted-3);
}

.home-card__title {
	font-size: clamp(26px, 2.4vw, 36px);
	font-weight: 600;
	letter-spacing: -0.03em;
}

.home-work__all {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 220px;
	padding: 32px;
	text-align: center;
	border: 1px dashed #3a3a48;
	border-radius: var(--radius-card);
	transition: border-color 0.3s, background-color 0.3s;
}

.home-work__all .mono {
	font-size: 11px;
	color: var(--muted-3);
}

.home-work__all-label {
	font-size: 30px;
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.1;
}

.home-work__nav {
	display: none;
}

@media (hover: hover) {
	.home-work__all:hover {
		border-color: var(--indigo-light);
		background: rgb(81 87 232 / 8%);
		color: var(--text);
	}
}

/* Pinned horizontal scroll (JS sets the exact height: track width − vw + vh).
   Only on viewports wide AND tall enough for a card + navigator (desktop and
   landscape tablets); phones, portrait tablets and short windows get the grid. */
@media (min-width: 1024px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
	.js .home-work {
		height: 420vh;
	}

	.js .home-work__sticky {
		position: sticky;
		top: 0;
		height: 100vh;
		padding: 0;
		overflow: hidden;
		display: flex;
		flex-direction: column;
	}

	.js .home-work__track {
		flex: 1;
		min-height: 0;
		display: flex;
		align-items: center;
		gap: 28px;
		width: max-content;
		padding: 80px 6vw 0;
		will-change: transform;
	}

	.js .home-work__intro {
		width: min(440px, 80vw);
		flex: none;
		margin: 0;
	}

	.js .home-card {
		width: clamp(300px, min(40vw, calc((100vh - 300px) * 1.25)), 600px);
		flex: none;
	}

	.js .home-work__all {
		width: clamp(260px, 26vw, 380px);
		aspect-ratio: 1;
		min-height: 0;
		flex: none;
		border-radius: 50%;
	}

	.js .home-work__nav {
		display: block;
		padding: 0 6vw 30px;
	}

	.home-work__rail {
		position: relative;
		height: 64px;
	}

	.home-work__rail::before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: 12px;
		height: 1px;
		background: #22222a;
	}

	.home-work__fill {
		position: absolute;
		left: 0;
		top: 12px;
		width: 100%;
		height: 1px;
		background: var(--indigo);
		transform: scaleX(0);
		transform-origin: 0 50%;
	}

	.home-work__planet {
		--size: 8px;
		position: absolute;
		top: 0;
		left: 12.5%;
		opacity: 0.4;
		transition: opacity 0.4s;
	}

	.home-work__planet:nth-child(3) {
		--size: 11px;
		left: 37.5%;
	}

	.home-work__planet:nth-child(4) {
		--size: 14px;
		left: 62.5%;
	}

	.home-work__planet:nth-child(5) {
		--size: 17px;
		left: 87.5%;
	}

	.home-work__orb {
		position: absolute;
		top: calc(12px - var(--size) / 2);
		left: calc(var(--size) / -2);
		width: var(--size);
		height: var(--size);
		border-radius: 50%;
		background: #2a2a34;
		transition: background-color 0.4s, box-shadow 0.4s;
	}

	.home-work__planet-name {
		position: absolute;
		top: 42px;
		left: 0;
		transform: translateX(-50%);
		font-size: 12px;
		line-height: 1;
		white-space: nowrap;
		color: var(--text);
	}

	.home-work__planet.is-past {
		opacity: 0.7;
	}

	.home-work__planet.is-past .home-work__orb {
		background: #3b3f9e;
	}

	.home-work__planet.is-active {
		opacity: 1;
	}

	.home-work__planet.is-active .home-work__orb {
		background: var(--indigo);
		box-shadow: 0 0 0 6px rgb(81 87 232 / 18%), 0 0 24px rgb(81 87 232 / 50%);
	}

	.home-work__rocket {
		position: absolute;
		left: 0;
		top: 1px;
		width: 22px;
		height: 22px;
		transform: translateX(-11px) rotate(90deg);
		will-change: transform;
	}
}

@media (max-width: 759px) {
	.home-work__sticky {
		padding-top: 80px;
		padding-bottom: 64px;
	}

	.home-work__all {
		min-height: 160px;
	}

	.home-work__all-label {
		font-size: 24px;
	}
}

/* ---------- Launch sequence ---------- */

.home-launch {
	position: relative;
}

.home-launch__sticky {
	padding: 100px var(--gutter) 80px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.home-launch__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 20px 32px;
	flex-wrap: wrap;
}

.home-launch__intro {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 760px;
}

.home-launch__copy {
	max-width: 560px;
}

.home-launch__status {
	padding: 8px 14px;
	border: 1px solid #22222a;
	border-radius: 999px;
	font-size: 12px;
	text-transform: uppercase;
	color: var(--indigo-light);
	white-space: nowrap;
}

.home-launch__svg,
.home-launch__rocket {
	display: none;
}

.home-launch__phases {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--line);
}

.home-launch__phase {
	display: grid;
	grid-template-columns: 14px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
	padding: 22px 0;
	border-bottom: 1px solid var(--line);
}

.home-launch__dot {
	display: block;
	width: 14px;
	height: 14px;
	margin-top: 2px;
	border-radius: 50%;
	border: 1px solid transparent;
	background: var(--indigo);
	box-shadow: 0 0 0 6px rgb(81 87 232 / 18%);
	transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s;
}

.home-launch__phase--liftoff .home-launch__dot {
	background: var(--flame);
	box-shadow: 0 0 0 6px rgb(245 154 91 / 15%);
}

.home-launch__label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	transition: opacity 0.5s;
}

.home-launch__t {
	font-size: 11px;
	text-transform: uppercase;
	color: var(--indigo-light);
}

.home-launch__phase--liftoff .home-launch__t {
	color: var(--flame);
}

.home-launch__name {
	font-size: 22px;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.home-launch__desc {
	font-size: 13px;
	line-height: 1.5;
	color: var(--muted-2);
}

/* Flight-path scene (desktop / landscape tablet with JS). */
@media (min-width: 1024px) and (min-height: 640px) {
	.js .home-launch__sticky {
		height: 100vh;
		min-height: 620px;
		padding: 110px var(--gutter) 40px;
		gap: 20px;
	}

	.js .home-launch__stage {
		position: relative;
		flex: 1;
		min-height: 0;
	}

	.js .home-launch__svg {
		display: block;
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		max-width: none;
		overflow: visible;
	}

	.js .home-launch__phases {
		position: absolute;
		inset: 0;
		border: 0;
	}

	.js .home-launch__phase {
		position: absolute;
		display: block;
		padding: 0;
		border: 0;
		transform: translate(-50%, -50%);
	}

	.js .home-launch__phase:nth-child(1) {
		left: 11.62%;
		top: 93.01%;
	}

	.js .home-launch__phase:nth-child(2) {
		left: 41.17%;
		top: 81.57%;
	}

	.js .home-launch__phase:nth-child(3) {
		left: 65.54%;
		top: 54.76%;
	}

	.js .home-launch__phase:nth-child(4) {
		left: 91.57%;
		top: 10.04%;
	}

	.js .home-launch__dot {
		margin: 0;
		border-color: #3a3a48;
		background: var(--bg);
		box-shadow: none;
	}

	.js .home-launch__label {
		position: absolute;
		left: 22px;
		bottom: 14px;
		width: 220px;
		opacity: 0.35;
	}

	.js .home-launch__phase:nth-child(n + 3) .home-launch__label {
		left: auto;
		bottom: auto;
		right: 22px;
		top: 14px;
		text-align: right;
	}

	.js .home-launch__phase.is-on .home-launch__label {
		opacity: 1;
	}

	.js .home-launch__phase.is-on .home-launch__dot {
		border-color: transparent;
		background: var(--indigo);
		box-shadow: 0 0 0 6px rgb(81 87 232 / 18%);
	}

	.js .home-launch__phase--liftoff.is-on .home-launch__dot {
		background: var(--flame);
		box-shadow: 0 0 0 6px rgb(245 154 91 / 15%);
	}

	.js .home-launch__rocket {
		display: block;
		position: absolute;
		left: 0;
		top: 0;
		width: 34px;
		height: 34px;
		will-change: transform;
	}

	.js .home-launch__rocket .rocket-glyph {
		width: 34px;
		height: 34px;
	}
}

@media (min-width: 1024px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
	.js .home-launch {
		height: 260vh;
	}

	.js .home-launch__sticky {
		position: sticky;
		top: 0;
	}
}

@media (max-width: 759px) {
	.home-launch__sticky {
		padding-top: 72px;
		padding-bottom: 64px;
		gap: 28px;
	}

	.home-launch__status {
		display: none;
	}

	.home-launch__desc {
		font-size: 15px;
	}
}

/* ---------- Capabilities ---------- */

.home-services {
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.home-services__head {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.home-services__rows {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--line);
}

.home-service {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.3fr) 40px;
	gap: 24px;
	align-items: center;
	padding: 34px 12px;
	border-bottom: 1px solid var(--line);
}

.home-service > * {
	transition: transform 0.3s var(--ease-out);
}

.home-service__num {
	font-size: 12px;
	color: var(--indigo-light);
}

.home-service__title {
	font-size: clamp(26px, 3vw, 44px);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.home-service__desc {
	font-size: 15px;
	line-height: 1.6;
	color: var(--muted);
}

.home-service__arrow {
	font-size: 22px;
	justify-self: end;
}

@media (hover: hover) {
	.home-service:hover {
		background: rgb(81 87 232 / 8%);
		color: var(--text);
	}

	.home-service:hover > * {
		transform: translateX(16px);
	}

	.home-service:hover > .home-service__arrow {
		transform: none;
	}
}

@media (max-width: 759px) {
	.home-services {
		gap: 36px;
	}

	.home-service {
		grid-template-columns: 32px minmax(0, 1fr);
		gap: 10px 14px;
		padding: 24px 0;
	}

	.home-service__num {
		align-self: start;
		padding-top: 8px;
	}

	.home-service__desc {
		grid-column: 2;
	}

	.home-service__arrow {
		display: none;
	}
}

/* ---------- Studio teaser ---------- */

.home-studio {
	position: relative;
	padding: 80px var(--gutter) 120px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: 64px;
}

.home-studio__intro {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.home-studio__intro .body-muted {
	max-width: 480px;
}

.home-studio__body {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.home-studio__facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.home-studio__fact {
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end;
	gap: 6px;
	padding: 24px 0;
}

.home-studio__fact + .home-studio__fact {
	padding-left: 20px;
	border-left: 1px solid var(--line);
}

.home-studio__fact dd {
	margin: 0;
	font-size: clamp(34px, 3.6vw, 52px);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.04em;
}

.home-studio__principles {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.home-studio__principles li {
	display: flex;
	gap: 18px;
	align-items: baseline;
}

.home-studio__principles .mono {
	font-size: 11px;
	color: var(--indigo-light);
}

.home-studio__principles h3 {
	font-size: 20px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0;
}

@media (max-width: 759px) {
	.home-studio {
		padding: 64px var(--gutter) 80px;
		gap: 40px;
	}

	.home-studio__fact + .home-studio__fact {
		padding-left: 12px;
	}

	.home-studio__principles h3 {
		font-size: 18px;
	}
}

/* ---------- Contact launch pad ---------- */

.home-contact {
	position: relative;
	z-index: 2;
	padding: 120px var(--gutter) 80px;
	border-top: 1px solid var(--line-soft);
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
	gap: 56px;
}

.home-contact__copy {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.home-contact__intro {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.home-contact__title {
	font-size: clamp(40px, 5.4vw, 84px);
	font-weight: 600;
	line-height: 0.98;
	letter-spacing: -0.045em;
}

.home-contact__intro .body-muted {
	max-width: 480px;
}

.home-contact__facts {
	margin: 0;
	border-top: 1px solid var(--line);
}

.home-contact__facts > div {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 18px 0;
	border-bottom: 1px solid var(--line);
}

.home-contact__facts dt {
	flex: none;
	white-space: nowrap;
}

.home-contact__facts dd {
	margin: 0;
	font-size: 17px;
	text-align: right;
}

.home-contact__facts a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-block: -11px;
	transition: color 0.2s;
}

.home-contact__facts a:hover {
	color: var(--indigo-light);
}

.home-pad {
	position: relative;
	min-height: 520px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	background: rgb(11 11 16 / 70%);
}

.home-pad__top {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted-3);
}

.home-pad__open {
	color: var(--indigo-light);
}

.home-pad__scene {
	position: relative;
	flex: 1;
	min-height: 320px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.home-pad__tower {
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 1px;
	height: 70%;
	background: var(--line);
}

.home-pad__arch {
	position: absolute;
	inset: 20% 10% 0;
	border: 1px dashed #1e1e28;
	border-bottom: 0;
	border-radius: 50% 50% 0 0;
}

.home-pad__count {
	position: absolute;
	top: 30%;
	left: 0;
	right: 0;
	text-align: center;
	font-size: clamp(56px, 7vw, 110px);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.05em;
	color: var(--text);
}

.home-pad__rocket {
	position: relative;
	z-index: 60;
	width: 120px;
	height: 150px;
	margin-bottom: 10px;
}

.home-pad__rocket svg {
	overflow: visible;
}

.home-pad__flame {
	transform-origin: 32px 41px;
	transition: transform 0.5s var(--ease-out);
}

.home-pad.is-lift .home-pad__flame {
	transform: scaleY(2.6) scaleX(1.3);
}

.home-pad.is-lift .home-pad__rocket {
	transform: translateY(-150vh);
	transition: transform 2s cubic-bezier(0.55, 0, 0.85, 0.25);
}

.home-pad__bottom {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.home-pad__rule {
	height: 1px;
	background: #2a2a34;
}

.home-pad__launch {
	justify-content: center;
	width: 100%;
	padding: 18px;
}

.home-pad__note {
	text-align: center;
	font-size: 11px;
	color: var(--muted-3);
}

@media (max-width: 759px) {
	.home-contact {
		padding: 80px var(--gutter) 64px;
		gap: 40px;
	}

	.home-pad {
		min-height: 460px;
		padding: 20px;
	}

	.home-pad__scene {
		min-height: 280px;
	}

	.home-pad__launch {
		white-space: normal;
	}
}
