/* Firmamento — Core (Spec-aligned tokens + base + a11y) */

:root {
  /* ===== Brand Core (Spec) ===== */
  --c-navy: #031335;
  --c-azure: #94B1FF;
  --c-gold: #F0CB7A;
  --c-white: #FFFFFF;

  /* ===== Extended palette (Spec) ===== */
  --c-navy-light: #0A1F47;
  --c-navy-lighter: #0A2854;

  --c-azure-bright: #5F7FFF;
  /* AA on navy */
  --c-azure-light: #B8D1FF;
  --c-azure-pale: #E8EDFF;

  --c-gold-bright: #F5D85C;
  --c-gold-muted: #D4B06F;

  --c-gray-50: #F8F9FB;
  --c-gray-100: #E8EBEF;
  --c-gray-dark: #4A4A4A;
  --c-gray-700: #2D3748;
  --c-gray-900: #1A202C;

  --c-border-light: #D1D5DB;
  --c-border-subtle: #E8EBEF;

  --c-success: #10B981;
  --c-warning: #F59E0B;
  --c-error: #EF4444;
  --c-info: #3B82F6;
  --c-blue-professional: #1E40AF;
  /* AAA on white */

  /* ===== Semantic (light) ===== */
  --bg-page: var(--c-white);
  --text: var(--c-navy);
  --text-secondary: var(--c-gray-dark);
  --line: var(--c-border-light);
  --line-subtle: var(--c-border-subtle);
  --shadow: 0 18px 60px rgba(0, 0, 0, .12);

  /* ===== Semantic (dark) ===== */
  --bg-dark: var(--c-navy);
  --bg-dark-elev: var(--c-navy-light);
  --line-dark: var(--c-navy-lighter);
  --text-dark: var(--c-white);
  --muted-dark: var(--c-gray-100);
  --shadow-dark: 0 20px 70px rgba(0, 0, 0, .40);

  /* ===== Typography (Spec) ===== */
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

  --fs-body: 16px;
  --lh-body: 1.6;

  /* H1: 48 desktop, down to ~32 on mobile */
  --fs-h1: clamp(32px, 4.2vw, 48px);
  --fs-h2: clamp(24px, 3vw, 36px);
  --fs-h3: clamp(18px, 2vw, 22px);
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ===== Spacing (Spec 8px base) ===== */
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 16px;
  --s-lg: 24px;
  --s-xl: 32px;
  --s-2xl: 48px;
  --s-3xl: 64px;
  --s-4xl: 96px;
  --s-5xl: 128px;

  /* ===== Radius / motion ===== */
  --r-10: 10px;
  --r-14: 14px;
  --r-18: 18px;
  --r-24: 24px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --speed-1: 140ms;
  --speed-2: 220ms;
  --speed-3: 360ms;

  /* ===== Layout (Spec) ===== */
  --container-max: 1024px;
  --gutter: 16px;

  /* ===== Header ===== */
  --header-h: 84px;
  --header-h-compact: 68px;

  /* ===== Focus ===== */
  --focus-ring: 0 0 0 4px rgba(95, 127, 255, .30);
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
  }
}

@media (min-width: 1024px) {
  :root {
    --container-max: 1024px;
    --gutter: 32px;
  }
}

@media (min-width: 1280px) {
  :root {
    --container-max: 1280px;
  }
}

@media (min-width: 1536px) {
  :root {
    --container-max: 1440px;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  background: var(--c-navy);
  color: var(--c-white);
  overflow-x: hidden;
}

/* Ensure sections reset text color correctly */
.section--light {
  color: var(--text);
  background: var(--c-white);
}

.section--dark {
  color: var(--text-dark);
  background: var(--bg-dark);
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

::selection {
  background: rgba(95, 127, 255, .24);
}

.container {
  width: min(var(--container-max), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

/* A11y */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  padding: 12px 14px;
  border-radius: var(--r-14);
  background: var(--c-navy);
  color: var(--c-white);
  border: 1px solid rgba(255, 255, 255, .18);
  z-index: 9999;
}

.skip-link:focus {
  left: 12px;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--c-azure-bright);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-14);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* Typography */
h1,
h2,
h3 {
  letter-spacing: -0.5px;
  /* Spec: tighter in light/B2B */
  line-height: 1.2;
  margin: 0 0 var(--s-md);
}

h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-semibold);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.2px;
}

