/* RHLS launch pages — shared design system.
 * Tokens mirror rhls-hub/styles.css (RHLS logo palette: deep-blue #004070 family).
 * Solid colors only; no gradients. Mobile-first; contrast-checked; RTL-ready via
 * logical properties; visible :focus-visible rings; prefers-reduced-motion respected.
 * NOTE: no catalog/locale files are touched from this stylesheet.
 */
:root {
	color-scheme: light;
	--blue-900: #003060;
	--blue-800: #004070;
	--blue-600: #0060a0;
	--blue-100: #e3eef7;
	--ink: #101418;
	--paper: #f5f6f8;
	--white: #ffffff;
	--muted: #5b6472;
	--border: #d7dce2;
	--radius-lg: 14px;
	--radius-md: 10px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	/* anchor jumps clear the sticky header */
	scroll-padding-top: 5.5rem;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.6;
	background: var(--paper);
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
}

::selection {
	background: var(--blue-100);
}

/* Keyboard visibility everywhere (links, buttons, select) */
:focus-visible {
	outline: 3px solid var(--blue-600);
	outline-offset: 2px;
}

a {
	color: var(--blue-600);
}

/* ---------------------------------- header --------------------------------- */
.topbar {
	position: sticky;
	top: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	padding: 0.75rem clamp(1rem, 3vw, 1.5rem);
	background: var(--white);
	border-bottom: 1px solid var(--border);
}

.topbar-logo {
	width: 34px;
	height: 34px;
	display: block;
}

.brand {
	font-weight: 700;
	font-size: 1.1rem;
	letter-spacing: -0.01em;
	color: var(--ink);
}

/* Brand lockup links home */
.brand-lockup {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	text-decoration: none;
	color: var(--ink);
}
.brand-lockup:hover,
.brand-lockup:focus-visible {
	color: var(--blue-800);
}

/* Push nav to the end: old pages put <nav> directly in .topbar,
   new structure wraps nav + lang-bar in .topbar-end. */
.topbar > nav,
.topbar-end {
	margin-inline-start: auto;
}

.topbar-end {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.4rem 1.1rem;
}

.topbar nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 1.3rem;
}
.topbar nav a {
	color: var(--ink);
	text-decoration: none;
	font-weight: 500;
	padding: 0.35rem 0;
}
.topbar nav a:hover {
	color: var(--blue-600);
	text-decoration: underline;
	text-underline-offset: 0.3em;
	text-decoration-color: var(--border);
}

/* Language switcher (pill, no longer floating over content) */
.lang-bar {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.1rem 0.55rem 0.1rem 0.8rem;
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: 999px;
}
.lang-bar label {
	font-size: 1rem;
	line-height: 1;
}
.lang-bar select {
	border: 0;
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-size: 0.95rem;
	padding: 0.35rem 0.15rem;
	cursor: pointer;
	border-radius: 999px;
}
.lang-bar select:focus-visible {
	outline: 2px solid var(--blue-600);
	outline-offset: 2px;
}

/* ---------------------------------- hero ----------------------------------- */
.hero {
	text-align: center;
	padding: clamp(3rem, 8vw, 4.5rem) clamp(1.25rem, 5vw, 2rem) clamp(2rem, 5vw, 3rem);
	max-width: 48rem;
	margin: 0 auto;
}
.hero h1 {
	margin: 0 0 0.9rem;
	font-size: clamp(1.85rem, 1.3rem + 2.9vw, 2.7rem);
	line-height: 1.15;
	letter-spacing: -0.02em;
	font-weight: 800;
	color: var(--blue-900);
}
.hero p {
	margin: 0 auto;
	max-width: 40rem;
	color: var(--muted);
	font-size: clamp(1rem, 0.95rem + 0.35vw, 1.15rem);
}
.hero-actions {
	margin-top: 1.75rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}

/* --------------------------------- buttons --------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.6rem 1.3rem;
	border-radius: var(--radius-md);
	border: 1px solid var(--border);
	background: var(--white);
	color: var(--ink);
	text-decoration: none;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}
.btn:hover {
	background: var(--blue-100);
	border-color: var(--blue-800);
	color: var(--blue-800);
}
.btn-primary {
	background: var(--blue-800);
	border-color: var(--blue-800);
	color: var(--white);
}
.btn-primary:hover {
	background: var(--blue-600);
	border-color: var(--blue-600);
	color: var(--white);
}

/* --------------------------------- product cards ---------------------------- */
.products {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
	gap: 1.25rem;
	max-width: 60rem;
	margin: 0 auto;
	padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 4vw, 1.5rem) clamp(2rem, 5vw, 3rem);
}
.card {
	background: var(--white);
	border: 1px solid var(--border);
	border-top: 4px solid var(--blue-800);
	border-radius: var(--radius-lg);
	padding: clamp(1.25rem, 3vw, 1.75rem);
}
.card h2 {
	margin: 0 0 0.4rem;
	font-size: 1.3rem;
	line-height: 1.25;
	color: var(--blue-900);
}
.tag {
	display: block;
	margin: -0.4rem 0 0.9rem;
	color: var(--muted);
	font-size: 0.9rem;
}
.card p {
	margin: 0.6rem 0;
}
.card-actions {
	margin-top: 1.1rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.625rem;
}

