/*
Theme Name: KGG Labs
Theme URI: https://kgglabs.com
Author: KGG Labs
Description: KGG Labs için minimal dark theme. Siyah/beyaz ağırlık, indigo→cyan gradient aksanlar (#4F46E5 → #0EA5E9). Apps CPT için tanıtım sayfaları ve WordPress-native legal sistem ile entegre.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kgglabs
*/

:root {
	--c-bg:           #0A0A0A;
	--c-bg-elev:      #121212;
	--c-bg-card:      #161616;
	--c-bg-hover:     #1C1C1C;
	--c-border:       #232323;
	--c-border-soft:  #1A1A1A;

	--c-text:         #FFFFFF;
	--c-text-muted:   #A8A8A8;
	--c-text-dim:     #707070;

	--c-accent-1:     #4F46E5; /* indigo */
	--c-accent-2:     #0EA5E9; /* cyan / sky */
	--g-brand:        linear-gradient(135deg, #4F46E5 0%, #0EA5E9 100%);

	--shadow-soft:    0 1px 0 rgba(255,255,255,0.04) inset, 0 10px 30px rgba(0,0,0,0.4);
	--shadow-strong:  0 20px 60px rgba(15, 20, 30, 0.6);

	--radius-sm:      8px;
	--radius:         14px;
	--radius-lg:      22px;
	--radius-xl:      28px;

	--container:      1200px;

	--font-body:      'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--font-display:   'Titillium Web', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	background-image:
		radial-gradient(900px 600px at -10% -20%, rgba(79, 70, 229, 0.10), transparent 60%),
		radial-gradient(900px 600px at 110% 0%, rgba(14, 165, 233, 0.10), transparent 55%);
	background-attachment: fixed;
}

a { color: var(--c-accent-2); text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--c-text); }

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

