/* ==========================================================================
   IPTV El Mejor — design tokens + components
   Design system: "IPTV El Mejor — Confianza en Verde" (Novamira, activated)
   ========================================================================== */

:root {
	--color-bg: #FFFFFF;
	--color-ink: #151B22;
	--color-accent: #00C987;
	--color-on-accent: #0B1F16;
	--color-secondary: #151B22;
	--color-on-secondary: #FFFFFF;
	--color-muted: #F3F5F4;
	--color-muted-ink: #5B6670;
	--color-border: #E3E7E6;
	--color-success: #16A34A;
	--color-warning: #F59E0B;
	--color-destructive: #DC2626;
	--color-ring: #00C987;

	--font-heading: 'Poppins', sans-serif;
	--font-body: 'Open Sans', sans-serif;

	--radius-sm: 8px;
	--radius-md: 10px;
	--radius-lg: 16px;
	--radius-pill: 999px;

	--shadow-soft: 0 2px 8px rgba(21, 27, 34, .06);
	--shadow-elevated: 0 8px 24px rgba(21, 27, 34, .10);

	--space-xs: 8px;
	--space-sm: 16px;
	--space-md: 24px;
	--space-lg: 32px;
	--space-xl: 48px;
	--space-xxl: 64px;
	--space-section: 96px;

	--container-max: 1200px;
	--gutter: 24px;
	--measure: 70ch;
}

@media (max-width: 767px) {
	:root {
		--space-section: 40px;
		--gutter: 16px;
	}
}

/* ---- Reset ---------------------------------------------------------- */

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

:where(html) { -webkit-text-size-adjust: 100%; }

:where(body, h1, h2, h3, p, ul, ol, figure, blockquote) { margin: 0; }

:where(ul, ol) { padding: 0; list-style: none; }

:where(img, svg) { display: block; max-width: 100%; }

:where(a) { color: inherit; text-decoration: none; }

:where(button) {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---- Base ------------------------------------------------------------ */

body {
	background: var(--color-bg);
	color: var(--color-ink);
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.5;
	padding-top: 64px; /* reserve sticky nav height */
}

h1, h2, h3 {
	font-family: var(--font-heading);
	line-height: 1.3;
	color: var(--color-ink);
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 1.75rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

small, .iel-small { font-size: 0.875rem; }

a {
	transition: color 150ms ease-out;
}
a:hover { color: var(--color-accent); }

:focus-visible {
	outline: 2px solid var(--color-ring);
	outline-offset: 2px;
}

.iel-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.iel-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--color-ink);
	color: #fff;
	padding: 12px 20px;
	border-radius: 0 0 var(--radius-sm) 0;
}
.iel-skip-link:focus {
	left: 0;
}

/* ---- Layout ------------------------------------------------------------ */

.iel-container {
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.iel-container--narrow {
	max-width: 760px;
}

.iel-section {
	padding-block: var(--space-section);
}

.iel-section--muted { background: var(--color-muted); }

.iel-section--dark {
	background: var(--color-secondary);
	color: var(--color-on-secondary);
}
.iel-section--dark h1, .iel-section--dark h2, .iel-section--dark h3 { color: var(--color-on-secondary); }
.iel-section--dark a { color: var(--color-on-secondary); text-decoration: underline; }

.iel-section--prose p { max-width: var(--measure); }
.iel-section--prose .iel-prose p,
.iel-prose p { max-width: var(--measure); margin-bottom: var(--space-sm); }
.iel-prose h2 { margin-top: var(--space-xl); margin-bottom: var(--space-sm); }
.iel-prose h2:first-child { margin-top: 0; }

.iel-section__intro {
	max-width: 640px;
	color: var(--color-muted-ink);
	margin-top: var(--space-sm);
	margin-bottom: var(--space-xl);
}

.iel-section h2 { margin-bottom: var(--space-sm); }

.iel-page-hero {
	padding-block: var(--space-xxl) var(--space-xl);
	background: var(--color-muted);
}
.iel-page-hero h1 { margin-bottom: var(--space-sm); }

.iel-card-grid {
	display: grid;
	gap: var(--space-md);
	grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
	.iel-card-grid--4 { grid-template-columns: repeat(4, 1fr); }
	.iel-card-grid--3 { grid-template-columns: repeat(3, 1fr); }
	.iel-card-grid--6 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
	.iel-card-grid--6 { grid-template-columns: repeat(6, 1fr); }
}

/* ---- Buttons ----------------------------------------------------------- */

.iel-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 12px 24px;
	border-radius: var(--radius-md);
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 1rem;
	white-space: nowrap;
	transition: background-color 150ms ease-out, transform 150ms ease-out, border-color 150ms ease-out;
}
.iel-btn .iel-icon { width: 20px; height: 20px; }

