/* ============================================================
   Sworoop LLC — AI-tech theme layer
   Modern dark + gradient redesign with a light-mode toggle.
   Loaded AFTER assets/css/style.css so these rules win.
   Theme is switched via [data-theme] on <html>.
   ============================================================ */

:root,
:root[data-theme="dark"] {
	--bg: #070b16;
	--bg-2: #0b1120;
	--surface: rgba(255, 255, 255, 0.04);
	--surface-solid: #0e1526;
	--surface-2: rgba(255, 255, 255, 0.06);
	--border: rgba(255, 255, 255, 0.09);
	--border-strong: rgba(255, 255, 255, 0.16);
	--text: #e7ecf6;
	--text-muted: #97a4bd;
	--heading: #ffffff;
	--accent: #38bdf8;
	--accent-2: #7c3aed;
	--accent-3: #22d3ee;
	--grad: linear-gradient(135deg, #22d3ee 0%, #3b82f6 45%, #7c3aed 100%);
	--grad-soft: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(124, 58, 237, 0.16));
	--glow: 0 0 40px rgba(56, 189, 248, 0.25);
	--shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.75);
	--nav: rgba(9, 13, 24, 0.72);
	color-scheme: dark;
}

:root[data-theme="light"] {
	--bg: #f5f8fd;
	--bg-2: #eef3fb;
	--surface: #ffffff;
	--surface-solid: #ffffff;
	--surface-2: #f3f6fc;
	--border: rgba(15, 23, 42, 0.10);
	--border-strong: rgba(15, 23, 42, 0.18);
	--text: #33415c;
	--text-muted: #5b6b86;
	--heading: #0f1e3a;
	--accent: #2563eb;
	--accent-2: #7c3aed;
	--accent-3: #0891b2;
	--grad: linear-gradient(135deg, #0891b2 0%, #2563eb 45%, #7c3aed 100%);
	--grad-soft: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.08));
	--glow: 0 0 40px rgba(37, 99, 235, 0.15);
	--shadow: 0 24px 50px -24px rgba(30, 55, 120, 0.30);
	--nav: rgba(255, 255, 255, 0.82);
	color-scheme: light;
}

html { scroll-behavior: smooth; }

body {
	background: var(--bg);
	color: var(--text);
	font-family: "Poppins", "Open Sans", system-ui, sans-serif;
	transition: background-color .4s ease, color .4s ease;
	overflow-x: hidden;
}

/* Ambient mesh glow behind everything */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -2;
	background:
		radial-gradient(60% 50% at 12% 8%, rgba(34, 211, 238, 0.14), transparent 60%),
		radial-gradient(55% 45% at 88% 4%, rgba(124, 58, 237, 0.16), transparent 60%),
		radial-gradient(50% 50% at 50% 100%, rgba(59, 130, 246, 0.10), transparent 60%);
	pointer-events: none;
}
:root[data-theme="light"] body::before { opacity: .6; }

::selection { background: rgba(56, 189, 248, 0.28); color: #fff; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 { color: var(--heading); }
a { color: var(--accent); }
a:hover { color: var(--accent-3); }

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

/* ---------- Header / Nav ---------- */
#header {
	background: transparent !important;
	box-shadow: none;
	padding: 18px 0;
	transition: all .35s ease;
}
#header.header-scrolled,
#header.header-inner-pages {
	background: var(--nav) !important;
	backdrop-filter: saturate(140%) blur(14px);
	-webkit-backdrop-filter: saturate(140%) blur(14px);
	border-bottom: 1px solid var(--border);
	padding: 12px 0;
	box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.6);
}
#header .logo a,
#header .logo a:hover { color: var(--heading); }
#header .logo img { max-height: 40px; border-radius: 8px; }

.navbar a, .navbar a:focus {
	color: var(--text-muted);
	font-weight: 500;
}
.navbar a:hover, .navbar .active, .navbar .active:focus, .navbar li:hover > a {
	color: var(--heading);
}
.navbar .getstarted, .navbar .getstarted:focus {
	background: var(--grad);
	color: #fff;
	border: 0;
	box-shadow: var(--glow);
	padding: 9px 22px;
	border-radius: 999px;
}
.navbar .getstarted:hover { filter: brightness(1.08); color: #fff; }
@media (max-width: 991px) {
	.navbar-mobile { background: rgba(6, 10, 22, 0.97); }
	.navbar-mobile ul { background: var(--surface-solid); border: 1px solid var(--border); }
	.navbar-mobile a, .navbar-mobile a:focus { color: var(--text); }
}
.mobile-nav-toggle { color: var(--heading); }

/* ---------- Theme toggle button ---------- */
.theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin-left: 14px;
	border-radius: 999px;
	border: 1px solid var(--border-strong);
	background: var(--surface);
	color: var(--heading);
	cursor: pointer;
	font-size: 20px;
	transition: transform .25s ease, background .25s ease;
}
.theme-toggle:hover { transform: rotate(-12deg) scale(1.05); background: var(--surface-2); }
.theme-toggle .bi-sun-fill { display: none; }
:root[data-theme="light"] .theme-toggle .bi-moon-stars-fill { display: none; }
:root[data-theme="light"] .theme-toggle .bi-sun-fill { display: inline; }
@media (max-width: 991px) { .theme-toggle { position: fixed; top: 14px; right: 66px; z-index: 9998; } }

