/* ============================================
   GRIDALE CLOUD — Design System
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
	--gridale-navy: #0B1F66;
	--gridale-blue: #1540A8;
	--gridale-mid: #2065D0;
	--gridale-cyan: #50C0F5;
	--gridale-gray: #5A6B8A;
	--gridale-light: #F0F4FA;
	--gridale-white: #FFFFFF;
	--gridale-shadow-sm: 0 1px 3px rgba(11, 31, 102, 0.06);
	--gridale-shadow-md: 0 4px 16px rgba(11, 31, 102, 0.08);
	--gridale-shadow-lg: 0 12px 40px rgba(11, 31, 102, 0.12);
	--gridale-shadow-xl: 0 20px 60px rgba(11, 31, 102, 0.16);
	--gridale-radius-sm: 8px;
	--gridale-radius-md: 12px;
	--gridale-radius-lg: 16px;
	--gridale-radius-xl: 24px;
	--gridale-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Global --- */
html {
	scroll-behavior: smooth;
	scroll-padding-top: 80px;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Remove default list bullets in footer and nav */
.gridale-footer ul,
.wp-block-navigation ul {
	list-style: none;
	padding: 0;
}

/* --- Scroll Reveal Animations --- */
@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(30px); }
	to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
	from { opacity: 0; transform: scale(0.95); }
	to { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
	from { opacity: 0; transform: translateX(-30px); }
	to { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
	0% { background-position: -200% 0; }
	100% { background-position: 200% 0; }
}
@keyframes float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}
@keyframes gradientShift {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

.gridale-animate {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.gridale-animate.is-visible {
	opacity: 1;
	transform: translateY(0);
}
.gridale-animate.delay-1 { transition-delay: 0.1s; }
.gridale-animate.delay-2 { transition-delay: 0.2s; }
.gridale-animate.delay-3 { transition-delay: 0.3s; }

/* --- Header --- */
.gridale-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(7, 15, 58, 0.96);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	border-bottom: 1px solid rgba(80, 192, 245, 0.10);
	transition: box-shadow var(--gridale-transition), background var(--gridale-transition);
}
.gridale-header.scrolled {
	background: rgba(7, 15, 58, 0.99);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* --- Navigation --- */
.wp-block-navigation .wp-block-navigation-item__content {
	font-weight: 500;
	font-size: 0.9375rem;
	color: rgba(255, 255, 255, 0.78);
	padding: 0.5rem 0.75rem;
	border-radius: var(--gridale-radius-sm);
	transition: color var(--gridale-transition), background var(--gridale-transition);
	text-decoration: none;
	position: relative;
}
.wp-block-navigation .wp-block-navigation-item__content:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

/* Active page — cyan text + underline */
.wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation-item .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--gridale-cyan) !important;
}
.wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::before,
.wp-block-navigation-item .wp-block-navigation-item__content[aria-current="page"]::before {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0.75rem;
	right: 0.75rem;
	height: 2px;
	background: var(--gridale-cyan);
	border-radius: 2px;
}

/* Chevron — white on dark */
.wp-block-navigation .wp-block-navigation-submenu > .wp-block-navigation-item__content::after {
	content: "";
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 5px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 4px solid rgba(255, 255, 255, 0.55);
	vertical-align: middle;
}

/* Submenu dropdowns — dark */
.wp-block-navigation .wp-block-navigation__submenu-container {
	background: #070F3A;
	border: 1px solid rgba(80, 192, 245, 0.15);
	border-radius: var(--gridale-radius-md);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
	padding: 0.5rem;
	min-width: 240px;
	animation: fadeInScale 0.2s ease-out;
}
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 0.875rem;
	font-weight: 450;
	padding: 0.625rem 1rem;
	border-radius: var(--gridale-radius-sm);
	display: block;
	color: rgba(255, 255, 255, 0.72);
}
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

/* Console button in header */

/* Mobile overlay — dark */
.wp-block-navigation__responsive-container.is-menu-open {
	background: #070F3A !important;
}

/* --- Hero Sections (gradient backgrounds) --- */