.iel-btn--primary {
	background: var(--color-accent);
	color: var(--color-on-accent);
}
.iel-btn--primary:hover { background: color-mix(in srgb, var(--color-accent) 92%, black); color: var(--color-on-accent); }
.iel-btn--primary:active { transform: scale(0.98); }

.iel-btn--secondary {
	background: transparent;
	border: 1.5px solid var(--color-secondary);
	color: var(--color-ink);
}
.iel-btn--secondary:hover { background: var(--color-muted); color: var(--color-ink); }
.iel-section--dark .iel-btn--secondary { border-color: var(--color-on-secondary); color: var(--color-on-secondary); }

/* ---- Nav ---------------------------------------------------------------- */

.iel-nav {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 500;
	height: 64px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--color-border);
}

.iel-nav__inner {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
}

.iel-nav__logo {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--color-ink);
	flex-shrink: 0;
}
.iel-nav__logo span { color: var(--color-accent); }
.iel-nav__logo:hover { color: var(--color-ink); }

.iel-nav__toggle {
	display: none;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
}
.iel-nav__toggle-icon { width: 24px; height: 24px; }

.iel-nav__menu { flex: 1; }
.iel-nav__list {
	display: flex;
	justify-content: center;
	gap: var(--space-lg);
}
.iel-nav__list a {
	font-weight: 500;
	padding: 8px 0;
	border-bottom: 2px solid transparent;
}
.iel-nav__list a:hover,
.iel-nav__list a[aria-current] {
	color: var(--color-accent);
	border-bottom-color: var(--color-accent);
	font-weight: 600;
}

.iel-nav__cta { flex-shrink: 0; padding: 10px 20px; min-height: 40px; }

@media (max-width: 1023px) {
	.iel-nav__toggle { display: flex; }
	.iel-nav__menu {
		position: fixed;
		top: 64px; left: 0; right: 0;
		background: var(--color-bg);
		border-bottom: 1px solid var(--color-border);
		padding: var(--space-md) var(--gutter);
		display: none;
	}
	.iel-nav__menu.is-open { display: block; }
	.iel-nav__list { flex-direction: column; gap: var(--space-sm); }
}

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

.iel-hero { padding-block: var(--space-xxl); }

.iel-hero__grid {
	display: grid;
	gap: var(--space-xl);
	align-items: center;
}
@media (min-width: 1024px) {
	.iel-hero__grid { grid-template-columns: 3fr 2fr; }
}

.iel-hero__subtext {
	font-size: 1.125rem;
	color: var(--color-muted-ink);
	margin-top: var(--space-sm);
	max-width: 50ch;
}

.iel-hero__bullets {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-md);
	margin-top: var(--space-lg);
}
.iel-hero__bullets li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	opacity: 0;
	transform: translateY(8px);
	animation: iel-fade-in 250ms ease-out forwards;
	animation-delay: var(--d, 0ms);
}
.iel-hero__bullets .iel-icon { width: 20px; height: 20px; color: var(--color-accent); }

@keyframes iel-fade-in {
	to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
	.iel-hero__bullets li { opacity: 1; transform: none; animation: none; }
}

.iel-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	margin-top: var(--space-lg);
}

