/* ==========================================================================
   GP IMPEX LLC — styles.css
   Palette derived from the brand mark (assets/logo/gpimpex-favicon.png):
     · flame highlight  #2A75B8   -> sapphire accent  (the single accent colour)
     · flame core       #00112D   -> deep navy grounds
     · wordmark ink     #061024   -> darkest ink
     · chrome crescent  #C9CDD2   -> platinum neutral (hairlines, labels)
   Accent tints are tuned per surface so every text pair clears WCAG AA.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts (self-hosted, variable, latin subset — no external requests)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --ink: #050d1b;          /* darkest — footer */
  --navy: #0a1729;         /* base navy — hero, capabilities */
  --navy-2: #0f2038;       /* elevated navy — cards on dark */
  --offwhite: #f4f6f8;     /* cool off-white, harmonised with the chrome */
  --white: #ffffff;

  /* Text */
  --text: #243247;         /* on light — 11.95:1 */
  --muted: #5b6b80;        /* on light —  5.02:1 */
  --text-inv: #e8ecf1;     /* on navy */
  --muted-inv: #9fb2c9;    /* on navy  —  8.30:1 */

  /* Accent — one hue (sapphire), three surface-tuned tints */
  --sapphire: #2a75b8;          /* true logo blue — button fill (white on it = 4.84:1) */
  --sapphire-hover: #3d8bd0;
  --sapphire-on-dark: #6fb0e8;  /* accent text on navy — 7.75:1 */
  --sapphire-on-light: #1f5d93; /* accent text on off-white — 6.37:1 */
  --platinum: #c9cdd2;

  /* Hairlines */
  --hair-dark: rgba(255, 255, 255, 0.12);
  --hair-light: rgba(10, 23, 41, 0.1);

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(6rem, 10vw, 10rem);
  --header-h: 76px;
  --radius: 3px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --focus: var(--sapphire-on-light);
}

/* --------------------------------------------------------------------------
   3. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.7;
  color: var(--text);
  background: var(--offwhite);
  overflow-x: clip;              /* belt-and-braces against horizontal scroll */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }

button, input, textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 1.35rem + 4.4vw, 4.75rem); }
h2 { font-size: clamp(1.95rem, 1.3rem + 2.5vw, 3.15rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); letter-spacing: -0.01em; }

p { text-wrap: pretty; }

/* Focus: always visible, surface-aware */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Visible to screen readers only */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 200;
  background: var(--white);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.section { padding-block: var(--section-y); }

/* Dark surfaces flip the text + focus tokens so nothing has to be re-declared */
.section--dark,
.footer {
  --text: var(--text-inv);
  --muted: var(--muted-inv);
  --focus: var(--sapphire-on-dark);
  color: var(--text-inv);
}
.section--navy { background: var(--navy); }
.section--ink { background: var(--ink); }
.section--light { background: var(--offwhite); }

/* Section eyebrow — letter-spaced small caps label */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sapphire-on-light);
  margin-bottom: 1.5rem;
}
.section--dark .eyebrow { color: var(--sapphire-on-dark); }
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  flex: none;
}

.lede {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  color: var(--muted);
  max-width: 62ch;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease),
    color 0.35s var(--ease), transform 0.35s var(--ease);
}

.btn--primary {
  background: var(--sapphire);
  color: var(--white);
  border-color: var(--sapphire);
}
.btn--primary:hover {
  background: var(--sapphire-hover);
  border-color: var(--sapphire-hover);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  border-color: var(--hair-light);
  color: var(--text);
}
/* The header is a SIBLING of .hero, not a descendant — it needs the dark-surface
   treatment named explicitly, or "Get in touch" renders navy-on-navy. */
.section--dark .btn--ghost,
.hero .btn--ghost,
.header .btn--ghost { border-color: var(--hair-dark); color: var(--text-inv); }
.btn--ghost:hover {
  border-color: var(--sapphire);
  color: var(--sapphire-on-light);
  transform: translateY(-2px);
}
.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover,
.header .btn--ghost:hover { color: var(--sapphire-on-dark); border-color: var(--sapphire-on-dark); }

