/* IPTV Live TV — design system
   World: "broadcast ink". Warm near-black, off-white paper text, one amber signal
   colour. Archivo for voice, IBM Plex Mono for data (channel counts, versions,
   step numbers). Everything ships self-hosted, no external requests. */

@font-face {
	font-family: 'Archivo';
	src: url('/assets/fonts/archivo-400700.woff2') format('woff2-variations');
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'IBM Plex Mono';
	src: url('/assets/fonts/ibmplexmono-400.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'IBM Plex Mono';
	src: url('/assets/fonts/ibmplexmono-500.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

:root {
	/* ink scale */
	--ink-900: #0c0b09;
	--ink-800: #131110;
	--ink-700: #1a1714;
	--ink-600: #221e19;
	--line: #2e2821;
	--line-soft: #221e19;

	/* paper */
	--text: #f5efe4;
	--text-dim: #c6b9a7;
	--text-faint: #9a8e7e;

	/* one signal colour */
	--signal: #f0a93c;
	--signal-dim: #bd8320;
	--signal-wash: #1d1508;
	--signal-ink: #1a1103;
	--good: #86d6a2;

	/* spacing — 4 unit base */
	--s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px;
	--s6: 28px; --s7: 40px; --s8: 56px; --s9: 72px; --s10: 96px;

	/* type */
	--font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;

	/* structure */
	--gutter: clamp(18px, 5vw, 40px);
	--measure: 66ch;
	--radius: 10px;
	--radius-lg: 14px;

	/* the one authored shadow: an offset drop, no hairline ring */
	--lift: 0 1px 0 rgba(245, 239, 228, 0.04) inset, 0 14px 28px -20px rgba(0, 0, 0, 0.9);
	--frame: 0 16px 32px -24px rgba(0, 0, 0, 0.92);
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--ink-900);
	color: var(--text);
	font: 400 17px/1.65 var(--font);
	letter-spacing: -0.005em;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* --- browser surfaces the design has to own --- */
::selection { background: var(--signal); color: var(--signal-ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 3px; }
input, textarea { caret-color: var(--signal); }
a { color: var(--signal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #ffc469; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--ink-900); }
::-webkit-scrollbar-thumb { background: #332c23; border: 3px solid var(--ink-900); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #463d31; }
::placeholder { color: var(--text-faint); opacity: 1; }

/* --- typography --- */
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.4vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.05rem); letter-spacing: -0.025em; }
h3 { font-size: 1.1875rem; letter-spacing: -0.015em; line-height: 1.3; }
p { margin: 0; }

/* mono data label — used for facts, never as decoration over a heading */
.label {
	font: 500 0.6875rem/1.2 var(--mono);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-faint);
}

/* --- layout --- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter) var(--s9); }
.wrap.narrow { max-width: 560px; padding-top: var(--s5); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.section { padding-block: var(--s8); }
.section + .section { padding-top: 0; }

/* --- nav --- */
.nav {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
	max-width: 1120px; margin: 0 auto; padding: var(--s4) var(--gutter);
	background: color-mix(in srgb, var(--ink-900) 82%, transparent);
	backdrop-filter: blur(12px) saturate(140%);
	border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 9px; font: 700 1.0625rem/1 var(--font); letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand svg { display: block; color: var(--signal); }
.brand span { color: var(--text-dim); font-weight: 500; }
.nav nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 22px); font-size: 0.9375rem; }
.nav nav a { color: var(--text-dim); text-decoration: none; }
.nav nav a:hover { color: var(--text); }
/* the nav CTA is a .btn: its amber background owns its own text colour */
.nav nav a.btn, .nav nav a.btn:hover, .nav nav a.btn.ghost, .nav nav a.btn.ghost:hover { color: var(--signal-ink); text-decoration: none; }
@media (max-width: 520px) {
	.nav { padding-block: var(--s3); }
	.nav nav { gap: 12px; font-size: 0.875rem; }
}

/* --- buttons --- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 13px 20px; border: 1px solid transparent; border-radius: var(--radius);
	background: var(--signal); color: var(--signal-ink);
	font: 600 0.9375rem/1 inherit; letter-spacing: -0.01em; text-decoration: none;
	cursor: pointer; transition: background 140ms ease, transform 140ms ease, border-color 140ms ease;
}
.btn:hover { background: #ffc76c; color: var(--signal-ink); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: #4b4237; background: var(--ink-700); color: var(--text); transform: translateY(-1px); }
.btn.small { padding: 8px 14px; font-size: 0.875rem; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

/* --- hero --- */
.hero h1 { margin-bottom: var(--s4); }
.hero .lead { font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); color: var(--text-dim); max-width: 46ch; margin-bottom: var(--s6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* spec strip — facts as data, not as feature cards */
.specs {
	display: flex; flex-wrap: wrap;
	margin-top: var(--s7); padding-top: var(--s5);
	border-top: 1px solid var(--line);
}
.specs > div { position: relative; padding-top: 4px; padding-bottom: 4px; padding-right: 24px; }
.specs > div + div { padding-left: 24px; }
.specs > div + div::before {
	content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 1px; background: var(--line);
}
.specs > div:last-child { padding-right: 0; }
.specs dt { font: 500 0.6875rem/1.2 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.specs dd { margin: 0; font-size: 0.9375rem; color: var(--text); font-weight: 500; letter-spacing: -0.01em; }
@media (max-width: 720px) {
	.specs > div { padding-right: 0; width: 100%; }
	.specs > div + div { padding-left: 0; }
	.specs > div + div::before { display: none; }
}

/* --- showcase: desktop shot with a phone inset, not two equal columns --- */
/* Hero: copy on the left, phone on the right, Windows shot underneath both. */
.hero { padding-block: clamp(40px, 7vw, 76px) var(--s7); }
.hero-grid {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: clamp(24px, 5vw, 56px);
	align-items: center;
}
.hero-copy { min-width: 0; }
.hero-phone {
	width: clamp(110px, 18vw, 176px);
	border-radius: 12px; overflow: hidden;
	box-shadow: 0 0 0 1px var(--line), 0 18px 40px -18px rgba(0, 0, 0, 0.95);
	background: var(--ink-800);
}
.hero-phone img { display: block; width: 100%; height: auto; }
.hero .specs { margin-top: var(--s7); }

/* the Windows screenshot spans the full width, beneath copy and phone */
.showcase { margin-top: clamp(24px, 4vw, 44px); }
.showcase .frame {
	border-radius: var(--radius-lg); overflow: hidden;
	box-shadow: var(--frame); background: var(--ink-800);
}
.showcase .frame img { display: block; width: 100%; height: auto; }

@media (max-width: 760px) {
	.hero-grid { grid-template-columns: 1fr; }
	.hero-phone { width: min(180px, 58%); margin: 0 auto; }
}

/* single figure on the install page */
.shot { margin: 22px 0 4px; }
.shot img {
	display: block; width: 100%; height: auto;
	border-radius: var(--radius-lg);
	box-shadow: var(--frame);
}
.shot figcaption { margin-top: 10px; font-size: 0.8125rem; color: var(--text-faint); text-align: center; }

/* one authored motion moment */
@keyframes rise {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: none; }
}
.hero-phone, .showcase .frame { animation: rise 620ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.showcase .frame { animation-delay: 90ms; }
@media (prefers-reduced-motion: reduce) {
	.hero-phone, .showcase .frame { animation: none; }
	html { scroll-behavior: auto; }
}

/* --- steps: procedure, so numbering carries information --- */
.steps { display: grid; gap: var(--s5); margin: var(--s6) 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: start; }
.steps li::before {
	counter-increment: step; content: counter(step, decimal-leading-zero);
	font: 500 0.8125rem/1 var(--mono); color: var(--signal);
	padding-top: 3px;
}
.steps li strong { display: block; font-weight: 600; margin-bottom: 2px; }
.steps li p { color: var(--text-dim); font-size: 0.9375rem; }
@media (min-width: 860px) {
	.steps { grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
	.steps li { grid-template-columns: auto 1fr; }
}

/* --- the honest caveat: one panel, stated once --- */
.callout {
	margin-top: var(--s7);
	background: var(--signal-wash);
	border: 1px solid #3a2c12;
	border-radius: var(--radius-lg);
	padding-top: 22px; padding-bottom: 22px; padding-left: 22px; padding-right: 22px;
	display: grid; grid-template-columns: auto 1fr; gap: var(--s4) var(--s5);
}
.callout > div { min-width: 0; }
.callout > svg { color: var(--signal); margin-top: 3px; }
.callout h2 { font-size: 1.75rem; margin-bottom: var(--s4); }
.callout p { color: var(--text-dim); font-size: 0.9375rem; max-width: var(--measure); }
.callout p + p { margin-top: var(--s3); }
.callout strong { color: var(--text); font-weight: 600; }
.callout .back { margin-top: var(--s4); }
@media (max-width: 560px) {
	.callout { grid-template-columns: 1fr; }
	.callout > svg { display: none; }
}

/* --- generic card, still used by the form pages --- */
.card {
	background: var(--ink-800);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: clamp(18px, 2.4vw, 24px);
}
form.card { display: block; margin-bottom: var(--s2); }

/* --- form rows --- */
.row { display: block; margin-bottom: var(--s4); }
.row > span { display: block; font-size: 0.8125rem; color: var(--text-dim); margin-bottom: 6px; }
.row.check { display: flex; gap: 10px; align-items: flex-start; }
.row.check > span { margin: 0; }
input[type=text], input[type=password], input[type=url] {
	width: 100%; padding: 11px 12px; border-radius: var(--radius);
	border: 1px solid var(--line); background: var(--ink-900); color: var(--text);
	font: 400 0.9375rem/1.4 var(--font);
}
input[type=checkbox] { accent-color: var(--signal); width: 16px; height: 16px; }
input:focus-visible { border-color: var(--signal-dim); }
.tag {
	display: inline-block; font-style: normal; font: 500 0.625rem/1 var(--mono);
	letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 7px; border-radius: 99px;
	background: var(--signal-wash); color: var(--signal); border: 1px solid #3a2c12;
	vertical-align: middle;
}
.link {
	background: none; border: 0; padding: 0; margin-top: 6px; color: var(--text-faint);
	font: inherit; font-size: 0.8125rem; cursor: pointer; text-decoration: underline;
	text-underline-offset: 3px;
}
.link:hover { color: var(--text); }
#add-playlist { margin: -4px 0 var(--s4); }
.license-row { display: flex; gap: 10px; align-items: center; }
.license-row input { flex: 1; }
.license-status { margin: 8px 0 0; overflow-wrap: anywhere; font-size: 0.8125rem; }
.license-status.ok { color: var(--good); }
.license-status.bad { color: #f0a0a0; }

/* --- hints / meta text --- */
.hint { font-size: 0.8125rem; color: var(--text-faint); max-width: 52ch; }
.hint a { color: var(--signal); }
.hint + .hint { margin-top: var(--s3); }

/* --- pricing --- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--s4); margin: var(--s6) 0; }
.card.plan { display: flex; flex-direction: column; }
.plan h2 { font-size: 0.6875rem; font-family: var(--mono); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.plan .price { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 700; letter-spacing: -0.04em; margin: var(--s3) 0 var(--s2); color: var(--text); }
.plan ul { padding-left: 18px; color: var(--text-dim); font-size: 0.9375rem; margin: 0 0 var(--s5); }
.plan ul li { margin-bottom: 5px; }
.plan .btn { margin-top: auto; }
.plan.featured { border-color: #4a3a18; background: linear-gradient(180deg, var(--signal-wash), var(--ink-800) 60%); }
.card.policy { max-width: 68ch; margin: var(--s6) 0 var(--s4); }
.card.policy h2 { font-size: 1.0625rem; margin-bottom: var(--s4); }
.card.policy p { font-size: 0.9375rem; color: var(--text-dim); margin-bottom: var(--s3); max-width: var(--measure); }
.card.policy p:last-child { margin-bottom: 0; }
.card.policy strong { color: var(--text); font-weight: 600; }

/* --- FAQ: in-page Q&A, citable answer units --- */
.faq { display: grid; gap: var(--s5); margin-top: var(--s6); }
.faq h3 { font-size: 1.25rem; margin-bottom: var(--s2); }
.faq p { color: var(--text-dim); font-size: 1rem; max-width: var(--measure); }
@media (min-width: 860px) {
	.faq { grid-template-columns: 1fr 1fr; gap: var(--s6) var(--s8); }
	.faq > div:nth-child(odd):last-child { grid-column: 1 / -1; }
}
.lead.tight { margin-bottom: var(--s5); }

/* --- footer --- */
.foot {
	max-width: 1120px; margin: 0 auto; padding: var(--s6) var(--gutter) var(--s7);
	border-top: 1px solid var(--line); color: var(--text-faint); font-size: 0.8125rem;
}
.foot p { max-width: var(--measure); }

code { font: 400 0.875em var(--mono); background: var(--ink-700); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }