/*
 * Hala Player — the public site.
 *
 * Its own stylesheet, separate from site.css, and deliberately so. site.css
 * dresses the activation flow: a light, high-contrast payment screen someone
 * opens on a phone while standing in front of a television they want fixed.
 * This dresses the shop window. Different job, different palette, same brand.
 *
 * The rules that file set still hold and are kept here: hand-written, one file,
 * no build step, no CDN, no webfont. The host is shared cPanel with a finite
 * inode budget, the deploy is FTPS, and node_modules is not a reasonable price
 * for a marketing site. A webfont would also be the single slowest thing on the
 * page for the audience that matters — a phone on mobile data in Cairo.
 *
 * Dark, because the application is dark. Someone arriving here from the TV
 * screen should recognise where they landed before they read a word.
 */

:root {
	color-scheme: dark;

	/* The television app's own ground and accent. */
	--bg: #080b10;
	--bg-2: #0b0f14;
	--surface: #11161d;
	--surface-2: #161d26;
	--line: #1e2731;
	--line-bright: #2a3644;

	--text: #f2f6fb;
	--muted: #9aabbd;
	--faint: #8798aa;

	/* The app's teal, at the brightness it actually renders on a TV. */
	--accent: #2ee6c5;
	--accent-deep: #0f766e;
	--accent-ink: #04211c;
	--accent-soft: rgba(46, 230, 197, 0.12);
	--accent-line: rgba(46, 230, 197, 0.3);

	/* The three card gradients from the app's home screen, reused so the site
	 * and the product are visibly the same object. */
	--grad-live: linear-gradient(135deg, #18c7b6 0%, #2b7cd3 100%);
	--grad-movies: linear-gradient(135deg, #e0457b 0%, #f0913c 100%);
	--grad-series: linear-gradient(135deg, #8b4bd8 0%, #3f7fe0 100%);

	--radius: 18px;
	--radius-sm: 12px;
	--shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
	--maxw: 1120px;

	/*
	 * No webfont, so the stack has to do the work. The Arabic families are
	 * listed ahead of the Latin ones because a phone that has Arabic system
	 * fonts should use them rather than fall through to a Latin face that
	 * renders Arabic badly.
	 */
	--font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--font-ar: "SF Arabic", "Segoe UI", system-ui, "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

[dir="rtl"] body { font-family: var(--font-ar); }

/* A code or a URL stays Latin and stays left-to-right inside an Arabic page,
 * or the bidi algorithm reorders something the reader is about to type. */
.ltr { direction: ltr; unicode-bidi: embed; font-family: var(--font); }

a { color: inherit; }

img { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

/* Focus has to be visible: a good part of this audience arrives by keyboard on
 * a television browser, and an invisible focus ring is an unusable page. */
:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 3px;
	border-radius: 6px;
}

/* ── Masthead ────────────────────────────────────────────────────────────── */

.top {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(8, 11, 16, 0.82);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}

.top-in {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 70px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	font-weight: 700;
	font-size: 19px;
	text-decoration: none;
	letter-spacing: -0.01em;
	margin-inline-end: auto;
}

.brand .mark {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	background: var(--grad-live);
	color: #04211c;
	font-weight: 800;
	font-size: 17px;
	flex: none;
}

.nav { display: flex; align-items: center; gap: 4px; }

.nav a {
	padding: 9px 13px;
	border-radius: 9px;
	text-decoration: none;
	color: var(--muted);
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	transition: color 0.15s, background 0.15s;
}

.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--accent); }

/* Keep every destination visible on a phone. A sideways strip hid Support
 * just when a viewer needed help; wrapping keeps it discoverable in RTL too. */
@media (max-width: 860px) {
	.nav {
		order: 3;
		width: 100%;
		flex-wrap: wrap;
		padding-bottom: 8px;
	}
	.top-in { flex-wrap: wrap; padding-top: 12px; }
	.brand { margin-inline-end: auto; }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 14px 24px;
	border-radius: 12px;
	border: 1px solid transparent;
	font: inherit;
	font-weight: 700;
	font-size: 16px;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.12s, background 0.15s, border-color 0.15s;
}

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

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #4af0d3; }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-bright); }
.btn-ghost:hover { background: var(--surface); border-color: var(--accent-line); }

.btn-sm { padding: 10px 17px; font-size: 15px; border-radius: 10px; }

/* Keep the language switch and activation action beside the brand on a phone;
 * wrapping just the English action created a mostly empty extra header row. */
@media (max-width: 440px) {
	.top-in { gap: 8px; }
	.top-in .brand { font-size: 16px; gap: 7px; }
	.top-in > .btn-sm { padding-inline: 11px; font-size: 14px; }
}

.btn[aria-disabled="true"] {
	opacity: 0.45;
	pointer-events: none;
}

/* ── Sections ────────────────────────────────────────────────────────────── */

section { padding-block: clamp(56px, 8vw, 104px); }

.eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--accent);
	background: var(--accent-soft);
	border: 1px solid var(--accent-line);
	padding: 6px 13px;
	border-radius: 999px;
	margin-bottom: 22px;
}