/* --------------------------------------------------------------------------
   6. Header / navigation
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: height 0.4s var(--ease), background-color 0.4s var(--ease),
    border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
/* Solidify once the hero is scrolled past */
.header.is-scrolled {
  height: 62px;
  background: rgba(10, 23, 41, 0.92);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--hair-dark);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--white);
  flex: none;
}
.brand img { width: 34px; height: 34px; }
.brand__name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}
.brand__name span { color: var(--platinum); font-weight: 400; }

.nav { margin-left: auto; }
.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2vw, 2.1rem);
  list-style: none;
  padding: 0;
}
.nav__link {
  position: relative;
  display: block;
  padding: 0.4rem 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(232, 236, 241, 0.78);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--sapphire-on-dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav__link:hover { color: var(--white); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--sapphire-on-dark); }

.header__cta { flex: none; padding: 0.7rem 1.25rem; }

/* Language switcher — plain links, no JS. Sits over the navy header, so it is
   tuned on-dark: the active language takes the sapphire accent, the other stays
   muted until hovered. Focus falls through to the global :focus-visible ring. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}
.lang-switch__opt {
  color: rgba(232, 236, 241, 0.55);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
a.lang-switch__opt:hover { color: var(--white); }
.lang-switch__opt.is-active {
  color: var(--sapphire-on-dark);
  font-weight: 600;
}
.lang-switch__sep {
  color: rgba(232, 236, 241, 0.28);
  font-weight: 400;
}

/* Hamburger — only shown on small screens */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--hair-dark);
  border-radius: var(--radius);
  cursor: pointer;
  flex: none;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.35s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Full-screen overlay menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--header-h) var(--gutter) 3rem;
  background: var(--navy);
  opacity: 0;
  visibility: hidden;
  /* `visibility` transitions discretely: if it were part of the 0.4s transition it
     would still compute to `hidden` on the opening frame, and a hidden element
     cannot take focus — the menu would open without the keyboard following it.
     So: flip it instantly on open, and delay it to the end of the fade on close. */
  transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s var(--ease), visibility 0s linear 0s;
}
.mobile-menu__list { list-style: none; padding: 0; display: grid; gap: 0.25rem; }
.mobile-menu__list a {
  display: block;
  padding: 0.9rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-inv);
  text-decoration: none;
  border-bottom: 1px solid var(--hair-dark);
}
.mobile-menu__list a:hover,
.mobile-menu__list a.is-active { color: var(--sapphire-on-dark); }
.mobile-menu__foot { margin-top: 2.5rem; color: var(--muted-inv); font-size: 0.9rem; }
.mobile-menu__foot a { color: var(--sapphire-on-dark); }

body.is-locked { overflow: hidden; }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  --focus: var(--sapphire-on-dark);
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 4rem) 0 6rem;
  text-align: center;
  color: var(--text-inv);
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(42, 117, 184, 0.18), transparent 62%),
    radial-gradient(circle at 82% 12%, rgba(111, 176, 232, 0.07), transparent 45%),
    linear-gradient(180deg, #0a1729 0%, #071324 55%, #050d1b 100%);
}

/* Signature motif: the dot texture — echoed later by the dotted world map */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1.2px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 80% 62% at 50% 45%, #000 28%, transparent 76%);
  mask-image: radial-gradient(ellipse 80% 62% at 50% 45%, #000 28%, transparent 76%);
  pointer-events: none;
}

.hero__inner { display: grid; justify-items: center; gap: 0; }