@keyframes heroPulse {
	0%, 100% { opacity: 0.4; }
	50% { opacity: 1; }
}
@keyframes heroOrbFloat1 {
	0% { transform: translate(0, 0) scale(1); }
	25% { transform: translate(50px, -40px) scale(1.15); }
	50% { transform: translate(-10px, 30px) scale(0.9); }
	75% { transform: translate(30px, -10px) scale(1.05); }
	100% { transform: translate(0, 0) scale(1); }
}
@keyframes heroOrbFloat2 {
	0% { transform: translate(0, 0) scale(1); }
	25% { transform: translate(-40px, 50px) scale(1.1); }
	50% { transform: translate(60px, -20px) scale(0.85); }
	75% { transform: translate(-20px, -30px) scale(1.05); }
	100% { transform: translate(0, 0) scale(1); }
}
@keyframes heroGradientShift {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}
@keyframes heroContentIn {
	from { opacity: 0; transform: translateY(24px); }
	to { opacity: 1; transform: translateY(0); }
}
@keyframes heroBtnGlow {
	0%, 100% { box-shadow: 0 4px 16px rgba(80, 192, 245, 0.35); }
	50% { box-shadow: 0 4px 28px rgba(80, 192, 245, 0.6), 0 0 40px rgba(80, 192, 245, 0.15); }
}

/* Animated gradient background */
.has-gridale-navy-gradient-background {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #070F3A 0%, #0B1F66 25%, #1540A8 50%, #0B1F66 75%, #1A3280 100%) !important;
	background-size: 400% 400% !important;
	animation: heroGradientShift 15s ease infinite;
}

/* Cloud network canvas — size/position enforced via JS setProperty('important') */
.gridale-cloud-canvas {
	position: absolute;
	top: 0;
	left: 0;
	pointer-events: none;
	z-index: 0;
}

/* Content above canvas */
.has-gridale-navy-gradient-background > *:not(.gridale-cloud-canvas) {
	position: relative;
	z-index: 1;
}

/* Staggered entrance */
.has-gridale-navy-gradient-background .alignwide > * {
	opacity: 0;
	animation: heroContentIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.has-gridale-navy-gradient-background .alignwide > *:nth-child(1) { animation-delay: 0.1s; }
.has-gridale-navy-gradient-background .alignwide > *:nth-child(2) { animation-delay: 0.25s; }
.has-gridale-navy-gradient-background .alignwide > *:nth-child(3) { animation-delay: 0.4s; }
.has-gridale-navy-gradient-background .alignwide > *:nth-child(4) { animation-delay: 0.55s; }
.has-gridale-navy-gradient-background .alignwide > *:nth-child(5) { animation-delay: 0.7s; }

/* Heading glow */
.has-gridale-navy-gradient-background h1 {
	text-shadow: 0 0 80px rgba(80, 192, 245, 0.2), 0 0 30px rgba(80, 192, 245, 0.08);
}

/* Cyan span shimmer */
.has-gridale-navy-gradient-background h1 span {
	background: linear-gradient(90deg, #50C0F5 0%, #8ED8F8 25%, #50C0F5 50%, #3AAFE8 75%, #50C0F5 100%);
	background-size: 300% 100%;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	animation: shimmer 6s ease-in-out infinite;
}

/* CTA button glow pulse */
.has-gridale-navy-gradient-background .wp-block-button__link.has-accent-1-background-color {
	animation: heroBtnGlow 2.5s ease-in-out infinite;
}

/* Trust badges */
.gridale-hero-trust {
	display: flex;
	gap: 1.5rem;
	align-items: center;
	justify-content: center;
	margin-top: 1rem;
	flex-wrap: wrap;
}
.gridale-hero-trust span {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.7);
	font-weight: 500;
	transition: color 0.3s ease;
}
.gridale-hero-trust span:hover {
	color: rgba(255, 255, 255, 0.95);
}
.gridale-hero-trust .trust-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--gridale-cyan);
	box-shadow: 0 0 8px rgba(80, 192, 245, 0.6);
	animation: heroPulse 2s ease-in-out infinite;
}
.gridale-hero-trust span:nth-child(2) .trust-dot { animation-delay: 0.3s; }
.gridale-hero-trust span:nth-child(3) .trust-dot { animation-delay: 0.6s; }
.gridale-hero-trust span:nth-child(4) .trust-dot { animation-delay: 0.9s; }
.gridale-hero-trust span:nth-child(5) .trust-dot { animation-delay: 1.2s; }