[dir="rtl"] .eyebrow { letter-spacing: normal; text-transform: none; }

.h-sec { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.lead { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 62ch; }

.section-head { margin-bottom: clamp(34px, 5vw, 54px); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
	position: relative;
	padding-block: clamp(64px, 10vw, 128px) clamp(56px, 8vw, 104px);
	overflow: hidden;
}

/* One big soft light behind the headline. Painted with a radial gradient rather
 * than an image so it costs nothing and scales to any screen. */
.hero::before {
	content: "";
	position: absolute;
	inset-inline-start: 50%;
	top: -280px;
	width: 900px;
	height: 900px;
	transform: translateX(-50%);
	background: radial-gradient(circle, rgba(46, 230, 197, 0.16) 0%, rgba(46, 230, 197, 0) 62%);
	pointer-events: none;
}

.hero-in { position: relative; max-width: 780px; }

.hero h1 {
	font-size: clamp(36px, 6.4vw, 62px);
	letter-spacing: -0.035em;
	margin-bottom: 22px;
}

.hero .lead { font-size: clamp(17px, 2.2vw, 21px); margin-bottom: 34px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; }

.hero-note {
	margin-top: 20px;
	color: var(--faint);
	font-size: 15px;
}

/* ── The three app cards, rebuilt in CSS ─────────────────────────────────── */

/*
 * A picture of the app would be better, and a picture of the app is also a
 * screenshot of somebody's actual subscription — channel names, film posters,
 * an account that belongs to a real person. These stand in for it: the same
 * three gradients and the same shape as the home screen, carrying no data.
 */
.showcase {
	display: grid;
	grid-template-columns: 1.35fr 1fr 1fr;
	gap: 16px;
	margin-top: clamp(46px, 7vw, 76px);
}

.scard {
	border-radius: var(--radius);
	padding: 22px;
	min-height: 190px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	color: #fff;
	box-shadow: var(--shadow);
	position: relative;
	overflow: hidden;
}

.scard::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.34), transparent 58%);
	pointer-events: none;
}

.scard > * { position: relative; z-index: 1; }
.scard-live { background: var(--grad-live); }
.scard-movies { background: var(--grad-movies); }
.scard-series { background: var(--grad-series); }
.scard .t { font-size: clamp(19px, 2.4vw, 25px); font-weight: 700; }
.scard .n { opacity: 0.92; font-size: 15px; margin-top: 3px; }
.scard .glyph { position: absolute; top: 20px; inset-inline-start: 20px; opacity: 0.95; z-index: 1; }

@media (max-width: 760px) {
	.showcase { grid-template-columns: 1fr 1fr; }
	.scard-live { grid-column: 1 / -1; }
}

/* ── Cards / grids ───────────────────────────────────────────────────────── */

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 26px;
	transition: border-color 0.18s, transform 0.18s, background 0.18s;
}

.card:hover { border-color: var(--line-bright); background: var(--surface-2); }

.card h3 { font-size: 19px; margin-bottom: 9px; }
.card p { color: var(--muted); font-size: 15.5px; }

.card .ico {
	width: 42px;
	height: 42px;
	border-radius: 11px;
	display: grid;
	place-items: center;
	background: var(--accent-soft);
	border: 1px solid var(--accent-line);
	color: var(--accent);
	margin-bottom: 17px;
}

