/* Sarlis Consults Theme */
:root {
  --brand-primary: #f4623a;
  --brand-primary-rgb: 244, 98, 58;
  --brand-dark: #212529;
  --brand-light: #f8f9fa;
  --bg: #ffffff;
  --text: #212529;
  --surface: #ffffff;
  --border: rgba(0,0,0,0.1);
  /* Fixed nav offset to prevent overlap */
  --nav-offset: 80px;
  /* Nexus header variables */
  --primary: #0A0E27;
  --accent: #00F5D4;
  --accent-alt: #FF6B9D;
  --text-muted: #8B95A8;
  --surface-light: #1A1F38;
  --gradient-1: linear-gradient(135deg, #00F5D4 0%, #00D9F5 100%);
  --gradient-2: linear-gradient(135deg, #FF6B9D 0%, #C44569 100%);
  --gradient-mesh: radial-gradient(at 20% 30%, rgba(0, 245, 212, 0.15) 0px, transparent 50%),
                   radial-gradient(at 80% 70%, rgba(255, 107, 157, 0.1) 0px, transparent 50%),
                   radial-gradient(at 50% 50%, rgba(0, 217, 245, 0.05) 0px, transparent 50%);
  /* Readable text on dark surfaces */
  --on-dark: #E9EEF5;
  --on-dark-muted: #C2CBD9;
}

/* Dark mode variables */
.theme-dark {
  --bg: #0f1113;
  --text: #e9ecef;
  --surface: #1a1d20;
  --border: rgba(255,255,255,0.12);
}

html, body {
  height: 100%;
}
body {
  font-family: Merriweather, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif;
  color: var(--text);
  background-color: var(--bg);
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0.03;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: "Merriweather Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Buttons */
.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn-primary:hover {
  background-color: #cf5331;
  border-color: #c34e2e;
}
.btn-xl {
  padding: 1.25rem 2.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  border: none;
  border-radius: 10rem;
}

/* Divider */
hr.divider {
  height: 0.2rem;
  max-width: 3.25rem;
  margin: 1.5rem auto;
  background-color: var(--brand-primary);
  opacity: 1;
}
hr.divider-light { background-color: #fff; }

/* Navbar */
#mainNav {
  box-shadow: none;
  background-color: transparent;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
#mainNav .navbar-brand { font-weight: 700; color: #fff; }
#mainNav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: 0.9rem;
}
#mainNav .nav-link:hover { color: #fff; }
#mainNav.navbar-shrink {
  background-color: #fff;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
#mainNav.navbar-shrink .navbar-brand { color: var(--brand-dark); }
#mainNav.navbar-shrink .nav-link { color: #6c757d; }
#mainNav.navbar-shrink .nav-link:hover { color: var(--brand-primary); }

/* Dark navbar */
.theme-dark #mainNav { background-color: transparent; }
.theme-dark #mainNav .navbar-brand { color: #fff; }
.theme-dark #mainNav .nav-link { color: rgba(255,255,255,0.85); }
.theme-dark #mainNav .nav-link:hover { color: #fff; }
.theme-dark #mainNav.navbar-shrink { background-color: #1a1d20; }
.theme-dark #mainNav.navbar-shrink .navbar-brand { color: #e9ecef; }
.theme-dark #mainNav.navbar-shrink .nav-link { color: #cfd3d7; }
.theme-dark #mainNav.navbar-shrink .nav-link:hover { color: #fff; }

/* Masthead */
header.masthead {
  padding-top: 10rem;
  padding-bottom: calc(10rem - 4.5rem);
  background: linear-gradient(to bottom, rgba(33, 37, 41, 0.6) 0%, rgba(33, 37, 41, 0.6) 100%),
              radial-gradient(1200px 600px at 50% 0%, rgba(var(--brand-primary-rgb), 0.35), transparent 70%);
  background-size: cover;
}
header.masthead h1 { font-size: 2.25rem; }
@media (min-width: 992px) {
  header.masthead { height: 100vh; min-height: 40rem; padding-top: 4.5rem; padding-bottom: 0; }
  header.masthead p { font-size: 1.15rem; }
  header.masthead h1 { font-size: 3rem; }
}
@media (min-width: 1200px) { header.masthead h1 { font-size: 3.5rem; } }

/* Sections */
.page-section { padding: 8rem 0; }
.text-white-75 { color: rgba(255, 255, 255, 0.75) !important; }

/* Skip to content */
.skip-to-content {
  position: absolute;
  left: -999px;
  top: -999px;
}
.skip-to-content:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1050;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
}



/* Contact Section */
.bg-primary { background-color: var(--brand-primary) !important; }

/* Footer */
footer { font-family: "Merriweather Sans", sans-serif; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}


/* =============================
   Nexus-style Navigation & Hero
   ============================= */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.25rem 3%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(10, 14, 39, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 245, 212, 0.1);
  animation: slideDown 0.6s ease-out;
}
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.logo {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

/* Homepage-specific compact header overrides */
.home { --nav-offset: 64px; }
.home nav { padding: 1rem 3%; }
.home .hero { min-height: 55vh; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.cta-button {
  padding: 0.6rem 1.5rem;
  background: var(--gradient-1);
  color: var(--primary);
  border: none;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.cta-button::before {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}
.cta-button:hover::before { width: 300px; height: 300px; }
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 245, 212, 0.3);
}

/* Theme toggle button */
.theme-toggle {
  margin-left: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 245, 212, 0.2);
  background: var(--surface-light);
  color: var(--text);
}

.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 0 5%;
  margin-top: var(--nav-offset);
  position: relative;
  overflow: hidden;
  background: var(--gradient-mesh);
}
.hero-content {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  z-index: 2;
}
.hero-text { animation: fadeInUp 0.8s ease-out 0.2s backwards; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-family: 'Instrument Sans', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}
.hero-buttons { display: flex; gap: 1rem; animation: fadeInUp 0.8s ease-out 0.6s backwards; }
.btn-primary {
  padding: 1rem 2.5rem;
  background: var(--gradient-1);
  color: var(--primary);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(0, 245, 212, 0.4); }
