/**
 * Homepage — Sistema visual "Performance científico" (SPEC-001).
 * Tokens y componentes documentados en docs/SPEC-001-homepage/design-system.md
 */

:root {
	--ecc-bg: #080a09;
	--ecc-surface: #111411;
	--ecc-card: #171a17;
	--ecc-border: #2a2f2a;
	--ecc-primary: #b7f000;
	--ecc-primary-hover: #c9ff26;
	--ecc-text: #f4f5f0;
	--ecc-muted: #a7aca6;
	--ecc-dark-text: #080a09;
	--ecc-photo-accent: #7657ff;
	--ecc-danger: #ff5a5f;

	--ecc-font-display: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
	--ecc-font-body: 'Inter', system-ui, 'Segoe UI', sans-serif;

	--ecc-max-width: 1320px;
	--ecc-radius-card: 16px;
	--ecc-radius-btn: 6px;
}

body.home {
	background-color: var(--ecc-bg);
	color: var(--ecc-text);
}

.ecc-home {
	background-color: var(--ecc-bg);
	color: var(--ecc-text);
	font-family: var(--ecc-font-body);
	overflow-x: hidden;
}

.ecc-home .container {
	max-width: var(--ecc-max-width);
}

.ecc-home h1,
.ecc-home h2,
.ecc-home h3 {
	font-family: var(--ecc-font-display);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: 0.01em;
}

.ecc-eyebrow {
	font-family: var(--ecc-font-body);
	font-weight: 700;
	font-size: clamp(12px, 1.4vw, 14px);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ecc-primary);
	margin-bottom: 12px;
}

.ecc-section {
	padding: 72px 0;
}

@media (min-width: 992px) {
	.ecc-section {
		padding: 112px 0;
	}
}

.ecc-section:nth-of-type(even) {
	background-color: var(--ecc-surface);
}

.ecc-section__head {
	max-width: 720px;
	margin-bottom: 40px;
}

.ecc-section__title {
	font-size: clamp(28px, 4vw, 44px);
}

/* Botones */

.ecc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 28px;
	border-radius: var(--ecc-radius-btn);
	font-weight: 700;
	text-decoration: none;
	border: 1px solid transparent;
	transition: background-color 200ms ease, color 200ms ease, transform 150ms ease, border-color 200ms ease;
	cursor: pointer;
}

.ecc-btn--small {
	min-height: 40px;
	padding: 0 18px;
	font-size: 14px;
}

.ecc-btn--primary {
	background-color: var(--ecc-primary);
	color: var(--ecc-dark-text);
}

.ecc-btn--primary:hover,
.ecc-btn--primary:focus-visible {
	background-color: var(--ecc-primary-hover);
	color: var(--ecc-dark-text);
	transform: translateY(-2px);
}

.ecc-btn--secondary {
	background-color: transparent;
	border-color: rgba(244, 245, 240, 0.4);
	color: var(--ecc-text);
}

.ecc-btn--secondary:hover,
.ecc-btn--secondary:focus-visible {
	border-color: var(--ecc-primary);
	color: var(--ecc-text);
}

.ecc-btn--ghost {
	background-color: transparent;
	border-color: var(--ecc-border);
	color: var(--ecc-text);
}

.ecc-btn--ghost:hover,
.ecc-btn--ghost:focus-visible {
	background-color: var(--ecc-card);
}

.ecc-home a:focus-visible,
.ecc-home button:focus-visible {
	outline: 3px solid var(--ecc-primary);
	outline-offset: 2px;
}

/* Header */

.ecc-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background-color: rgba(8, 10, 9, 0.75);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid transparent;
	transition: background-color 200ms ease, border-color 200ms ease;
}

.ecc-header.is-scrolled {
	background-color: rgba(8, 10, 9, 0.97);
	border-bottom-color: var(--ecc-border);
}

.ecc-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 72px;
}

@media (min-width: 992px) {
	.ecc-header__inner {
		min-height: 84px;
	}
}

.ecc-header .site-branding {
	display: flex;
	align-items: center;
}