/* Numbered steps. The number is the ornament, so it is large and quiet. */
.step { position: relative; }
.step .num {
	font-size: 46px;
	font-weight: 800;
	line-height: 1;
	color: var(--accent);
	opacity: 0.28;
	margin-bottom: 10px;
	letter-spacing: -0.04em;
}

/* ── Statement band ──────────────────────────────────────────────────────── */

.band {
	background: var(--bg-2);
	border-block: 1px solid var(--line);
}

/* A child of .wrap, never the same element: .wrap carries margin-inline:auto,
 * and putting a narrower max-width on it centred the band against the page
 * instead of starting it where every other section starts. */
.band-in { max-width: 760px; }
.band h2 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 16px; }
.band p { color: var(--muted); font-size: clamp(16px, 2vw, 18.5px); }
.band em { color: var(--text); font-style: normal; font-weight: 600; }

/* ── Pricing ─────────────────────────────────────────────────────────────── */

.plans {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 18px;
	max-width: 780px;
	margin-inline: auto;
}

.plan {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 30px 28px;
	display: flex;
	flex-direction: column;
	position: relative;
}

/* The featured plan is lifted by a border and a glow, not by being bigger:
 * a taller card breaks the row's alignment and makes the other look broken. */
.plan-featured {
	border-color: var(--accent-line);
	background: linear-gradient(180deg, rgba(46, 230, 197, 0.07), transparent 42%), var(--surface);
	box-shadow: 0 0 0 1px var(--accent-line), var(--shadow);
}

.plan .tag {
	position: absolute;
	top: -11px;
	inset-inline-start: 28px;
	background: var(--accent);
	color: var(--accent-ink);
	font-size: 12.5px;
	font-weight: 800;
	padding: 4px 12px;
	border-radius: 999px;
	letter-spacing: 0.01em;
}

.plan .pname { font-size: 17px; font-weight: 700; color: var(--muted); }

.plan .price {
	font-size: clamp(42px, 6vw, 54px);
	font-weight: 800;
	letter-spacing: -0.04em;
	margin-block: 10px 2px;
	line-height: 1;
}

.plan .per { color: var(--faint); font-size: 15px; }
.plan .term { color: var(--accent); font-size: 15px; font-weight: 600; margin-top: 8px; }
.plan .btn { margin-top: 26px; width: 100%; }

.includes { margin-top: clamp(40px, 6vw, 64px); max-width: 780px; margin-inline: auto; }
.includes h3 { font-size: 17px; color: var(--muted); margin-bottom: 18px; font-weight: 600; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }

.ticks .tick {
	flex: none;
	width: 21px;
	height: 21px;
	border-radius: 50%;
	background: var(--accent-soft);
	border: 1px solid var(--accent-line);
	color: var(--accent);
	display: grid;
	place-items: center;
	margin-top: 2px;
}

/* Two notes that have to be read, so they are set apart rather than buried. */
.notes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); margin-top: clamp(40px, 6vw, 64px); }
.note-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 24px; }
.note-card h3 { font-size: 17px; margin-bottom: 9px; }
.note-card p { color: var(--muted); font-size: 15.5px; }

/* ── Disclosure list (FAQ / troubleshooting) ─────────────────────────────── */

.qa { max-width: 820px; display: grid; gap: 10px; }

.qa details {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	overflow: hidden;
	transition: border-color 0.18s;
}

.qa details[open] { border-color: var(--line-bright); background: var(--surface-2); }

.qa summary {
	cursor: pointer;
	padding: 19px 22px;
	font-weight: 650;
	font-size: 17px;
	display: flex;
	align-items: center;
	gap: 14px;
	list-style: none;
}

.qa summary::-webkit-details-marker { display: none; }

.qa summary::after {
	content: "";
	margin-inline-start: auto;
	width: 9px;
	height: 9px;
	border-inline-end: 2px solid var(--faint);
	border-block-end: 2px solid var(--faint);
	transform: rotate(45deg);
	flex: none;
	transition: transform 0.18s;
}

.qa details[open] summary::after { transform: rotate(-135deg); }

.qa .a { padding: 0 22px 22px; color: var(--muted); font-size: 16px; }
.qa .a code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 14px; }
.qa .a strong { color: var(--text); }

