/* Global styles, CSS variables, resets, typography */

:root {
  --primary-blue: #0047AB;
  --cta-accent: #E32B09;
  --accent-light-red: #FF6B4A;
  --text-body: #4a4a4a;
  --content-max: 1240px;

  /* Consistent spacing scale (8px system) */
  --space-1: 0.5rem;   /*  8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-5: 2.5rem;   /* 40px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-10: 5rem;    /* 80px */
  --space-12: 6rem;    /* 96px */

  /* Animation easing tokens */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Prevent horizontal overflow on mobile */
html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

/* Make all images/videos responsive by default */
img, video, svg {
  max-width: 100%;
  height: auto;
}

/* Respect reduced motion */
@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;
  }
}

/* ── CTA Banner (shared across pages) ── */
.services-cta {
  background: var(--primary-blue, #0047AB);
  padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 5vw, 6rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
}

.services-cta__text {
  max-width: 36rem;
  flex: 1 1 20rem;
}

.services-cta__headline {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.services-cta__sub {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: rgba(255, 255, 255, 0.78);
  margin-top: 0.75rem;
  line-height: 1.6;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.25rem;
  min-height: 48px;
  background: var(--cta-accent, #E32B09);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  white-space: nowrap;
  transition: background 0.2s var(--ease-standard), transform 0.2s var(--ease-standard);
  cursor: pointer;
}

.btn-primary:hover {
  background: #c82308;
  transform: translateY(-1px) scale(1.02);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.08s;
}

.btn-primary:focus-visible {
  outline: 3px solid var(--primary-blue, #0047AB);
  outline-offset: 3px;
}

.services-cta__btn {
  flex-shrink: 0;
}

.services-cta__btn:focus-visible {
  outline-color: #fff;
}

/* Tablet */
@media (max-width: 900px) {
  .services-cta {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  .services-cta__text {
    flex: none;
  }
}

/* Mobile */
@media (max-width: 600px) {
  /* Prevent iOS zoom on input focus */
  input, select, textarea {
    font-size: 16px;
  }

  .services-cta__btn {
    width: 100%;
    max-width: 20rem;
    text-align: center;
  }
}

/* Dropdown Navigation */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown__content {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 220px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 200;
  padding: 0.5rem 0;
}

.site-footer__nav .nav-dropdown__content {
  top: auto;
  bottom: 100%;
  transform: translateY(-10px);
}

.nav-dropdown:hover .nav-dropdown__content,
.site-footer__nav .nav-dropdown:hover .nav-dropdown__content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown__content a {
  padding: 0.75rem 1.5rem !important;
  color: #333 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  text-decoration: none;
  display: block;
  font-size: 0.9rem !important;
  min-height: auto !important;
  border-bottom: none !important;
}

.nav-dropdown__content a:hover {
  background: rgba(0, 71, 171, 0.05);
  color: var(--primary-blue) !important;
}

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

@media (max-width: 1024px) {
  .nav-dropdown {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .nav-dropdown__content {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none !important;
    box-shadow: none;
    padding: 0 0 0.5rem 1.5rem;
    background: transparent;
  }
}

/* ── Scroll Reveal System ── */

/* Base hidden state — only when JS has initialized */
html.is-ready [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

html.is-ready [data-reveal="fade"] {
  transform: none;
}

html.is-ready [data-reveal="fade-left"] {
  transform: translateX(-16px);
}

html.is-ready [data-reveal="fade-right"] {
  transform: translateX(16px);
}

html.is-ready [data-reveal="fade-scale"] {
  transform: scale(0.96);
}

/* Visible state — added by reveal.js */
html.is-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Sticky header shadow when scrolled */
.site-header.is-scrolled {
  box-shadow: 0 4px 28px rgba(0, 71, 171, 0.14);
  transition: box-shadow 0.3s var(--ease-standard);
}
