/* ============================================
   JIGSAW NOTIONS — Premium Dark Agency Design
   Inspired by Digital Gravity aesthetic
   Blue palette with rich gradients & animations
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary-dark: #060b18;
  --primary-bg: #0a1225;
  --secondary-bg: #0f1d36;
  --tertiary-bg: #142847;
  --accent-blue: #1e90ff;
  --accent-blue-light: #4da6ff;
  --accent-blue-dark: #0a6edc;
  --accent-cyan: #00d4ff;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  --text-white: #ffffff;
  --text-light: #c8d6e5;
  --text-muted: #8a9cb3;
  --card-bg: rgba(15, 29, 54, 0.7);
  --card-border: rgba(30, 144, 255, 0.12);
  --nav-bg: rgba(6, 11, 24, 0.88);
  --gradient-blue: linear-gradient(135deg, #1e90ff, #00d4ff);
  --gradient-blue-purple: linear-gradient(135deg, #1e90ff, #6366f1);
  --gradient-cyan-blue: linear-gradient(135deg, #00d4ff, #1e90ff);
  --gradient-dark: linear-gradient(180deg, #060b18 0%, #0a1225 100%);
  --gradient-radial-blue: radial-gradient(ellipse at 50% 50%, rgba(30, 144, 255, 0.15), transparent 70%);
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1320px;
  --nav-height: 90px;
  --section-padding: 120px 0;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  background-color: var(--primary-dark);
  color: var(--text-light);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Sticky-footer layout: page always fills the viewport */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

/* Content stretches so short pages never leave a gap above the footer */
main {
  flex: 1 0 auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

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

ul, ol {
  list-style: none;
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-white);
  font-weight: 700;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
}

h4 {
  font-size: 1.15rem;
}

p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.8;
}

/* --- Gradient Text Utility --- */
.gradient-text {
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-animated {
  background: linear-gradient(270deg, #1e90ff, #00d4ff, #6366f1, #1e90ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Section Label (dot + label) --- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.section-label::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  display: inline-block;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.6), 0 0 30px rgba(0, 212, 255, 0.2);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 212, 255, 0.6), 0 0 30px rgba(0, 212, 255, 0.2); }
  50% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.9), 0 0 50px rgba(0, 212, 255, 0.4); }
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(30, 144, 255, 0.08);
  padding: 12px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-white);
}

.nav-logo span {
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 35px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-white);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-blue);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  padding: 10px 26px !important;
  border: 1px solid var(--accent-blue) !important;
  border-radius: 50px !important;
  color: var(--text-white) !important;
  font-weight: 600 !important;
  transition: var(--transition-smooth) !important;
  background: rgba(30, 144, 255, 0.08) !important;
}

.nav-cta:hover {
  background: var(--accent-blue) !important;
  box-shadow: 0 0 25px rgba(30, 144, 255, 0.5), 0 0 60px rgba(30, 144, 255, 0.15) !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 10px;
}

.nav-social a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.nav-social a:hover {
  border-color: var(--accent-blue);
  background: rgba(30, 144, 255, 0.12);
  color: var(--text-white);
  box-shadow: 0 0 20px rgba(30, 144, 255, 0.2);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text-white);
  transition: var(--transition-smooth);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(5px) translateX(5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-5px) translateX(5px);
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--gradient-blue);
  color: var(--text-white);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(30, 144, 255, 0.25);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(30, 144, 255, 0.45), 0 0 80px rgba(30, 144, 255, 0.15);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: transparent;
  color: var(--text-white);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  border-color: var(--accent-blue);
  background: rgba(30, 144, 255, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(30, 144, 255, 0.15);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue-light);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 50px;
  transition: var(--transition-smooth);
}

.btn-outline:hover {
  background: var(--accent-blue);
  color: var(--text-white);
  box-shadow: 0 0 25px rgba(30, 144, 255, 0.35);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-dark);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(30, 144, 255, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 40%);
  animation: heroGlow 15s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-5%, -5%) rotate(3deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero h1 {
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.3s;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.5s;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.7s;
}

/* --- Page Header (inner pages) --- */
.page-header {
  padding: 180px 0 90px;
  text-align: center;
  background: var(--primary-dark);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 80%, rgba(30, 144, 255, 0.08) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 20% 30%, rgba(0, 212, 255, 0.04) 0%, transparent 60%);
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(30, 144, 255, 0.3), transparent);
}

.page-header h1 {
  position: relative;
  z-index: 1;
}

/* --- Sections --- */
section {
  padding: var(--section-padding);
  position: relative;
}

.section-dark {
  background: var(--primary-dark);
}

.section-darker {
  background: var(--primary-bg);
}

.section-gradient {
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-bg) 50%, var(--primary-dark) 100%);
}

