/*
 * Gastrototem · Page · Home (hero de portada)
 *
 * Pieza 1: estructura + composición editorial. SIN capa de movimiento (el
 * zoom-scroll de la foto, el desvanecido del texto y el grano son una pieza
 * posterior). Depende de assets/css/base.css.
 *
 * Cero hex literales · cero familias tipográficas literales. Todos los colores y
 * tipografías vienen de tokens.css vía var(--gtt-*); las opacidades del overlay
 * se derivan del token de grafito con color-mix (sin canales RGB literales).
 *
 * OVERLAP sin JS: .gtt-hero es sticky (z-index 0) y .gtt-home-contenido es
 * relative (z-index 1) con fondo papel opaco: al hacer scroll el contenido sube
 * y cubre el hero. El <main id="gtt-content"> (que abre header.php) envuelve a
 * ambos como hermanos; no se abre ningún <main> nuevo.
 */

.gtt-hero {
	/* Padding de la composición (a sangre la foto, con aire el texto). El top
	 * deja paso al header fijo (64/80px) más respiración editorial. */
	--hero-pad-x: var(--gtt-space-6);          /* 24px */
	--hero-pad-top: 80px;                       /* despeja el header móvil + aire */
	--hero-pad-bottom: var(--gtt-space-12);    /* 48px */
	--hero-transition: 180ms ease-out;
	--hero-title-tracking: -0.02em;

	position: sticky;
	top: 0;
	height: 100vh;
	width: 100%;                                /* el <main> es full-width → a sangre */
	z-index: 0;
	overflow: hidden;
	background-color: var(--gtt-color-grafito-900);
	color: var(--gtt-color-papel-100);
}

@media (min-width: 768px) {
	.gtt-hero {
		--hero-pad-x: var(--gtt-space-12);     /* 48px */
		--hero-pad-top: 100px;
		--hero-pad-bottom: var(--gtt-space-16); /* 64px */
	}
}

@media (min-width: 1024px) {
	.gtt-hero {
		--hero-pad-x: var(--gtt-space-16);     /* 64px */
	}
}

/* Foto full-bleed --------------------------------------------------------- */

.gtt-hero__foto {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 100% 100%;                /* móvil: encuadre inferior-derecho */
	opacity: 0.6;                              /* móvil: foto atenuada sobre el grafito */
	transform-origin: center center;           /* zoom (hero.js) desde el centro */
	will-change: transform;                    /* zoom por scroll → capa de composición */
}

@media (min-width: 768px) {
	.gtt-hero__foto {
		object-position: center;
		opacity: 1;
	}
}

/* Overlay de contraste — solo desktop/tablet; en móvil contrasta la opacidad
 * de la foto. Gradiente grafito derivado del token con color-mix (cero RGB). */
.gtt-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	display: none;
}

@media (min-width: 768px) {
	.gtt-hero__overlay {
		display: block;
		background: linear-gradient(
			0deg,
			color-mix(in srgb, var(--gtt-color-grafito-900) 85%, transparent) 0%,
			color-mix(in srgb, var(--gtt-color-grafito-900) 75%, transparent) 35%,
			color-mix(in srgb, var(--gtt-color-grafito-900) 35%, transparent) 60%,
			transparent 100%
		);
	}
}

/* Grano ------------------------------------------------------------------- */
/* Capa de ruido sutil sobre la foto+overlay y por DEBAJO de la composición de
 * texto (z-index 1, mismo plano que el overlay pero pintada después por ser
 * ::after → queda encima de él; la composición es z-index 2 y manda sobre todo).
 * SVG feTurbulence como data-URI; sin colores literales (ruido en escala neutra),
 * estática (no se anima), pointer-events:none. Se mantiene también con
 * prefers-reduced-motion (es textura, no movimiento). */
.gtt-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	opacity: 0.06;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='gtt-grano'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23gtt-grano)'/%3E%3C/svg%3E");
	background-repeat: repeat;
	background-size: 160px 160px;
}

/* Composición editorial --------------------------------------------------- */

.gtt-hero__contenido {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	padding: var(--hero-pad-top) var(--hero-pad-x) var(--hero-pad-bottom);
	will-change: opacity, transform;           /* desvanecido + parallax (hero.js) */
}

/* Rótulos / kicker / folio: pila mono en mayúsculas, papel. */
.gtt-hero__rotulo,
.gtt-hero__kicker,
.gtt-hero__folio {
	margin: 0;
	font-family: var(--gtt-font-mono);
	font-weight: 400;
	font-size: var(--gtt-text-xs);
	text-transform: uppercase;
	letter-spacing: var(--gtt-tracking-wide);
	color: var(--gtt-color-papel-100);
}

