/**
 * Abannet — Modern UI Layer v1.2
 * Glass · Aurora · Bento · Micro-interactions
 */

/* ─── Design Tokens Override ─── */
:root {
	--color-primary: #1a2b4b;
	--color-primary-dark: #132038;
	--color-primary-light: #2a5080;
	--color-accent: #2a6fc0;
	--color-accent-2: #243a5e;
	--color-accent-glow: rgba(26, 43, 75, 0.12);

	--color-dark: #1a2b4b;
	--color-dark-secondary: #243a5e;
	--color-dark-tertiary: #2f4a6e;

	--color-text: #334155;
	--color-text-light: #64748b;
	--color-text-muted: #94a3b8;

	--color-bg: #f8fafc;
	--color-bg-alt: #f1f5f9;
	--color-border: #e2e8f0;

	--radius-sm: 10px;
	--radius-md: 14px;
	--radius-lg: 22px;
	--radius-xl: 32px;

	--shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
	--shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
	--shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
	--shadow-glow: 0 0 40px rgba(26, 43, 75, 0.1);
	--shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 20px 40px -12px rgba(15, 23, 42, 0.1);

	--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
	--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--transition: 0.35s var(--ease-out-expo);

	--glass-bg: rgba(255, 255, 255, 0.92);
	--glass-border: rgba(226, 232, 240, 0.9);
	--glass-blur: blur(16px) saturate(120%);

	--gradient-brand: linear-gradient(135deg, #1a2b4b 0%, #2a5080 100%);
	--gradient-dark: linear-gradient(180deg, #1a2b4b 0%, #132038 100%);

	--header-height: 64px;
}

/* ─── Base Polish ─── */
::selection {
	background: rgba(26, 43, 75, 0.12);
	color: var(--color-dark);
}

body {
	background: var(--color-white);
	letter-spacing: -0.01em;
	overflow-x: clip;
	max-width: 100%;
}

/* ─── Global overflow guard ─── */
.site-header,
.site-footer,
.section,
.hero,
.eng-tools-section,
.eng-tools-hub,
.eng-bento {
	max-width: 100%;
}

.hero-bg {
	overflow: hidden;
}

.site-header {
	width: 100%;
	overflow-x: clip;
}

body.abannet-front-page {
	background: #ffffff;
}

body.abannet-front-page .site-main {
	padding-top: 0;
}

body.abannet-front-page .site-header {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 1000;
	padding: 8px 0 0;
	background: transparent;
}

body.abannet-front-page .hero {
	margin-top: 0;
}

body.abannet-front-page .hero-content {
	padding-top: calc(var(--header-height) + 10px);
}

body.abannet-front-page .hero-content--showcase {
	display: block;
}

.section {
	padding: 48px 0;
}

.section-header {
	margin-bottom: 40px;
}

.section-badge {
	padding: 5px 12px;
	font-size: 0.8125rem;
	margin-bottom: 12px;
}

/* ─── Section Badges — Gradient Border ─── */
.section-badge,
.hero-badge {
	background: rgba(26, 43, 75, 0.05);
	border: 1px solid rgba(26, 43, 75, 0.12);
	backdrop-filter: blur(8px);
	letter-spacing: 0.02em;
	color: var(--color-primary);
}

.section-badge::before,
.hero-badge::before {
	display: none;
}

.section-title {
	letter-spacing: -0.03em;
}

.text-gradient {
	background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
	background-size: 200% auto;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

@keyframes gradient-shift {
	0%, 100% { background-position: 0% center; }
	50% { background-position: 100% center; }
}

/* ─── Buttons — Shine & Glow ─── */
.btn {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius-md);
	transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-out-expo), background 0.35s ease;
}

.btn-primary {
	background: var(--color-primary);
	border: none;
	box-shadow: none;
}

.btn-primary::after {
	display: none;
}

.btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: none;
	color: #fff;
}