/* Animated section divider line */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(30, 144, 255, 0.4), rgba(0, 212, 255, 0.4), transparent);
  margin: 0 auto;
  max-width: 80%;
}

/* --- Cards --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px 30px;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

/* Gradient accent bar on left (Digital Gravity style) */
.card::before {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue), var(--accent-indigo));
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: opacity 0.4s ease, transform 0.5s ease;
}

/* Top glow line on hover */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-blue), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card:hover {
  border-color: rgba(30, 144, 255, 0.25);
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(30, 144, 255, 0.08);
  background: rgba(15, 29, 54, 0.9);
}

.card:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.card:hover::after {
  opacity: 1;
}

.card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30, 144, 255, 0.12), rgba(0, 212, 255, 0.08));
  border: 1px solid rgba(30, 144, 255, 0.15);
  margin-bottom: 22px;
  font-size: 1.4rem;
  color: var(--accent-cyan);
  transition: var(--transition-smooth);
}

.card:hover .card-icon {
  background: linear-gradient(135deg, rgba(30, 144, 255, 0.2), rgba(0, 212, 255, 0.15));
  border-color: rgba(30, 144, 255, 0.3);
  box-shadow: 0 0 20px rgba(30, 144, 255, 0.15);
  transform: scale(1.05);
}

.card h3 {
  margin-bottom: 14px;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.card:hover h3 {
  color: var(--accent-cyan);
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* --- Stats Row --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 60px 0;
}

.stat-item {
  text-align: center;
  position: relative;
  padding: 30px 20px;
}

/* Subtle separator between stats */
.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(30, 144, 255, 0.25), transparent);
}

.stat-number {
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, #00d4ff, #1e90ff, #6366f1);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* --- Team Section --- */
.team-card {
  text-align: center;
}

.team-card .team-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: var(--secondary-bg);
  border: 3px solid rgba(30, 144, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent-blue);
  transition: var(--transition-smooth);
  position: relative;
}

.team-card:hover .team-photo {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.2), 0 0 80px rgba(30, 144, 255, 0.1);
}

.team-card h4 {
  margin-bottom: 5px;
}

.team-card .team-role {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* --- Government Panels Grid --- */
.panels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.panel-badge {
  background: rgba(30, 144, 255, 0.06);
  border: 1px solid rgba(30, 144, 255, 0.12);
  border-radius: 12px;
  padding: 18px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition-smooth);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.panel-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 144, 255, 0.08), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.panel-badge:hover {
  border-color: var(--accent-blue);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(30, 144, 255, 0.12);
}

.panel-badge:hover::before {
  opacity: 1;
}

/* --- CTA Banner --- */
.cta-banner {
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--primary-bg);
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(30, 144, 255, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 30% 40% at 30% 70%, rgba(0, 212, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 30% 40% at 70% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
  animation: ctaGlow 8s ease-in-out infinite alternate;
}

@keyframes ctaGlow {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 144, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 144, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

.cta-banner h2 {
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.cta-banner p {
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.cta-banner .btn-primary {
  position: relative;
  z-index: 1;
}

/* --- Contact Form --- */
.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  background: rgba(15, 29, 54, 0.6);
  border: 1px solid rgba(30, 144, 255, 0.12);
  border-radius: 12px;
  color: var(--text-white);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 20px rgba(30, 144, 255, 0.15), 0 0 40px rgba(30, 144, 255, 0.05);
  background: rgba(15, 29, 54, 0.8);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* --- Footer --- */
.footer {
  background: var(--primary-bg);
  padding: 80px 0 30px;
  border-top: 1px solid rgba(30, 144, 255, 0.08);
  position: relative;
  margin-top: auto; /* sticky footer */
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(30, 144, 255, 0.3), rgba(0, 212, 255, 0.3), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand .footer-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand .footer-logo span {
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
  color: var(--text-white);
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 6px 0;
  transition: var(--transition-smooth);
}

.footer-col a:hover {
  color: var(--accent-cyan);
  padding-left: 6px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes orbitFloat {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, -30px) rotate(5deg); }
  50% { transform: translate(-10px, -50px) rotate(-3deg); }
  75% { transform: translate(-30px, -20px) rotate(2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children with longer delays */
.stagger-children .card:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .card:nth-child(2) { transition-delay: 0.12s; }
.stagger-children .card:nth-child(3) { transition-delay: 0.19s; }
.stagger-children .card:nth-child(4) { transition-delay: 0.26s; }
.stagger-children .card:nth-child(5) { transition-delay: 0.33s; }
.stagger-children .card:nth-child(6) { transition-delay: 0.40s; }

/* --- Background Decorations --- */

/* Ambient floating orbs */
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0;
  transition: opacity 1.5s ease;
}

.ambient-orb.visible {
  opacity: 1;
}

.ambient-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(30, 144, 255, 0.12) 0%, transparent 70%);
  top: -15%;
  right: -10%;
  animation: orbitFloat 20s ease-in-out infinite;
}

.ambient-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
  bottom: -10%;
  left: -8%;
  animation: orbitFloat 25s ease-in-out infinite reverse;
}

.ambient-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  animation: orbitFloat 18s ease-in-out infinite;
}

/* Grid background pattern */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 144, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 144, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0,0,0,0.5) 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0,0,0,0.5) 0%, transparent 100%);
}

