/* ==========================================================================
   Best IPTV Service — "Tonight's Telly"
   British TV-listings layout on a clean white page. Calm, low-glare palette:
   soft charcoal text, light grey rules, one deep navy accent.
   Brand type: Lexend (designed to reduce visual stress when reading).
   ========================================================================== */

@font-face {
	font-family: "Lexend";
	src: url("../fonts/lexend-wght.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	/* Page surfaces: white, with very light cool greys for alternate bands. */
	--paper: #ffffff;
	--paper-2: #f6f7f9;
	--paper-3: #e9edf2;
	--card: #ffffff;

	/* Text: soft charcoal rather than pure black (less glare on white).
	   ink-3 stays >= 4.8:1 on white. */
	--ink: #1f2933;
	--ink-2: #46525f;
	--ink-3: #627080;
	--hair: #e2e6eb;
	--rule: #c7d0da;

	/* The one accent: deep British navy. */
	--accent: #1f4e79;
	--accent-dark: #173b5c;
	--accent-soft: #eaf1f8;

	/* The telly (its own dark scale so the product reads as a screen). */
	--screen: #161b22;
	--screen-2: #222a35;
	--screen-3: #2f3946;
	--screen-text: #eef2f6;
	--screen-muted: #9aa6b4;

	--wa: #25d366;

	--display: "Lexend", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--sans: "Lexend", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

	--text-sm: 0.9375rem;
	--text-base: clamp(1.0313rem, 1rem + 0.15vw, 1.125rem);
	--text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
	--h3: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
	--h2: clamp(1.9rem, 1.4rem + 2vw, 2.9rem);
	--h1: clamp(2.2rem, 1.5rem + 2.8vw, 3.6rem);

	--gutter: clamp(1rem, 0.6rem + 2vw, 2.25rem);
	--space-section: clamp(4rem, 2.8rem + 5vw, 7.5rem);
	--maxw: 1200px;
	--maxw-prose: 720px;

	--radius: 2px;
	--shadow-paper: 0 1px 2px rgba(16, 24, 40, 0.05), 0 16px 32px -20px rgba(16, 24, 40, 0.22);

	--dur: 220ms;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);

	--z-header: 30;
	--z-sticky: 40;
	--z-widget: 45;
	--z-menu: 50;
}

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

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 6rem;
}

body {
	margin: 0;
	min-height: 100vh;
	background-color: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: var(--text-base);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
	margin: 0;
}

ul[class],
ol[class],
nav ul {
	list-style: none;
	padding: 0;
}