p {
  margin: 0 0 var(--s-md);
  color: var(--text-secondary);
}

/* Sections */
.section {
  position: relative;
  padding: var(--s-4xl) 0;
  /* Spec: often 96px */
}

.section--tight {
  padding: var(--s-3xl) 0;
}

.section--light {
  background: var(--c-white);
  color: var(--text);
}

.section--dark {
  background: var(--bg-dark);
  color: var(--text-dark);
}

.section--dark p {
  color: var(--muted-dark);
}

/* Main offset under fixed header */
/* Main offset disabled for immersive header */
.main-offset {
  padding-top: 0;
}

/* Ensure header sits on top */
.site-header {
  position: absolute;
  /* or fixed */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(3, 19, 53, 0.3) !important;
  /* Semi-transparent dark */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Reveal on scroll */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--speed-3) var(--ease), transform var(--speed-3) var(--ease);
}

.fade-in-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Utility */
.stack {
  display: grid;
  gap: var(--s-md);
}

.hr {
  height: 1px;
  background: var(--line);
  border: 0;
}

/* =========================================
   IMMERSIVE HEADER - FIXED TO VIEWPORT
   Eliminates gap between screen top and content
   ========================================= */

/* Force header to stick to viewport top */
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(3, 19, 53, 0.45) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
}

/* Remove all spacing from page structure */
html {
  background-color: #031335 !important;
  margin: 0;
  padding: 0;
}

body {
  background-color: #031335 !important;
  margin: 0 !important;
  padding: 0 !important;
}

main {
  margin: 0 !important;
  padding: 0 !important;
}

.main-offset {
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure hero sections start at screen top */
section.hero,
section.about-hero,
.hero,
.about-hero {
  margin-top: 0 !important;
}

/* Force backgrounds to cover from absolute top */
.hero__bg,
.about-hero,
.about-hero::before {
  top: 0 !important;
  left: 0 !important;
}

/* ===== TARGETED FIX: White Sections Need Dark Text ===== */
/* Services hero and similar white-bg sections */
.serv-hero,
.serv-hero * {
  color: var(--c-navy);
}

/* Override inherited white color for these specific sections */
.section--light.serv-hero,
.section--light.serv-hero * {
  color: var(--c-navy);
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.5px;
}

.lang-switcher__link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--speed-2) var(--ease);
  padding: 4px 6px;
  border-radius: 4px;
}

.lang-switcher__link:hover {
  color: rgba(255, 255, 255, 0.9);
}

.lang-switcher__link.is-active {
  color: var(--c-white);
  font-weight: var(--fw-semibold);
}

.lang-switcher__separator {
  color: rgba(255, 255, 255, 0.3);
  user-select: none;
}

/* Mobile hamburger menu - hide lang switcher in favor of mobile menu */
@media (max-width: 768px) {
  .lang-switcher {
    display: none;
    /* Will be in mobile menu instead */
  }
}

/* ===== RESPONSIVE VIDEO CONTAINER ===== */
.video-wrapper {
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto;
  padding: 0 !important;
}

.video-container {
  position: relative;
  width: 100% !important;
  max-width: none !important;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--r-18);
  background: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--r-18);
}

/* Dual video grid for testimonials */
.video-grid {
  display: grid !important;
  gap: 24px;
  margin-top: 24px;
  grid-template-columns: 1fr !important;
  /* Mobile: 1 column */
  width: 100%;
}

@media (min-width: 640px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    /* Desktop: 2 columns */
    gap: 32px;
  }
}

.video-item {
  width: 100%;
}

.video-item__title {
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--c-white);
  margin-bottom: 12px;
  text-align: center;
  opacity: 0.9;
}