h1, h2, h3, h4, h5 {
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.2;
	color: var(--c-text);
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

.text-gradient {
	background: var(--g-brand);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .12s ease, background .2s ease, border-color .2s ease, color .2s ease;
	line-height: 1;
	white-space: nowrap;
}

.btn-primary {
	background: var(--g-brand);
	color: #fff;
	box-shadow: 0 8px 24px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover { color: #fff; transform: translateY(-1px); }

.btn-ghost {
	background: transparent;
	color: var(--c-text);
	border-color: var(--c-border);
}
.btn-ghost:hover { background: var(--c-bg-hover); color: var(--c-text); }

.btn-store {
	background: #fff;
	color: #000;
	padding: 12px 18px;
}
.btn-store:hover { color: #000; transform: translateY(-1px); }
.btn-store svg { width: 22px; height: 22px; }

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(10, 10, 10, 0.78);
	backdrop-filter: saturate(140%) blur(14px);
	-webkit-backdrop-filter: saturate(140%) blur(14px);
	border-bottom: 1px solid var(--c-border-soft);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 72px;
}

.site-logo {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.site-logo-mark {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--g-brand);
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-family: var(--font-display);
	color: #fff;
	line-height: 0.95;
	box-shadow: 0 6px 20px rgba(14, 165, 233, 0.25);
}
.site-logo-mark .mark-kgg  { font-weight: 600; font-size: 13px; letter-spacing: 0.5px; }
.site-logo-mark .mark-labs { font-weight: 200; font-size: 10px; letter-spacing: 1px; }

.site-logo-text {
	font-family: var(--font-display);
	font-size: 1.25rem;
	color: var(--c-text);
	display: inline-flex;
	gap: 6px;
	letter-spacing: 0.5px;
}
.site-logo-text .t-kgg  { font-weight: 600; }
.site-logo-text .t-labs { font-weight: 200; opacity: 0.92; }

.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav ul { list-style: none; display: flex; gap: 4px; align-items: center; }
.main-nav a {
	color: var(--c-text-muted);
	padding: 8px 14px;
	border-radius: 999px;
	font-weight: 500;
	font-size: 0.95rem;
	transition: color .2s ease, background .2s ease;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
	color: var(--c-text);
	background: var(--c-bg-hover);
}

.nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--c-border);
	border-radius: 10px;
	width: 42px; height: 42px;
	color: var(--c-text);
	cursor: pointer;
	align-items: center;
	justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
	.nav-toggle { display: inline-flex; }
	.main-nav {
		position: fixed; inset: 72px 0 0 0;
		background: rgba(10,10,10,0.96);
		backdrop-filter: blur(16px);
		flex-direction: column;
		padding: 24px;
		gap: 12px;
		transform: translateY(-12px);
		opacity: 0;
		pointer-events: none;
		transition: opacity .2s ease, transform .2s ease;
	}
	.main-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
	.main-nav ul { flex-direction: column; width: 100%; gap: 4px; }
	.main-nav a { display: block; width: 100%; font-size: 1.1rem; padding: 12px 16px; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 8vw, 120px) 0; }
.section-narrow { padding: clamp(40px, 5vw, 72px) 0; }

.eyebrow {
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	font-size: 0.78rem;
	color: var(--c-accent-2);
	margin-bottom: 14px;
}

/* ---------- Hero ---------- */

.hero {
	padding-top: clamp(48px, 8vw, 96px);
	padding-bottom: clamp(48px, 8vw, 96px);
	text-align: center;
}
.hero h1 {
	font-size: clamp(2.5rem, 6vw, 4.5rem);
	line-height: 1.05;
	margin-bottom: 18px;
}
.hero p.lead {
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
	color: var(--c-text-muted);
	max-width: 760px;
	margin: 0 auto 28px;
}
.hero-actions { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- App grid (front + archive) ---------- */

.apps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}

.app-card {
	background: var(--c-bg-card);
	border: 1px solid var(--c-border-soft);
	border-radius: var(--radius-lg);
	padding: 28px;
	transition: transform .15s ease, border-color .2s ease, background .2s ease;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.app-card:hover { transform: translateY(-2px); border-color: var(--c-border); background: var(--c-bg-hover); }
.app-card a.app-card-link { color: inherit; display: contents; }

.app-card .app-icon {
	width: 72px;
	height: 72px;
	border-radius: 18px;
	overflow: hidden;
	background: var(--g-brand);
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.app-card .app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-card .app-icon-fallback {
	font-family: var(--font-display);
	font-weight: 600;
	color: #fff;
	font-size: 1.5rem;
	letter-spacing: 0.5px;
}

.app-card h3 { font-size: 1.25rem; margin: 0; }
.app-card .app-tagline { color: var(--c-text-muted); font-size: 0.95rem; }
.app-card .app-card-cta {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--c-accent-2);
	margin-top: auto;
}

/* ---------- Section header ---------- */

.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 36px;
	flex-wrap: wrap;
}
.section-head h2 { max-width: 720px; }
.section-head p   { color: var(--c-text-muted); max-width: 520px; }

/* ---------- App single ---------- */

.app-hero {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 32px;
	align-items: center;
	padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 4vw, 56px);
	border-bottom: 1px solid var(--c-border-soft);
}
.app-hero .app-icon { width: 140px; height: 140px; border-radius: 32px; box-shadow: var(--shadow-soft); overflow: hidden; background: var(--g-brand); }
.app-hero .app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-hero h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); margin-bottom: 12px; }
.app-hero .app-tagline { font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--c-text-muted); margin-bottom: 24px; max-width: 640px; }
.app-hero .store-row { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 720px) {
	.app-hero { grid-template-columns: 1fr; text-align: center; }
	.app-hero .app-icon { margin: 0 auto; width: 110px; height: 110px; border-radius: 26px; }
	.app-hero .store-row { justify-content: center; }
}

.app-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 56px;
	padding: clamp(40px, 6vw, 72px) 0;
}
@media (max-width: 960px) { .app-body { grid-template-columns: 1fr; gap: 32px; } }

.app-content {
	color: var(--c-text);
	font-size: 1.05rem;
}
.app-content h2 { margin-top: 2rem; margin-bottom: 0.75rem; }
.app-content h2:first-child { margin-top: 0; }
.app-content p { color: var(--c-text-muted); }
.app-content ul, .app-content ol { padding-left: 1.25rem; color: var(--c-text-muted); margin-bottom: 1rem; }
.app-content li { margin-bottom: 0.4rem; }