.btn-secondary {
  padding: 1rem 2.5rem;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  border: 2px solid var(--accent);
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
}
.btn-secondary:hover { background: var(--accent); color: var(--primary); transform: translateY(-3px); }
.hero-visual { position: relative; height: 560px; overflow: visible; animation: fadeIn 1s ease-out 0.4s backwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.floating-card {
  position: absolute;
  background: var(--surface-light);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  animation: float 6s ease-in-out infinite;
  z-index: 3;
  color: var(--on-dark);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
}
@keyframes float { 0%, 100% { transform: translateY(0px) rotate(0deg); } 50% { transform: translateY(-20px) rotate(2deg); } }
.card-1 { top: 15%; left: 0; width: 280px; animation-delay: 0s; }
.card-2 { top: 35%; right: 0; width: 260px; animation-delay: 1s; }
.card-3 { bottom: 5%; left: 5%; width: 240px; animation-delay: 2s; }
.card-icon { width: 50px; height: 50px; background: var(--gradient-1); border-radius: 12px; margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.card-desc { font-size: 0.9rem; color: var(--on-dark-muted); }

/* Responsive header */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* =============================
   Nexus-style Sections & Footer
   ============================= */
/* Stats */
.stats { padding: 4rem 5%; background: var(--surface); position: relative; }
.stats-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3rem; }
.stat-item { text-align: center; animation: fadeInUp 0.6s ease-out backwards; }
.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }
.stat-number { font-family: 'DM Serif Display', serif; font-size: 3.5rem; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; margin-bottom: 0.5rem; }
.stat-label { color: var(--text-muted); font-size: 1.1rem; }