.btn-outline,
.btn-outline-white {
	backdrop-filter: blur(8px);
}

/* ─── Header — Floating Glass Bar ─── */
.site-header {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 1000;
	height: auto;
	min-height: var(--header-height);
	background: transparent;
	border-bottom: none;
	padding: 6px 0 0;
}

.site-header .header-inner {
	background: var(--glass-bg);
	backdrop-filter: var(--glass-blur);
	-webkit-backdrop-filter: var(--glass-blur);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
	padding: 0 16px;
	height: 52px;
	max-width: 100%;
	min-width: 0;
	box-shadow: var(--shadow-sm);
	transition: all 0.4s var(--ease-out-expo);
}

.site-header.scrolled .header-inner {
	background: rgba(255, 255, 255, 0.88);
	box-shadow: var(--shadow-md), 0 0 0 1px rgba(59, 130, 246, 0.06);
}

.brand-icon {
	width: 42px;
	height: 42px;
	background: var(--gradient-brand);
	border-radius: 12px;
	padding: 8px;
	color: #fff !important;
	box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.brand-text strong {
	background: var(--gradient-brand);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* ─── Official Logo ─── */
.site-branding {
	flex-shrink: 1;
	min-width: 0;
	overflow: hidden;
}

.site-branding .brand-link,
.footer-logo-link {
	display: inline-flex;
	align-items: center;
	line-height: 0;
	transition: opacity 0.3s ease, transform 0.35s var(--ease-out-expo);
}

.site-branding .brand-link:hover,
.footer-logo-link:hover {
	opacity: 0.9;
	transform: scale(1.02);
}

.site-logo img {
	display: block;
	width: auto;
	height: auto;
	max-height: 52px;
	max-width: min(210px, 46vw);
	object-fit: contain;
	object-position: right center;
}

.site-logo--footer {
	display: inline-block;
	padding: 0;
	background: transparent;
	border-radius: 0;
	box-shadow: none;
	border: none;
	margin-bottom: 16px;
}

.site-logo--footer img {
	max-height: 96px;
	max-width: min(300px, 88vw);
}

.nav-menu li a {
	position: relative;
	font-weight: 600;
	font-size: 0.9375rem;
}

.nav-menu li a::after {
	content: '';
	position: absolute;
	bottom: 4px;
	right: 18px;
	left: 18px;
	height: 2px;
	background: var(--gradient-brand);
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.35s var(--ease-out-expo);
}

.nav-menu li a:hover::after,
.nav-menu li.current-menu-item a::after,
.nav-menu li.current_page_item a::after {
	transform: scaleX(1);
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a,
.nav-menu li.current_page_item a {
	background: transparent;
	color: var(--color-primary);
}

.phone-dropdown-toggle {
	background: rgba(26, 43, 75, 0.04);
	border-color: rgba(26, 43, 75, 0.1);
	border-radius: var(--radius-md);
}

/* ─── Hero — Minimal Light ─── */
.hero {
	background: #f8fafc;
	min-height: auto;
	align-items: flex-start;
	color: var(--color-text);
}

.hero-aurora,
.hero-orb,
.hero-data-stream,
.hero-scanlines,
.hero-canvas {
	display: none !important;
}

.hero-aurora {
	position: absolute;
	inset: -20%;
	background:
		radial-gradient(ellipse 80% 60% at 20% 30%, rgba(59, 130, 246, 0.35) 0%, transparent 55%),
		radial-gradient(ellipse 60% 50% at 80% 20%, rgba(34, 211, 238, 0.2) 0%, transparent 50%),
		radial-gradient(ellipse 50% 40% at 60% 80%, rgba(129, 140, 248, 0.25) 0%, transparent 50%);
	animation: aurora-drift 18s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
	0% { transform: translate(0, 0) rotate(0deg); }
	100% { transform: translate(-3%, 2%) rotate(2deg); }
}

.hero-grid {
	background-image:
		linear-gradient(rgba(26, 43, 75, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(26, 43, 75, 0.04) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 20%, transparent 75%);
	opacity: 0.5;
}

@keyframes grid-pulse {
	0%, 100% { opacity: 0.6; }
	50% { opacity: 1; }
}

.hero-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	animation: orb-float 12s ease-in-out infinite;
}

.hero-orb-1 {
	width: 320px;
	height: 320px;
	background: rgba(59, 130, 246, 0.4);
	top: 10%;
	left: 5%;
	animation-delay: 0s;
}

.hero-orb-2 {
	width: 240px;
	height: 240px;
	background: rgba(34, 211, 238, 0.3);
	bottom: 20%;
	right: 15%;
	animation-delay: -4s;
}

.hero-orb-3 {
	width: 180px;
	height: 180px;
	background: rgba(129, 140, 248, 0.35);
	top: 50%;
	right: 35%;
	animation-delay: -8s;
}

@keyframes orb-float {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(20px, -30px) scale(1.05); }
	66% { transform: translate(-15px, 20px) scale(0.95); }
}

.hero-noise {
	position: absolute;
	inset: 0;
	opacity: 0.035;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	pointer-events: none;
}

.hero-title {
	font-size: clamp(2.5rem, 6vw, 4rem);
	letter-spacing: -0.04em;
	line-height: 1.1;
	text-shadow: 0 2px 40px rgba(0, 0, 0, 0.3);
}

.hero-title--brand {
	font-size: inherit;
	text-shadow: none;
	margin-bottom: 12px;
}

.hero-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hero-wordmark {
	display: block;
	width: min(100%, 520px);
	height: auto;
	max-height: clamp(88px, 18vw, 168px);
	object-fit: contain;
	object-position: right center;
	filter: none;
}

.hero-content {
	padding: 20px 20px 44px;
	gap: 32px;
}

.hero-desc {
	font-size: 1.0625rem;
	color: var(--color-text-light);
	max-width: 540px;
	margin-bottom: 22px;
	line-height: 1.65;
}

.hero-text {
	animation: hero-enter 1s var(--ease-out-expo) both;
}

.hero-visual {
	animation: hero-enter 1s var(--ease-out-expo) 0.15s both;
}

@keyframes hero-enter {
	from {
		opacity: 0;
		transform: translateY(32px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.signal-center {
	width: 96px;
	height: 96px;
	background: var(--gradient-brand);
	box-shadow: var(--shadow-glow), 0 0 80px rgba(34, 211, 238, 0.3);
	animation: signal-pulse 3s ease-in-out infinite;
}

@keyframes signal-pulse {
	0%, 100% { box-shadow: var(--shadow-glow), 0 0 60px rgba(34, 211, 238, 0.25); }
	50% { box-shadow: var(--shadow-glow), 0 0 100px rgba(34, 211, 238, 0.45); }
}

.float-stat {
	background: #fff;
	backdrop-filter: blur(16px);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
	transition: transform 0.4s var(--ease-spring), border-color 0.3s ease;
}

.float-stat:hover {
	transform: translateY(-4px) scale(1.03);
	border-color: rgba(26, 43, 75, 0.2);
}

.float-stat strong {
	color: var(--color-primary);
}

.float-stat span {
	color: var(--color-text-muted);
}

.hero-wave svg {
	height: 64px;
	filter: drop-shadow(0 -4px 20px rgba(59, 130, 246, 0.08));
}

/* ─── Stats Bar — Glass Cards ─── */
.stats-bar {
	margin-top: -32px;
	overflow: visible;
}

.stats-grid {
	max-width: 100%;
}

.stats-grid {
	background: var(--glass-bg);
	backdrop-filter: var(--glass-blur);
	-webkit-backdrop-filter: var(--glass-blur);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
	padding: 18px 22px;
	box-shadow: var(--shadow-card);
}

.stat-item {
	padding: 10px;
	border-radius: var(--radius-md);
	transition: background 0.3s ease, transform 0.35s var(--ease-spring);
}

.stat-item:hover {
	background: rgba(26, 43, 75, 0.04);
	transform: translateY(-2px);
}

.stat-icon {
	background: var(--color-primary);
	color: #fff;
	border-radius: 14px;
	box-shadow: 0 4px 14px rgba(26, 43, 75, 0.2);
}

.stat-number {
	font-size: 1.5rem;
	letter-spacing: -0.03em;
}

/* ─── Services — Bento Cards ─── */
.services-section {
	background:
		radial-gradient(ellipse 60% 40% at 10% 0%, rgba(59, 130, 246, 0.06) 0%, transparent 60%),
		radial-gradient(ellipse 50% 30% at 90% 100%, rgba(34, 211, 238, 0.05) 0%, transparent 50%),
		var(--color-bg);
}

.service-card {
	position: relative;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(12px);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: transform 0.45s var(--ease-out-expo), box-shadow 0.45s var(--ease-out-expo), border-color 0.3s ease;
}

.service-card::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 3px;
	background: var(--gradient-brand);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.45s var(--ease-out-expo);
}

.service-card:hover {
	transform: translateY(-10px);
	box-shadow: var(--shadow-card);
	border-color: rgba(59, 130, 246, 0.25);
}

.service-card:hover::before {
	transform: scaleX(1);
}

.service-icon {
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
	transition: transform 0.4s var(--ease-spring);
}

.service-card:hover .service-icon {
	transform: scale(1.08) rotate(-3deg);
}

/* ─── About — Elevated Cards ─── */
.about-card {
	backdrop-filter: blur(12px);
	transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.about-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--shadow-lg);
}

.about-card-accent {
	background: var(--gradient-brand);
	box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
}

.feature-check {
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(34, 211, 238, 0.1));
}

/* ─── Why Section — Neon Grid ─── */
.why-section {
	background: var(--gradient-dark);
}

.why-card {
	background: rgba(255, 255, 255, 0.03);
	backdrop-filter: blur(12px);
	border-radius: var(--radius-lg);
	transition: transform 0.4s var(--ease-out-expo), background 0.3s ease, box-shadow 0.4s ease;
}

.why-card:hover {
	background: rgba(255, 255, 255, 0.07);
	transform: translateY(-6px);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(34, 211, 238, 0.15);
}

.why-number {
	background: var(--gradient-brand);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	opacity: 0.7;
}

/* ─── Tariff Table — Premium Dark ─── */
.tariff-section {
	background: var(--gradient-dark);
}

.tariff-table {
	border-radius: var(--radius-xl);
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tariff-row-featured {
	background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(34, 211, 238, 0.08));
	border-right: 3px solid;
	border-image: var(--gradient-brand) 1;
	box-shadow: inset 0 0 60px rgba(59, 130, 246, 0.05);
}

.tariff-badge {
	box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.btn-tariff:hover {
	box-shadow: 0 8px 30px rgba(34, 211, 238, 0.35);
}

/* ─── Consultation Form — Modern Input ─── */
.consultation-section {
	background:
		radial-gradient(ellipse 50% 40% at 100% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 55%),
		var(--color-bg);
}

.consultation-form-wrap {
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
	border: 1px solid rgba(255, 255, 255, 0.8);
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px);
	padding: 28px;
}

.consultation-form .form-group input,
.consultation-form .form-group select,
.consultation-form .form-group textarea,
.contact-form .form-group input,
.contact-form .form-group select,
.contact-form .form-group textarea {
	border-radius: var(--radius-md);
	border: 1.5px solid var(--color-border);
	background: rgba(248, 250, 252, 0.8);
	transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.consultation-form .form-group input:focus,
.consultation-form .form-group select:focus,
.consultation-form .form-group textarea:focus,
.contact-form .form-group input:focus,
.contact-form .form-group select:focus,
.contact-form .form-group textarea:focus {
	border-color: var(--color-primary);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.consultation-hotline {
	border-radius: var(--radius-md);
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(34, 211, 238, 0.04));
	border: 1px solid rgba(59, 130, 246, 0.15);
}

/* ─── CTA Box — Holographic ─── */
.cta-box {
	background: var(--gradient-brand);
	background-size: 200% 200%;
	animation: cta-gradient 8s ease infinite;
	border-radius: var(--radius-xl);
	box-shadow: 0 20px 60px rgba(59, 130, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@keyframes cta-gradient {
	0%, 100% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
}

.cta-box::before {
	filter: blur(80px);
	opacity: 0.6;
}

/* ─── Footer — Refined Dark ─── */
.site-footer {
	background: linear-gradient(180deg, #0f172a 0%, #030712 100%);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-neshan-map {
	border-radius: var(--radius-md);
	backdrop-filter: blur(8px);
}

/* ─── Page Hero ─── */
.page-hero {
	background: var(--gradient-dark);
}

.page-hero::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.4), transparent);
}

/* ─── Scroll Reveal Enhancement ─── */
.fade-in {
	opacity: 0;
	transform: translateY(40px) scale(0.98);
	transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.fade-in.visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

/* ─── Form Success Glow ─── */
.form-alert-success {
	animation: success-glow 0.6s var(--ease-out-expo), success-pulse-soft 2.5s ease 0.6s infinite;
}

@keyframes success-glow {
	from {
		opacity: 0;
		transform: translateY(-12px) scale(0.96);
		box-shadow: none;
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
		box-shadow: 0 0 40px rgba(16, 185, 129, 0.25);
	}
}

@keyframes success-pulse-soft {
	0%, 100% { box-shadow: 0 0 30px rgba(16, 185, 129, 0.15); }
	50% { box-shadow: 0 0 50px rgba(16, 185, 129, 0.28); }
}

/* ─── 404 ─── */
.error-code {
	font-size: clamp(5rem, 15vw, 9rem);
}

/* ─── Responsive Refinements ─── */
@media (max-width: 1024px) {
	.site-header .header-inner {
		border-radius: var(--radius-lg);
	}
}

@media (max-width: 768px) {
	.site-header {
		padding: 8px 0;
	}

	.site-logo img {
		max-height: 44px;
		max-width: min(200px, 48vw);
	}

	.site-logo--footer img {
		max-height: 72px;
		max-width: 240px;
	}

	.site-header .header-inner {
		height: 56px;
		padding: 0 14px;
		border-radius: var(--radius-md);
	}

	.site-main {
		padding-top: 60px;
	}

	body.abannet-front-page .site-main {
		padding-top: 0;
	}

	body.abannet-front-page .hero-content {
		padding-top: calc(var(--header-height) + 8px);
	}

	:root {
		--header-height: 60px;
	}

	.hero {
		min-height: auto;
		padding-bottom: 0;
	}

	.hero-content {
		padding: 16px 16px 36px;
		gap: 24px;
	}

	.hero-title {
		font-size: clamp(2rem, 8vw, 2.75rem);
	}

	.hero-wordmark {
		width: min(100%, 360px);
		max-height: 120px;
	}

	.stats-bar {
		margin-top: -24px;
	}

	.stats-grid {
		padding: 16px;
		gap: 10px;
	}

	.section {
		padding: 56px 0;
	}

	.service-card:hover {
		transform: translateY(-4px);
	}

	.cta-box {
		border-radius: var(--radius-lg);
	}

	.consultation-form-wrap {
		padding: 24px 18px;
	}
}

@media (max-width: 480px) {
	.container {
		padding: 0 16px;
	}

	.hero-content {
		padding: 48px 16px 80px;
	}

	.btn {
		font-size: 0.9375rem;
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.fade-in {
		opacity: 1;
		transform: none;
	}
}
