/* Yasal sayfalar (Gizlilik / Çerez) — AIKeySoft */
.page-legal {
	--legal-sidebar-w: min(280px, 100%);
	--legal-toc-pad: 1rem;
}

.page-legal .bg-mesh {
	opacity: 0.82;
}

/* —— Hero —— */
.legal-hero {
	position: relative;
	padding: calc(var(--header-offset) + 2.25rem) 0 2rem;
	overflow: hidden;
	background: linear-gradient(180deg, var(--bg) 0%, var(--section-alt) 100%);
}

.legal-hero__ambient {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.legal-hero__mesh {
	position: absolute;
	inset: -20% -12% auto;
	height: 72%;
	opacity: 0.48;
	background-image:
		linear-gradient(rgba(79, 70, 229, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(79, 70, 229, 0.045) 1px, transparent 1px);
	background-size: 36px 36px;
	mask-image: radial-gradient(ellipse 70% 58% at 50% 0%, #000 20%, transparent 72%);
	animation: legalMeshDrift 36s linear infinite;
}

@keyframes legalMeshDrift {
	to {
		transform: translate(-36px, 36px);
	}
}

.legal-hero__orb {
	position: absolute;
	border-radius: 50%;
	opacity: 0.42;
	animation: legalOrbFloat 24s ease-in-out infinite;
}

.legal-hero__orb--a {
	width: min(400px, 78vw);
	height: min(400px, 78vw);
	background: radial-gradient(circle, rgba(79, 70, 229, 0.18), transparent 70%);
	top: -16%;
	right: -10%;
}

.legal-hero__orb--b {
	width: min(300px, 62vw);
	height: min(300px, 62vw);
	background: radial-gradient(circle, rgba(14, 165, 233, 0.12), transparent 72%);
	bottom: -6%;
	left: -12%;
	animation-delay: -9s;
}

@keyframes legalOrbFloat {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}
	50% {
		transform: translate(-1.5%, 1.5%) scale(1.02);
	}
}

.legal-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 52rem;
	margin-inline: auto;
	text-align: center;
}

.legal-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.7rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--accent-2);
	margin-bottom: 0.6rem;
}

.legal-hero__title {
	font-family: var(--font-display);
	font-size: clamp(1.85rem, 4vw, 2.65rem);
	font-weight: 800;
	letter-spacing: -0.036em;
	line-height: 1.12;
	color: var(--text);
	margin-bottom: 0.65rem;
}

.legal-hero__title em {
	font-style: normal;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.legal-hero__lead {
	font-size: clamp(0.98rem, 1.85vw, 1.08rem);
	color: var(--text-muted);
	line-height: 1.65;
	max-width: 40rem;
	margin-inline: auto 0;
	margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
	.legal-hero__lead {
		margin-inline: auto;
	}
}

.legal-hero__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 0.75rem;
	margin-bottom: 0.5rem;
}

.legal-hero__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--text-muted);
	background: rgba(255, 255, 255, 0.55);
	border: 1px solid rgba(15, 23, 42, 0.06);
	backdrop-filter: blur(10px);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.legal-hero__chip i {
	color: var(--accent);
	font-size: 0.72rem;
}

/* —— Layout —— */
.legal-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	padding: clamp(1.35rem, 4vw, 2.25rem) 0 3.5rem;
}

@media (min-width: 1024px) {
	.legal-layout {
		grid-template-columns: var(--legal-sidebar-w) minmax(0, 1fr);
		align-items: start;
		gap: 2rem;
		padding: clamp(1.5rem, 3.5vw, 2.5rem) 0 4rem;
	}
}

/* —— Sticky TOC (desktop) —— */
.legal-toc-wrap {
	display: none;
}

@media (min-width: 1024px) {
	.legal-toc-wrap {
		display: block;
		position: sticky;
		top: calc(var(--header-offset, 72px) + 1rem);
		align-self: start;
		max-height: calc(100vh - var(--header-offset, 72px) - 2rem);
		overflow: auto;
		padding-bottom: 1rem;
		scrollbar-width: thin;
	}
}

