/* ============================================================
   site.css — shared styles loaded by every page
   Header (sticky + shrinking logo), language switcher, base font.
   Page-specific styles (hero, forms, etc.) stay inline per page.
   ============================================================ */

/* --- Base typography --- */
body { font-family: 'Inter', sans-serif; }
.font-serif { font-family: 'Cormorant Garamond', serif; }

/* --- Disable :hover-driven click cursors on desktop hover devices --- */
@media (hover: hover) {
  .no-click-desktop { pointer-events: none; cursor: default; }
}

/* --- Sticky site header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: transparent;
  transition: background-color 0.3s ease;
}
.site-header.scrolled { background-color: #0d1b2a; }

/* Logo + brand text shrink on scroll */
.logo-img,
.logo-equaterra,
.logo-invest {
  transition: height 0.3s ease, font-size 0.3s ease;
}
.site-header.scrolled .logo-img       { height: 56px; }
.site-header.scrolled .logo-equaterra { font-size: 26px; }
.site-header.scrolled .logo-invest    { font-size: 12px; }

/* Nav uses a 3-column grid (1fr | auto | 1fr) so the nav links (ul) sit
   centered in the viewport, not centered in the asymmetric space between
   the logo and lang switcher. */
.site-header nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.site-header nav > a:first-child {
  grid-column: 1;
  justify-self: start;
}
.site-header nav > ul {
  grid-column: 2;
  justify-self: center;
}
.site-header nav > .nav-right-group {
  grid-column: 3;
  justify-self: end;
}

/* Desktop only: shift logo + brand up to 200px left.
   The shift adjusts with viewport width so the logo stays
   locked at 20px from the viewport edge down to ~1640px,
   then keeps the full -200px shift above that.
   Lang switcher locks at 1760px from the viewport's left edge
   (≈160px from the right edge on a 1920px viewport). When the viewport
   narrows past ~1810px, the lang switcher follows the right edge,
   keeping a 50px gap. */
@media (min-width: 769px) {
  .site-header nav > a:first-child {
    transform: translateX(clamp(-200px, calc(620px - 50vw), -20px));
  }
  .site-header .nav-right-group {
    transform: translateX(min(max(-10px, calc(50vw - 650px)), calc(1160px - 50vw)));
  }
}

/* Mobile header — fixed sizes, no transition */
@media (max-width: 768px) {
  .site-header { transition: none; }
  .site-header .logo-img       { height: 48px; }
  .site-header .logo-equaterra { font-size: 22px; }
  .site-header .logo-invest    { font-size: 10px; font-weight: 700; }
  .site-header.scrolled .logo-img       { height: 48px; }
  .site-header.scrolled .logo-equaterra { font-size: 22px; }
  .site-header.scrolled .logo-invest    { font-size: 10px; font-weight: 700; }
}

/* --- Language switcher (desktop dropdown) --- */
.lang-switcher { position: relative; }
.lang-switcher > button {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.lang-switcher img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.25);
  display: block;
}
.lang-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: rgba(13,27,42,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  z-index: 50;
}
.lang-dropdown a { display: block; line-height: 0; }
.lang-dropdown a:hover img { opacity: 0.8; }

/* Language switcher (mobile flag row in hamburger menu) */
.lang-mobile-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(13,27,42,0.15);
}
.lang-mobile-row img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(13,27,42,0.2);
  display: block;
}
.lang-mobile-row a:hover img { opacity: 0.8; }