/* Header en móvil: hamburguesa a la izquierda, logo centrado, acciones a la
   derecha. Se usa CSS Grid para que el logo quede garantizado en el centro
   sin depender de cálculos de flex-grow. */
@media (max-width: 991.98px) {
	.ecc-header__inner {
		display: grid;
		grid-template-columns: auto 1fr auto;
		align-items: center;
		column-gap: 12px;
	}

	.ecc-header #site-navigation {
		grid-column: 1;
	}

	.ecc-header .site-branding {
		grid-column: 2;
		justify-self: center;
		flex-shrink: 0;
	}

	.ecc-header__actions {
		grid-column: 3;
		justify-self: end;
	}
}

.ecc-header .custom-logo-link {
	display: flex;
	align-items: center;
}

.ecc-header .custom-logo-link img {
	max-height: 40px;
	width: auto;
	height: auto;
}

@media (min-width: 992px) {
	.ecc-header .custom-logo-link img {
		max-height: 48px;
	}
}

.ecc-header .site-title a {
	font-family: var(--ecc-font-display);
	font-weight: 800;
	color: var(--ecc-text);
	text-decoration: none;
	font-size: 22px;
}

.ecc-header #site-navigation ul#primary-menu {
	display: none;
	list-style: none;
	gap: 28px;
	margin: 0;
	padding: 0;
}

@media (min-width: 992px) {
	.ecc-header #site-navigation ul#primary-menu {
		display: flex;
	}
}

.ecc-header #primary-menu a {
	color: var(--ecc-text);
	text-decoration: none;
	font-weight: 500;
}

.ecc-header #primary-menu a:hover {
	color: var(--ecc-primary);
}

.ecc-header .menu-toggle {
	background: none;
	border: 1px solid var(--ecc-border);
	color: var(--ecc-text);
	border-radius: var(--ecc-radius-btn);
	padding: 0;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

@media (min-width: 992px) {
	.ecc-header .menu-toggle {
		display: none;
	}
}

.ecc-menu-icon {
	position: relative;
	width: 20px;
	height: 14px;
	display: inline-block;
}

.ecc-menu-icon__bar {
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	border-radius: 2px;
	background-color: var(--ecc-text);
	transition: transform 200ms ease, opacity 150ms ease;
}

.ecc-menu-icon__bar:nth-child(1) {
	top: 0;
}

.ecc-menu-icon__bar:nth-child(2) {
	top: 6px;
}

.ecc-menu-icon__bar:nth-child(3) {
	top: 12px;
}

#site-navigation.toggled .ecc-menu-icon__bar:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

#site-navigation.toggled .ecc-menu-icon__bar:nth-child(2) {
	opacity: 0;
}

#site-navigation.toggled .ecc-menu-icon__bar:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

.ecc-header #site-navigation.toggled ul#primary-menu {
	display: flex;
	flex-direction: column;
	position: absolute;
	top: 72px;
	left: 0;
	right: 0;
	background-color: var(--ecc-bg);
	border-bottom: 1px solid var(--ecc-border);
	padding: 16px 24px;
	gap: 16px;
}

.ecc-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.ecc-header__account-icon {
	width: 20px;
	height: 20px;
	display: none;
}

@media (max-width: 991.98px) {
	.ecc-header__account {
		width: 44px;
		height: 44px;
		min-height: 44px;
		padding: 0;
		border-radius: 50%;
	}

	.ecc-header__account-icon {
		display: inline-flex;
	}

	.ecc-header__account-label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
}

.ecc-header__cart,
.ecc-header__cart:visited {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	border-radius: 50%;
	border: 1px solid var(--ecc-border);
	color: var(--ecc-text) !important;
	text-decoration: none;
	transition: border-color 200ms ease;
}

.ecc-header__cart:hover,
.ecc-header__cart:focus-visible {
	border-color: var(--ecc-primary);
}

.ecc-header__cart-icon {
	width: 20px;
	height: 20px;
}