/* Services */
.services { padding: 2.5rem 5%; position: relative; }
.section-header { max-width: 800px; margin: 0 auto 3rem; text-align: center; }
.section-tag { display: inline-block; padding: 0.5rem 1.5rem; background: rgba(0, 245, 212, 0.1); color: var(--accent); border-radius: 50px; font-size: 0.9rem; font-weight: 600; margin-bottom: 1.5rem; border: 1px solid rgba(0, 245, 212, 0.2); }
.section-title { font-family: 'DM Serif Display', serif; font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; line-height: 1.2; }
.section-subtitle { font-size: 1.2rem; color: var(--text-muted); line-height: 1.8; }
/* Responsive typography */
.section-subtitle { font-size: clamp(1rem, 2.5vw, 1.2rem); }
.services-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.service-card { background: var(--surface-light); border: 1px solid rgba(0, 245, 212, 0.1); border-radius: 24px; padding: 2rem; transition: all 0.4s ease; position: relative; overflow: hidden; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--gradient-1); opacity: 0; transition: opacity 0.4s ease; }
.service-card:hover::before { opacity: 0.05; }
.service-card:hover { transform: translateY(-10px); border-color: var(--accent); box-shadow: 0 20px 60px rgba(0, 245, 212, 0.2); }
.service-icon { width: 70px; height: 70px; background: var(--gradient-1); border-radius: 16px; margin-bottom: 2rem; display: flex; align-items: center; justify-content: center; font-size: 2rem; position: relative; z-index: 1; }
.service-card:nth-child(2) .service-icon { background: var(--gradient-2); }
.service-card:nth-child(3) .service-icon { background: linear-gradient(135deg, #FFD93D 0%, #FFA500 100%); }
.service-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; position: relative; z-index: 1; }
.service-title { color: var(--on-dark); }
.service-desc { color: var(--on-dark-muted); line-height: 1.8; margin-bottom: 1.5rem; position: relative; z-index: 1; }
.service-link { color: var(--accent); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem; position: relative; z-index: 1; transition: gap 0.3s ease; }
.service-link:hover { gap: 1rem; }
/* Improve base text color inside dark service cards */
.service-card { color: var(--on-dark); }

/* Compact overrides for Services section */
.services .section-header { margin: 0 auto 1.5rem; }
.services .section-tag { margin-bottom: 1rem; }
.services .section-title { margin-bottom: 1rem; font-size: clamp(2rem, 4.2vw, 3rem); }
.services .services-grid { gap: 0.75rem; }
.services .service-card { padding: 1.25rem; }
.services .service-icon { margin-bottom: 1rem; width: 56px; height: 56px; font-size: 1.6rem; }
.services .service-desc { margin-bottom: 1rem; }
.services .service-title { font-size: 1.35rem; }
.services .service-desc { font-size: 0.95rem; line-height: 1.7; }
.services .section-subtitle { font-size: clamp(0.95rem, 2.2vw, 1.1rem); }

/* Why We Exist */
.why { padding: 3rem 5%; background: var(--surface); position: relative; }
.why-intro { max-width: 900px; margin: 0 auto 2rem; color: var(--text-muted); line-height: 1.9; }
.beliefs-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.why-card { background: var(--surface-light); border: 1px solid rgba(0, 245, 212, 0.14); border-radius: 20px; padding: 1.25rem; display: flex; align-items: center; gap: 1rem; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; color: var(--on-dark); }
.why-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 12px 36px rgba(0, 245, 212, 0.18); }
.why-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--gradient-1); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.why-title { font-size: 1.05rem; font-weight: 600; color: var(--on-dark); }

/* Compact overrides for Why section header spacing */
.why .section-header { margin: 0 auto 2rem; }