.gtt-hero__cabecera {
	display: flex;
	justify-content: space-between;
	gap: var(--gtt-space-4);
}

.gtt-hero__rotulo {
	color: color-mix(in srgb, var(--gtt-color-papel-100) 75%, transparent);
}

.gtt-hero__composicion {
	margin-top: auto;                          /* empuja la composición al pie */
	max-width: var(--gtt-container-content);
}

.gtt-hero__folio {
	margin-bottom: var(--gtt-space-6);
	color: color-mix(in srgb, var(--gtt-color-papel-100) 75%, transparent);
}

.gtt-hero__kicker {
	margin-bottom: var(--gtt-space-8);
	font-weight: 500;
}

.gtt-hero__titulo {
	margin: 0;
	/* Medida para que el titular rompa en 3 líneas como Lovable, sin <br>:
	 * «Donde otros ven una comida,» / «nosotros leemos» / «un restaurante.».
	 * Debe ser menor que el cap de .gtt-hero__composicion (64rem) para llegar a
	 * actuar, y por debajo del umbral 2→3 líneas (~13.9em a tamaño máximo, medido
	 * en staging). 13.6em deja la línea 1 completa con margen. «un restaurante.»
	 * va unido por &nbsp; para caer entero a la 3.ª. En em → escala con el clamp
	 * del tamaño (en móviles estrechos rompe natural en más líneas, deseable). */
	max-width: 13.6em;
	font-family: var(--gtt-font-sans);
	font-weight: 600;
	font-size: var(--gtt-text-4xl);
	line-height: var(--gtt-leading-tight);
	letter-spacing: var(--hero-title-tracking);
	color: var(--gtt-color-papel-100);
}

/* Corrección de marca (MARCA §3.3): «leemos» en serif italic PAPEL, nunca tinta
 * sobre fondo oscuro. El acento lo da la cursiva, no el color. */
.gtt-hero__acento {
	font-family: var(--gtt-font-serif);
	font-style: italic;
	font-weight: 400;
	color: var(--gtt-color-papel-100);
}

.gtt-hero__subtitulo {
	margin: var(--gtt-space-6) 0 0;
	max-width: 34em;
	font-family: var(--gtt-font-sans);
	font-weight: 400;
	font-size: var(--gtt-text-lg);
	line-height: var(--gtt-leading-snug);
	color: var(--gtt-color-papel-100);
}

/* CTAs: sobrios sobre el oscuro. Sin exclamaciones, sin urgencia. */
.gtt-hero__ctas {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--gtt-space-3);
	margin-top: var(--gtt-space-8);
}

.gtt-hero__cta {
	font-family: var(--gtt-font-sans);
	text-decoration: none;
	color: var(--gtt-color-papel-100);
	transition: color var(--hero-transition);
}

.gtt-hero__cta--primario {
	display: inline-flex;
	align-items: baseline;
	gap: var(--gtt-space-3);
	font-weight: 500;
	font-size: var(--gtt-text-lg);
}

.gtt-hero__cta--secundario {
	font-weight: 400;
	font-size: var(--gtt-text-base);
}

.gtt-hero__cta-flecha {
	display: inline-block;
	font-family: var(--gtt-font-serif);
	font-style: italic;
	transition: transform var(--hero-transition);
}

@media (hover: hover) and (pointer: fine) {
	.gtt-hero__cta:hover {
		color: var(--gtt-color-papel-50);
	}

	.gtt-hero__cta--primario:hover .gtt-hero__cta-flecha {
		transform: translateX(var(--gtt-space-1));
	}
}

/* Banda inferior ---------------------------------------------------------- */

.gtt-hero__banda {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: var(--gtt-space-4);
	margin-top: var(--gtt-space-12);
	pointer-events: none;
}

.gtt-hero__rotulo--lamina {
	display: none;                             /* oculta en móvil (como la referencia) */
}

@media (min-width: 640px) {
	.gtt-hero__rotulo--lamina {
		display: block;
		color: color-mix(in srgb, var(--gtt-color-papel-100) 85%, transparent);
	}
}

/* ========================================================================
 * CONTENIDO · sube por encima del hero (overlap CSS puro)
 * ===================================================================== */