.iel-hero__price-teaser {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: var(--space-md);
	padding: 8px 16px;
	background: var(--color-muted);
	border-radius: var(--radius-pill);
	font-size: 0.875rem;
}
.iel-hero__price-teaser .iel-icon { width: 16px; height: 16px; color: var(--color-accent); }

.iel-hero__media { display: flex; justify-content: center; }
.iel-hero__mock-placeholder {
	position: relative;
	width: 100%;
	max-width: 420px;
	aspect-ratio: 1 / 1;
}
.iel-hero__mock-tv {
	background: var(--color-ink);
	border-radius: var(--radius-lg);
	padding: var(--space-md);
	height: 80%;
}
.iel-hero__mock-bar { height: 10px; width: 40%; background: var(--color-accent); border-radius: var(--radius-pill); margin-bottom: var(--space-md); }
.iel-hero__mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: calc(100% - 26px); }
.iel-hero__mock-grid span { background: rgba(255,255,255,0.08); border-radius: var(--radius-sm); }
.iel-hero__mock-phone {
	position: absolute;
	bottom: -10%;
	right: -5%;
	width: 35%;
	aspect-ratio: 9 / 16;
	background: var(--color-bg);
	border: 3px solid var(--color-ink);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-elevated);
	display: flex;
	align-items: center;
	justify-content: center;
}
.iel-hero__mock-phone-icon { width: 40%; height: 40%; color: var(--color-accent); }
.iel-hero__mock-image { border-radius: var(--radius-lg); box-shadow: var(--shadow-elevated); width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }

/* ---- Trust bar -------------------------------------------------------------- */

.iel-trustbar { background: var(--color-muted); padding-block: var(--space-lg); }
.iel-trustbar__list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-lg);
}
@media (min-width: 768px) {
	.iel-trustbar__list { grid-template-columns: repeat(4, 1fr); }
}
.iel-trustbar__list li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 0.875rem;
}
.iel-trustbar__list .iel-icon { width: 28px; height: 28px; color: var(--color-accent); flex-shrink: 0; }
.iel-trustbar__item--soon { opacity: 0.6; }
.iel-trustbar__item--soon .iel-icon { color: var(--color-muted-ink); }

/* ---- Category / device cards ------------------------------------------------ */

.iel-category-card, .iel-device-card {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: var(--space-lg);
	text-align: center;
	transition: transform 150ms ease-out, border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.iel-category-card .iel-icon, .iel-device-card .iel-icon {
	width: 32px; height: 32px;
	color: var(--color-accent);
	margin-inline: auto;
	margin-bottom: var(--space-sm);
}
.iel-category-card span, .iel-device-card span {
	display: block;
	font-weight: 600;
	font-family: var(--font-heading);
}
.iel-category-card p { color: var(--color-muted-ink); font-size: 0.875rem; margin-top: 4px; }

.iel-device-card { display: block; }
.iel-category-card:hover, .iel-device-card:hover {
	transform: translateY(-4px);
	border-color: var(--color-accent);
	box-shadow: var(--shadow-soft);
}

/* ---- Pricing ------------------------------------------------------------------ */

.iel-pricing-grid {
	display: grid;
	gap: var(--space-md);
	grid-template-columns: 1fr;
}
@media (min-width: 640px) {
	.iel-pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
	.iel-pricing-grid { grid-template-columns: repeat(4, 1fr); }
}

.iel-pricing-card {
	position: relative;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(12px);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
	padding: var(--space-lg);
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}
.iel-pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-elevated); }

.iel-pricing-card--popular { border: 2px solid var(--color-accent); }
.iel-pricing-card__badge {
	position: absolute;
	top: -12px; left: var(--space-lg);
	background: var(--color-accent);
	color: var(--color-on-accent);
	font-size: 0.75rem;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: var(--radius-pill);
}

.iel-pricing-card__price { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; }
.iel-pricing-card__price span { font-size: 1rem; font-weight: 400; color: var(--color-muted-ink); }
.iel-pricing-card__tagline { color: var(--color-muted-ink); font-size: 0.875rem; }