/* --- Two-column layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.two-col-text h2 {
  margin-bottom: 20px;
}

.two-col-text p {
  margin-bottom: 16px;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-blue-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* --- Responsive --- */
/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* --- Tablet (1024px and below) --- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2)::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 40px; }

  .container {
    padding: 0 30px;
  }

  h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
  h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
}

/* --- Mobile landscape / small tablet (768px and below) --- */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  .container {
    padding: 0 20px;
  }

  /* Navigation - hamburger menu */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: var(--primary-bg);
    flex-direction: column;
    justify-content: center;
    gap: 25px;
    transition: right 0.4s ease;
    border-left: 1px solid rgba(30, 144, 255, 0.1);
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .hamburger {
    display: flex;
  }

  .nav-social {
    display: none;
  }

  /* Navbar logo responsive */
  .nav-logo img {
    height: 54px !important;
  }

  .navbar {
    padding: 14px 0;
  }

  .navbar.scrolled {
    padding: 10px 0;
  }

  /* Grid collapses */
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; gap: 20px; }
  .grid-4 { grid-template-columns: 1fr; gap: 20px; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 20px; }
  .stat-item::after { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 12px; }

  /* Typography scales down */
  .hero h1 { font-size: 2.2rem; }
  h1 { font-size: clamp(2rem, 6vw, 3rem); }
  h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
  h3 { font-size: clamp(1.1rem, 3vw, 1.5rem); }
  p { font-size: 0.95rem; line-height: 1.7; }

  /* Buttons stack on very narrow screens */
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    text-align: center;
    width: 100%;
  }

  /* Page header spacing */
  .page-header {
    padding: 140px 0 60px;
  }

  /* Card improvements for mobile */
  .card {
    padding: 28px 22px;
  }

  /* Section spacing - override inline 120px paddings */
  section {
    padding: 60px 0 !important;
  }

  /* Two-column layout */
  .two-col {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  /* CTA banner */
  .cta-banner {
    padding: 60px 0 !important;
  }

  .cta-banner h2 {
    font-size: 1.6rem;
  }

  /* Footer */
  .footer {
    padding: 50px 0 30px;
  }
}

/* --- Mobile portrait (480px and below) --- */
@media (max-width: 480px) {
  :root {
    --section-padding: 50px 0;
  }

  .container {
    padding: 0 16px;
  }

  /* Navbar */
  .nav-logo img {
    height: 44px !important;
  }

  .navbar {
    padding: 10px 0;
  }

  /* Typography */
  h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  h2 { font-size: clamp(1.4rem, 6vw, 2rem); }
  h3 { font-size: 1.1rem; }
  p { font-size: 0.9rem; }

  /* Stats row single column on very small screens */
  .stats-row { grid-template-columns: 1fr; }

  /* Cards */
  .card {
    padding: 24px 18px;
  }

  /* Buttons */
  .btn-primary, .btn-secondary {
    padding: 14px 24px;
    font-size: 0.9rem;
  }

  /* Page header */
  .page-header {
    padding: 120px 0 50px;
  }

  /* Section label */
  .section-label {
    font-size: 0.75rem;
  }
}


/* ============================================
   LARGE SCREENS — fill wide / ultrawide displays
   ============================================ */
@media (min-width: 1500px) {
  :root { --max-width: 1480px; }
  .container { padding: 0 56px; }
}
@media (min-width: 1900px) {
  :root { --max-width: 1640px; font-size: 17px; }
}
@media (min-width: 2400px) {
  :root { --max-width: 1840px; font-size: 18px; }
}

/* ============================================
   ACCESSIBILITY & ROBUSTNESS
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.hamburger:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-left, .reveal-right { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none !important; }
  .ambient-orb { opacity: 0.6 !important; }
}

#jigsaw3d { max-width: 100%; }

.marquee-name,
.panel-badge { overflow-wrap: anywhere; }

/* Registered-trademark superscript on the brand name */
.tm {
  font-size: 0.5em;
  vertical-align: super;
  font-weight: 600;
  letter-spacing: 0;
  opacity: 0.85;
  margin-left: 1px;
}