.gtt-home-contenido {
	position: relative;
	z-index: 1;
	background-color: var(--gtt-color-papel-100);
	color: var(--gtt-color-grafito-900);
	padding: var(--gtt-space-24) var(--gtt-space-6);
}

@media (min-width: 768px) {
	.gtt-home-contenido {
		padding-inline: var(--gtt-space-12);
	}
}

@media (min-width: 1024px) {
	.gtt-home-contenido {
		padding-inline: var(--gtt-space-16);
	}
}

/* Sentinel del observer del header: marcador invisible en el tope del contenido. */
.gtt-hero__sentinel {
	display: block;
	width: 1px;
	height: 1px;
}

/* ========================================================================
 * prefers-reduced-motion · accesibilidad sobre estética
 * ===================================================================== */

@media (prefers-reduced-motion: reduce) {
	.gtt-hero__cta,
	.gtt-hero__cta-flecha {
		transition: none;
	}

	/* Sin movimiento: hero.js ya no instala listeners, pero blindamos por si
	 * hubiera estilo inline previo. El grano (::after) NO se toca: es textura. */
	.gtt-hero__foto {
		transform: none !important;
	}

	.gtt-hero__contenido {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ========================================================================
 * CUERPO DE LA HOME · secciones dentro de .gtt-home-contenido (papel)
 *
 * Cada sección es un <section> bajo el sentinel. Ritmo vertical editorial por
 * margen entre secciones. Medida de lectura acotada por sección. Todo papel/
 * grafito/tinta vía tokens; mono uppercase con --gtt-tracking-wide.
 * ===================================================================== */

.gtt-home-section {
	max-width: var(--gtt-container-content);
}

.gtt-home-section + .gtt-home-section {
	margin-top: var(--gtt-space-24);
}

/* Kicker mono (etiqueta de sección y de estado). */
.gtt-home-kicker {
	margin: 0;
	font-family: var(--gtt-font-mono);
	font-weight: 500;
	font-size: var(--gtt-text-xs);
	text-transform: uppercase;
	letter-spacing: var(--gtt-tracking-wide);
	color: var(--gtt-color-grafito-900);
}

/* Sección 1 · Qué hacemos -------------------------------------------------- */

.gtt-home-lede {
	margin: var(--gtt-space-6) 0 0;
	max-width: 42rem;
	font-family: var(--gtt-font-sans);
	font-weight: 400;
	font-size: var(--gtt-text-lg);
	line-height: var(--gtt-leading-normal);
	color: var(--gtt-color-grafito-900);
}

/* Sección 2 · Los pasos (#metodo) ------------------------------------------ */

.gtt-pasos {
	list-style: none;
	margin: var(--gtt-space-8) 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
}

.gtt-paso {
	padding: var(--gtt-space-6) 0;
	border-top: 1px solid var(--gtt-color-grafito-200);
}

.gtt-paso:first-child {
	border-top: 0;
	padding-top: 0;
}

.gtt-paso__num {
	margin: 0;
	font-family: var(--gtt-font-mono);
	font-weight: 500;
	font-size: var(--gtt-text-sm);
	color: var(--gtt-color-tinta-500);
}

.gtt-paso__titulo {
	margin: var(--gtt-space-3) 0 0;
	font-family: var(--gtt-font-sans);
	font-weight: 500;
	font-size: var(--gtt-text-xl);
	line-height: var(--gtt-leading-tight);
	color: var(--gtt-color-grafito-900);
}

.gtt-paso__texto {
	margin: var(--gtt-space-2) 0 0;
	font-family: var(--gtt-font-sans);
	font-weight: 400;
	font-size: var(--gtt-text-base);
	line-height: var(--gtt-leading-relaxed);
	color: var(--gtt-color-grafito-900);
}

@media (min-width: 768px) {
	.gtt-pasos {
		grid-template-columns: repeat(3, 1fr);
	}

	.gtt-paso {
		padding: 0 var(--gtt-space-8);
		border-top: 0;
		border-left: 1px solid var(--gtt-color-grafito-200);
	}

	.gtt-paso:first-child {
		padding-left: 0;
		border-left: 0;
	}

	.gtt-paso:last-child {
		padding-right: 0;
	}
}

/* Sección 3 · Precio y zonas (#zonas) -------------------------------------- */

.gtt-home-precio {
	margin: var(--gtt-space-6) 0 0;
	font-family: var(--gtt-font-sans);
	font-weight: 500;
	font-size: var(--gtt-text-2xl);
	line-height: var(--gtt-leading-snug);
	color: var(--gtt-color-grafito-900);
}

.gtt-home-link {
	display: inline-block;
	margin-top: var(--gtt-space-2);
	font-family: var(--gtt-font-sans);
	font-weight: 500;
	font-size: var(--gtt-text-base);
	color: var(--gtt-color-tinta-500);
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.gtt-home-link:hover {
		text-decoration: underline;
		text-underline-offset: 4px;
	}
}

.gtt-home-zonas-intro {
	margin: var(--gtt-space-6) 0 0;
	font-family: var(--gtt-font-sans);
	font-weight: 400;
	font-size: var(--gtt-text-lg);
	line-height: var(--gtt-leading-normal);
	color: var(--gtt-color-grafito-900);
}

.gtt-zonas-grid {
	margin-top: var(--gtt-space-8);
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--gtt-space-4);
}

@media (min-width: 768px) {
	.gtt-zonas-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: var(--gtt-space-6);
	}
}

