: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;
  /* Fix iOS pull-to-refresh bounce but allow refresh on iPad */
  overscroll-behavior-y: auto;
  /* scroll-padding-top will be set dynamically by JavaScript */
  /* Improve scroll performance on mobile */
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 768px) {
  html {
    /* Slower, smoother scroll on mobile */
    scroll-behavior: smooth;
  }
}
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;
  /* Smooth scrolling for iOS */
  -webkit-overflow-scrolling: touch;
  /* Allow normal refresh behavior on iPad */
  overscroll-behavior-y: auto;
  /* Prevent text selection by default */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Padding-top will be set dynamically by JavaScript */
}

/* Allow text selection for important content */
.contact-item,
#about p,
.modal-description,
.hero-tagline {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Floating Buttons (Language Switcher & Scroll to Top) */
.floating-btn {
  position: fixed;
  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;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.floating-btn:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(27, 43, 80, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(27, 43, 80, 0.15);
}

.floating-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 43, 80, 0.2);
}

/* Language Switcher */
#lang-switcher {
  bottom: 30px;
  left: 30px;
  opacity: 1;
  transform: translateY(0);
}

.lang-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Scroll to top button */
#scroll-to-top {
  bottom: 30px;
  right: 30px;
  opacity: 0;
  transform: translateY(100px);
}

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

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

@media (max-width: 768px) {
  .floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    bottom: 20px;
  }
  
  #lang-switcher {
    left: 20px;
  }
  
  #scroll-to-top {
    right: 20px;
  }
  
  .lang-text {
    font-size: 12px;
  }
  
  #scroll-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--muted);
  position: fixed; /* Always fixed at top */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  transition: padding 0.2s ease-out, background-color 0.2s ease-out, box-shadow 0.2s ease-out;
  will-change: padding, background-color, box-shadow;
}
/* When user scrolls down the header gets the .shrink class (handled in JS) - make it sticky and visually transparent */
header.shrink {
  padding: 0.5rem 2rem;
  /* Fallback for browsers without backdrop-filter support */
  background-color: rgba(255,255,255,0.85);
  /* slightly stronger but still soft shadow for separation */
  box-shadow: 0 8px 24px rgba(11,22,30,0.08);
  /* hairline separation for clarity on busy backgrounds */
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Progressive enhancement with backdrop-filter for supporting browsers */
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  header.shrink {
    background-color: rgba(255,255,255,0.08);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

/* Even more compact and transparent when scrolled further */
header.shrink.compact {
  padding: 0.3rem 1.5rem;
  background-color: rgba(255,255,255,0.9);
  box-shadow: 0 4px 16px rgba(11,22,30,0.06);
}

/* Progressive enhancement for compact header */
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  header.shrink.compact {
    background-color: rgba(255,255,255,0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

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

/* 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: 40px;
  transition: height 0.3s ease;
}
.brand-logo {
  height: 100%;
  width: auto;
  display: block;
  transition: all 0.3s ease;
}
header.shrink .brand {
  height: 32px;
}

header.shrink.compact .brand {
  height: 28px;
  opacity: 0.9;
}

/* 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);
}

/* Compact navigation styling */
header.shrink.compact nav a {
  padding: 0.4rem 0.8rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.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: 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: 800px;
  z-index: 1;
  perspective: 1000px;
}

.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: 5rem 1.5rem 4rem;
    min-height: 70vh;
  }
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-tagline {
    font-size: 1.05rem;
  }
  .hero-section::before {
    width: 400px;
    height: 400px;
    right: -40%;
  }
}

/* Extra spacing for very small screens (iPhone SE, etc.) */
@media (max-width: 400px) {
  .hero-section {
    padding: 10rem 1.5rem 4rem;
    min-height: 85vh;
  }
  .hero-section h1 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-top: 1.5rem;
  }
}

/* Even more aggressive spacing for very narrow screens */
@media (max-width: 375px) and (max-height: 667px) {
  .hero-section {
    padding: 12rem 1rem 4rem;
  }
}

/* Make About section paragraph narrower and centered so it doesn't run edge-to-edge */
#about p {
  max-width: 62ch; /* keeps line-length comfortable and similar to heading width */
  margin: 1.25rem auto 0;
  text-align: center;
  line-height: 1.7;
  font-size: 1.08rem;
  color: rgba(27, 43, 80, 0.85);
}

@media (max-width: 768px) {
  #about p { max-width: 90%; padding: 0 1rem; 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);
  transform-style: preserve-3d;
  cursor: pointer;
}
.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;
  transition: transform 0.1s ease-out, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}
