:root {
  --brand: #1b2b50;
  --bg: #ffffff;
  --muted: #fafafa;
  --gradient-light: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
  --gradient-subtle: linear-gradient(180deg, rgba(27, 43, 80, 0.02) 0%, rgba(27, 43, 80, 0.00) 100%);
  --shadow-sm: 0 2px 8px rgba(27, 43, 80, 0.04);
  --shadow-md: 0 4px 16px rgba(27, 43, 80, 0.08);
}

* { 
  box-sizing: border-box; 
  margin: 0;
  padding: 0;
}

/* Prevent flash of unstyled content */
html {
  visibility: hidden;
  opacity: 0;
}

html.loaded {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}
html, body { 
  margin: 0; 
  padding: 0; 
  overflow-x: hidden;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* offset for sticky header */
}
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  background-color: var(--bg);
  color: var(--brand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scroll to top button */
#scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(27, 43, 80, 0.12);
  border-radius: 14px;
  color: var(--brand);
  cursor: pointer;
  opacity: 0;
  transform: translateY(100px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 14px;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(27, 43, 80, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

#scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#scroll-to-top:hover {
  background: white;
  border-color: rgba(27, 43, 80, 0.2);
  box-shadow: 0 8px 32px rgba(27, 43, 80, 0.2);
  transform: translateY(-6px);
}

#scroll-to-top:active {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(27, 43, 80, 0.15);
}

#scroll-to-top svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
}

/* Language Toggle Button - Same style as scroll-to-top but always visible */
#language-toggle {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(27, 43, 80, 0.1);
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(27, 43, 80, 0.15);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 1000;
}

#language-toggle.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#language-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(27, 43, 80, 0.25);
  background: rgba(255, 255, 255, 0.98);
}

#language-toggle:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(27, 43, 80, 0.2);
}

#language-toggle .lang-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  #scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
  
  #scroll-to-top svg {
    width: 20px;
    height: 20px;
  }

  #language-toggle {
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  #language-toggle .lang-text {
    font-size: 12px;
  }
}

/* Extra small devices like iPhone SE */
@media (max-width: 375px) {
  .hero-section {
    padding: 8rem 1rem 4rem 1rem;
    min-height: 100vh;
  }
  
  .hero-logo {
    margin-top: 4rem;
  }
  
  .main-logo {
    max-height: 160px;
  }
  
  .hero-section h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }
}

/* Floating Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(27, 43, 80, 0.1);
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes headerSlideIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
/* When user scrolls down the header gets the .shrink class (handled in JS) - enhanced floating effect */
header.shrink {
  padding: 0.7rem 0 !important;
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(25px) !important;
  box-shadow: 0 4px 20px rgba(27, 43, 80, 0.08) !important;
  border-bottom: 1px solid rgba(27, 43, 80, 0.06) !important;
}

/* Respect users who prefer reduced motion: disable heavy transitions and backdrop-filter */
@media (prefers-reduced-motion: reduce) {
  header, header.shrink {
    transition: none;
  }
  header.shrink {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background-color: rgba(255,255,255,0.9);
  }
}

/* When header becomes sticky we ensure content isn't hidden under it by keeping the visual height consistent via padding on the body if needed (JS could adjust further). */

/* Logo (Dynamic sizing) */
.brand {
  height: 70px;
  transition: height 0.3s ease;
}
.brand svg,
.brand img {
  height: 100%;
  width: auto;
  display: block;
  transition: all 0.3s ease;
}
header.shrink .brand {
  height: 60px;
  transition: all 0.3s ease;
}

/* Nav */
nav { display: flex; gap: 0.5rem; }
nav a {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--brand);
  border-radius: 4px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--brand);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}
nav a:hover::after {
  width: calc(100% - 2rem);
}
nav a:hover {
  transform: translateY(-1px);
}
nav a:active {
  transform: translateY(0);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.3s ease;
}
.menu-toggle span {
  height: 3px;
  width: 25px;
  background: var(--brand);
  margin: 4px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Sections */
.section {
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  transition: background 0.6s ease;
}
.section.light { 
  background: var(--gradient-light);
}

/* Subtle decorative line dividers between sections */
.section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--brand) 50%, transparent 100%);
  opacity: 0.15;
}
.section:last-of-type::after {
  display: none; /* no divider after last section */
}

/* Section headings with more breathing space */
.section h2 {
  margin-bottom: 1.5rem;
  font-size: 2.2rem;
  font-weight: 600;
  position: relative;
  display: inline-block;
}

/* Subtle underline animation for section headings */
.section h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--brand);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.section.revealed h2::after {
  transform: translateX(-50%) scaleX(1);
}

