/* ==================================================
   Daring to Dream — estilos propios de la plantilla (hero: el sueño que se escapa del marco)
   Barra, botones, secciones comunes, similares, CTA y WhatsApp vienen de themes/_kit/am-kit.css
   Los colores de la aurora (--a1, --a2, --a3) los cambia dd.js según la escena.
   ================================================== */

.dd-hero {
	--a1: #f2a65a;
	--a2: #6c7a89;
	--a3: #c0392b;
	--frame-w: min(30vw, 470px);
	--frame-h: min(60vh, 600px);
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100svh;
	min-height: 700px;
	padding-top: 68px;
	overflow: hidden;
	color: #fff;
	background: #080914;
	touch-action: pan-y;
}

/* ---------- Aurora: tres manchas de luz con los colores de la escena ---------- */
.dd-aurora { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.dd-blob { position: absolute; display: block; width: 62vw; height: 62vw; border-radius: 50%; opacity: .5; filter: blur(60px); mix-blend-mode: screen; }
.dd-blob--1 { left: -18vw; top: -22vw; background: radial-gradient(circle, var(--a1), rgba(8, 9, 20, 0) 65%); animation: dd-drift1 22s ease-in-out infinite alternate; }
.dd-blob--2 { right: -16vw; top: 6vh; background: radial-gradient(circle, var(--a2), rgba(8, 9, 20, 0) 65%); animation: dd-drift2 26s ease-in-out infinite alternate; }
.dd-blob--3 { left: 18vw; bottom: -36vw; background: radial-gradient(circle, var(--a3), rgba(8, 9, 20, 0) 65%); animation: dd-drift3 30s ease-in-out infinite alternate; }
@keyframes dd-drift1 { to { transform: translate(14vw, 10vh) scale(1.15); } }
@keyframes dd-drift2 { to { transform: translate(-12vw, 14vh) scale(.9); } }
@keyframes dd-drift3 { to { transform: translate(10vw, -12vh) scale(1.2); } }
.dd-grain {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.5'/></svg>");
	opacity: .08;
	mix-blend-mode: overlay;
	pointer-events: none;
}

/* ---------- Pantalla dividida ---------- */
.dd-split { position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; }

/* Mitad izquierda: texto */
.dd-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(20px, 4vh, 48px) clamp(20px, 3vw, 48px) clamp(20px, 4vh, 48px) calc(var(--gutter) + 1vw); }
.dd-kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; font-family: 'Manrope', sans-serif; font-size: clamp(17px, 1.6vw, 24px); font-weight: 600; color: rgba(255, 255, 255, .9); text-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.dd-kicker i { display: block; width: 46px; height: 2px; background: linear-gradient(90deg, var(--a1), var(--a2)); }
.dd-page .dd-title {
	max-width: 13ch;
	margin: 0 0 28px;
	font-family: 'Manrope', var(--mb-display);
	font-size: clamp(40px, 5.3vw, 86px);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -.045em;
	text-align: left;
	text-transform: none;
	color: #fff;
	text-shadow: 0 20px 35px rgba(0, 0, 0, .15);
}
.dd-title .dd-ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.dd-title .dd-ln > span { display: inline-block; }
/* La última línea con el degradado de la escena */
.dd-title .dd-ln:last-child > span { background: linear-gradient(100deg, #fff 10%, var(--a1) 60%, var(--a2) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ak-page .dd-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; font-family: 'Manrope', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .45); transition: border-color .2s linear, gap .2s var(--ease); }
.ak-page .dd-more:hover, .ak-page .dd-more:focus-visible { color: #fff; gap: 16px; border-color: #fff; }
.dd-nav { display: flex; gap: 10px; margin-top: clamp(26px, 5vh, 54px); }
.ak-page .dd-dot {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	width: 112px;
	min-height: 0;
	margin: 0;
	padding: 0 0 12px;
	font-family: 'Manrope', sans-serif;
	text-align: left;
	color: rgba(255, 255, 255, .5);
	background: none;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: color .25s linear;
}
.dd-dot b { font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.dd-dot span { font-size: 14px; font-weight: 600; }
.dd-dot i { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .18); }
.dd-dot i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--a1), var(--a2)); transform: scaleX(var(--fill, 0)); transform-origin: 0 50%; }
.ak-page .dd-dot:hover, .ak-page .dd-dot.is-on { color: #fff; background: none; }

/* Mitad derecha: la ventana en arco, en 3D */
.dd-scene { position: relative; display: grid; place-items: center; perspective: 1300px; }
/* Centrada sin transform (GSAP la mueve en x/z) */
.dd-word {
	position: absolute;
	left: -50%;
	right: -50%;
	top: 50%;
	margin: -.5em 0 0;
	text-align: center;
	font-family: 'Manrope', sans-serif;
	font-size: clamp(90px, 14vw, 230px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.05em;
	white-space: nowrap;
	color: transparent;
	-webkit-text-stroke: 1.5px rgba(255, 255, 255, .16);
	pointer-events: none;
}
.dd-word span { display: inline-block; }
.dd-window { position: relative; width: var(--frame-w); height: var(--frame-h); margin-top: calc(var(--frame-h) * .14); transform-style: preserve-3d; }
.dd-frame {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: 999px 999px 26px 26px / calc(var(--frame-w) * .5) calc(var(--frame-w) * .5) 26px 26px;
	background: #12142a;
	box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .75), 0 0 120px -20px var(--a1);
	transform: translateZ(0);
}
.dd-pic { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.dd-ring { position: absolute; inset: -14px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px 999px 36px 36px / calc(var(--frame-w) * .5 + 14px) calc(var(--frame-w) * .5 + 14px) 36px 36px; transform: translateZ(-30px); pointer-events: none; }
/* Personajes: se apoyan en la base del arco y se salen por arriba (y a los costados) */
/* Centrados sin transform (left/right 0 + margin auto); GSAP los mueve en y/z */
.dd-subj { position: absolute; left: -100%; right: -100%; bottom: 0; margin: 0 auto; max-width: none; height: auto; opacity: 0; visibility: hidden; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); pointer-events: none; }
.ak-page .dd-subj { max-width: none; }   /* el kit limita las imágenes al 100%: los personajes deben poder salirse */
.dd-subj.is-on { opacity: 1; visibility: visible; }
.dd-subj:nth-of-type(1) { width: 140%; bottom: 7%; }
.dd-subj:nth-of-type(2) { height: 108%; }
.dd-subj:nth-of-type(3) { height: 126%; bottom: -2%; }
.dd-subj:nth-of-type(4) { height: 116%; bottom: -3%; }
.dd-bgsrc { display: none; }

.dd-dust { position: absolute; inset: 0; z-index: 3; display: block; width: 100%; height: 100%; pointer-events: none; }
.dd-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Pie del hero ---------- */
.dd-foot {
	position: relative;
	z-index: 6;
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: minmax(260px, 1fr) auto auto;
	gap: 14px clamp(20px, 3vw, 44px);
	align-items: center;
	/* a la derecha queda libre el lugar del botón flotante de WhatsApp */
	padding: 14px calc(var(--gutter) + 140px) 16px var(--gutter);
	background: rgba(8, 9, 20, .82);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-top: 3px solid var(--accent);
}
.dd-foot__meta { margin: 0 0 4px; font-family: var(--mb-mono); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.dd-foot__lead { max-width: 60ch; margin: 0; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.5; color: rgba(245, 245, 240, .86); }
.dd-ctrl { display: flex; align-items: center; gap: 10px; }
.dd-count { margin: 0 6px 0 0; font-family: var(--mb-mono); font-size: 14px; color: rgba(245, 245, 240, .7); white-space: nowrap; }
.dd-idx { display: inline-block; font-family: var(--mb-display); font-weight: 900; font-size: 34px; line-height: 1; letter-spacing: -.02em; vertical-align: -5px; color: var(--accent); }
@media (max-width: 1180px) {
	.dd-foot { grid-template-columns: minmax(0, 1fr) auto; }
	.dd-foot .ak-actions { grid-column: 1 / -1; }
	.ak-page .dd-dot { width: 90px; }
}
/* Pantallas bajas */
@media (max-height: 820px) and (min-width: 901px) {
	.dd-hero { --frame-h: min(54vh, 520px); --frame-w: min(27vw, 410px); }
	.dd-page .dd-title { font-size: clamp(38px, 4.4vw, 70px); margin-bottom: 20px; }
	.dd-nav { margin-top: 24px; }
}

/* ---------- Tablet y móvil: ventana arriba, texto abajo ---------- */
@media (max-width: 900px) {
	.dd-hero { --frame-w: min(62vw, 360px); --frame-h: min(46vh, 440px); height: auto; min-height: 0; }
	.dd-split { grid-template-columns: 1fr; }
	.dd-scene { order: -1; min-height: calc(var(--frame-h) * 1.5); padding-top: 20px; }
	.dd-copy { padding: 10px var(--gutter) 34px; }
	.dd-word { font-size: clamp(70px, 24vw, 160px); }
	.dd-page .dd-title { max-width: none; }
}
@media (max-width: 700px) {
	.dd-hero { padding-top: 60px; }
	.ak-page .dd-dot { flex: 1 1 0; width: auto; }
	.dd-dot span { display: none; }
	.dd-foot { grid-template-columns: 1fr; padding: 14px var(--gutter) 88px; }
	.dd-ctrl { order: -1; }
	.dd-foot .ak-actions .ak-btn { flex: 1 1 auto; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
	.dd-blob { animation: none; }
	.dd-dust { display: none; }
}