/* ---------- Hero ---------- */
#hero {
	width: 100%;
	min-height: 100vh;
	background: transparent;
	position: relative;
	overflow: hidden;
	padding-top: 90px;
}
#hero .hero-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	opacity: .55;
}
#hero .container { position: relative; z-index: 2; }

.hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 16px;
	border-radius: 999px;
	border: 1px solid var(--border-strong);
	background: var(--surface);
	color: var(--text);
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 22px;
	backdrop-filter: blur(6px);
}
.hero-badge .dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: #22d3ee; box-shadow: 0 0 10px #22d3ee;
	animation: pulse 1.8s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

#hero h1 {
	font-size: 54px;
	font-weight: 700;
	line-height: 1.12;
	color: var(--heading);
	margin-bottom: 22px;
}
#hero h1 .gradient-text { display: inline-block; }
#hero h2 {
	color: var(--text-muted);
	font-size: 19px;
	line-height: 1.7;
	margin-bottom: 30px;
	font-weight: 400;
	max-width: 560px;
}
#hero .btn-get-started {
	background: var(--grad);
	border: 0;
	box-shadow: var(--glow);
	border-radius: 999px;
	padding: 13px 32px;
	font-weight: 600;
	letter-spacing: .3px;
	color: #fff;
}
#hero .btn-get-started:hover { filter: brightness(1.1); }
#hero .btn-watch-video {
	color: var(--text);
	margin-left: 22px;
	font-weight: 500;
}
#hero .btn-watch-video i { color: var(--accent-3); font-size: 30px; }
#hero .hero-img img { filter: drop-shadow(0 30px 60px rgba(34, 211, 238, 0.18)); }

@media (max-width: 991px) {
	#hero { min-height: auto; padding: 130px 0 60px; text-align: center; }
	#hero h1 { font-size: 38px; }
	#hero h2 { margin-left: auto; margin-right: auto; }
	#hero .hero-badge { margin-top: 10px; }
}