.iel-pricing-card__features { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.iel-pricing-card__features li { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; }
.iel-pricing-card__features .iel-icon { width: 18px; height: 18px; color: var(--color-accent); flex-shrink: 0; }

.iel-pricing-card__cta { width: 100%; }

.iel-trial-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	margin-top: var(--space-xl);
	padding: var(--space-md) var(--space-lg);
	background: var(--color-bg);
	border: 1px dashed var(--color-border);
	border-radius: var(--radius-lg);
}
.iel-trial-banner p { display: flex; align-items: center; gap: 8px; }
.iel-trial-banner .iel-icon { width: 20px; height: 20px; color: var(--color-accent); }

.iel-payment-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-lg);
	align-items: center;
	margin-top: var(--space-lg);
	color: var(--color-muted-ink);
	font-size: 0.875rem;
}
.iel-payment-row span { display: inline-flex; align-items: center; gap: 6px; }
.iel-payment-row .iel-icon { width: 18px; height: 18px; }
.iel-payment-row__note { margin-left: auto; }

/* ---- Features ------------------------------------------------------------------ */

.iel-feature-card {
	background: var(--color-bg);
	border-radius: var(--radius-lg);
	padding: var(--space-lg);
}
.iel-feature-card .iel-icon { width: 32px; height: 32px; color: var(--color-accent); margin-bottom: var(--space-sm); }
.iel-feature-card h3 { margin-bottom: 8px; }
.iel-feature-card p { color: var(--color-muted-ink); }

.iel-reveal { opacity: 1; transform: none; }
html.has-js .iel-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 300ms ease-out, transform 300ms ease-out;
	transition-delay: var(--d, 0ms);
}
html.has-js .iel-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.iel-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---- Guarantee -------------------------------------------------------------------- */

.iel-guarantee { text-align: center; }
.iel-guarantee__icon { width: 48px; height: 48px; color: var(--color-accent); margin-inline: auto; margin-bottom: var(--space-md); }
.iel-guarantee h2 { margin-bottom: var(--space-sm); }
.iel-guarantee p { margin-bottom: var(--space-sm); }

/* ---- Testimonials ------------------------------------------------------------------- */

.iel-testimonial-placeholder {
	text-align: center;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(12px);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-soft);
	padding: var(--space-xl);
}
.iel-testimonial-placeholder__icon { width: 32px; height: 32px; color: var(--color-accent); margin-inline: auto; margin-bottom: var(--space-sm); }
.iel-testimonial-placeholder__sub { color: var(--color-muted-ink); font-size: 0.9375rem; margin-block: var(--space-sm) var(--space-md); }

/* ---- Comparison table ---------------------------------------------------------------- */