.hero__mark {
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 2.25rem;
}
.hero__mark img { width: clamp(76px, 9vw, 104px); height: auto; }
/* Thin ring echoing the circular geometry of the logo */
.hero__mark::after {
  content: "";
  position: absolute;
  inset: -46%;
  border: 1px solid rgba(111, 176, 232, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.hero h1 { max-width: 17ch; margin-bottom: 1.75rem; }
.hero h1 em { font-style: normal; color: var(--sapphire-on-dark); }

/* Sits between the headline and the supporting line — see the hero markup. */
.hero__wordmark {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--platinum);
  margin-bottom: 0.85rem; /* paired with .hero__expansion, which carries the gap below */
  padding-left: 0.34em; /* optical: compensate the trailing letter-space */
}

/* The wordmark spelled out. Deliberately subordinate to it: smaller, tighter
   tracking, and an accent tint rather than platinum — a definition, not a second
   headline. #2a75b8 is only 3.8:1 here, so this uses the navy-tuned tint.
   Tracking is held back below 480px so the four words keep to one line down to
   320px; it still wraps cleanly if the text is zoomed. */
.hero__expansion {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 0.4rem;
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--sapphire-on-dark);
  margin-bottom: 1.75rem;
  padding-left: 0.13em; /* optical: compensate the trailing letter-space */
}
.hero__expansion b { font-weight: 700; }
/* Separator rides with the word before it, so a wrapped line never opens on a dot */
.hero__expansion span:not(:last-child)::after {
  content: "·";
  margin: 0 0.35em 0 0.5em;
  opacity: 0.5;
}

@media (min-width: 480px) {
  .hero__expansion {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    padding-left: 0.2em;
  }
  .hero__expansion span:not(:last-child)::after { margin: 0 0.5em 0 0.65em; }
}

/* Russian gloss under the Latin brand expansion (RU page only). The expansion
   keeps its own spacing on the English page, where no gloss follows it. */
.hero__expansion:has(+ .hero__gloss) { margin-bottom: 0.55rem; }
.hero__gloss {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted-inv);
  margin-bottom: 1.9rem;
}

.hero__sub {
  max-width: 60ch;
  color: var(--muted-inv);
  margin-bottom: 2.75rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-inv);
  text-decoration: none;
}
.scroll-cue__line { width: 1px; height: 44px; background: var(--hair-dark); overflow: hidden; }
.scroll-cue__line::after {
  content: "";
  display: block;
  width: 100%;
  height: 40%;
  background: var(--sapphire-on-dark);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(250%); }
}
/* On short viewports the cue would crowd the hero buttons. */
@media (max-height: 720px) {
  .scroll-cue { display: none; }
}

/* --------------------------------------------------------------------------
   8. About — sticky heading / flowing prose
   -------------------------------------------------------------------------- */
.about__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
}
@media (min-width: 900px) {
  .about__grid { grid-template-columns: 1fr 1.15fr; align-items: start; }
  .about__head { position: sticky; top: calc(var(--header-h) + 3rem); }
}
.about__body { display: grid; gap: 1.5rem; }
.about__body p { color: var(--muted); }
.about__body p:first-child {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.6;
  color: var(--text);
}
/* The acronym in running prose — a tint and a half-step of weight, nothing more.
   Intentionally unlike the hero treatment: no caps, no tracking. */
.expansion-inline {
  font-weight: 500;
  color: var(--sapphire-on-light);
}

/* --------------------------------------------------------------------------
   9. Directions — the four business lines
   -------------------------------------------------------------------------- */
.section-head { max-width: 60ch; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.section-head h2 { margin-bottom: 1.25rem; }

.directions__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  /* Two business lines: cap the row and centre it so the pair reads as a
     balanced unit rather than hugging the left of a wide container. */
  max-width: 800px;
  margin-inline: auto;
}
@media (min-width: 640px) { .directions__grid { grid-template-columns: repeat(2, 1fr); } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 2.5vw, 2.25rem);
  background: var(--white);
  border: 1px solid var(--hair-light);
  border-radius: var(--radius);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
}
/* Accent hairline that draws in on hover */
.card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 2px;
  background: var(--sapphire);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(10, 23, 41, 0.16);
  box-shadow: 0 18px 40px -24px rgba(10, 23, 41, 0.35);
}
.card:hover::before { transform: scaleX(1); }

.card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1.5rem;
  color: var(--sapphire-on-light);
  transition: transform 0.4s var(--ease);
}
.card:hover .card__icon { transform: translateY(-2px); }
.card__icon svg { width: 100%; height: 100%; }

.card h3 { margin-bottom: 0.85rem; }
.card__desc { font-size: 0.9375rem; line-height: 1.65; color: var(--muted); margin-bottom: 1.5rem; }