.legal-toc {
	padding: var(--legal-toc-pad);
	border-radius: 1rem;
	border: 1px solid rgba(15, 23, 42, 0.06);
	background: rgba(255, 255, 255, 0.55);
	backdrop-filter: blur(14px);
	box-shadow:
		0 4px 24px rgba(15, 23, 42, 0.05),
		0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.legal-toc__title {
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.11em;
	color: var(--text-muted);
	margin: 0 0 0.75rem;
	padding: 0 0.35rem;
}

.legal-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.legal-toc__list a {
	display: block;
	padding: 0.45rem 0.5rem;
	border-radius: 0.5rem;
	font-size: 0.84rem;
	font-weight: 500;
	color: var(--text-muted);
	text-decoration: none;
	line-height: 1.35;
	transition:
		background 0.18s ease,
		color 0.18s ease,
		transform 0.18s ease;
}

.legal-toc__list a:hover {
	background: rgba(79, 70, 229, 0.06);
	color: var(--text);
}

.legal-toc__list a.is-active {
	background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(124, 58, 237, 0.08));
	color: var(--accent);
	font-weight: 600;
}

.legal-toc__rel {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.legal-toc__rel a {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--accent);
	text-decoration: none;
	padding: 0.4rem 0.5rem;
	border-radius: 0.5rem;
}

.legal-toc__rel a:hover {
	background: rgba(79, 70, 229, 0.06);
}

/* —— Mobile TOC —— */
.legal-toc-mobile {
	position: sticky;
	top: calc(var(--header-offset, 72px) - 1px);
	z-index: 30;
	margin: 0 0 clamp(0.9rem, 2.8vw, 1.4rem);
}

@media (min-width: 1024px) {
	.legal-toc-mobile {
		display: none;
	}
}

.legal-toc-mobile__btn {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.65rem 1rem;
	border-radius: 0.75rem;
	border: 1px solid rgba(15, 23, 42, 0.08);
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(12px);
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--text);
	cursor: pointer;
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.legal-toc-mobile__btn:hover {
	border-color: rgba(79, 70, 229, 0.25);
	box-shadow: 0 4px 20px rgba(79, 70, 229, 0.08);
}

.legal-toc-mobile__btn i:last-child {
	transition: transform 0.25s ease;
	color: var(--accent);
}

.legal-toc-mobile.is-open .legal-toc-mobile__btn i:last-child {
	transform: rotate(180deg);
}

.legal-toc-mobile__panel {
	display: none;
	margin-top: 0.5rem;
	padding: 0.5rem;
	border-radius: 0.85rem;
	border: 1px solid rgba(15, 23, 42, 0.06);
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(14px);
	max-height: min(52vh, 420px);
	overflow: auto;
}

.legal-toc-mobile.is-open .legal-toc-mobile__panel {
	display: block;
	animation: legalPanelIn 0.22s ease;
}

@keyframes legalPanelIn {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.legal-toc-mobile__panel .legal-toc__list a {
	padding: 0.55rem 0.65rem;
}

/* —— Document body —— */
.legal-doc {
	min-width: 0;
}

.legal-intro {
	padding: clamp(1.35rem, 3.2vw, 1.55rem) 1.35rem 1.3rem;
	border-radius: 1rem;
	margin-bottom: 1.5rem;
	margin-top: 0.15rem;
	border: 1px solid rgba(15, 23, 42, 0.06);
	background: rgba(255, 255, 255, 0.58);
	backdrop-filter: blur(12px);
	box-shadow: 0 4px 28px rgba(15, 23, 42, 0.045);
}

.legal-intro p {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--text-muted);
}

.legal-intro strong {
	color: var(--text);
}