/* Data Analytics Detail */
.service-detail { padding: 5rem 5%; background: var(--surface); position: relative; }
.detail-grid { max-width: 1400px; margin: 1.5rem auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.detail-block { background: var(--surface-light); border: 1px solid rgba(0, 245, 212, 0.14); border-radius: 24px; padding: 1.5rem; color: var(--on-dark); }
.detail-heading { font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; color: var(--on-dark); }
.detail-list { list-style: none; display: grid; gap: 0.75rem; }
.detail-item { position: relative; padding-left: 2rem; color: var(--on-dark); line-height: 1.7; }
.detail-item::before { content: '✔'; position: absolute; left: 0; top: 0.1rem; width: 1.25rem; height: 1.25rem; display: grid; place-items: center; font-size: 0.9rem; color: var(--accent); }
.detail-block.outcomes .detail-item::before { content: '★'; color: var(--accent-alt); }
.detail-note { color: var(--on-dark-muted); margin-top: 1rem; }
.detail-cta { max-width: 1200px; margin: 1.5rem auto 0; display: grid; gap: 0.75rem; }
.service-cta { display: inline-block; padding: 0.9rem 1.2rem; border-radius: 12px; background: var(--surface-light); border: 1px solid rgba(0, 245, 212, 0.2); color: var(--on-dark); text-decoration: none; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.service-cta:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 30px rgba(0, 245, 212, 0.2); }

/* Process */
.process { padding: 2.5rem 5%; background: var(--surface); position: relative; }
.process-timeline { max-width: 1200px; margin: 0 auto; position: relative; }
.timeline-line { position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: linear-gradient(180deg, var(--accent) 0%, var(--accent-alt) 100%); transform: translateX(-50%); }
.process-step { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; position: relative; }
.process-step:nth-child(even) .step-content { order: 2; }
.process-step:nth-child(even) .step-visual { order: 1; }
.step-content { padding: 0.75rem; }
.step-number { font-family: 'DM Serif Display', serif; font-size: 3.5rem; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; margin-bottom: 0.5rem; opacity: 0.25; }
.step-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-desc { color: var(--text-muted); line-height: 1.6; font-size: 1rem; }
.step-visual { background: var(--surface-light); border: 1px solid rgba(0, 245, 212, 0.2); border-radius: 16px; padding: 1rem; display: flex; align-items: center; justify-content: center; min-height: 200px; }

/* Responsive compactness for smaller screens */
@media (max-width: 992px) {
  .process-step { grid-template-columns: 1fr; gap: 0.75rem; }
  .timeline-line { display: none; }
}

/* CTA Section */
.cta-section { padding: 3.5rem 5%; background: var(--primary); position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: var(--gradient-mesh); animation: rotate 30s linear infinite; }
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.cta-content { max-width: 900px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.cta-title { font-family: 'DM Serif Display', serif; font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 1rem; line-height: 1.2; color: var(--on-dark); }
.cta-desc { font-size: 1.3rem; color: var(--on-dark-muted); margin-bottom: 1.25rem; line-height: 1.8; }

/* Page hero with background image */
.page-hero {
  padding: 3.5rem 5%;
  margin-top: var(--nav-offset);
  background:
    linear-gradient(to bottom, rgba(10, 14, 39, var(--overlay-opacity, 0.72)), rgba(10, 14, 39, var(--overlay-opacity, 0.72))),
    var(--hero-image, url('../img/Data%20Analytics%20%26%20Intelligence%20image.avif'));
  background-size: cover;
  background-position: center;
  color: var(--on-dark);
}
.page-hero h1 { color: var(--on-dark); margin-bottom: 0.25rem; }
.page-hero p { color: var(--on-dark-muted); margin-top: 0.25rem; font-size: clamp(1rem, 2vw, 1.1rem); max-width: 800px; }
@media (max-width: 768px) {
  .page-hero { padding: 2.5rem 5%; }
}

/* Inline page image section */
.page-image { padding: 2rem 5%; background: var(--surface); }
.page-image .container { max-width: 1200px; margin: 0 auto; }
.page-image img { width: 100%; height: auto; border-radius: 16px; border: 1px solid rgba(0, 245, 212, 0.2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }

/* Innovation page hero (update image path) */
.page-hero--innovation { --hero-image: url('../img/innovation%20image.jpg'); --overlay-opacity: 0.35; background-position: left center; }
/* Compact spacing for innovation hero */
.page-hero.page-hero--innovation { padding: 1.5rem 5%; }

/* Compact spacing for energy & data analytics heroes */
.page-hero.page-hero--energy { padding: 1.75rem 5%; }
.page-hero.page-hero--data { padding: 0.9rem 5%; }

/* Energy page hero (update image path if needed) */
.page-hero--energy { --hero-image: url('../img/Energy%20page%20image.avif'); }
.cta-form { display: flex; gap: 1rem; max-width: 600px; margin: 0 auto; }
.cta-input { flex: 1; padding: 1.2rem 2rem; background: var(--surface-light); border: 2px solid rgba(0, 245, 212, 0.2); border-radius: 50px; color: var(--text); font-size: 1rem; transition: border-color 0.3s ease; }
.cta-input:focus { outline: none; border-color: var(--accent); }
.cta-submit { padding: 1.2rem 3rem; background: var(--gradient-1); color: var(--primary); border: none; border-radius: 50px; font-weight: 600; font-size: 1rem; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.cta-submit:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(0, 245, 212, 0.4); }

/* Footer */
footer { padding: 2rem 5%; background: var(--surface); border-top: 1px solid rgba(0, 245, 212, 0.1); }
.footer-content { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand { font-size: 1.8rem; font-weight: 700; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 1rem; }
.footer-desc { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.social-links { display: flex; gap: 1rem; }
.social-link { width: 38px; height: 38px; background: var(--surface-light); border: 1px solid rgba(0, 245, 212, 0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--on-dark); text-decoration: none; transition: all 0.3s ease; font-size: 1.1rem; font-weight: 700; }
.social-link:hover { background: var(--accent); color: var(--primary); transform: translateY(-3px); }
.footer-section h4 { font-size: 1.1rem; margin-bottom: 0.75rem; color: var(--text); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { max-width: 1400px; margin: 0.5rem auto 0; padding-top: 0.5rem; border-top: 1px solid rgba(0, 245, 212, 0.1); text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.footer-bottom p { margin: 0; }

/* Footer contact block */
.footer-contact { font-size: 0.95rem; }
.footer-contact .contact-label { font-weight: 600; color: var(--text); margin-top: 0.5rem; }
.footer-contact p { color: var(--text-muted); margin: 0.35rem 0; line-height: 1.6; }
.footer-contact a { color: var(--accent); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }

/* Responsive for sections */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .beliefs-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .process-step { grid-template-columns: 1fr; }
  .process-step:nth-child(even) .step-content { order: 1; }
  .process-step:nth-child(even) .step-visual { order: 2; }
  .timeline-line { display: none; }
  .footer-content { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .cta-form { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  .beliefs-grid { grid-template-columns: 1fr; }
  .page-hero.page-hero--innovation { padding: 1rem 5%; }
  .page-hero.page-hero--energy { padding: 1.25rem 5%; }
  .page-hero.page-hero--data { padding: 0.6rem 5%; }
}

/* =============================
   Mobile Navigation & Controls
   ============================= */
/* Hamburger toggle */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(0, 245, 212, 0.2);
  background: var(--surface-light);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  position: relative;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-icon::before { position: absolute; top: -6px; }
.menu-icon::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { opacity: 1; transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { opacity: 1; transform: translateY(-6px) rotate(-45deg); }

/* Slide-out mobile nav */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 340px;
  height: 100vh;
  background: var(--surface-light);
  border-left: 1px solid rgba(0, 245, 212, 0.2);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.35);
  z-index: 1100;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}
.mobile-nav.open { right: 0; }
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 245, 212, 0.15);
}
.menu-close {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(0, 245, 212, 0.2);
  background: transparent;
  color: var(--text);
}
.mobile-nav-links {
  list-style: none;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mobile-nav-links a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
}
.mobile-nav-links a:hover { background: rgba(0, 245, 212, 0.08); }
.mobile-cta { display: block; margin-top: auto; border-radius: 12px; }

/* Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 39, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1090;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-overlay.visible { opacity: 1; }

/* Scroll lock when menu open */
body.menu-open { overflow: hidden; }

/* Show hamburger on tablet/mobile, hide desktop links */
@media (max-width: 1024px) {
  .menu-toggle { display: inline-flex; }
  .nav-links { display: none; }
  .cta-button { display: none; }
}

/* =============================
   Accessibility & Touch Targets
   ============================= */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-links a, .cta-button, .btn-primary, .btn-secondary, .cta-submit { min-height: 44px; }
/* Screen-reader only utility */
.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; }

/* =============================
   Responsive Layout Refinements
   ============================= */
/* Use auto-fit/minmax for flexible grids */
.services-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Only show floating hero visuals on ultra-wide screens */
.hero-visual { display: none; }
@media (min-width: 1400px) { .hero-visual { display: block; } }

/* =============================
  Performance: content-visibility
  ============================= */
.services, .process, .stats, .cta-section { content-visibility: auto; contain-intrinsic-size: 1px 800px; }

/* =============================
   Glass Popup (Home Page)
   ============================= */
/* Additional root variables for glass popup */
:root {
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-blur: 15px;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

.glass-popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  z-index: 9999;
  font-family: "Merriweather Sans", sans-serif;
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-sizing: border-box;
}

.glass-popup .popup-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.glass-popup h3 { margin: 0; font-size: 1.2rem; color: #1f2937; }
.glass-popup p { margin: 0; font-size: 0.9rem; color: #4b5563; }

.glass-popup .audit-btn {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
}
.glass-popup .audit-btn svg { stroke: currentColor; }

.glass-popup .close-text {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 0.75rem;
  margin-top: 8px;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.glass-popup .drag-handle { display: none; }

/* Desktop close button */
.glass-popup .popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.6);
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.glass-popup .popup-close:hover { filter: brightness(0.95); }
.theme-dark .glass-popup .popup-close {
  background: rgba(20, 22, 28, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
  color: #e5e7eb;
}

/* Dark mode adjustments */
.theme-dark .glass-popup {
  background: rgba(20, 22, 28, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}
.theme-dark .glass-popup h3 { color: #e5e7eb; }
.theme-dark .glass-popup p { color: #cbd5e1; }
.theme-dark .glass-popup .close-text { color: #9ca3af; }

/* Mobile adaptation */
@media (max-width: 600px) {
  .glass-popup {
    bottom: max(0px, env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: clamp(16px, 4vw, 24px) clamp(14px, 4vw, 20px) calc(clamp(16px, 4vw, 24px) + env(safe-area-inset-bottom));
    max-height: 46vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .glass-popup .drag-handle {
    display: block;
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 6px auto 12px;
  }
  /* Hide swipe text on mobile */
  .glass-popup .close-text { display: none; }
  .glass-popup h3 { font-size: clamp(1rem, 4.2vw, 1.2rem); }
  .glass-popup p { font-size: clamp(0.85rem, 3.8vw, 0.95rem); }
}

  /* Mobile alignment: center content and hide desktop close */
  .glass-popup .popup-content { align-items: center; text-align: center; }
  .glass-popup .popup-close { display: none; }
