/* ── GLOBAL STYLES (360BIM) ── */

/* ── CSS VARIABLES ── */
:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface2: #EDF0F4;
  --gold: #004b72;
  --gold-dim: rgba(0, 75, 114, 0.1);
  --text: #0D1B2E;
  --text-dim: #5A6578;
  --border: rgba(0, 0, 0, 0.08);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --blue: #004b72;
  --blue-light: #006090;
  --blue-pale: rgba(0, 75, 114, 0.07);
  --amber: #E8972A;
}

/* ── RESET & BASE ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 2px; }

/* ── CUSTOM CURSOR ── */
@media (pointer: fine) {
  body {
    cursor: none;
  }

  .cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--blue);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.12s ease-out, opacity 0.4s ease;
    will-change: transform;
    left: 0;
    top: 0;
  }

  .cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 75, 114, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: transform 0.18s ease-out, width 0.3s, height 0.3s, border-color 0.3s, opacity 0.4s ease;
    will-change: transform;
    left: 0;
    top: 0;
  }

  body.cursor-active .cursor,
  body.cursor-active .cursor-ring {
    opacity: 1;
  }
}

/* ── NAV ── */
nav {
  min-height: 72px;
  background: transparent;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: background 0.3s ease, padding 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
}

nav.scrolled {
  background: rgba(245, 246, 248, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  min-height: 60px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

/* Disable backdrop-filter while mobile menu is open — otherwise iOS Safari
   treats nav as a containing block for position:fixed, clipping the overlay */
nav.menu-open,
nav.menu-open.scrolled {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
}

/* ── NAV DROPDOWN ── */
.nav-links li {
  position: relative;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(245, 246, 248, 0.99);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  list-style: none;
  min-width: 240px;
  z-index: 200;
  padding: 20px 0 8px;
}

.nav-links li:hover .nav-dropdown {
  display: block;
}

.nav-links li:hover .has-dropdown-arrow img {
  transform: rotate(180deg);
  transition: transform 0.2s;
}

.nav-dropdown li a {
  display: block;
  padding: 10px 20px;
  font-size: 10px;
  letter-spacing: 1px;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-dropdown li a:hover {
  color: var(--blue);
  background: var(--blue-pale);
}

.nav-dropdown li + li {
  border-top: 1px solid var(--border);
}

.nav-lang {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
}

.nav-lang a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid transparent;
  transition: all 0.3s;
}

.nav-lang a.active,
.nav-lang a:hover {
  color: var(--blue);
  border-color: rgba(0, 75, 114, 0.4);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 101;
}

.hamburger span {
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: all 0.3s;
}

/* Hamburger → X when menu open */
.hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile lang switcher (inside nav-links, hidden on desktop) */
.nav-lang-mobile {
  display: none !important;
}

/* ── REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── FOOTER ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 80px 60px 40px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border);
}

.footer-logo-img {
  height: 36px;
  width: auto;
  margin-bottom: 16px;
  display: block;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-dim);
  max-width: 280px;
  margin-bottom: 24px;
}

.footer-badges {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.footer-badges img {
  width: auto;
  transition: all 0.3s ease;
  display: block;
}

.footer-badges img.logo-iso {
  height: 120px;
}

.footer-badges img.logo-bs {
  height: 64px;
}

.footer-badges img:hover {
  transform: scale(1.05);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 24px;
}

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

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--blue);
}

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.footer-bottom a {
  color: var(--text-dim);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--blue);
}

/* ── MOBILE ── */
@media (max-width: 900px) {
  nav {
    padding: 16px 24px;
  }

  nav.scrolled {
    padding: 12px 24px;
  }

  .nav-links,
  .nav-lang {
    display: none;
  }

  .nav-links.open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(8, 8, 13, 0.97);
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 99;
    overflow-y: auto;
    padding: 80px 24px 40px;
    box-sizing: border-box;
  }

  /* Prevent background scroll when mobile menu is open */
  body.nav-open {
    overflow: hidden;
  }

  .nav-links.open > li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .nav-links.open a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
  }

  .nav-links.open a:hover {
    color: #fff;
  }

  /* Services dropdown inline in mobile menu */
  .nav-links.open .nav-dropdown {
    display: block;
    position: static;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 8px 0 0;
    min-width: unset;
    text-align: center;
  }

  .nav-links.open .nav-dropdown li {
    border-top: none !important;
  }

  .nav-links.open .nav-dropdown li a {
    font-size: 9px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    padding: 4px 0;
    white-space: nowrap;
  }

  .nav-links.open .nav-dropdown li a:hover {
    color: rgba(255, 255, 255, 0.75);
    background: transparent;
  }

  .nav-links.open .has-dropdown-arrow img {
    display: none;
  }

  /* Language switcher in open mobile menu */
  .nav-links.open .nav-lang-mobile {
    display: flex !important;
    flex-direction: row;
    gap: 12px;
    list-style: none;
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    justify-content: center;
  }

  .nav-links.open .nav-lang-mobile a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid transparent;
    transition: all 0.25s;
  }

  .nav-links.open .nav-lang-mobile a.active,
  .nav-links.open .nav-lang-mobile a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
  }

  .hamburger {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 480px) {
  .nav-logo img {
    height: 26px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  footer {
    padding: 60px 24px 40px;
  }
}