a {
	color: inherit;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

::selection {
	background: var(--accent);
	color: var(--paper);
}

/* Typography -------------------------------------------------------------- */

h1,
h2 {
	font-family: var(--display);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

h3,
h4 {
	font-family: var(--sans);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

h1 em,
h2 em {
	font-style: normal;
	color: var(--accent);
}

p {
	text-wrap: pretty;
}

strong {
	font-weight: 600;
}

code {
	font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
	font-size: 0.88em;
	background: var(--paper-2);
	border: 1px solid var(--hair);
	padding: 0.05em 0.35em;
	border-radius: var(--radius);
	white-space: nowrap;
}

.kicker {
	margin-bottom: 0.9rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--accent);
}

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

.wrap {
	width: 100%;
	max-width: calc(var(--maxw) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.wrap--prose {
	max-width: calc(var(--maxw-prose) + var(--gutter) * 2);
}

.section {
	padding-block: var(--space-section) calc(var(--space-section) * 1.1);
}

.section--tight {
	padding-block: clamp(2.5rem, 2rem + 2vw, 4rem) var(--space-section);
}

.section--alt {
	background: var(--paper-2);
	border-block: 1px solid var(--hair);
}

.split {
	display: grid;
	gap: clamp(2rem, 1rem + 4vw, 5rem);
	align-items: start;
}

@media (min-width: 900px) {
	.split {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	}
	.split > :first-child {
		position: sticky;
		top: 8rem;
	}
}

.section__more {
	margin-top: 2.5rem;
}

.stack-sm {
	margin-top: 1.5rem;
}

/* Section head ------------------------------------------------------------ */

.section-head {
	max-width: 44rem;
	margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem);
}

.section-head__title {
	font-size: var(--h2);
}

h1.section-head__title {
	font-size: var(--h1);
}

.section-head__lead {
	margin-top: 1.1rem;
	font-size: var(--text-lg);
	color: var(--ink-2);
	max-width: 56ch;
}

/* Buttons and links ------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 50px;
	padding: 0 1.4rem;
	border: 1.5px solid transparent;
	border-radius: var(--radius);
	font-family: var(--sans);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn__icon {
	width: 1.1em;
	height: 1.1em;
	flex: none;
	transition: transform var(--dur) var(--ease);
}

.btn:hover .icon[class*="btn__icon"]:last-child {
	transform: translateX(3px);
}

.btn:active {
	transform: translateY(1px);
}

.btn--primary {
	background: var(--accent);
	color: var(--paper);
}

.btn--primary:hover {
	background: var(--accent-dark);
}

.btn--outline {
	border-color: var(--ink);
	color: var(--ink);
}

.btn--outline:hover {
	background: var(--ink);
	color: var(--paper);
}

.btn--paper {
	background: var(--paper);
	color: var(--ink);
}

.btn--paper:hover {
	background: var(--accent-soft);
}

.btn--text-light {
	padding-inline: 0.25rem;
	color: var(--paper);
	text-decoration: underline;
	text-underline-offset: 0.3em;
	text-decoration-thickness: 1px;
}

.btn--text-light:hover {
	text-decoration-thickness: 2px;
}

.btn--whatsapp {
	background: var(--wa);
	color: #062b14;
}

.btn--whatsapp:hover {
	background: #1fbd5a;
}

.btn--sm {
	min-height: 44px;
	padding: 0 1.05rem;
	font-size: var(--text-sm);
}

.link {
	color: var(--ink);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.28em;
	transition: color var(--dur) var(--ease);
}

.link:hover {
	color: var(--accent);
}

.icon {
	width: 1.35rem;
	height: 1.35rem;
	flex: none;
}

/* Utility ----------------------------------------------------------------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 101;
	background: var(--ink);
	color: var(--paper);
	padding: 0.75rem 1rem;
	font-weight: 700;
	text-decoration: none;
}

.skip-link:focus {
	top: 1rem;
}

.site-main:focus {
	outline: none;
}

.fineprint {
	margin-top: 1.5rem;
	font-size: var(--text-sm);
	color: var(--ink-3);
}

.note {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	margin-top: 1.25rem;
	padding: 0.85rem 1rem;
	background: var(--accent-soft);
	border-left: 3px solid var(--accent);
	color: var(--ink-2);
	font-size: var(--text-sm);
}

.note .icon {
	width: 1.15rem;
	height: 1.15rem;
	margin-top: 0.15rem;
	color: var(--accent);
}

.checklist {
	display: grid;
	gap: 0.8rem;
}

.checklist li {
	display: flex;
	gap: 0.7rem;
	align-items: flex-start;
	color: var(--ink-2);
}

.checklist .icon {
	width: 1.15rem;
	height: 1.15rem;
	margin-top: 0.25rem;
	color: var(--accent);
}

.checklist a {
	color: var(--ink);
	text-decoration-color: var(--accent);
}

.table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Prose (blog posts, legal pages) ----------------------------------------- */

.prose {
	font-size: var(--text-lg);
	line-height: 1.75;
	color: var(--ink-2);
	max-width: 66ch;
}

.prose > * + * {
	margin-top: 1.1em;
}

.prose h2 {
	margin-top: 2em;
	font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.5rem);
	color: var(--ink);
}

.prose h3 {
	margin-top: 1.7em;
	font-size: var(--text-lg);
	color: var(--ink);
}

.prose h2 + *,
.prose h3 + * {
	margin-top: 0.6em;
}

.prose a {
	color: var(--ink);
	text-decoration-color: var(--accent);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.25em;
}

.prose a:hover {
	color: var(--accent);
}

.prose ul,
.prose ol {
	padding-left: 1.3em;
}

.prose li + li {
	margin-top: 0.4em;
}

.prose ul li::marker {
	content: "–  ";
	color: var(--accent);
}

.prose ol li::marker {
	color: var(--accent);
	font-weight: 700;
}

.prose strong {
	color: var(--ink);
}

.prose em {
	color: var(--ink-3);
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--text-sm);
	display: block;
	overflow-x: auto;
	border-top: 1px solid var(--rule);
}

.prose th,
.prose td {
	padding: 0.65rem 0.8rem 0.65rem 0;
	text-align: left;
	border-bottom: 1px solid var(--hair);
	vertical-align: top;
}

.prose thead th {
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink);
	white-space: nowrap;
}

/* Reveal: a gentle rise as blocks enter. ---------------------------------- */

.reveal {
	opacity: 0;
	transform: translateY(14px);
}

.reveal.is-in {
	opacity: 1;
	transform: none;
	transition: opacity 600ms var(--ease), transform 600ms var(--ease);
	transition-delay: var(--delay, 0ms);
}

@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;
	}
	.reveal {
		opacity: 1;
		transform: none;
	}
}