.ecc-header__cart-count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background-color: var(--ecc-primary);
	color: var(--ecc-dark-text);
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Header en móvil: hamburguesa a la izquierda, logo centrado, acciones a la derecha */
@media (max-width: 991.98px) {
	#site-navigation {
		order: 1;
	}

	.site-branding {
		order: 2;
		flex: 1;
		justify-content: center;
	}

	.ecc-header__actions {
		order: 3;
	}
}

/* Hero */

.ecc-hero {
	padding: 56px 0 72px;
	background: radial-gradient(circle at 80% 20%, rgba(118, 87, 255, 0.18), transparent 55%), var(--ecc-bg);
}

@media (min-width: 992px) {
	.ecc-hero {
		padding: 96px 0;
	}
}

.ecc-hero--has-bg {
	position: relative;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	isolation: isolate;
}

.ecc-hero--has-bg::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, rgba(8, 10, 9, 0.72) 25%, rgba(8, 10, 9, 0.3) 75%),
		linear-gradient(0deg, rgba(8, 10, 9, 0.32), rgba(8, 10, 9, 0.32));
	z-index: -1;
}

.ecc-hero__title {
	font-size: clamp(44px, 6vw, 88px);
	margin: 16px 0 20px;
}

.ecc-hero__description {
	font-size: clamp(16px, 1.6vw, 20px);
	color: var(--ecc-muted);
	max-width: 520px;
	margin-bottom: 32px;
}

.ecc-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.ecc-hero__media {
	margin-top: 40px;
}

@media (min-width: 992px) {
	.ecc-hero__media {
		margin-top: 0;
	}
}

.ecc-hero__frame {
	position: relative;
	max-width: 440px;
	margin: 0 auto;
}

.ecc-hero__shape {
	position: absolute;
	inset: 0;
	background-color: var(--ecc-primary);
	border-radius: var(--ecc-radius-card);
	transform: rotate(-6deg);
	opacity: 0.9;
}

.ecc-hero__photo {
	position: relative;
	display: flex;
	width: 100%;
	aspect-ratio: 4 / 5;
	border-radius: var(--ecc-radius-card);
	background-color: var(--ecc-card);
	border: 1px solid var(--ecc-border);
	align-items: center;
	justify-content: center;
	object-fit: cover;
	object-position: center top;
}

img.ecc-hero__photo::after {
	content: none;
}

div.ecc-hero__photo::after {
	content: 'CM';
	font-family: var(--ecc-font-display);
	font-size: 64px;
	color: var(--ecc-muted);
}

/* Catálogo / tarjeta de curso */

.ecc-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ecc-badge--upcoming {
	background-color: rgba(183, 240, 0, 0.15);
	color: var(--ecc-primary);
	border: 1px solid rgba(183, 240, 0, 0.4);
}

.ecc-course-card {
	background-color: var(--ecc-card);
	border: 1px solid var(--ecc-border);
	border-radius: var(--ecc-radius-card);
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
	transition: transform 200ms ease, border-color 200ms ease;
}

.ecc-course-card:hover {
	transform: translateY(-4px);
	border-color: var(--ecc-primary);
}

.ecc-course-card__media {
	position: relative;
	aspect-ratio: 4 / 5;
	background: linear-gradient(135deg, var(--ecc-surface), var(--ecc-bg));
	display: flex;
	align-items: center;
	justify-content: center;
}

.ecc-course-card__initial {
	font-family: var(--ecc-font-display);
	font-size: 56px;
	color: var(--ecc-border);
}

.ecc-course-card__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.ecc-course-card--upcoming .ecc-course-card__image {
	filter: grayscale(0.5);
	opacity: 0.55;
}

.ecc-course-card__media .ecc-badge {
	position: absolute;
	top: 16px;
	right: 16px;
}

.ecc-course-card__body {
	padding: 20px 20px 12px;
	flex: 1;
}

.ecc-course-card__title {
	font-size: 22px;
	margin-bottom: 8px;
}