/* --- CTA Sections (cyan gradient) --- */
.has-gridale-cyan-gradient-background {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #1540A8 0%, #2065D0 40%, #50C0F5 100%) !important;
}
.has-gridale-cyan-gradient-background::before {
	content: "";
	position: absolute;
	top: -40%;
	left: -15%;
	width: 500px;
	height: 500px;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
	border-radius: 50%;
	pointer-events: none;
	animation: heroOrbFloat2 12s ease-in-out infinite;
}
.has-gridale-cyan-gradient-background::after {
	content: "";
	position: absolute;
	bottom: -30%;
	right: -10%;
	width: 400px;
	height: 400px;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
	border-radius: 50%;
	pointer-events: none;
	animation: heroOrbFloat1 15s ease-in-out infinite;
}
.has-gridale-cyan-gradient-background > * {
	position: relative;
	z-index: 1;
}

/* --- Buttons --- */
.wp-element-button,
.wp-block-button__link {
	font-weight: 600;
	letter-spacing: -0.01em;
	padding: 0.75rem 1.75rem;
	border-radius: var(--gridale-radius-sm);
	transition: all var(--gridale-transition);
	position: relative;
	overflow: hidden;
}
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: var(--gridale-shadow-md);
}
.wp-block-button__link:active {
	transform: translateY(0);
}

/* Primary CTA buttons (cyan bg) */
.wp-block-button__link.has-accent-1-background-color {
	background: linear-gradient(135deg, var(--gridale-cyan) 0%, #3AAFE8 100%) !important;
	box-shadow: 0 4px 16px rgba(80, 192, 245, 0.35);
}
.wp-block-button__link.has-accent-1-background-color:hover {
	box-shadow: 0 8px 24px rgba(80, 192, 245, 0.45);
}

/* White CTA buttons */
.wp-block-button__link.has-base-background-color {
	box-shadow: 0 2px 8px rgba(11, 31, 102, 0.08);
}
.wp-block-button__link.has-base-background-color:hover {
	box-shadow: 0 8px 24px rgba(11, 31, 102, 0.12);
}

/* Outline buttons */
.wp-block-button__link.has-border-color {
	backdrop-filter: blur(4px);
}
.wp-block-button__link.has-border-color:hover {
	background: rgba(255, 255, 255, 0.12) !important;
}

/* --- Service Cards --- */
.service-card {
	transition: all var(--gridale-transition);
	border: 1px solid rgba(11, 31, 102, 0.06);
	position: relative;
	overflow: hidden;
}
.service-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--gridale-cyan), var(--gridale-mid));
	opacity: 0;
	transition: opacity var(--gridale-transition);
}
.service-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--gridale-shadow-lg);
	border-color: rgba(80, 192, 245, 0.2);
}
.service-card:hover::before {
	opacity: 1;
}

/* Cards with accent-5 bg */
.service-card.has-accent-5-background-color {
	border-color: transparent;
}
.service-card.has-accent-5-background-color:hover {
	background-color: var(--gridale-white) !important;
	border-color: rgba(80, 192, 245, 0.2);
}

/* Cards with base bg */
.service-card.has-base-background-color {
	border-color: rgba(11, 31, 102, 0.06);
}

/* Card headings */
.service-card h3,
.service-card h4 {
	transition: color var(--gridale-transition);
}
.service-card:hover h3,
.service-card:hover h4 {
	color: var(--gridale-mid) !important;
}

