/* ============================================================
   JoyIT — hero "coming soon"
   ============================================================ */

@font-face {
	font-family: 'Familjen Grotesk';
	src: url('assets/fonts/familjen-grotesk-latin-wght-normal.woff2') format('woff2-variations');
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'DM Sans';
	src: url('assets/fonts/dm-sans-latin-wght-normal.woff2') format('woff2-variations');
	font-weight: 100 1000;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'IBM Plex Mono';
	src: url('assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'IBM Plex Mono';
	src: url('assets/fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

:root {
	--space: #01050a;
	--ink: #ffffff;
	--ink-muted: rgba(255, 255, 255, 0.72);
	--edge: clamp(20px, 4vw, 56px);
	--font-display: 'Familjen Grotesk', 'DM Sans', system-ui, sans-serif;
	--font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

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

html {
	height: 100%;
}

body {
	margin: 0;
	min-height: 100%;
	overflow-x: hidden;
	background: var(--space);
	color: var(--ink);
	font-family: var(--font-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

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

.hero {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
	background: radial-gradient(120% 95% at 50% 100%, #03142c 0%, #01050a 55%, #000205 100%);
	isolation: isolate;
}

/* Estrellas */
.stars {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* Planeta
   La imagen (1619x615) mantiene su proporción real: nunca se estira.
   --pw  = ancho del planeta
   --rise = cuánto sobresale la cima del arco desde el borde inferior */
.planet {
	--pw: min(96vw, 165vh);
	--rise: 22vh;
	position: absolute;
	left: calc(50% - var(--pw) / 2);
	/* la cima del arco está al 35.6 % de la altura de la imagen
	   (alto = 0.38 * ancho) → queda a 0.245 * ancho del borde inferior */
	bottom: calc(var(--rise) - var(--pw) * 0.245);
	z-index: 1;
	width: var(--pw);
	aspect-ratio: 1619 / 615;
	pointer-events: none;
	transform: translate3d(0, 0, 0);
}

.planet__enter,
.planet__float {
	display: block;
	width: 100%;
	height: 100%;
}

.planet__enter {
	animation: planet-enter 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s backwards;
}

.planet__float {
	animation: planet-float 16s ease-in-out 2s infinite;
}

.planet__img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: saturate(1.1) brightness(1.05);
	animation: planet-pulse 9s ease-in-out infinite;
}

/* halo atmosférico suave detrás del arco */
.planet::before {
	content: '';
	position: absolute;
	left: 8%;
	right: 8%;
	top: 18%;
	height: 60%;
	background: radial-gradient(
		50% 50% at 50% 50%,
		rgba(36, 132, 255, 0.22) 0%,
		rgba(24, 96, 230, 0.08) 45%,
		rgba(0, 60, 180, 0) 70%
	);
	filter: blur(20px);
}

@keyframes planet-enter {
	from {
		opacity: 0;
		transform: translate3d(0, 70px, 0) scale(1.04);
	}
	to {
		opacity: 1;
		transform: translate3d(0, 0, 0) scale(1);
	}
}

@keyframes planet-float {
	0%,
	100% {
		transform: translate3d(0, 0, 0);
	}
	50% {
		transform: translate3d(0, -7px, 0);
	}
}

@keyframes planet-pulse {
	0%,
	100% {
		filter: saturate(1.1) brightness(1.05);
	}
	50% {
		filter: saturate(1.18) brightness(1.18);
	}
}

/* Viñeta */
.hero__vignette {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background:
		radial-gradient(130% 70% at 50% 62%, transparent 50%, rgba(0, 0, 0, 0.4) 100%),
		linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 22%);
}

/* ------------------------------------------------------------
   Cabecera / pie
   ------------------------------------------------------------ */

.site-header {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 4;
	display: flex;
	align-items: center;
	padding: clamp(22px, 4.2vh, 44px) var(--edge);
}

.brand {
	display: inline-flex;
	align-items: center;
	outline-offset: 6px;
}

.brand img {
	display: block;
	height: clamp(22px, 2.4vw, 30px);
	width: auto;
	/* el SVG del logo viene invertido en Y (igual que en el sitio de referencia) */
	transform: scaleY(-1);
}

.site-footer {
	position: absolute;
	right: var(--edge);
	bottom: clamp(14px, 2.4vh, 26px);
	z-index: 4;
	margin: 0;
}

.site-footer p {
	margin: 0;
	font-family: var(--font-body);
	font-size: clamp(8px, 0.78vw, 11px);
	font-weight: 500;
	letter-spacing: 0.05em;
	line-height: 1.4;
	text-align: right;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.88);
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}

/* ------------------------------------------------------------
   Contenido
   ------------------------------------------------------------ */

.hero__content {
	position: relative;
	z-index: 3;
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: clamp(90px, 12vh, 130px) var(--edge);
	text-align: center;
}

.hero__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(34px, 5.9vw, 112px);
	font-weight: 400;
	line-height: 0.98;
	letter-spacing: -0.025em;
	text-transform: uppercase;
	color: var(--ink);
	text-wrap: balance;
}

.hero__line {
	display: block;
}

.hero__subtitle {
	margin: clamp(18px, 2.6vw, 34px) 0 0;
	font-family: var(--font-mono);
	font-size: clamp(12px, 1.4vw, 18px);
	font-weight: 400;
	letter-spacing: 0.17em;
	line-height: 1.4;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.94);
}

.hero__note {
	margin: clamp(30px, 4.6vw, 58px) 0 0;
	max-width: min(560px, 92vw);
	font-family: var(--font-body);
	font-size: clamp(11px, 1.05vw, 14px);
	font-weight: 400;
	letter-spacing: 0.05em;
	line-height: 1.55;
	text-transform: uppercase;
	color: var(--ink-muted);
}

/* ------------------------------------------------------------
   Entrada del texto (blur + rise, como el hero de referencia)
   ------------------------------------------------------------ */

.js [data-reveal] {
	opacity: 0;
	filter: blur(12px);
	transform: translate3d(0, 16px, 0);
	transition:
		opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s),
		filter 1.1s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s),
		transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s);
}

.js [data-reveal].is-visible {
	opacity: 1;
	filter: blur(0);
	transform: translate3d(0, 0, 0);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

.hero__content {
	padding-bottom: calc(22vh + 40px);
}

@media (max-width: 900px) {
	.planet {
		--pw: 130vw;
		--rise: 20vh;
	}
}

@media (max-width: 640px) {
	:root {
		--edge: clamp(16px, 5vw, 28px);
	}

	.hero__title {
		font-size: clamp(30px, 9.5vw, 46px);
		line-height: 1;
	}

	.hero__subtitle {
		font-size: clamp(11px, 3.2vw, 14px);
		letter-spacing: 0.14em;
	}

	.hero__note {
		font-size: clamp(10px, 2.9vw, 13px);
	}

	.planet {
		--pw: 175vw;
		--rise: 18vh;
	}

	.hero__content {
		padding-bottom: calc(18vh + 32px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.planet__enter,
	.planet__float,
	.planet__img {
		animation: none;
	}

	.js [data-reveal] {
		opacity: 1;
		filter: none;
		transform: none;
		transition: none;
	}
}