/* Hero stat strip */
.hero-stats {
	display: flex;
	gap: 34px;
	margin-top: 40px;
	flex-wrap: wrap;
}
.hero-stats .stat .num {
	font-size: 30px;
	font-weight: 700;
	color: var(--heading);
	line-height: 1;
}
.hero-stats .stat .num span { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stats .stat .label { color: var(--text-muted); font-size: 13px; margin-top: 6px; }
@media (max-width: 991px) { .hero-stats { justify-content: center; } }

/* ---------- Generic sections ---------- */
section { position: relative; }
.about, .why-us, .skills, .services, .pricing, .contact, .ai-solutions, .clients {
	background: transparent;
}
.section-bg { background: var(--bg-2) !important; }

.section-title h2 {
	color: var(--heading);
	font-size: 34px;
	font-weight: 700;
}
.section-title h2::after { background: var(--grad); height: 4px; width: 60px; border-radius: 4px; }
.section-title p { color: var(--text-muted); }

.eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	margin-bottom: 12px;
	background: var(--grad);
	-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- AI Solutions cards ---------- */
.ai-solutions .ai-card {
	position: relative;
	height: 100%;
	padding: 30px 26px;
	border-radius: 18px;
	background: var(--surface);
	border: 1px solid var(--border);
	backdrop-filter: blur(8px);
	transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
	overflow: hidden;
}
.ai-solutions .ai-card::before {
	content: "";
	position: absolute; inset: 0;
	background: var(--grad-soft);
	opacity: 0;
	transition: opacity .35s ease;
}
.ai-solutions .ai-card:hover {
	transform: translateY(-8px);
	border-color: var(--border-strong);
	box-shadow: var(--shadow);
}
.ai-solutions .ai-card:hover::before { opacity: 1; }
.ai-solutions .ai-card > * { position: relative; z-index: 1; }
.ai-solutions .ai-icon {
	width: 58px; height: 58px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 14px;
	background: var(--grad);
	color: #fff;
	font-size: 27px;
	margin-bottom: 20px;
	box-shadow: var(--glow);
}
.ai-solutions .ai-card h4 { font-size: 19px; margin-bottom: 10px; color: var(--heading); }
.ai-solutions .ai-card p { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; margin: 0; }
.ai-solutions .ai-card .tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.ai-solutions .ai-card .tags span {
	font-size: 11.5px; padding: 4px 10px; border-radius: 999px;
	background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}

/* ---------- About / Why-us / cards restyle ---------- */
.about .content p, .why-us .content p { color: var(--text-muted); }
.about .content ul li, .why-us .content h3 { color: var(--text); }
.about .content ul i, .why-us .content h3 strong { color: var(--accent-3); }
.about .btn-learn-more, .why-us .content h3 strong { color: var(--accent-3); }
.about .btn-learn-more {
	border: 2px solid var(--accent);
	color: var(--accent);
	border-radius: 999px;
}
.about .btn-learn-more:hover { background: var(--grad); border-color: transparent; color: #fff; }

.why-us .content h3 { color: var(--heading); }
.why-us .content h3 strong { color: var(--accent-3); }
.why-us .content p { color: var(--text-muted); }
.why-us .accordion-list li {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 14px;
	backdrop-filter: blur(8px);
	transition: border-color .3s ease, box-shadow .3s ease;
}
.why-us .accordion-list li:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.why-us .accordion-list a { color: var(--heading); }
.why-us .accordion-list span { color: var(--accent-3); }
.why-us .accordion-list p { color: var(--text-muted); }
.why-us .accordion-list a.collapsed { color: var(--text); }
.why-us .accordion-list a.collapsed:hover { color: var(--accent); }
.why-us .accordion-list i { color: var(--accent-3); }

/* ---------- Skills ---------- */
.skills .progress { background: transparent; }
.skills .skill { color: var(--heading); }
.skills .progress-bar-wrap { background: var(--surface-2); border-radius: 999px; }
.skills .progress-bar { background: var(--grad); border-radius: 999px; }
.skills .content h3 { color: var(--heading); }
.skills .content p { color: var(--text-muted); }

/* ---------- Services icon boxes ---------- */
.services .icon-box {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: none;
	transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.services .icon-box:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.services .icon i { color: var(--accent-3); }
.services .icon-box h4 a { color: var(--heading); }
.services .icon-box:hover h4 a { color: var(--accent); }
.services .icon-box p { color: var(--text-muted); }

/* ---------- Pricing ---------- */
.pricing .box {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 18px;
	box-shadow: none;
	color: var(--text);
}
.pricing .box h3 { color: var(--text-muted); }
.pricing .box h4 { color: var(--heading); }
.pricing .box h4 sup, .pricing .box ul i { color: var(--accent-3); }
.pricing .box ul { color: var(--text-muted); }
.pricing .box.featured { border-color: var(--accent); box-shadow: var(--glow); }
.pricing .buy-btn {
	border: 2px solid var(--accent); color: var(--accent); border-radius: 999px;
}
.pricing .buy-btn:hover, .pricing .box.featured .buy-btn { background: var(--grad); border-color: transparent; color: #fff; }

/* ---------- Contact ---------- */
.contact .info { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.contact .info i { background: var(--surface-2); color: var(--accent-3); }
.contact .info h4 { color: var(--heading); }
.contact .info p { color: var(--text-muted); }
.contact .php-email-form {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 18px;
	box-shadow: none;
}
.contact .php-email-form label { color: var(--text); font-weight: 500; }
.contact .php-email-form input, .contact .php-email-form textarea {
	background: var(--surface-2);
	border: 1px solid var(--border);
	color: var(--text);
	border-radius: 10px;
}
.contact .php-email-form input:focus, .contact .php-email-form textarea:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}
.contact .php-email-form input::placeholder, .contact .php-email-form textarea::placeholder { color: var(--text-muted); }
.contact .php-email-form button[type="submit"] {
	background: var(--grad);
	border: 0;
	border-radius: 999px;
	padding: 12px 40px;
	box-shadow: var(--glow);
}
.contact .php-email-form button[type="submit"]:hover { filter: brightness(1.1); }

/* ---------- Footer ---------- */
#footer { background: var(--bg-2); color: var(--text-muted); border-top: 1px solid var(--border); }
#footer .footer-top { background: transparent; }
#footer .footer-contact h3, #footer h4 { color: var(--heading); }
#footer .footer-links ul a { color: var(--text-muted); }
#footer .footer-links ul a:hover { color: var(--accent); }
#footer .footer-links ul i, #footer .footer-contact p strong { color: var(--accent-3); }
#footer .social-links a { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
#footer .social-links a:hover { background: var(--grad); border-color: transparent; color: #fff; }
#footer .copyright span { color: var(--accent-3); }

/* ---------- Back to top ---------- */
.back-to-top { background: var(--grad) !important; box-shadow: var(--glow); }
.back-to-top:hover { filter: brightness(1.1); }

/* ---------- Preloader ---------- */
#preloader { background: var(--bg); }
#preloader:before { border-color: var(--accent) transparent var(--accent) transparent; }

/* ============================================================
   Sworoop AI Assistant — chat widget
   ============================================================ */
.ai-launcher {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9997;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 20px 12px 14px;
	border: 0;
	border-radius: 999px;
	background: var(--grad);
	color: #fff;
	font-weight: 600;
	font-size: 14.5px;
	cursor: pointer;
	box-shadow: 0 14px 40px -10px rgba(34, 211, 238, 0.55);
	transition: transform .25s ease, box-shadow .25s ease;
}
.ai-launcher:hover { transform: translateY(-3px); box-shadow: 0 20px 46px -10px rgba(124, 58, 237, 0.6); }
.ai-launcher .avatar {
	width: 30px; height: 30px; border-radius: 50%;
	background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.ai-launcher.hidden { transform: scale(.4); opacity: 0; pointer-events: none; }
@media (max-width: 575px) { .ai-launcher .txt { display: none; } .ai-launcher { padding: 14px; } }

.ai-panel {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9999;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 48px);
	display: flex;
	flex-direction: column;
	background: var(--surface-solid);
	border: 1px solid var(--border-strong);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
	transform: translateY(20px) scale(.96);
	opacity: 0;
	pointer-events: none;
	transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .3s ease;
}
.ai-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

.ai-panel .ai-head {
	display: flex; align-items: center; gap: 12px;
	padding: 16px 18px;
	background: var(--grad);
	color: #fff;
}
.ai-panel .ai-head .ai-avatar {
	width: 40px; height: 40px; border-radius: 50%;
	background: rgba(255,255,255,0.18);
	display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.ai-panel .ai-head .meta { line-height: 1.25; }
.ai-panel .ai-head .meta strong { font-size: 15.5px; display: block; }
.ai-panel .ai-head .meta small { font-size: 12px; opacity: .9; display: flex; align-items: center; gap: 6px; }
.ai-panel .ai-head .meta small .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #34ffb0; box-shadow: 0 0 8px #34ffb0; }
.ai-panel .ai-head .ai-close {
	margin-left: auto; background: transparent; border: 0; color: #fff; font-size: 22px; cursor: pointer; opacity: .9;
}
.ai-panel .ai-head .ai-close:hover { opacity: 1; }

.ai-body {
	flex: 1;
	overflow-y: auto;
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: var(--bg-2);
}
.ai-body::-webkit-scrollbar { width: 8px; }
.ai-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }

.ai-msg { max-width: 82%; padding: 11px 15px; border-radius: 16px; font-size: 14px; line-height: 1.6; }
.ai-msg.bot {
	align-self: flex-start;
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
	border-bottom-left-radius: 5px;
}
.ai-msg.user {
	align-self: flex-end;
	background: var(--grad);
	color: #fff;
	border-bottom-right-radius: 5px;
}

.ai-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.ai-suggestions button {
	font-size: 12.5px;
	padding: 7px 13px;
	border-radius: 999px;
	border: 1px solid var(--border-strong);
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}
.ai-suggestions button:hover { background: var(--grad); color: #fff; border-color: transparent; transform: translateY(-1px); }

.ai-typing { align-self: flex-start; display: flex; gap: 5px; padding: 13px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; border-bottom-left-radius: 5px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-3); animation: aiblink 1.2s infinite; }
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aiblink { 0%,60%,100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.ai-foot {
	display: flex; align-items: flex-end; gap: 10px;
	padding: 12px 14px;
	background: var(--surface-solid);
	border-top: 1px solid var(--border);
}
.ai-foot textarea {
	flex: 1;
	resize: none;
	max-height: 96px;
	border: 1px solid var(--border);
	background: var(--surface-2);
	color: var(--text);
	border-radius: 12px;
	padding: 11px 14px;
	font-size: 14px;
	font-family: inherit;
	outline: none;
}
.ai-foot textarea:focus { border-color: var(--accent); }
.ai-foot textarea::placeholder { color: var(--text-muted); }
.ai-foot .ai-send {
	width: 44px; height: 44px; flex: 0 0 44px;
	border: 0; border-radius: 12px;
	background: var(--grad); color: #fff;
	font-size: 19px; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: filter .2s ease;
}
.ai-foot .ai-send:hover { filter: brightness(1.1); }
.ai-foot .ai-send:disabled { opacity: .5; cursor: default; }

.ai-disclaimer { text-align: center; font-size: 11px; color: var(--text-muted); padding: 0 14px 10px; background: var(--surface-solid); }
.ai-disclaimer .mode-badge { color: var(--accent-3); font-weight: 600; }

@media (max-width: 575px) {
	.ai-panel { right: 8px; bottom: 8px; height: calc(100vh - 16px); }
	.ai-launcher { right: 12px; bottom: 12px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