.legal-section {
	scroll-margin-top: calc(var(--header-offset, 72px) + 1rem);
	padding: 1.35rem 1.4rem;
	border-radius: 1rem;
	margin-bottom: 1.25rem;
	border: 1px solid rgba(15, 23, 42, 0.06);
	background: rgba(255, 255, 255, 0.52);
	backdrop-filter: blur(12px);
	box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.legal-section:hover {
	border-color: rgba(79, 70, 229, 0.12);
	box-shadow: 0 8px 32px rgba(79, 70, 229, 0.06);
}

.legal-section h2 {
	font-family: var(--font-display);
	font-size: clamp(1.15rem, 2.2vw, 1.35rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text);
	margin: 0 0 0.85rem;
	padding-bottom: 0.65rem;
	border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.legal-section h3 {
	font-size: 1rem;
	font-weight: 700;
	color: var(--text);
	margin: 1.25rem 0 0.5rem;
}

.legal-section p,
.legal-section li {
	font-size: 0.93rem;
	line-height: 1.72;
	color: var(--text-muted);
}

.legal-section p {
	margin: 0 0 0.85rem;
}

.legal-section ul,
.legal-section ol {
	margin: 0 0 0.85rem;
	padding-left: 1.25rem;
}

.legal-section li {
	margin-bottom: 0.35rem;
}

.legal-section li::marker {
	color: var(--accent);
}

.legal-note {
	margin-top: 0.75rem;
	padding: 0.75rem 1rem;
	border-radius: 0.65rem;
	background: rgba(79, 70, 229, 0.06);
	border-left: 3px solid var(--accent);
	font-size: 0.88rem;
	line-height: 1.65;
	color: var(--text-muted);
}

.legal-table-wrap {
	overflow-x: auto;
	margin: 0.75rem 0 1rem;
	border-radius: 0.65rem;
	border: 1px solid rgba(15, 23, 42, 0.06);
}

.legal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.82rem;
	min-width: 480px;
}

.legal-table th,
.legal-table td {
	padding: 0.6rem 0.75rem;
	text-align: left;
	border-bottom: 1px solid rgba(15, 23, 42, 0.06);
	color: var(--text-muted);
}

.legal-table th {
	font-weight: 700;
	color: var(--text);
	background: rgba(79, 70, 229, 0.05);
	white-space: nowrap;
}

.legal-table tr:last-child td {
	border-bottom: none;
}

/* —— FAQ mini —— */
.legal-faq {
	display: grid;
	gap: 0.85rem;
	margin-top: 0.5rem;
}

@media (min-width: 720px) {
	.legal-faq {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.legal-faq__item {
	padding: 1rem 1.1rem;
	border-radius: 0.85rem;
	border: 1px solid rgba(15, 23, 42, 0.06);
	background: rgba(255, 255, 255, 0.45);
}

.legal-faq__item h3 {
	font-size: 0.92rem;
	font-weight: 700;
	margin: 0 0 0.45rem;
	color: var(--text);
}

.legal-faq__item p {
	font-size: 0.86rem;
	margin: 0;
	line-height: 1.65;
}

/* —— CTA —— */
.legal-cta {
	margin-top: 0.5rem;
	padding: 1.5rem 1.35rem;
	border-radius: 1rem;
	border: 1px solid rgba(15, 23, 42, 0.06);
	background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(14, 165, 233, 0.06));
	backdrop-filter: blur(12px);
	text-align: center;
}

.legal-cta h2 {
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 800;
	margin: 0 0 0.5rem;
	color: var(--text);
	border: none;
	padding: 0;
}

.legal-cta p {
	margin: 0 auto 1rem;
	max-width: 32rem;
	font-size: 0.92rem;
	color: var(--text-muted);
	line-height: 1.65;
}

.legal-cta__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.65rem;
}

/* —— Floating quick nav —— */
.legal-float {
	position: fixed;
	left: max(1rem, env(safe-area-inset-left));
	bottom: max(1.25rem, env(safe-area-inset-bottom));
	z-index: 40;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

@media (min-width: 1024px) {
	.legal-float {
		left: auto;
		right: max(1rem, env(safe-area-inset-right));
		bottom: max(1.5rem, env(safe-area-inset-bottom));
	}
}

.legal-float__btn {
	width: 2.65rem;
	height: 2.65rem;
	display: grid;
	place-items: center;
	border-radius: 0.75rem;
	border: 1px solid rgba(15, 23, 42, 0.08);
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(12px);
	color: var(--accent);
	box-shadow: 0 6px 22px rgba(15, 23, 42, 0.1);
	cursor: pointer;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease,
		background 0.2s ease;
	text-decoration: none;
}

.legal-float__btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(79, 70, 229, 0.15);
	background: #fff;
}

.legal-float__btn i {
	font-size: 1rem;
}

@media (prefers-reduced-motion: reduce) {
	.legal-hero__mesh,
	.legal-hero__orb {
		animation: none;
	}

	.legal-toc-mobile.is-open .legal-toc-mobile__panel {
		animation: none;
	}

	.legal-float__btn:hover {
		transform: none;
	}
}