/* ------------------------------ section blocks ----------------------------- */
.download {
	text-align: center;
	padding: clamp(2.5rem, 7vw, 3.5rem) clamp(1.25rem, 5vw, 2rem);
	max-width: 46rem;
	margin: 0 auto;
}
.download h2 {
	margin: 0 0 0.75rem;
	font-size: clamp(1.4rem, 1.15rem + 1.2vw, 1.8rem);
	line-height: 1.25;
	color: var(--blue-900);
}
.download p {
	color: var(--muted);
}
.muted-note {
	margin-top: 1.1rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.contact {
	text-align: center;
	padding: clamp(2.5rem, 6vw, 3.5rem) clamp(1.25rem, 5vw, 2rem);
	max-width: 46rem;
	margin: 0 auto;
}
.contact h2 {
	margin: 0 0 0.5rem;
	font-size: clamp(1.4rem, 1.15rem + 1.2vw, 1.8rem);
	color: var(--blue-900);
}
.contact a {
	color: var(--blue-600);
}

/* Pro / premium panel (single wide card) */
.pro {
	text-align: center;
	padding: clamp(0.75rem, 2vw, 1rem) clamp(1rem, 4vw, 1.5rem) clamp(2rem, 5vw, 3rem);
	max-width: 60rem;
	margin: 0 auto;
}
.pro-card {
	text-align: start;
	max-width: 46rem;
	margin-inline: auto;
}
.pro-list {
	text-align: start;
	padding-inline-start: 1.25rem;
	color: var(--muted);
	margin: 0.9rem 0;
}
.pro-list li {
	margin-bottom: 0.5rem;
}
.pro-note {
	color: var(--muted);
	font-size: 0.95rem;
}

/* ---------------------------------- footer --------------------------------- */
footer {
	text-align: center;
	padding: 1.75rem clamp(1rem, 4vw, 1.5rem);
	color: var(--muted);
	font-size: 0.95rem;
	border-top: 1px solid var(--border);
	background: var(--white);
}
footer p {
	margin: 0.35rem 0;
}
.legal-links {
	margin-top: 0.9rem;
	font-size: 0.95rem;
}
.legal-links a {
	color: var(--blue-600);
	text-decoration: none;
}
.legal-links a:hover {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* --------------------------- guide + legal pages --------------------------- */
.guide-lead {
	font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
	color: var(--muted);
}
main.legal {
	max-width: 47.5rem;
	margin: 0 auto;
	padding: clamp(1.5rem, 5vw, 2.5rem) clamp(1.25rem, 5vw, 2rem) 4rem;
}
main.legal h1 {
	margin: 0 0 0.9rem;
	font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.2rem);
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--blue-900);
	border-bottom: 1px solid var(--border);
	padding-bottom: 0.9rem;
}
main.legal h2 {
	margin: 2.25rem 0 0.6rem;
	font-size: 1.35rem;
	line-height: 1.3;
	color: var(--blue-800);
}
main.legal h3 {
	margin: 1.75rem 0 0.5rem;
}
main.legal p,
main.legal li {
	line-height: 1.7;
}
main.legal a {
	color: var(--blue-600);
	text-underline-offset: 0.2em;
}
main.legal code {
	background: var(--blue-100);
	padding: 0.1em 0.35em;
	border-radius: 5px;
	font-size: 0.92em;
}

/* ---------------------------------- small screens --------------------------- */
@media (max-width: 40rem) {
	.topbar {
		padding: 0.65rem 0.9rem;
		gap: 0.4rem 0.75rem;
	}
	.brand {
		font-size: 1.02rem;
	}
	.topbar nav {
		gap: 0.1rem 0.95rem;
	}
	.topbar nav a {
		font-size: 0.95rem;
	}
	/* second row of the header: nav on the start, language on the end */
	.topbar-end {
		width: 100%;
		margin-inline-start: 0;
		justify-content: space-between;
	}
}

/* Arabic / RTL: drop letter-spacing that would fragment joined script */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] .brand {
	letter-spacing: 0;
}

/* ---------------------------------- motion --------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
	.topbar nav a,
	.btn,
	.brand-lockup,
	.lang-bar select {
		transition: color 0.15s ease, background-color 0.15s ease,
			border-color 0.15s ease, outline-color 0.15s ease;
	}
}