/* `margin-top:auto` sits on the LABEL, not the list, so the hairline rules
   line up across cards whose descriptions run to different lengths. */
.card__label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);           /* 5.44:1 on white — no opacity stacking */
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hair-light);
  margin-bottom: 0.85rem;
}
.card__list { list-style: none; padding: 0; }
.card__list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}
.card__list li + li { margin-top: 0.5rem; }
.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sapphire);
  opacity: 0.75;
}

.directions__note {
  margin-top: 2.25rem;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 78ch;
}

/* --------------------------------------------------------------------------
   10. Capabilities
   -------------------------------------------------------------------------- */
.caps__grid {
  display: grid;
  gap: 1px;                       /* the gap itself becomes the hairline grid */
  background: var(--hair-dark);
  border: 1px solid var(--hair-dark);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) { .caps__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .caps__grid { grid-template-columns: repeat(3, 1fr); } }

.cap {
  position: relative;
  background: var(--navy);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transition: background-color 0.4s var(--ease);
}
.cap:hover { background: var(--navy-2); }

.cap__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.cap__icon { width: 30px; height: 30px; color: var(--sapphire-on-dark); }
.cap__icon svg { width: 100%; height: 100%; }
.cap__num {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted-inv);
  opacity: 0.75;                 /* 5.17:1 on navy */
  letter-spacing: 0.05em;
}
.cap h3 { margin-bottom: 0.75rem; color: var(--text-inv); }
.cap p { font-size: 0.9375rem; line-height: 1.65; color: var(--muted-inv); }

/* --------------------------------------------------------------------------
   11. Global reach — dotted world map
   -------------------------------------------------------------------------- */
.reach__grid { display: grid; gap: clamp(3rem, 5vw, 4.5rem); }
@media (min-width: 1000px) {
  .reach__grid { grid-template-columns: 0.85fr 1.15fr; align-items: center; }
}
/* This heading is not inside .section-head, so it needs its own rhythm. */
.reach__text h2 { margin-bottom: 1.25rem; }

.map {
  width: 100%;
  height: auto;
  color: var(--sapphire-hover);
  /* Fade the far edges so the map dissolves into the section */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.map__dots {
  stroke: currentColor;
  stroke-width: 0.62;
  stroke-linecap: round;
  fill: none;
  opacity: 0.55;
}
/* Dots brighten gently as the section reveals */
.reach__figure { position: relative; }
.reach__figure figcaption {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--muted-inv);
  opacity: 0.7;
  text-align: center;
}

/* --------------------------------------------------------------------------
   12. Contact
   -------------------------------------------------------------------------- */
.contact__grid { display: grid; gap: clamp(3rem, 5vw, 5rem); }
@media (min-width: 900px) { .contact__grid { grid-template-columns: 0.85fr 1.15fr; } }

.contact__details { list-style: none; padding: 0; display: grid; gap: 1.75rem; }
.contact__details dt,
.contact__label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sapphire-on-light);
  margin-bottom: 0.4rem;
}
.contact__details dd { margin: 0; font-size: 1.05rem; }
/* Two labelled offices under ADDRESS. The small caps name mirrors the map's
   toggle labels, so the text block and the map read as the same two places. */
.contact__offices { display: grid; gap: 1.1rem; }
.contact__office { display: block; }
.contact__office-name {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}
.contact__details a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--hair-light); transition: border-color .3s var(--ease), color .3s var(--ease); }
.contact__details a:hover { color: var(--sapphire-on-light); border-bottom-color: currentColor; }

/* Office map — a dark, framed card sitting in an otherwise light section.
   `--map-accent` is the single knob: it drives the marker core ring, its glow
   and the pulse. Swap that one line (e.g. to the reference amber #f0a202) to
   retheme the whole pin. Leaflet's own stylesheet is injected at runtime, so
   the `.leaflet-*` overrides below are scoped to `.map__canvas` and cannot
   leak into the dotted world map in §11. The card owns its own class so it no
   longer inherits §11's `.map` edge-fade mask (that mask was clipping the
   footer link on the left). */

