/* ============================================================
   DaddyHug — shared styles for legal pages (Privacy, Terms,
   Cookies, Children's Privacy, Acceptable Use). Mirrors the
   landing design system: light theme, #F0F0F0 page, purple brand.
   ============================================================ */
:root {
	--bg: #F0F0F0;
	--surface: #FFFFFF;
	--border: #D1D1D1;
	--border-card: #ECECEC;
	--fg: #242424;
	--fg-2: #424242;
	--muted: #616161;
	--accent: #643FB2;
	--accent-hover: #553695;
	--accent-light: #8251EE;
	--accent-fg: #FFFFFF;
	--bg-hover: #F5F5F5;
	--radius-lg: 6px;
	--radius-xl: 8px;
	--radius-2xl: 12px;
	--radius-full: 9999px;
	--shadow-soft: 0 2px 4px rgba(0, 0, 0, .04), 0 0 2px rgba(0, 0, 0, .06);
	--ease-soft: cubic-bezier(0.32, 0.72, 0.24, 1);
	color-scheme: light;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scroll-behavior: smooth;
}

body {
	background: var(--bg);
	color: var(--fg);
	font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
	line-height: 1.7;
	font-size: 0.95rem;
}

html[dir='rtl'] body {
	font-family: 'Cairo', 'Segoe UI', system-ui, sans-serif;
	line-height: 1.9;
}

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 3px;
}

/* ---- top bar ---- */
.topbar {
	position: sticky;
	top: 0;
	z-index: 50;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 clamp(1rem, 4vw, 2.5rem);
	background: rgba(240, 240, 240, .85);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	border-bottom: .75px solid var(--border-card);
}

.brand {
	display: flex;
	align-items: center;
	gap: .55rem;
	font-weight: 800;
	letter-spacing: -.02em;
	font-size: 1.02rem;
	color: var(--fg);
}

.brand .mk {
	width: 28px;
	height: 28px;
	flex: none;
}

.lang-toggle {
	font-family: inherit;
	font-size: .8rem;
	font-weight: 600;
	color: var(--fg-2);
	background: transparent;
	border: .75px solid var(--border);
	border-radius: var(--radius-full);
	padding: 6px 12px;
	cursor: pointer;
	transition: background .15s, border-color .15s;
}

.lang-toggle:hover {
	background: var(--bg-hover);
	border-color: var(--accent-light);
}

/* ---- document layout ---- */
.doc {
	max-width: 820px;
	margin: 0 auto;
	padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem) 4rem;
}

.doc-head {
	border-bottom: .75px solid var(--border-card);
	padding-bottom: 1.5rem;
	margin-bottom: 2rem;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--accent);
	background: rgba(130, 81, 238, .09);
	border: .75px solid rgba(130, 81, 238, .18);
	padding: 5px 12px;
	border-radius: var(--radius-full);
}

.doc h1 {
	font-size: clamp(1.8rem, 4vw, 2.5rem);
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1.1;
	margin-top: 1rem;
}

.doc .meta {
	margin-top: .8rem;
	font-size: .85rem;
	color: var(--muted);
}

.doc .intro {
	margin-top: 1.2rem;
	font-size: 1rem;
	color: var(--fg-2);
}

.doc h2 {
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: -.01em;
	margin-top: 2.2rem;
	margin-bottom: .6rem;
	color: var(--fg);
	scroll-margin-top: 72px;
}

.doc h3 {
	font-size: 1.02rem;
	font-weight: 700;
	margin-top: 1.4rem;
	margin-bottom: .4rem;
}

.doc p {
	margin-top: .7rem;
	color: var(--fg-2);
}

.doc ul {
	margin: .7rem 0;
	padding-inline-start: 1.4rem;
	color: var(--fg-2);
}

.doc li {
	margin-top: .4rem;
}

.doc strong {
	color: var(--fg);
	font-weight: 700;
}

/* callout box for important notices */
.notice {
	margin: 1.4rem 0;
	background: rgba(130, 81, 238, .06);
	border: .75px solid rgba(130, 81, 238, .2);
	border-inline-start: 3px solid var(--accent);
	border-radius: var(--radius-lg);
	padding: 1rem 1.2rem;
	font-size: .9rem;
	color: var(--fg-2);
}

.notice strong {
	color: var(--accent);
}

/* table of related legal links */
.legal-nav {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: .75px solid var(--border-card);
	display: flex;
	flex-wrap: wrap;
	gap: .5rem .5rem;
}

.legal-nav a {
	font-size: .82rem;
	font-weight: 600;
	color: var(--fg-2);
	background: var(--surface);
	border: .75px solid var(--border-card);
	border-radius: var(--radius-full);
	padding: 6px 13px;
}

.legal-nav a:hover {
	background: var(--bg-hover);
	border-color: var(--accent-light);
	text-decoration: none;
}

.legal-nav a[aria-current='page'] {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

/* ---- footer ---- */
footer {
	border-top: .75px solid var(--border-card);
	background: var(--surface);
	padding: 2rem 0 2.4rem;
}

.foot-inner {
	max-width: 820px;
	margin: 0 auto;
	padding: 0 clamp(1rem, 4vw, 2rem);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .8rem;
}

.foot-brand {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-weight: 700;
	color: var(--fg);
}

.foot-brand .mk {
	width: 22px;
	height: 22px;
}

.foot-meta {
	font-size: .78rem;
	color: var(--muted);
}

.back-link {
	font-size: .85rem;
	font-weight: 600;
}

/* ---- bilingual visibility ---- */
[data-en],
[data-ar] {
	display: none;
}

html[lang='en'] [data-en] {
	display: revert;
}

html[lang='ar'] [data-ar] {
	display: revert;
}

html[lang='en'] .brand [data-en],
html[lang='ar'] .brand [data-ar] {
	display: inline;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