.btn:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(27, 43, 80, 0.2);
}

/* Services */
.service-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3rem;
  padding: 0 1rem;
  perspective: 1000px;
}
.service {
  max-width: 260px;
  text-align: center;
  padding: 2rem 1.75rem;
  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;
  transform-style: preserve-3d;
}
.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);
  transition: transform 0.1s ease-out, border-color 0.4s ease;
}
.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: 64px;
  height: 64px;
  margin-bottom: 0.75rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.service:hover svg { 
  transform: translateY(-6px) scale(1.08);
  filter: drop-shadow(0 4px 6px rgba(27, 43, 80, 0.1));
}

/* 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;
  perspective: 1000px;
}

/* Contact items */
.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: var(--brand);
  border: 1px solid rgba(27, 43, 80, 0.1);
  background: rgba(255, 255, 255, 0.6);
  transform-style: preserve-3d;
  cursor: pointer;
}
.contact-item:hover {
  background: rgba(27, 43, 80, 0.06);
  transform: translateY(-3px);
  border-color: rgba(27, 43, 80, 0.2);
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease-out, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.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:hover .ico {
  transform: scale(1.15);
}

.contact-item:focus {
  /* visible focus for keyboard users without changing color */
  outline: 2px solid rgba(27,43,80,0.12);
  outline-offset: 3px;
}

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

/* Hero section ultra slow fade-in animation */
.hero-section.will-reveal h1,
.hero-section.will-reveal .hero-tagline,
.hero-section.will-reveal .btn,
.hero-section.will-reveal .lock-badge {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Prevent flash during page load/refresh */
html.loading .hero-section.will-reveal h1,
html.loading .hero-section.will-reveal .hero-tagline,
html.loading .hero-section.will-reveal .btn,
html.loading .hero-section.will-reveal .lock-badge,
html.no-animations .hero-section.will-reveal h1,
html.no-animations .hero-section.will-reveal .hero-tagline,
html.no-animations .hero-section.will-reveal .btn,
html.no-animations .hero-section.will-reveal .lock-badge {
  transition: none !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.hero-section.will-reveal.revealed h1 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.hero-section.will-reveal.revealed .lock-badge {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.6s;
}

.hero-section.will-reveal.revealed .hero-tagline {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.9s;
}

.hero-section.will-reveal.revealed .btn {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1.2s;
}

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

/* 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-logo {
    height: min(36px, 7vh);
  }
  header.shrink .brand-logo {
    height: min(28px, 5.5vh);
  }
}

/* 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;
  }
  
  /* Prevent header jumping on mobile during scroll */
  header {
    position: fixed;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: padding;
  }
  
  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; }
  
  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 down on small screens */
  .brand-logo {
    height: min(32px, 6vh);
  }
  header.shrink .brand-logo {
    height: min(24px, 5vh);
  }

  /* 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.5rem auto 1rem auto; /* more space for bigger size */
  width: 96px; /* increased from 64px for more impact */
  height: 96px;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: transform 320ms cubic-bezier(0.2,0.8,0.2,1), opacity 280ms ease;
}
.lock-badge:focus {
  outline: none; /* Remove focus outline */
}
.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: 80px; height: 80px; margin: 0.4rem auto 0.8rem auto; }
  .lock-badge .lock-svg { width: 80px; height: 80px; }
}

/* 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 new larger sizing */
.lock-badge .lock-svg { width: 96px; height: 96px; }

@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 SVG 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: 350ms;
  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.05s; }
.revealed .service:nth-child(2) svg { animation-delay: 0.12s; }
.revealed .service:nth-child(3) svg { animation-delay: 0.18s; }

/* 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;
  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 modal content */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(27, 43, 80, 0.05);
  border-radius: 10px;
  margin: 8px 0;
}

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

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

/* Firefox scrollbar styling */
.modal-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(27, 43, 80, 0.2) rgba(27, 43, 80, 0.05);
}

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

.modal-close {
  position: sticky;
  top: 1.25rem;
  right: 1.25rem;
  margin-left: auto;
  margin-bottom: -40px;
  background: rgba(27, 43, 80, 0.08);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
  z-index: 10;
  float: right;
}

.modal-close.scrolling {
  opacity: 0.7;
  background: rgba(27, 43, 80, 0.15);
  transition: opacity 0.2s ease, background 0.2s ease;
}

.modal-close:hover {
  background: rgba(27, 43, 80, 0.15);
  transform: rotate(90deg) scale(1.05);
}

.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;
  }
}

/* Language Switching Animation */
.language-switching * {
  transition: color 0.2s ease, opacity 0.2s ease !important;
}