.app-sidebar {
	background: var(--c-bg-card);
	border: 1px solid var(--c-border-soft);
	border-radius: var(--radius-lg);
	padding: 24px;
	height: max-content;
	position: sticky;
	top: 96px;
}
.app-sidebar h4 {
	font-family: var(--font-display);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--c-accent-2);
	margin-bottom: 12px;
}
.app-sidebar ul { list-style: none; }
.app-sidebar li + li { margin-top: 8px; }
.app-sidebar a { color: var(--c-text-muted); display: block; padding: 8px 10px; border-radius: 8px; }
.app-sidebar a:hover { color: var(--c-text); background: var(--c-bg-hover); }

.feature-list { list-style: none; padding: 0; }
.feature-list li {
	display: flex; align-items: flex-start; gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--c-border-soft);
	color: var(--c-text);
}
.feature-list li:last-child { border-bottom: 0; }
.feature-list li::before {
	content: '';
	flex-shrink: 0;
	width: 20px; height: 20px;
	background: var(--g-brand);
	border-radius: 6px;
	margin-top: 3px;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/14px no-repeat;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/14px no-repeat;
}

/* Screenshots */

.screens {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	margin: 24px 0;
}
.screens .screen {
	background: var(--c-bg-card);
	border: 1px solid var(--c-border-soft);
	border-radius: var(--radius);
	overflow: hidden;
	cursor: zoom-in;
	transition: transform .15s ease, border-color .2s ease;
}
.screens .screen:hover { transform: translateY(-2px); border-color: var(--c-border); }
.screens .screen img { width: 100%; aspect-ratio: 9/16; object-fit: cover; }

/* Lightbox */

.kgg-lightbox {
	position: fixed; inset: 0; background: rgba(0,0,0,0.92);
	display: none; align-items: center; justify-content: center;
	z-index: 200; padding: 24px;
}
.kgg-lightbox.is-open { display: flex; }
.kgg-lightbox img { max-width: 100%; max-height: 92vh; border-radius: var(--radius); }
.kgg-lightbox-close {
	position: absolute; top: 18px; right: 18px;
	background: transparent; color: #fff; border: 0;
	width: 44px; height: 44px; font-size: 28px; cursor: pointer;
}

/* ---------- Page (legal etc) ---------- */

.page-hero {
	padding: clamp(40px, 6vw, 80px) 0 clamp(20px, 3vw, 40px);
	border-bottom: 1px solid var(--c-border-soft);
}
.page-hero h1 { margin-bottom: 8px; }
.page-hero .crumb { color: var(--c-text-dim); font-size: 0.92rem; }
.page-hero .crumb a { color: var(--c-text-muted); }
.page-hero .crumb a:hover { color: var(--c-text); }

.page-body { padding: clamp(40px, 5vw, 64px) 0; }
.page-content {
	max-width: 760px;
	margin: 0 auto;
	color: var(--c-text);
	font-size: 1.05rem;
}
.page-content h2, .page-content h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.page-content p, .page-content li { color: var(--c-text-muted); }
.page-content a { color: var(--c-accent-2); border-bottom: 1px solid rgba(14,165,233,0.3); }
.page-content a:hover { border-color: var(--c-accent-2); }
.page-content ul, .page-content ol { margin: 0 0 1rem 1.25rem; }
.page-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.page-content th, .page-content td { padding: 10px 12px; border: 1px solid var(--c-border); text-align: left; }
.page-content th { background: var(--c-bg-card); }

/* ---------- Footer ---------- */

.site-footer {
	border-top: 1px solid var(--c-border-soft);
	padding: 48px 0 32px;
	margin-top: 64px;
	color: var(--c-text-muted);
	background: rgba(8, 8, 8, 0.6);
}
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: 24px; } }

.footer-col h5 {
	font-family: var(--font-display);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--c-text-dim);
	margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li + li { margin-top: 8px; }
.footer-col a { color: var(--c-text-muted); }
.footer-col a:hover { color: var(--c-text); }

.site-footer .footer-bottom {
	margin-top: 36px;
	padding-top: 20px;
	border-top: 1px solid var(--c-border-soft);
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 0.9rem;
}

/* ---------- 404 ---------- */

.error-404 { text-align: center; padding: 96px 0; }
.error-404 .code {
	font-family: var(--font-display);
	font-weight: 200;
	font-size: clamp(7rem, 14vw, 12rem);
	line-height: 1;
	background: var(--g-brand);
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent;
	letter-spacing: -0.05em;
}

/* ---------- Auto-injected legal footer (plugin) ---------- */

.kgglabs-legal-footer { display: none; }