/* `position: relative; z-index: 0` deliberately opens a stacking context:
   Leaflet's controls ship with z-index 1000 and would otherwise paint over the
   fixed header (z-index 100) as the section scrolls under it. */
.map-card {
  --map-accent: var(--sapphire);
  position: relative;
  z-index: 0;
  margin: 2.5rem 0 0;
  background: var(--navy);         /* any tile gap reads as intentional dark */
  border: 1px solid rgba(42, 117, 184, 0.35);   /* accent sapphire, low alpha */
  border-radius: 14px;
  overflow: hidden;                /* clip tiles, controls & attribution to the
                                      rounded corners — this removes white bleed */
  box-shadow:
    inset 0 0 0 1px rgba(10, 23, 41, 0.9),       /* navy inner ring */
    0 10px 30px rgba(10, 23, 41, 0.25);          /* soft outer depth */
}

/* Thin sapphire→transparent accent bar across the card's top edge. */
.map-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(42, 117, 184, 0.7), rgba(42, 117, 184, 0));
  z-index: 2;
  pointer-events: none;
}

/* Two-office segmented toggle — its own row above the map frame, so it never
   overlaps the office chip (top-left of the frame) or the zoom control
   (top-right). Navy glass to echo the chip; the active tab is filled sapphire,
   inactive tabs muted. z-index 3 keeps it above the top accent bar (z-index 2). */
.map-card__tabs {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 0.7rem;
  background: rgba(10, 23, 41, 0.55);
  border-bottom: 1px solid rgba(42, 117, 184, 0.28);
}
.map-card__tab {
  flex: 0 0 auto;
  padding: 0.4rem 0.95rem;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-inv);
  background: rgba(10, 23, 41, 0.5);
  border: 1px solid rgba(42, 117, 184, 0.35);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.map-card__tab:hover {
  color: var(--text-inv);
  border-color: rgba(42, 117, 184, 0.6);
}
.map-card__tab.is-active {
  color: var(--white);
  background: var(--sapphire);
  border-color: var(--sapphire);
  box-shadow: 0 0 0 1px rgba(42, 117, 184, 0.35), 0 4px 14px rgba(10, 23, 41, 0.35);
}
.map-card__tab:focus-visible {
  outline: 2px solid var(--sapphire-on-dark);
  outline-offset: 2px;
}

.map-card__media { position: relative; }

/* Brand label chip, top-left inside the frame — echoes the section eyebrows.
   `pointer-events: none` so it never intercepts a drag on the map beneath. */
.map-card__chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.7rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-inv);
  background: rgba(10, 23, 41, 0.7);
  border: 1px solid rgba(42, 117, 184, 0.35);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.map-card__chip-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--map-accent);
  box-shadow: 0 0 6px 1px var(--map-accent);
}

/* `position: relative; z-index: 0` keeps Leaflet's panes (z-index 200–700) and
   controls (z-index 1000) inside their own stacking context, so they can't rise
   above the chip and top accent bar that sit in the card's context. */
.map__canvas {
  position: relative;
  z-index: 0;
  height: 360px;
  background: var(--navy);          /* dark while tiles load — no white flash */
}
@media (min-width: 900px) { .map__canvas { height: 400px; } }

/* Footer strip — the "Open in Google Maps" link, full width under the map. */
.map-card__footer {
  margin: 0;
  padding: 0.8rem 1.1rem;
  background: var(--ink);
  border-top: 1px solid var(--hair-dark);
}
.map-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--sapphire-on-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.map-card__link:hover { color: var(--white); border-bottom-color: currentColor; }
.map-card__link svg { flex: none; width: 12px; height: 12px; }

/* Kept for the no-JS / failed-load fallback link inside the canvas. */
.map__link {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--sapphire-on-light);
  text-decoration: none;
  border-bottom: 1px solid var(--hair-light);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.map__link:hover { color: var(--text); border-bottom-color: currentColor; }

/* No-JS view (and the network-failure view, which reuses the same markup). */
.map__fallback {
  display: grid;
  gap: 0.75rem;
  place-content: center;
  height: 100%;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-inv);
  font-size: 0.95rem;
}
.map__fallback p { margin: 0; }
.map__fallback .map__link {
  color: var(--sapphire-on-dark);       /* the light-section blue is too dim here */
  border-bottom-color: var(--hair-dark);
}
.map__fallback .map__link:hover { color: var(--white); }