/* Hero section with subtle gradient background */
.hero-section {
  background: linear-gradient(165deg, #fafafa 0%, #ffffff 50%, rgba(27, 43, 80, 0.03) 100%);
  padding: 8rem 2rem 6rem 2rem;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Decorative background elements */
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(27, 43, 80, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  max-width: 1200px;
  z-index: 1;
  width: 100%;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-logo {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  filter: drop-shadow(0 4px 16px rgba(255, 255, 255, 0.8)) 
          drop-shadow(0 2px 8px rgba(27, 43, 80, 0.1));
}

.hero-text {
  text-align: left;
}

.hero-section h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--brand);
}

.hero-tagline {
  font-size: 1.2rem;
  line-height: 1.7;
  color: rgba(27, 43, 80, 0.8);
  margin: 1.5rem auto 2.5rem;
  max-width: 600px;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 4rem 1.5rem;
    min-height: 70vh;
  }
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .hero-text {
    text-align: center;
  }
  .hero-section {
    padding: 8rem 1.5rem 4rem 1.5rem;
    min-height: 95vh;
  }
  
  .hero-logo {
    margin-top: 3rem;
  }
  
  .main-logo {
    max-height: 200px;
  }
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-tagline {
    font-size: 1.05rem;
  }
  .hero-section::before {
    width: 400px;
    height: 400px;
    right: -40%;
  }
}

/* About section layout */
.about-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

.about-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

.icon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  width: 200px;
  height: 200px;
}