.ecc-course-card__excerpt {
	color: var(--ecc-muted);
	font-size: 15px;
	margin-bottom: 16px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ecc-course-card__meta {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	padding: 0;
	margin: 0;
	font-size: 13px;
	color: var(--ecc-muted);
}

.ecc-course-card__meta li:not(:last-child)::after {
	content: '·';
	margin-left: 16px;
	color: var(--ecc-border);
}

.ecc-course-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px 20px;
	border-top: 1px solid var(--ecc-border);
}

.ecc-course-card__price {
	font-family: var(--ecc-font-display);
	font-weight: 700;
	font-size: 20px;
}

.ecc-course-card__actions {
	display: flex;
	gap: 8px;
}

.ecc-course-card__soon {
	color: var(--ecc-muted);
	font-size: 14px;
}

.ecc-course-card--upcoming {
	opacity: 0.85;
}

/* Ayuda para elegir */

.ecc-guide__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.ecc-guide__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	background-color: var(--ecc-card);
	border: 1px solid var(--ecc-border);
	border-radius: 12px;
	color: var(--ecc-text);
	text-decoration: none;
	transition: border-color 200ms ease, background-color 200ms ease;
}

.ecc-guide__link:hover,
.ecc-guide__link:focus-visible {
	border-color: var(--ecc-primary);
}

.ecc-guide__link--soon {
	opacity: 0.7;
}

.ecc-guide__arrow {
	color: var(--ecc-primary);
	font-size: 20px;
}

/* Cómo funciona */

/* La sección completa se centra: encabezado, los 4 pasos y el CTA leen
   como un bloque autocontenido, y cada ícono queda alineado con su
   número y texto en vez de quedar descuadrado a la izquierda. */
.ecc-how .ecc-section__head {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.ecc-how__steps {
	list-style: none;
	padding: 0;
	margin: 0 0 40px;
	justify-content: center;
}

.ecc-how__step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
}

.ecc-how__cta {
	text-align: center;
}

.ecc-how__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 14px;
	border: 1px dashed var(--ecc-border);
	background-color: var(--ecc-card);
	color: var(--ecc-muted);
	margin-bottom: 4px;
}

.ecc-how__icon img {
	max-width: 60%;
	max-height: 60%;
	width: auto;
	height: auto;
}

.ecc-how__number {
	font-family: var(--ecc-font-display);
	font-size: clamp(36px, 5vw, 56px);
	color: var(--ecc-primary);
	font-weight: 800;
}

.ecc-how__label {
	font-weight: 600;
}

/* Qué incluye */

.ecc-check-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ecc-check-item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 18px 20px;
	background-color: var(--ecc-card);
	border: 1px solid var(--ecc-border);
	border-radius: 12px;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.ecc-check-item:hover {
	border-color: var(--ecc-primary);
	transform: translateY(-2px);
}

.ecc-check-item__icon {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-color: rgba(183, 240, 0, 0.14);
	color: var(--ecc-primary);
}

.ecc-check-item__text {
	padding-top: 4px;
	color: var(--ecc-text);
	font-size: 1rem;
	line-height: 1.4;
}

/* Instructor */

.ecc-instructor__photo {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: var(--ecc-radius-card);
	background-color: var(--ecc-card);
	border: 1px solid var(--ecc-border);
	max-width: 320px;
	object-fit: cover;
	object-position: center top;
}

.ecc-instructor__bio {
	color: var(--ecc-muted);
	max-width: 640px;
	margin-bottom: 24px;
}

/* Testimonios */

.ecc-testimonial {
	background-color: var(--ecc-card);
	border: 1px solid var(--ecc-border);
	border-radius: 12px;
	padding: 24px;
	margin: 0;
}

/* FAQ */

.ecc-accordion__item {
	border-bottom: 1px solid var(--ecc-border);
}

.ecc-accordion__heading {
	margin: 0;
}

.ecc-accordion__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: none;
	border: none;
	color: var(--ecc-text);
	font-size: 18px;
	font-weight: 600;
	text-align: left;
	padding: 20px 4px;
	min-height: 44px;
	cursor: pointer;
}