/* ---- Leaflet, restyled for the dark palette ---- */
.map__canvas .leaflet-container {
  height: 100%;
  background: var(--ink);
  font-family: var(--font-body);
  font-size: 0.75rem;
}
.map__canvas .leaflet-container:focus-visible {
  outline: 2px solid var(--sapphire-on-dark);
  outline-offset: -2px;
}

/* Zoom controls — navy glass buttons. Added at top-right in JS (§8) so they
   clear the office chip; inset from the corner so they don't kiss the edge.
   Chaining both container classes (`.leaflet-bar.leaflet-control-zoom`) lifts
   these above leaflet.css, which is injected at runtime and would otherwise win
   the equal-specificity tie by load order. */
.map__canvas .leaflet-top { top: 12px; }
.map__canvas .leaflet-top.leaflet-right { right: 12px; }
.map__canvas .leaflet-bar.leaflet-control-zoom {
  border: 1px solid rgba(42, 117, 184, 0.4);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(10, 23, 41, 0.35);
}
.map__canvas .leaflet-bar.leaflet-control-zoom a {
  width: 32px;
  height: 32px;
  line-height: 32px;
  background: rgba(10, 23, 41, 0.75);
  color: var(--text-inv);
  border: none;
  border-bottom: 1px solid rgba(42, 117, 184, 0.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.map__canvas .leaflet-bar.leaflet-control-zoom a:last-child { border-bottom: none; }
.map__canvas .leaflet-bar.leaflet-control-zoom a:hover,
.map__canvas .leaflet-bar.leaflet-control-zoom a:focus-visible {
  background: var(--sapphire);
  color: var(--white);
  transform: translateY(-1px);
}
.map__canvas .leaflet-bar.leaflet-control-zoom a.leaflet-disabled {
  background: rgba(10, 23, 41, 0.5);
  color: var(--muted-inv);
  transform: none;
}

/* Attribution — kept in full (Leaflet, CARTO, OSM), inside the rounded frame at
   bottom-right, navy-translucent so it stops overlapping the corner. */
.map__canvas .leaflet-control-attribution {
  margin: 0;
  padding: 3px 9px;
  background: rgba(10, 23, 41, 0.78);
  color: var(--muted-inv);
  font-size: 0.6875rem;
  border-top-left-radius: 8px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.map__canvas .leaflet-control-attribution a { color: var(--sapphire-on-dark); }

.map__canvas .leaflet-popup-content-wrapper,
.map__canvas .leaflet-popup-tip {
  background: var(--navy);
  color: var(--text-inv);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  border-radius: var(--radius);
}
.map__canvas .leaflet-popup-content { margin: 0.85rem 1.1rem; line-height: 1.55; }
.map__canvas .leaflet-popup-content strong {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--white);
}
.map__canvas .leaflet-popup-close-button { color: var(--muted-inv); }
.map__canvas .leaflet-popup-close-button:hover { color: var(--white); }

/* ---- The glowing pin (an L.divIcon, so no default blue PNG) ----
   Leaflet's own `.leaflet-marker-icon` makes this absolute and drives it with a
   transform, which is what the two pseudo-elements below anchor to. Do not add
   a `position` here: it would tie correct rendering to leaflet.css still
   winning the cascade, and both selectors have the same specificity. */

/* Core dot — a crisp white centre ringed by the accent, with a soft sapphire
   glow. The pulse ring below expands out of it. */
.map__pin::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--map-accent);
  box-shadow: 0 0 6px 1px var(--map-accent), 0 0 12px 2px rgba(42, 117, 184, 0.55);
}

/* Expanding pulse ring — killed under reduced motion, see §16. */
.map__pin::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--map-accent);
  animation: map-pulse 2.6s var(--ease) infinite;
}
@keyframes map-pulse {
  0%        { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(3); opacity: 0; }
}

/* Form */
.form { display: grid; gap: 1.35rem; }
.form__row { display: grid; gap: 1.35rem; }
@media (min-width: 560px) { .form__row { grid-template-columns: 1fr 1fr; } }