.grid-item {
  background: rgba(27, 43, 80, 0.03);
  border: 1px solid rgba(27, 43, 80, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-item:nth-child(1) {
  grid-row: 1;
  grid-column: 1;
}

.grid-item:nth-child(2) {
  grid-row: 1;
  grid-column: 2;
}

.grid-item:nth-child(3) {
  grid-row: 2;
  grid-column: 1;
}

.grid-item:nth-child(4) {
  grid-row: 2;
  grid-column: 2;
}

.grid-item:hover {
  background: rgba(27, 43, 80, 0.08);
  border-color: rgba(27, 43, 80, 0.15);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(27, 43, 80, 0.1);
}

.grid-item svg {
  width: 36px;
  height: 36px;
  transition: all 0.3s ease;
}

.grid-item:hover svg {
  transform: scale(1.1);
}

.about-text {
  text-align: left;
}

.about-text h2 {
  margin-bottom: 1.5rem;
  text-align: left;
}

.about-text p {
  line-height: 1.7;
  font-size: 1.08rem;
  color: rgba(27, 43, 80, 0.85);
  margin: 0;
}

@media (max-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .about-text {
    text-align: center;
  }
  
  .about-text h2 {
    text-align: center;
  }
  
  .icon-grid {
    width: 180px;
    height: 160px;
    gap: 0.6rem;
    transform: rotate(-1deg);
  }
  
  .grid-item:nth-child(1) svg {
    width: 30px;
    height: 30px;
  }

  .grid-item:nth-child(2) svg {
    width: 26px;
    height: 26px;
  }

  .grid-item:nth-child(3) svg {
    width: 24px;
    height: 24px;
  }

  .grid-item:nth-child(4) svg {
    width: 28px;
    height: 28px;
  }
  
  .about-text p {
    font-size: 1rem;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: var(--brand);
  color: white;
  border: 2px solid var(--brand);
  padding: 0.85rem 2rem;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-weight: 500;
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(27, 43, 80, 0.2);
}
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn:hover::before {
  opacity: 1;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(27, 43, 80, 0.3);
  border-color: #0f1a2e;
  background-color: #0f1a2e;
}
.btn:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(27, 43, 80, 0.2);
}

/* Services */
.services-subtitle {
  font-size: 1.1rem;
  color: rgba(27, 43, 80, 0.7);
  text-align: center;
  margin: 1rem auto 0;
  max-width: 600px;
}

.service-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3rem;
  padding: 0 1rem;
}
.service {
  max-width: 280px;
  text-align: center;
  padding: 3rem 2.5rem;
  border-radius: 16px;
  background: var(--bg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid rgba(27, 43, 80, 0.08);
  cursor: pointer;
  overflow: visible;
}
.service::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: var(--gradient-subtle);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.service::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(27, 43, 80, 0.12);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.service:hover {
  transform: translateY(-8px);
  border-color: rgba(27, 43, 80, 0.15);
}
.service:hover::before {
  opacity: 1;
}
.service:hover::after {
  opacity: 1;
}
.service h3 {
  margin: 1rem 0 0.75rem;
  font-size: 1.25rem;
  color: var(--brand);
}
.service p {
  color: rgba(27, 43, 80, 0.75);
  line-height: 1.6;
  font-size: 0.95rem;
}
.service svg {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem auto;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
  /* Ensure consistent visual scaling for all service icons */
  display: block;
  /* Force all SVGs to scale uniformly within the 80x80 container */
  object-fit: contain;
  object-position: center;
  transform-origin: 50% 50%;
  /* Force horizontal centering within flex container */
  align-self: center;
  /* Normalize any internal size differences */
  scale: 1;
}

/* Additional CSS to ensure visual consistency by scaling the entire SVG content */
.service-icons .service {
  /* Ensure parent container doesn't interfere */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

.service svg {
  /* Force consistent viewBox interpretation */
  overflow: visible;
}

/* Specific adjustments for service icons to ensure visual consistency */
.service[data-service="system-admin"] svg {
  /* System admin icon has complex matrix transforms and appears smaller visually */
  transform: scale(1.15);
  transform-origin: 50% 50%;
}

.service[data-service="backup-archive"] svg {
  /* Cloud with download arrow - compact shape needs slight scaling up */
  transform: scale(1.08);
  transform-origin: 50% 50%;
}

.service[data-service="remote-support"] svg {
  /* Monitor with cursor - good baseline size */
  transform: scale(1);
  transform-origin: 50% 50%;
}

.service[data-service="hardware-sales"] svg {
  /* Computer hardware icons - good detail level, baseline size */
  transform: scale(1);
  transform-origin: 50% 50%;
}
/* Base hover effect - will be overridden by specific services */
.service:hover svg { 
  filter: drop-shadow(0 4px 6px rgba(27, 43, 80, 0.1));
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Specific hover effects that maintain proper scaling and centering */
.service[data-service="system-admin"]:hover svg {
  transform: translateY(-6px) scale(1.24); /* 1.15 * 1.08 */
}

.service[data-service="backup-archive"]:hover svg {
  transform: translateY(-6px) scale(1.17); /* 1.08 * 1.08 */
}

.service[data-service="remote-support"]:hover svg,
.service[data-service="hardware-sales"]:hover svg {
  transform: translateY(-6px) scale(1.08); /* 1 * 1.08 */
}

/* Contact section */
.contact-intro {
  max-width: 600px;
  margin: 1rem auto 2.5rem;
  font-size: 1.08rem;
  line-height: 1.6;
  color: rgba(27, 43, 80, 0.75);
}

.contact-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Contact items */
.contact-item {
  display: inline-flex;
}

.contact-item a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--brand);
  border: 1px solid rgba(27, 43, 80, 0.1);
  background: #ffffff;
}

.contact-item .ico {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contact-item a:hover .ico {
  transform: scale(1.15);
}

/* Keep contact links a consistent brand color in all states */
.contact-item a:link,
.contact-item a:visited,
.contact-item a:active,
.contact-item a:focus {
  color: var(--brand);
  text-decoration: none;
  outline: none;
}

/* Reveal animation: slide-up + slight zoom-in */
.will-reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.will-reveal.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stagger child elements */
.service-icons .service {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.revealed .service {
  opacity: 1;
  transform: translateY(0);
}
.revealed .service:nth-child(1) { transition-delay: 0.1s; }
.revealed .service:nth-child(2) { transition-delay: 0.2s; }
.revealed .service:nth-child(3) { transition-delay: 0.3s; }

/* 3D Tilt Effect */
.service,
.btn {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.contact-item a {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.service.tilt-active,
.btn.tilt-active {
  transform: perspective(1000px) 
             rotateX(var(--tilt-x, 0deg)) 
             rotateY(var(--tilt-y, 0deg)) 
             translateZ(5px);
}

.contact-item a.tilt-active {
  transform: perspective(1000px) 
             rotateX(var(--tilt-x, 0deg)) 
             rotateY(var(--tilt-y, 0deg)) 
             translateZ(5px);
}

/* Enhanced hover effects with tilt */
.service:hover,
.btn:hover {
  transform: perspective(1000px) 
             rotateX(var(--tilt-x, 0deg)) 
             rotateY(var(--tilt-y, 0deg)) 
             translateZ(12px) 
             translateY(-6px);
  box-shadow: 0 15px 35px rgba(27, 43, 80, 0.15);
}

.contact-item a:hover {
  transform: perspective(1000px) 
             rotateX(var(--tilt-x, 0deg)) 
             rotateY(var(--tilt-y, 0deg)) 
             translateZ(12px) 
             translateY(-6px);
  box-shadow: 0 15px 35px rgba(27, 43, 80, 0.15);
}

/* Smooth transitions for tilt effect */
.service,
.btn {
  transition: transform 0.1s ease-out, box-shadow 0.3s ease;
}

.contact-item a {
  transition: transform 0.1s ease-out, box-shadow 0.3s ease;
}

.service.tilt-active,
.btn.tilt-active {
  transition: none; /* Remove transition during active tilt for smooth mouse tracking */
}

.contact-item a.tilt-active {
  transition: none;
}

/* Footer */
footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(180deg, var(--muted) 0%, #f5f5f5 100%);
  font-size: 0.9rem;
  color: rgba(27, 43, 80, 0.7);
  border-top: 1px solid rgba(27, 43, 80, 0.08);
}

/* ================================================= */
/* Responsive Sizing */
/* ================================================= */

/* 1. Tablet/Large Mobile (max-width: 992px) */
@media (max-width: 992px) {
  .brand svg,
  .brand img {
    height: min(62px, 10vh);
  }
  header.shrink .brand svg,
  header.shrink .brand img {
    height: min(48px, 8vh);
  }
}

/* 2. Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .section {
    padding: 3.5rem 1.5rem;
  }
  .section h2 {
    font-size: 1.8rem;
  }
  .service-icons {
    gap: 1.5rem;
  }
  
  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    /* translucent base so backdrop-filter has visible effect */
    background: rgba(255,255,255,0.04);
    position: absolute;
    top: 60px; /* JS will override this dynamically to match header height */
    left: 0;
    text-align: center;
    box-shadow: 0 6px 18px rgba(11,22,30,0.06);
    animation: fadeIn 0.25s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.04);
  }
  nav.active { display: flex; }
  .menu-toggle { 
    display: flex; 
    margin-right: 1rem;
  }
  
  nav a {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 8px;
    color: var(--brand);
    background: transparent;
    transition: background-color 0.18s ease, transform 0.18s ease;
  }
  nav a:hover {
    background: rgba(27,43,80,0.06);
    transform: translateY(-2px);
  }

  /* When the mobile nav is open, make the menu surface bright/opaque so it does
     not visually dim or blur due to the overlay underneath. This keeps the
     menu readable while the rest of the page is dimmed by the overlay. */
  nav.active {
    background: rgba(255,255,255,0.96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 12px 32px rgba(11,22,30,0.10);
  }

  /* allow the brand logo to scale appropriately on small screens */
  .brand svg,
  .brand img {
    height: min(56px, 9vh);
  }
  header.shrink .brand svg,
  header.shrink .brand img {
    height: min(44px, 8vh);
  }

  /* Reduced-motion fallback inside mobile breakpoint */
  @media (prefers-reduced-motion: reduce) {
    nav {
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
      background: rgba(250,250,250,0.95);
      box-shadow: 0 4px 8px rgba(0,0,0,0.04);
    }
  }
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-10px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Lock badge (centered, interactive) */
.lock-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.25rem auto 0.6rem auto; /* sit closer to title */
  width: 64px; /* match service icon size */
  height: 64px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 320ms cubic-bezier(0.2,0.8,0.2,1), opacity 280ms ease;
}
.lock-badge:focus {
  outline: 3px solid rgba(27,43,80,0.12);
  outline-offset: 4px;
}
.lock-badge .lock-svg { display:block; }

/* visual states */
.lock-badge.locked .shackle {
  transform-origin: 32px 28px;
  transform: rotate(0deg) translateY(0);
}
.lock-badge.unlocked .shackle {
  transform-origin: 32px 28px;
  transform: translateY(-6px) rotate(-22deg);
  transition: transform 420ms cubic-bezier(0.2,0.8,0.2,1);
}
.lock-badge .shackle { transition: transform 420ms cubic-bezier(0.2,0.8,0.2,1); }

.lock-badge .body { transition: transform 320ms ease, fill 320ms ease; }
.lock-badge.unlocked .body { transform: translateY(2px); fill: #1b2b50; opacity: 0.97; }

/* small pop on reveal */
.lock-badge.will-reveal { opacity: 0; transform: translateY(8px) scale(0.96); }
.lock-badge.revealed { opacity: 1; transform: translateY(0) scale(1); transition: transform 420ms cubic-bezier(0.2,0.8,0.2,1), opacity 360ms ease; }

/* responsive sizing */
@media (max-width: 768px) {
  .lock-badge { width: 56px; height: 56px; margin-top: 0.2rem; }
  .lock-badge .lock-svg { width: 56px; height: 56px; }
}

/* when placed inside the home section we want it closer to the title */
#home .lock-badge { margin-top: 0.5rem; margin-bottom: 0.6rem; }

/* ensure the svg inside the badge matches the service icon sizing */
.lock-badge .lock-svg { width: 64px; height: 64px; }

@media (prefers-reduced-motion: reduce) {
  .lock-badge, .lock-badge .shackle, .lock-badge .body { transition: none !important; }
}

/* Overlay that dims the page when mobile menu is open */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,22,30,0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
  z-index: 950; /* under nav (999) and header (1000) */
}
.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .menu-overlay { transition: none; }
}

/* Service icon entrance animation when services reveal */
@keyframes serviceIconIn {
  0% { opacity: 0; transform: translateY(10px) scale(0.92); }
  60% { opacity: 1; transform: translateY(-6px) scale(1.06); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Trigger icon animation when their parent section has .revealed */
.revealed .service svg {
  opacity: 0; /* start invisible until animation kicks in */
  transform-origin: center;
  animation-name: serviceIconIn;
  animation-duration: 520ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-fill-mode: both;
}
.revealed .service:nth-child(1) svg { animation-delay: 0.08s; }
.revealed .service:nth-child(2) svg { animation-delay: 0.18s; }
.revealed .service:nth-child(3) svg { animation-delay: 0.28s; }
.revealed .service:nth-child(4) svg { animation-delay: 0.38s; }

/* Respect reduced motion for icon animations */
@media (prefers-reduced-motion: reduce) {
  .revealed .service svg {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ================================================= */
/* Modal System */
/* ================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27, 43, 80, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  max-width: 680px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(27, 43, 80, 0.2) transparent;
  box-shadow: 0 20px 60px rgba(27, 43, 80, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

/* Custom scrollbar for webkit browsers */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(27, 43, 80, 0.2);
  border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(27, 43, 80, 0.3);
}

.modal.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: sticky;
  top: 1.25rem;
  right: 1.25rem;
  margin-left: auto;
  margin-right: 1.25rem;
  margin-bottom: -60px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(27, 43, 80, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(27, 43, 80, 0.15);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(27, 43, 80, 0.2);
  transform: rotate(90deg) scale(1.05);
  opacity: 1 !important;
  box-shadow: 0 6px 20px rgba(27, 43, 80, 0.2);
}

.modal-close svg {
  width: 20px;
  height: 20px;
  stroke: var(--brand);
}

.modal-header {
  text-align: center;
  padding: 3rem 2rem 1.5rem;
  background: linear-gradient(165deg, #fafafa 0%, #ffffff 100%);
  border-radius: 20px 20px 0 0;
}

.modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(27, 43, 80, 0.1);
}

.modal-icon svg {
  width: 48px;
  height: 48px;
}

.modal-service-name {
  font-size: 2rem;
  color: var(--brand);
  margin: 0;
}

.modal-body {
  padding: 2rem 2.5rem;
}

.modal-description {
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(27, 43, 80, 0.8);
  margin-bottom: 2rem;
  text-align: center;
}

.modal-details {
  margin-top: 2rem;
}

.modal-details h3 {
  font-size: 1.3rem;
  color: var(--brand);
  margin: 1.5rem 0 0.75rem;
}

.modal-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-details li {
  padding: 0.75rem 0 0.75rem 2rem;
  position: relative;
  line-height: 1.6;
  color: rgba(27, 43, 80, 0.85);
  border-bottom: 1px solid rgba(27, 43, 80, 0.08);
}

.modal-details li:last-child {
  border-bottom: none;
}

.modal-details li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: bold;
  font-size: 1.2rem;
}

.modal-footer {
  padding: 1.5rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.modal-cta {
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.btn-secondary {
  background: transparent;
  color: var(--brand);
  border: 2px solid rgba(27, 43, 80, 0.2);
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  border-color: var(--brand);
  background: rgba(27, 43, 80, 0.05);
  transform: translateY(-2px);
}

/* Modal responsive */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 90vh;
    border-radius: 16px;
  }
  
  .modal-header {
    padding: 2.5rem 1.5rem 1.25rem;
    border-radius: 16px 16px 0 0;
  }
  
  .modal-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
  }
  
  .modal-icon svg {
    width: 36px;
    height: 36px;
  }
  
  .modal-service-name {
    font-size: 1.6rem;
  }
  
  .modal-body {
    padding: 1.5rem 1.5rem;
  }
  
  .modal-description {
    font-size: 1.05rem;
  }
  
  .modal-footer {
    padding: 1.25rem 1.5rem 2rem;
  }
  
  .modal-close {
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal, .modal-content {
    transition: none;
  }
  .modal-overlay {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}