/* ============================================================
   BLUE WAVE SOLUTIONS — GLOBAL STYLESHEET
   ============================================================ */

/* 1. Root Variables & Theme System */
:root {
  --blue: #0E5FA6;
  --cyan: #4FC3E8;
  --amber: #F5A623;
  --foam: #F5F5F7;
  --ink: #1D1D1F;
  --ink-soft: #515154;
  --border: rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Base Reset & Lenis Engine Compatibility */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Accessibility Focus States */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
select:focus-visible, 
textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

/* 3. Global Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}

.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 65ch;
}

/* 4. Layout Containers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

section {
  padding: 80px 0;
}

/* 5. Fixed Header & Glassmorphic Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 20px rgba(7, 28, 54, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  height: 84px;
}

.brand img {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.3s var(--ease);
}

.brand img:hover {
  transform: scale(1.03);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--blue);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  touch-action: manipulation;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 6. Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  border: none;
  box-sizing: border-box;
  vertical-align: middle;
  will-change: transform;
  touch-action: manipulation;
}

.btn-primary {
  background: var(--blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: #0b4c85;
  box-shadow: 0 6px 20px rgba(14, 95, 166, 0.3);
}

.btn-ghost-dark {
  background: transparent;
  border: 1.5px solid var(--blue);
  color: var(--blue);
}

.btn-ghost-dark:hover {
  background: var(--foam);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* 7. Hero Sections */
.hero {
  padding-top: 160px;
  padding-bottom: 90px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--foam) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.hero-stats div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--blue);
}

.hero-stats div span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.page-hero {
  padding-top: 140px;
  padding-bottom: 60px;
  background: var(--ink);
  color: #ffffff;
}

.page-hero h1, .page-hero p {
  color: #ffffff;
}

/* 8. Feature Rows & Visual Containers */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 40px 0;
}

.feature-row.reverse {
  direction: rtl;
}

.feature-row.reverse > * {
  direction: ltr;
}

.feature-num {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cyan);
}

.feature-list {
  list-style: none;
  margin-top: 20px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.feature-visual {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(7, 28, 54, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.feature-visual img, .feature-visual svg {
  border-radius: calc(var(--radius) - 4px);
  width: 100%;
  height: auto;
  transition: transform 0.6s var(--ease);
}

.feature-row:hover .feature-visual img,
.feature-row:hover .feature-visual svg {
  transform: scale(1.03);
}

/* 9. Pillars & Products Grid */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.pillar {
  background: #ffffff;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.product-card {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.product-card .thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--foam);
}

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.product-card:hover .thumb img {
  transform: scale(1.04);
}

.product-card .body {
  padding: 24px;
  flex-grow: 1;
}

.product-card .tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.08em;
}

/* 10. Dark Bands & CTA Sections */
.band-dark {
  background: var(--ink);
  color: #ffffff;
}

.band-dark h2, .band-dark h3 {
  color: #ffffff;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.stat-grid div {
  border-left: 2px solid var(--cyan);
  padding-left: 16px;
}

.stat-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--cyan);
}

.cta-band {
  background: var(--blue);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.cta-band h2, .cta-band p {
  color: #ffffff;
}

/* 11. Timeline & Contact Form */
.timeline {
  border-left: 2px solid var(--border);
  padding-left: 24px;
  margin-left: 8px;
}

.t-item {
  position: relative;
  margin-bottom: 36px;
}

.t-item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue);
  transition: transform 0.3s var(--ease), background-color 0.3s ease;
}

.t-item:hover::before {
  transform: scale(1.4);
  background: var(--cyan);
}

.t-year {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.form-field {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(14, 95, 166, 0.15);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* 12. Footer */
.site-footer {
  background: var(--ink);
  color: #ffffff;
  padding: 80px 0 30px;
}

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

.footer-brand img {
  height: 48px;
  width: auto;
  margin-bottom: 16px;
}

.footer-grid h4 {
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-grid ul {
  list-style: none;
}

.footer-grid li {
  margin-bottom: 10px;
}

.footer-grid a {
  color: #a0aec0;
  transition: color 0.2s;
}

.footer-grid a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  font-size: 0.85rem;
  color: #a0aec0;
}

/* 13. Dynamic Motion Adds & Cursor Glow */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 450px;
  height: 450px;
  margin-left: -225px;
  margin-top: -225px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 195, 232, 0.12) 0%, rgba(14, 95, 166, 0.04) 50%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
  will-change: transform;
}

.product-card, .pillar, .t-item {
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.product-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 24px 48px rgba(7, 28, 54, 0.12);
}

.pillar:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(7, 28, 54, 0.08);
}

/* 14. Mobile Responsiveness */
@media (max-width: 900px) {
  .hero-grid, .feature-row, .contact-grid, .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .feature-row.reverse {
    direction: ltr;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-links {
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  
  .nav-links.open {
    display: flex;
  }
  
  .cta-band {
    padding: 36px 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* 15. Accessibility Fallback */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}