/* --- Stats / Key Numbers --- */
.is-style-stat-number {
	font-size: clamp(2.5rem, 5vw, 3.5rem);
	font-weight: 700;
	line-height: 1;
	background: linear-gradient(135deg, var(--gridale-cyan), var(--gridale-mid));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* Stat blocks on homepage */
.has-accent-5-background-color .has-accent-1-color {
	transition: transform 0.4s ease;
}

/* --- Pricing Cards --- */
.is-style-pricing-highlight {
	border: 2px solid var(--gridale-cyan);
	border-radius: var(--gridale-radius-md);
	position: relative;
}

/* Pricing section cards with colored borders */
.has-border-color {
	transition: all var(--gridale-transition);
}
.has-border-color:hover {
	transform: translateY(-4px);
	box-shadow: var(--gridale-shadow-lg);
}

/* --- Section spacing (compact) --- */
.alignfull > .wp-block-heading {
	margin-bottom: 0.5rem;
}
.alignfull > .wp-block-heading + .has-text-align-center {
	margin-bottom: 1.5rem;
}

/* Reduce vertical gaps between sections */
.wp-block-group.alignfull + .wp-block-group.alignfull {
	margin-top: 0;
}

/* Tighter blockGap inside full-width sections */
.wp-block-group.alignfull > .wp-block-group {
	gap: 0.75rem;
}

/* Compact paragraphs in cards */
.service-card p,
.has-base-background-color p:last-child,
.has-accent-5-background-color .has-base-background-color p:last-child {
	margin-bottom: 0;
}

/* Reduce default WP block margins */
.wp-block-group .wp-block-heading {
	margin-top: 0;
	margin-bottom: 0.5rem;
}

/* Tighter spacing for stat numbers */
.is-style-stat-number {
	margin-bottom: 0.25rem;
}

/* Compact columns block gap */
.wp-block-columns.alignwide {
	gap: 1.25rem;
}

/* Reduce spacing in hero/CTA sections */
.has-gridale-navy-gradient-background .wp-block-buttons,
.has-gridale-cyan-gradient-background .wp-block-buttons {
	margin-top: 1.5rem;
}

/* --- Certifications / Feature boxes --- */
.has-accent-5-background-color .has-base-background-color {
	transition: all var(--gridale-transition);
}
.has-accent-5-background-color .has-base-background-color:hover {
	transform: translateY(-2px);
	box-shadow: var(--gridale-shadow-md);
}

/* --- FAQ Section --- */
.wp-block-separator.has-accent-5-background-color {
	opacity: 0.5;
}

/* --- Footer --- */
.gridale-footer {
	position: relative;
	overflow: hidden;
}
.gridale-footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 80%;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(80, 192, 245, 0.3), transparent);
}
.gridale-footer a {
	color: rgba(255, 255, 255, 0.7) !important;
	text-decoration: none;
	transition: color var(--gridale-transition);
}
.gridale-footer a:hover {
	color: var(--gridale-cyan) !important;
}
.gridale-footer ul {
	list-style: none;
	padding-left: 0;
}
.gridale-footer li {
	padding: 0.25rem 0;
}
.gridale-footer .wp-block-social-links a {
	transition: transform var(--gridale-transition), opacity var(--gridale-transition);
}
.gridale-footer .wp-block-social-links a:hover {
	transform: translateY(-2px);
	opacity: 0.8;
}

/* --- Language Switcher --- */
.gridale-lang-switcher {
	display: inline-flex;
	gap: 0.25rem;
	align-items: center;
	background: rgba(255, 255, 255, 0.08);
	padding: 0.2rem;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.12);
}
.gridale-lang-switcher a {
	text-decoration: none;
	font-weight: 600;
	font-size: 0.8rem;
	padding: 0.3rem 0.6rem;
	border-radius: 4px;
	color: rgba(255, 255, 255, 0.58);
	transition: all var(--gridale-transition);
}
.gridale-lang-switcher .current-lang {
	background: rgba(80, 192, 245, 0.20);
	color: var(--gridale-cyan);
	box-shadow: none;
}

/* --- Columns / grid visual improvements --- */
.wp-block-columns {
	gap: 1.5rem;
}
.wp-block-column > .wp-block-group {
	height: 100%;
}

/* --- Responsive --- */
@media (max-width: 768px) {
	.gridale-header .wp-block-image img {
		width: 110px !important;
	}
	.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
		margin-bottom: 1rem;
	}
	.service-card {
		margin-bottom: 0.5rem;
	}
	.gridale-cloud-canvas {
		display: none;
	}
	.gridale-hero-trust {
		justify-content: center;
	}
}

/* --- Focus states for a11y --- */
.wp-block-button__link:focus-visible,
.wp-block-navigation-item__content:focus-visible {
	outline: 2px solid var(--gridale-cyan);
	outline-offset: 2px;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
	.gridale-cloud-canvas { display: none; }
	.has-gridale-navy-gradient-background,
	.has-gridale-navy-gradient-background .alignwide > * {
		animation: none !important;
		opacity: 1 !important;
	}
}

/* --- Selection color --- */
::selection {
	background: rgba(80, 192, 245, 0.2);
	color: var(--gridale-navy);
}