/* ── Download ────────────────────────────────────────────────────────────── */

.dl { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.dl-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 26px;
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.dl-card .plat { font-size: 19px; font-weight: 700; }
.dl-card .sub { color: var(--faint); font-size: 14.5px; }
.dl-card .btn { margin-top: 16px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--line); background: var(--bg-2); padding-block: 54px 34px; }
.foot-grid { display: grid; gap: 34px; grid-template-columns: 1.6fr repeat(3, 1fr); }

@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

.foot h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin: 0 0 13px; font-weight: 700; }
[dir="rtl"] .foot h4 { text-transform: none; letter-spacing: normal; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot a { color: var(--muted); text-decoration: none; font-size: 15px; }
.foot a:hover { color: var(--text); }

.foot-note {
	margin-top: 38px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
	color: var(--faint);
	font-size: 14px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 26px;
	justify-content: space-between;
}

/* The disclaimer is the most legally load-bearing sentence on the site, so it
 * is not hidden in a corner at 11px. */
.foot-disclaimer { max-width: 62ch; }

/* ── Portal ──────────────────────────────────────────────────────────────── */

/*
 * The signed-in screens. Same palette as the rest of the site — someone who
 * arrives here from the television and then from the pricing page should not
 * feel handed off to a different product.
 */

.alert {
	border-radius: var(--radius-sm);
	padding: 14px 18px;
	margin-bottom: 20px;
	font-size: 15.5px;
	border: 1px solid;
}

.alert-ok { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
.alert-error { background: rgba(255, 120, 120, 0.1); border-color: rgba(255, 120, 120, 0.32); color: #ffd9d9; }

.field { display: block; margin-bottom: 18px; }
.flabel { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 7px; letter-spacing: 0.02em; }
[dir="rtl"] .flabel { letter-spacing: normal; }
.fhelp { display: block; color: var(--faint); font-size: 13.5px; margin-top: 6px; }

.input {
	width: 100%;
	background: var(--bg);
	border: 1px solid var(--line-bright);
	border-radius: 10px;
	color: var(--text);
	font: inherit;
	font-size: 16px; /* 16px exactly: anything smaller makes iOS zoom on focus. */
	padding: 12px 14px;
	transition: border-color 0.15s;
}

.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

select.input { appearance: none; cursor: pointer; }

.portal-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 26px;
	flex-wrap: wrap;
}

.licence-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.licence-state { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

.pill {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	border: 1px solid;
}

.pill-active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.pill-trial { background: rgba(240, 180, 60, 0.12); border-color: rgba(240, 180, 60, 0.34); color: #f0b43c; }
.pill-expired,
.pill-banned { background: rgba(255, 120, 120, 0.1); border-color: rgba(255, 120, 120, 0.32); color: #ff9b9b; }

.pl-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.pl-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pl-name { font-size: 17px; font-weight: 700; }
.pl-meta { color: var(--faint); font-size: 14px; word-break: break-word; }
.pl-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }

.btn-danger { color: #ff9b9b; border-color: rgba(255, 120, 120, 0.3); }
.btn-danger:hover { background: rgba(255, 120, 120, 0.1); border-color: rgba(255, 120, 120, 0.5); }

/* The edit form lives inside a <details>, so a row expands in place rather than
 * navigating away — on a phone, losing your place in a list to edit one item is
 * the difference between fixing it now and giving up. */
.pl-edit summary { list-style: none; }
.pl-edit summary::-webkit-details-marker { display: none; }
.pl-form { width: 100%; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
/* The open form takes the full width, which with the card's flex-wrap is
 * already enough to put it on its own line under the name and the buttons.
 *
 * There used to be a `.pl-card:has(.pl-edit[open]) { flex-direction: column }`
 * here as well. Rendering the card with and without it produced pixel-identical
 * output — the wrap was doing all the work — so it was only a Chrome 105
 * requirement bought for nothing. */
.pl-edit[open] { width: 100%; }

.add-card { margin-top: 8px; }
.add-summary { cursor: pointer; font-weight: 700; font-size: 17px; color: var(--accent); list-style: none; }
.add-summary::-webkit-details-marker { display: none; }