.gtt-zona {
	/* Fondo papel (mismo que el contenido): la tarjeta se define por el borde,
	 * no por contraste de fondo. Paleta: papel + grafito. */
	background-color: var(--gtt-color-papel-100);
	border: 1px solid var(--gtt-color-grafito-200);
	border-radius: 6px;
	padding: var(--gtt-space-8);
}

.gtt-zona__estado {
	display: flex;
	align-items: center;
	gap: var(--gtt-space-2);
	margin-bottom: var(--gtt-space-4);
}

/* Punto de estado: color SEMÁNTICO de UI (no branding, no fondo de sección). */
.gtt-zona__punto {
	width: var(--gtt-space-2);
	height: var(--gtt-space-2);
	border-radius: 50%;
	flex-shrink: 0;
}

.gtt-zona__punto--abierta {
	background-color: var(--gtt-color-success);
}

.gtt-zona__punto--sin-fechas {
	background-color: var(--gtt-color-warning);
}

.gtt-zona__punto--proximamente {
	background-color: var(--gtt-color-grafito-200);
}

.gtt-zona__nombre {
	margin: 0;
	font-family: var(--gtt-font-sans);
	font-weight: 500;
	font-size: var(--gtt-text-xl);
	line-height: var(--gtt-leading-tight);
	color: var(--gtt-color-grafito-900);
}

.gtt-zona__sublinea {
	margin: var(--gtt-space-2) 0 0;
	font-family: var(--gtt-font-sans);
	font-weight: 400;
	font-size: var(--gtt-text-sm);
	line-height: var(--gtt-leading-normal);
	color: var(--gtt-color-grafito-500);
}

.gtt-zona__cta {
	display: inline-flex;
	align-items: baseline;
	gap: var(--gtt-space-2);
	margin-top: var(--gtt-space-4);
	font-family: var(--gtt-font-sans);
	font-weight: 500;
	font-size: var(--gtt-text-base);
	color: var(--gtt-color-grafito-900);
	text-decoration: none;
}

.gtt-zona__cta-flecha {
	display: inline-block;
	transition: transform 180ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
	.gtt-zona__cta:hover .gtt-zona__cta-flecha {
		transform: translateX(var(--gtt-space-1));
	}

	.gtt-zona__cta:hover .gtt-zona__cta-label {
		text-decoration: underline;
		text-underline-offset: 4px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gtt-zona__cta-flecha {
		transition: none;
	}
}

/* Sección 4 · El criterio / la firma --------------------------------------- */
/* Pull-quote con el lenguaje de la cita de las páginas-documento: Source Serif 4
 * Italic, regla 48×1px grafito-200, sobre papel (texto grafito, no tinta). */

.gtt-pullquote {
	margin: 0;
	max-width: 42rem;
}

.gtt-pullquote__regla {
	width: var(--gtt-space-12);
	height: 1px;
	margin: 0 0 var(--gtt-space-6);
	border: 0;
	background-color: var(--gtt-color-grafito-200);
}

.gtt-pullquote__cita {
	margin: 0;
	font-family: var(--gtt-font-serif);
	font-style: italic;
	font-weight: 400;
	font-size: var(--gtt-text-3xl);
	line-height: var(--gtt-leading-tight);
	color: var(--gtt-color-grafito-900);
}

.gtt-home-firma {
	display: flex;
	flex-direction: column;
	gap: var(--gtt-space-4);
	margin-top: var(--gtt-space-8);
}

@media (min-width: 768px) {
	.gtt-home-firma {
		flex-direction: row;
		gap: var(--gtt-space-8);
	}
}