.iel-compare-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--color-bg);
	border-radius: var(--radius-lg);
	overflow: hidden;
}
.iel-compare-table th, .iel-compare-table td {
	padding: var(--space-sm) var(--space-md);
	text-align: left;
	border-bottom: 1px solid var(--color-border);
}
.iel-compare-table thead th { background: var(--color-ink); color: #fff; font-family: var(--font-heading); }
.iel-compare-table tbody th { font-weight: 600; background: var(--color-muted); }
.iel-compare-table__cell { display: flex; align-items: center; gap: 8px; }
.iel-compare-table .iel-icon { width: 18px; height: 18px; flex-shrink: 0; }
.iel-compare-table td:nth-of-type(1) .iel-icon { color: var(--color-accent); }
.iel-compare-table td:nth-of-type(2) .iel-icon { color: var(--color-muted-ink); }
.iel-compare-table tbody tr:hover { background: var(--color-muted); }

@media (max-width: 767px) {
	.iel-compare-table thead { display: none; }
	.iel-compare-table, .iel-compare-table tbody, .iel-compare-table tr, .iel-compare-table th, .iel-compare-table td {
		display: block;
		width: 100%;
	}
	.iel-compare-table tr { margin-bottom: var(--space-md); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
	.iel-compare-table tbody th { border-bottom: 1px solid var(--color-border); }
}

/* ---- FAQ accordion ---------------------------------------------------------------------- */

.iel-faq { margin-top: var(--space-xl); border-top: 1px solid var(--color-border); }
.iel-faq__item { border-bottom: 1px solid var(--color-border); }
.iel-faq__item h3 { font-size: 1rem; }
.iel-faq__question {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
	padding: var(--space-md) 0;
	text-align: left;
	font-family: var(--font-heading);
	font-weight: 600;
	transition: color 150ms ease-out;
}
.iel-faq__question:hover { background: var(--color-muted); color: var(--color-ink); }
.iel-faq__chevron { width: 20px; height: 20px; flex-shrink: 0; transition: transform 200ms ease-in-out; color: var(--color-accent); }
.iel-faq__question[aria-expanded="true"] .iel-faq__chevron { transform: rotate(180deg); }
.iel-faq__panel { padding-bottom: var(--space-md); max-width: var(--measure); }

/* ---- CTA band ---------------------------------------------------------------------------- */

.iel-cta-band {
	background: color-mix(in srgb, var(--color-accent) 12%, white);
	padding-block: var(--space-xxl);
	text-align: center;
}
.iel-cta-band h2 { margin-bottom: var(--space-lg); }
.iel-cta-band__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-sm); }
.iel-cta-band__reassurance {
	margin-top: var(--space-md);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: var(--color-muted-ink);
	font-size: 0.9375rem;
}
.iel-cta-band__reassurance .iel-icon { width: 18px; height: 18px; color: var(--color-accent); }

/* ---- Footer -------------------------------------------------------------------------------- */

.iel-footer {
	background: var(--color-secondary);
	color: var(--color-on-secondary);
	padding-block: var(--space-xxl) var(--space-lg);
}
.iel-footer__grid {
	display: grid;
	gap: var(--space-xl);
	grid-template-columns: 1fr;
}
@media (min-width: 768px) {
	.iel-footer__grid { grid-template-columns: repeat(4, 1fr); }
}
.iel-footer h2 { color: var(--color-on-secondary); font-size: 1rem; margin-bottom: var(--space-sm); }
.iel-footer p { margin-bottom: 8px; }
.iel-footer a { opacity: 0.9; }
.iel-footer a:hover { opacity: 1; text-decoration: underline; color: var(--color-accent); }
.iel-footer__brand { font-family: var(--font-heading); font-weight: 700; font-size: 1.125rem; }
.iel-footer__brand span { color: var(--color-accent); }
.iel-footer ul li { margin-bottom: 8px; }
.iel-footer__icon { width: 16px; height: 16px; display: inline; vertical-align: middle; margin-right: 4px; }
.iel-footer__payments li { display: flex; align-items: center; gap: 6px; }
.iel-footer__hours { font-size: 0.875rem; opacity: 0.75; }

.iel-footer__bottom {
	margin-top: var(--space-xl);
	padding-top: var(--space-md);
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.8125rem;
	opacity: 0.7;
}

/* ---- WhatsApp sticky CTA ----------------------------------------------------------------------- */

.iel-whatsapp-fab {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 400;
	width: 56px;
	height: 56px;
	border-radius: var(--radius-pill);
	background: var(--color-accent);
	color: var(--color-on-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-elevated);
	transition: transform 150ms ease-out;
	animation: iel-pulse 1.6s ease-in-out 2;
}
.iel-whatsapp-fab .iel-icon { width: 28px; height: 28px; }
.iel-whatsapp-fab:hover { transform: scale(1.05); color: var(--color-on-accent); }

@keyframes iel-pulse {
	0%, 100% { box-shadow: var(--shadow-elevated), 0 0 0 0 rgba(0, 201, 135, 0.4); }
	50% { box-shadow: var(--shadow-elevated), 0 0 0 10px rgba(0, 201, 135, 0); }
}
@media (prefers-reduced-motion: reduce) {
	.iel-whatsapp-fab { animation: none; }
}

/* ---- Icon base ------------------------------------------------------------------------------------- */

.iel-icon { width: 24px; height: 24px; flex-shrink: 0; }