.ecc-accordion__icon {
	position: relative;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.ecc-accordion__icon::before,
.ecc-accordion__icon::after {
	content: '';
	position: absolute;
	background-color: var(--ecc-primary);
}

.ecc-accordion__icon::before {
	top: 7px;
	left: 0;
	width: 16px;
	height: 2px;
}

.ecc-accordion__icon::after {
	top: 0;
	left: 7px;
	width: 2px;
	height: 16px;
	transition: transform 200ms ease;
}

.ecc-accordion__trigger[aria-expanded='true'] .ecc-accordion__icon::after {
	transform: scaleY(0);
}

.ecc-accordion__panel {
	padding: 0 4px 20px;
	color: var(--ecc-muted);
}

.ecc-faq__more {
	margin-top: 24px;
}

.ecc-faq__more a {
	color: var(--ecc-primary);
}

/* Soporte */

.ecc-support__box {
	background-color: var(--ecc-card);
	border: 1px solid var(--ecc-border);
	border-radius: var(--ecc-radius-card);
	padding: 40px;
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: center;
	justify-content: space-between;
}

.ecc-support__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

.ecc-support__faq-link {
	color: var(--ecc-muted);
	text-decoration: underline;
}

/* CTA final */

.ecc-final-cta {
	text-align: center;
}

.ecc-final-cta--has-bg {
	position: relative;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	padding-top: 96px;
	padding-bottom: 96px;
	isolation: isolate;
}

.ecc-final-cta--has-bg::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(8, 10, 9, 0.82), rgba(8, 10, 9, 0.9));
	z-index: -1;
}

.ecc-final-cta__title {
	font-size: clamp(32px, 4.5vw, 52px);
	margin-bottom: 16px;
}

.ecc-final-cta__text {
	color: var(--ecc-muted);
	max-width: 560px;
	margin: 0 auto 32px;
}

.ecc-final-cta--has-bg .ecc-final-cta__text {
	color: rgba(244, 245, 240, 0.85);
}

.ecc-final-cta__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
}

/* Footer */

.ecc-footer {
	background-color: var(--ecc-surface);
	border-top: 1px solid var(--ecc-border);
	color: var(--ecc-muted);
	padding: 56px 0 24px;
}

.ecc-footer__brand {
	font-family: var(--ecc-font-display);
	font-size: 22px;
	color: var(--ecc-text);
	margin-bottom: 8px;
}

.ecc-footer__heading {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ecc-text);
	margin-bottom: 12px;
}

.ecc-footer__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ecc-footer__list a {
	color: var(--ecc-muted);
	text-decoration: none;
}

.ecc-footer__list a:hover {
	color: var(--ecc-primary);
}

.ecc-footer__info {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--ecc-border);
	font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
	.ecc-home * {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* Los CTA principales son <a>; se fuerza el color también en :visited para
   que enlaces ya visitados (p. ej. WooCommerce) no hereden el morado por
   defecto del navegador. */
.ecc-btn--primary:visited {
	color: var(--ecc-dark-text) !important;
}

.ecc-btn--secondary:visited,
.ecc-btn--ghost:visited,
.ecc-guide__link:visited,
.ecc-header #primary-menu a:visited,
.ecc-footer__list a:visited,
.ecc-faq__more a:visited,
.ecc-support__faq-link:visited {
	color: inherit !important;
}

/* ==========================================================================
   Scroll reveal (Animate.css + IntersectionObserver, ver assets/js/scroll-reveal.js)
   Progressive enhancement: sin JS o con "reduce motion", el contenido es
   visible por defecto (no se añade la clase js-animate-ready).
   ========================================================================== */

.js-animate-ready [data-animate]:not(.animate__animated) {
	opacity: 0;
}

.js-animate-ready [data-animate].animate__animated {
	animation-duration: 0.7s;
}

@media (prefers-reduced-motion: reduce) {
	.js-animate-ready [data-animate]:not(.animate__animated) {
		opacity: 1;
	}
}