/* `align-content: start` stops the optional Company field — which has no error
   slot — from stretching its input to match the required fields' height. */
.field { display: grid; gap: 0.5rem; align-content: start; }
.field__error:empty { display: none; }
.field label { font-size: 0.8125rem; font-weight: 500; color: var(--text); }
.field label .req { color: var(--sapphire-on-light); }

.field input,
.field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--white);
  border: 1px solid var(--hair-light);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:hover,
.field textarea:hover { border-color: rgba(10, 23, 41, 0.2); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sapphire);
  box-shadow: 0 0 0 3px rgba(42, 117, 184, 0.15);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #b3261e; }

.field__error {
  font-size: 0.8125rem;
  color: #b3261e;
  min-height: 0;
}

/* Honeypot — off-screen, never shown, must stay empty */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.form__note { font-size: 0.8125rem; color: var(--muted); }

/* Status banners.
   `:target` makes them work with JS disabled (contact.php redirects to #sent / #error);
   `.is-visible` is what main.js toggles on the fetch path. */
.form-note {
  display: none;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  border: 1px solid transparent;
}
.form-note:target,
.form-note.is-visible { display: block; }
.form-note--ok { background: rgba(42, 117, 184, 0.08); border-color: rgba(42, 117, 184, 0.35); color: var(--sapphire-on-light); }
.form-note--err { background: rgba(179, 38, 30, 0.06); border-color: rgba(179, 38, 30, 0.3); color: #b3261e; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.footer { background: var(--ink); padding-top: clamp(4rem, 7vw, 6rem); }
.footer__grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.footer__brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; margin-bottom: 1.25rem; }
.footer__brand img { width: 38px; height: 38px; }
.footer__tag { color: var(--muted-inv); font-size: 0.9375rem; max-width: 38ch; }

.footer h2 {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--platinum);
  margin-bottom: 1.25rem;
  letter-spacing: 0.16em;
}
.footer__list { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.footer__list a,
.footer address a {
  color: var(--muted-inv);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.footer__list a:hover,
.footer address a:hover { color: var(--sapphire-on-dark); }
.footer address { font-style: normal; display: grid; gap: 0.9rem; color: var(--muted-inv); font-size: 0.9375rem; }
.footer__office-name { display: block; margin-bottom: 0.15rem; font-size: 0.8125rem; font-weight: 600; color: var(--text-inv); }

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.75rem;
  border-top: 1px solid var(--hair-dark);
  font-size: 0.8125rem;
  color: var(--muted-inv);
}
.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted-inv);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.footer__top:hover { color: var(--sapphire-on-dark); }
.footer__top svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   14. Scroll reveal
   The `[data-reveal]` hidden state is neutralised by a <noscript><style>
   block in the <head>, so with JS off the content is simply visible.
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   15. Responsive: nav collapse
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .nav,
  .header__cta { display: none; }
  .nav-toggle { display: inline-flex; }
  /* .nav carried margin-left:auto on desktop; with it hidden, the switcher takes
     over pushing the right-hand cluster (switch + hamburger) to the edge. */
  .lang-switch { margin-left: auto; }
}

/* --------------------------------------------------------------------------
   16. Reduced motion — kill every transition, animation and smooth scroll
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;   /* also clears the menu's close-delay */
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .card:hover,
  .btn:hover { transform: none; }
  /* The blanket rule above only clamps the pulse to one 0.001ms cycle, which
     leaves the ring parked over the dot. Remove it outright; the pin keeps its
     static glow. main.js §8 also turns off Leaflet's own zoom/fade tweens. */
  .map__pin::before { animation: none; opacity: 0; }
}

/* --------------------------------------------------------------------------
   17. Print
   -------------------------------------------------------------------------- */
@media print {
  /* Tiles never print usefully; the address and the Maps link still do. */
  .header, .mobile-menu, .scroll-cue, .form, .footer__top, .map__canvas { display: none !important; }
  body { background: #fff; color: #000; }
  .section--dark, .footer { background: #fff; color: #000; }
}
