/* =========================================================================
   PAESA pilot site — style.css
   Tokens copied verbatim from website/brand/paesa-brand-guidelines-v2.01.html
   :root block. Mobile-first: base rules target ~375px, then layered up with
   min-width breakpoints at 768 / 1024 / 1440.
   ========================================================================= */

:root {
  /* ===== Core palette, sourced, not estimated ===== */
  --logo-blue: #001AFF;
  --logo-red: #EB0A0E;
  --deck-navy: #043174;
  --deck-blue-deep: #002060;
  --deck-blue: #0070C0;
  --deck-green: #00AC41;
  --deck-ink: #1A1A2E;
  --deck-gold: #E9901C;
  --gray-600: #5A6472;
  --gray-300: #C9D1DC;
  --offwhite: #F6F7F9;
  --paper: #FFFFFF;
  --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 32px;
  --space-5: 48px; --space-6: 64px; --space-7: 96px; --space-8: 128px;
  --maxw: 1320px;
}

/* ===== Reset ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
button { font: inherit; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--deck-ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Sora', sans-serif; letter-spacing: -0.01em; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-2);
}
.wrap-narrow { max-width: 760px; }

/* Scroll offset so sticky header never covers a jumped-to section */
section[id], main[id] { scroll-margin-top: 88px; }

/* ===== Focus visibility — never remove outlines without a replacement ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--deck-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Skip link ===== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--deck-navy);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  z-index: 200;
}
.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

/* =========================================================================
   NAV
   ========================================================================= */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #E7EAEF;
}
.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 72px;
  padding: 10px 0;
  gap: 8px;
  row-gap: 8px;
}

.brand-mark {
  display: flex;
  align-items: center;
  height: 44px;
  flex-shrink: 0;
}
.brand-mark img { height: 100%; width: auto; }

.primary-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #E7EAEF;
  flex-direction: column;
  padding: var(--space-2);
  box-shadow: 0 8px 20px rgba(4, 49, 116, 0.08);
}
.primary-nav.is-open { display: flex; }
.primary-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--gray-600);
  border-radius: 6px;
}
.primary-nav a:hover { color: var(--logo-blue); background: var(--offwhite); }
.primary-nav a.is-active { color: var(--logo-blue); }

.topnav-utility {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gray-600);
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--logo-blue); color: var(--logo-blue); }
.lang-toggle .lang-sep { color: var(--gray-300); }
.lang-toggle .lang-option { padding: 2px 4px; border-radius: 4px; }
.lang-toggle:not(.is-id) .lang-en,
.lang-toggle.is-id .lang-id {
  background: var(--deck-navy);
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--logo-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 26, 255, 0.25);
}
.btn-primary:hover { background: var(--deck-blue-deep); }
.btn-primary:active { transform: translateY(1px); }

.cta-inquiry {
  font-size: 12px;
  padding: 0 14px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  background: transparent;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  color: var(--deck-navy);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--logo-blue); color: var(--logo-blue); }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-burger { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh; /* progressive enhancement: ignored by older engines, keeps the vh fallback above */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0A1A2E;
}
.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(0.92) saturate(1.05);
  animation: hero-ken-burns 22s ease-in-out infinite alternate;
  transform-origin: center center;
}
@keyframes hero-ken-burns {
  from { transform: scale(1); }
  to   { transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-img { animation: none; transform: scale(1.04); }
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(0.92) saturate(1.05);
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 1;
}
.hero-video.is-active { opacity: 1; }

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(4, 20, 40, 0.1) 0%, rgba(4, 20, 40, 0.18) 45%, rgba(2, 10, 24, 0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-6) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (min-width: 768px) {
  .hero-content {
    text-align: left;
    align-items: flex-start;
  }
}
.hero-headline {
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.hero-subhead {
  color: #EAEFF7;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  max-width: 480px;
  margin-top: var(--space-2);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

.scroll-cue {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 44px;
  justify-content: center;
}
.scroll-cue svg {
  animation: scroll-bounce 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue svg { animation: none; }
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* =========================================================================
   PROOF STATS STRIP
   ========================================================================= */
.proof-stats {
  background: var(--deck-navy);
  color: #fff;
  padding: var(--space-4) 0;
}
.proof-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  text-align: center;
}
.proof-stat strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
}
.proof-stat span {
  display: block;
  font-size: 13px;
  color: #CBD6EA;
  margin-top: 6px;
  line-height: 1.4;
}

/* =========================================================================
   SECTION SHELL
   ========================================================================= */
.section { padding: var(--space-6) 0; }
.section-offwhite { background: var(--offwhite); }

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--logo-blue);
  margin-bottom: var(--space-2);
}
.section-head { max-width: 760px; margin-bottom: var(--space-5); }
.section-head h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
}
.section-head p {
  font-size: 16px;
  color: var(--gray-600);
  margin-top: var(--space-2);
  max-width: 620px;
  line-height: 1.6;
}

/* =========================================================================
   CARD GRID — Business Units & Case Studies
   ========================================================================= */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.unit-card, .case-card {
  background: #fff;
  border: 1px solid #E7EAEF;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.unit-card:hover, .case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(4, 49, 116, 0.14);
}
@media (prefers-reduced-motion: reduce) {
  .unit-card:hover, .case-card:hover { transform: none; }
}

.unit-card-media { height: 340px; overflow: hidden; }
.unit-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.unit-card:hover .unit-card-media img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) {
  .unit-card:hover .unit-card-media img { transform: none; }
}
.unit-card-body { padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.unit-card-body h3 { font-size: 20px; }
.unit-card-body p { font-size: 15px; color: var(--gray-600); line-height: 1.6; flex: 1; }

.unit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--logo-blue);
  text-decoration: none;
  min-height: 44px;
}
.unit-link:hover { color: var(--deck-blue-deep); text-decoration: underline; }
.unit-link svg { flex-shrink: 0; transition: transform 0.15s ease; }
.unit-link:hover svg { transform: translateX(3px); }

.case-card-media { height: 320px; overflow: hidden; }
.case-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.case-card:hover .case-card-media img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) {
  .case-card:hover .case-card-media img { transform: none; }
}
.case-card-body { padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.case-card h3 { font-size: 18px; line-height: 1.3; }
.case-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--space-2) 0;
  border-top: 1px solid #EFF1F4;
  border-bottom: 1px solid #EFF1F4;
}
.case-meta div { display: flex; flex-direction: column; gap: 4px; }
.case-meta dt.meta-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--logo-blue);
  background: rgba(0, 26, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
}
.case-meta dd { font-size: 14px; color: var(--deck-ink); font-weight: 500; }
.case-card-body > p { font-size: 14.5px; color: var(--gray-600); line-height: 1.65; }
.case-card-body > p.case-card-client {
  margin-top: 2px;
  padding-top: var(--space-2);
  border-top: 1px dashed var(--gray-300);
  font-size: 13px;
  line-height: 1.5;
  color: var(--deck-ink);
}
.case-card-client-label {
  font-weight: 700;
  color: var(--logo-blue);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 11.5px;
}

/* =========================================================================
   CONSTRUCTION CAPABILITY — descending staircase bar chart
   ========================================================================= */
.capability-subcaption { font-size: 13px; color: var(--gray-600); margin-top: 2px; }

.capability-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
}

/* Mobile-only name key — see the comment in renderCapability(). Small
   chips centered under a left-aligned "Legend" title, wrapping to 2-3 rows
   so all 7 fit without needing the width a single row would take; hidden
   once each bar has room to show its own name (min-width:768px, below). */
.capability-mobile-legend-wrap { width: 100%; }
.capability-mobile-legend-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-600);
  text-align: left;
  margin-bottom: 6px;
}
.capability-mobile-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
}
.capability-mobile-legend-row { display: flex; align-items: center; gap: 4px; }
.capability-mobile-legend-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--cap-color, var(--logo-blue));
  color: #fff;
  flex-shrink: 0;
}
.capability-mobile-legend-icon svg { width: 10px; height: 10px; }
.capability-mobile-legend-name { font-size: 10.5px; font-weight: 600; color: var(--deck-ink); text-align: left; }
@media (min-width: 768px) {
  .capability-mobile-legend-wrap { display: none; }
}

.capability-stairs {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
}
.capability-step {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  flex: 1 1 0;
  min-width: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.capability-step:hover, .capability-step:focus-visible { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) {
  .capability-step:hover, .capability-step:focus-visible { transform: none; }
}
.capability-bar-track {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  width: 100%;
  height: 220px;
}
.capability-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 6px;
  padding-top: 6px;
  border-radius: 6px 6px 0 0;
  background: var(--cap-color, var(--logo-blue));
  transition: filter 0.15s ease;
}
.capability-step:hover .capability-bar, .capability-step:focus-visible .capability-bar { filter: brightness(1.1); }

/* think-cell-style data labels: inside the bar (white) when there's room,
   or just above it (bar's own color) when the bar is too short. */
.capability-bar-value { text-align: center; line-height: 1.2; }
.capability-bar-value strong { display: block; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 15px; }
.capability-bar-value-count { display: block; font-size: 11px; font-weight: 600; }
.capability-bar-value.is-inside { color: #fff; }
.capability-bar-value.is-inside strong, .capability-bar-value.is-inside .capability-bar-value-count {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.capability-bar-value.is-outside { color: var(--cap-color, var(--logo-blue)); margin-bottom: 4px; }

.capability-step-label-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.capability-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--cap-color, var(--logo-blue));
  color: #fff;
  flex-shrink: 0;
}
.capability-step-icon svg { width: 16px; height: 16px; }
.capability-step-name {
  display: none;
  font-weight: 700;
  font-size: 14px;
  color: var(--deck-ink);
  line-height: 1.3;
  text-align: left;
}
@media (min-width: 768px) {
  .capability-step-name { display: block; }
  .capability-step-icon { width: 32px; height: 32px; }
  .capability-step-icon svg { width: 18px; height: 18px; }
  .capability-step-name { font-size: 16px; }
}

@media (min-width: 768px) {
  .capability-bar-track { height: 280px; }
  .capability-bar-value strong { font-size: 17px; }
}

/* =========================================================================
   PROJECT DISTRIBUTION MAP
   ========================================================================= */
.map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}
.map-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-300);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-600);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.map-filter-chip .chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--chip-color, var(--gray-600));
  flex-shrink: 0;
}
.map-filter-chip:hover { border-color: var(--chip-color, var(--logo-blue)); color: var(--deck-ink); }
.map-filter-chip.is-active {
  border-color: var(--chip-color, var(--logo-blue));
  background: color-mix(in srgb, var(--chip-color, var(--logo-blue)) 10%, #fff);
  color: var(--deck-ink);
}

#map .wrap {
  /* Keep this section at its original width — the hand-transcribed marker
     coordinates read as noticeably off once the map is enlarged, so it
     stays at the pre-widen container size regardless of the --maxw bump
     used elsewhere on large screens. */
  --maxw: 1320px;
}
.map-figure {
  position: relative;
  width: 100%;
  background: var(--offwhite);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #E7EAEF;
}
.map-bg { width: 100%; height: auto; aspect-ratio: 1168 / 466; display: block; }
.map-markers { position: absolute; inset: 0; }

/* Masks the "# of Projects" gradient legend baked into the source PNG's
   top-right corner — there's no image-editing tool in this environment to
   crop it out of the raster, and it sits above the real Papua/Papua Barat
   markers (which are placed lower, around 48-50% down), so this is safe. */
.map-legend-mask {
  position: absolute;
  top: 0;
  right: 0;
  width: 10%;
  height: 30%;
  background: var(--offwhite);
}

.map-marker {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  touch-action: manipulation;
  border: none;
  padding: 0;
  cursor: pointer;
}
.map-marker:focus-visible {
  outline: 2px solid var(--logo-blue);
  outline-offset: 2px;
  border-radius: 50%;
}
.map-marker .marker-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--marker-color, var(--logo-blue));
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.map-marker:hover .marker-dot,
.map-marker:focus-visible .marker-dot {
  /* Checked against the tightest two dots on the map (Jambi/South Sumatera,
     ~30px apart): this hovered halo's radius plus a resting neighbor's
     radius leaves a few px of clear gap at that worst case, instead of
     the old 9px/1.5x/6px numbers which actually exceeded it. */
  transform: scale(1.35);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--marker-color, var(--logo-blue)) 30%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  .map-marker:hover .marker-dot,
  .map-marker:focus-visible .marker-dot { transform: none; }
}
.map-marker.is-dimmed { opacity: 0.18; }
.map-marker.is-dimmed:hover { opacity: 0.18; }

/* Per-province info card — a bonus glance layer on top of the always-
   visible Province Breakdown list below, shown on ANY device: hover a dot
   with a mouse, or tap/click a dot or its list row (touch has no hover,
   so tap is the equivalent trigger there). At most one card is ever shown
   at a time (see applyMapCardVisibility/mapHoverProvince/mapActiveProvince
   in script.js), so two cards can never overlap even when their dots sit
   a few pixels apart. Dismiss by repeating the tap/click, picking a
   different dot/row, or "All provinces". left/top are set inline from the
   same xPercent/yPercent as the dot, with the open-direction/anchor
   computed in JS (mapCardTransform) so cards near the map's edges don't
   get clipped by .map-figure's overflow:hidden. */
.map-cards { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.map-card {
  position: absolute;
  background: var(--deck-navy);
  color: #fff;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  line-height: 1.35;
  min-width: 108px;
  max-width: 150px;
  box-shadow: 0 6px 14px rgba(4, 49, 116, 0.35);
}
.map-card strong { display: block; font-size: 11px; margin-bottom: 2px; }
.map-card .tooltip-row { display: flex; justify-content: space-between; gap: 6px; color: #CBD6EA; }
.map-card[hidden] { display: none; }

.map-footnote {
  font-size: 13px;
  color: var(--gray-600);
  margin-top: var(--space-2);
  line-height: 1.6;
}

/* Hidden by default (mobile uses .map-province-mobile instead); restored
   at the min-width:768px breakpoint below. */
.map-legend-heading, .map-legend-list { display: none; }
.map-legend-heading {
  font-size: 15px;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}
.map-legend-list {
  font-size: 13.5px;
}
.map-legend-list > li { margin-bottom: 6px; break-inside: avoid; }
.map-legend-list > li:last-child { margin-bottom: 0; }
.map-legend-list button {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  background: var(--offwhite);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.map-legend-list button:hover { border-color: var(--gray-300); }
.map-legend-list button.is-active {
  border-color: var(--logo-blue);
  background: color-mix(in srgb, var(--logo-blue) 8%, var(--offwhite));
}
/* Lighter than the map dot's 0.18 dim — these rows still carry readable
   text, so a near-invisible dim would make them hard to use. */
.map-legend-list button.is-dimmed { opacity: 0.4; }
/* Links a hovered/focused map dot to its row without implying the
   stronger "pinned" state .is-active represents. */
.map-legend-list button.is-hover-linked {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--logo-blue) 35%, transparent);
}
.map-legend-list .legend-head { display: flex; align-items: center; gap: 8px; }
.map-legend-list .legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.map-legend-list .legend-name { flex: 1; color: var(--deck-ink); font-weight: 600; }
.map-legend-list .legend-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 18px;
}
.map-legend-list .legend-stats .tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
  color: var(--gray-600);
}
.map-legend-list .legend-stats .tooltip-row span:last-child { color: var(--deck-ink); font-weight: 700; }
.map-legend-list .legend-stats .tooltip-row-total {
  font-weight: 700;
  color: var(--deck-navy);
  padding-bottom: 4px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--gray-300);
}
.map-legend-list .legend-stats .tooltip-row-total span:first-child { color: var(--deck-navy); }

/* "All provinces" reset — clears a pinned province selection back to the
   default (no card shown, no dots dimmed by province). */
.map-legend-all { border-style: dashed; }
.map-legend-all .legend-dot-all {
  border-radius: 50%;
  border: 1.5px solid var(--gray-600);
  background: transparent;
}
.map-legend-all.is-active {
  border-color: var(--logo-blue);
  border-style: solid;
  background: color-mix(in srgb, var(--logo-blue) 8%, var(--offwhite));
}

/* Mobile-only alternative to the card list above: a province picker plus
   a single result card for whichever one is selected. Swaps with the
   list at the 768px breakpoint (see the min-width:768px block below). */
.map-province-mobile { margin-top: var(--space-5); }
.map-province-select-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--deck-ink);
  margin-bottom: var(--space-2);
}
.map-province-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--gray-300);
  background: #fff;
  font-size: 14px;
  color: var(--deck-ink);
}
.map-province-result:empty { display: none; }
.map-province-result {
  margin-top: var(--space-3);
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--offwhite);
  border: 1.5px solid var(--gray-300);
}
.map-province-result-head { font-weight: 700; color: var(--deck-ink); margin-bottom: 6px; }
.map-province-result-stats { display: flex; flex-direction: column; gap: 2px; }
.map-province-result-stats .tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
  color: var(--gray-600);
}
.map-province-result-stats .tooltip-row span:last-child { color: var(--deck-ink); font-weight: 700; }
.map-province-result-stats .tooltip-row-total {
  font-weight: 700;
  color: var(--deck-navy);
  padding-bottom: 4px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--gray-300);
}
.map-province-result-stats .tooltip-row-total span:first-child { color: var(--deck-navy); }

/* =========================================================================
   CLIENTS — dense logo grid
   ========================================================================= */
.client-group { margin-bottom: var(--space-5); }
.client-group:last-child { margin-bottom: 0; }
.client-group-label {
  font-family: 'Sora', sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--deck-navy);
  margin-bottom: var(--space-3);
}
.logo-strip-wrap {
  position: relative;
}
.logo-strip-wrap::before,
.logo-strip-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  z-index: 2;
  pointer-events: none;
}
.logo-strip-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--offwhite) 0%, rgba(246, 247, 249, 0) 100%);
}
.logo-strip-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--offwhite) 0%, rgba(246, 247, 249, 0) 100%);
}
.section .logo-strip-wrap::before { background: linear-gradient(90deg, var(--paper) 0%, rgba(255, 255, 255, 0) 100%); }
.section .logo-strip-wrap::after { background: linear-gradient(270deg, var(--paper) 0%, rgba(255, 255, 255, 0) 100%); }
.section-offwhite .logo-strip-wrap::before { background: linear-gradient(90deg, var(--offwhite) 0%, rgba(246, 247, 249, 0) 100%); }
.section-offwhite .logo-strip-wrap::after { background: linear-gradient(270deg, var(--offwhite) 0%, rgba(246, 247, 249, 0) 100%); }

.logo-strip {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: var(--space-1) var(--space-1) var(--space-2);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.logo-tile {
  background: #fff;
  border: 1px solid #E7EAEF;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  min-height: 140px;
  min-width: 200px;
  flex-shrink: 0;
  scroll-snap-align: start;
}
.logo-tile img {
  max-height: 80px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.logo-tile a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: opacity 0.15s ease;
}
.logo-tile a:hover, .logo-tile a:focus-visible { opacity: 0.75; }

/* =========================================================================
   HISTORY TIMELINE — horizontal scroll at every width
   ========================================================================= */
.timeline-scroll { width: 100%; overflow-x: auto; overflow-y: visible; padding-top: 10px; padding-bottom: var(--space-2); }
.timeline {
  display: flex;
  flex-direction: row;
  gap: var(--space-4);
  position: relative;
  padding-left: 0;
  padding-top: var(--space-4);
  border-left: none;
  border-top: 2px solid var(--gray-300);
  min-width: max-content;
}
.timeline-item {
  position: relative;
  padding: var(--space-3) 0 0 0;
  width: 150px;
  flex-shrink: 0;
}
.timeline-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--logo-blue) 12%, #fff);
  color: var(--logo-blue);
}
.timeline-icon svg { width: 16px; height: 16px; }
.timeline-dot {
  position: absolute;
  left: 0;
  top: calc(-1 * var(--space-4) - 6px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--logo-blue);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--gray-300);
}
.timeline-date {
  display: block;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--deck-navy);
  margin-bottom: 4px;
}
.timeline-text { font-size: 14.5px; color: var(--gray-600); line-height: 1.5; }
@media (min-width: 1024px) {
  .timeline-item { width: 180px; }
  .timeline { gap: var(--space-5); }
}

/* =========================================================================
   CERTIFICATIONS
   ========================================================================= */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.cert-card {
  background: #fff;
  border: 1px solid #E7EAEF;
  border-left: 4px solid var(--deck-green);
  border-radius: 10px;
  padding: var(--space-3);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cert-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(4, 49, 116, 0.12);
}
@media (prefers-reduced-motion: reduce) {
  .cert-card:hover { transform: none; }
}
.cert-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--deck-green) 12%, #fff);
  color: var(--deck-green);
}
.cert-icon svg { width: 24px; height: 24px; }
.cert-body { flex: 1; min-width: 0; }
.cert-name { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 16px; color: var(--deck-ink); margin-bottom: 4px; }
.cert-body p { font-size: 14px; color: var(--gray-600); line-height: 1.5; }

/* =========================================================================
   CONTACT FORM
   ========================================================================= */
.inquiry-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 14px; font-weight: 600; color: var(--deck-ink); }
.form-row input,
.form-row textarea {
  font-family: 'Inter', sans-serif;
  font-size: 16px; /* keep >=16px to avoid iOS auto-zoom */
  padding: 12px 14px;
  min-height: 44px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: #fff;
  color: var(--deck-ink);
}
.form-row input:focus,
.form-row textarea:focus { border-color: var(--logo-blue); }
.form-row textarea { min-height: 120px; resize: vertical; }
.form-row input[aria-invalid="true"],
.form-row textarea[aria-invalid="true"] { border-color: var(--logo-red); }

.field-error {
  font-size: 13px;
  color: var(--logo-red);
  margin-top: 2px;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.form-status {
  font-size: 14px;
  color: var(--deck-green);
  font-weight: 600;
}

/* =========================================================================
   ABOUT US (standalone page — hero + President Director message)
   ========================================================================= */
.about-hero {
  position: relative;
  min-height: 70vh;
  min-height: 70dvh; /* progressive enhancement: ignored by older engines, keeps the vh fallback above */
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0A1A2E;
}
.about-hero-media { position: absolute; inset: 0; overflow: hidden; }
.about-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(0.9) saturate(1.05);
}
.about-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 20, 40, 0.25) 0%, rgba(4, 20, 40, 0.35) 55%, rgba(2, 10, 24, 0.65) 100%);
}
.about-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-7) var(--space-2) var(--space-5);
}
.about-hero-content h1 { color: #fff; font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 0 0 var(--space-2); }
.about-hero-tagline { color: #fff; font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 600; max-width: 560px; margin: 0; }

#about-content h2 { font-size: 19px; margin: var(--space-4) 0 var(--space-2); }
#about-content p { font-size: 15.5px; line-height: 1.7; color: var(--gray-600); margin: 0 0 var(--space-3); }
.about-signature {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--gray-300);
}
.about-signature-name { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 16px; color: var(--deck-navy); margin: 0; }
.about-signature-title { font-size: 14px; color: var(--gray-600); margin: 2px 0 0; }

/* =========================================================================
   LEGAL PAGES (privacy, terms)
   ========================================================================= */
#legal-content h1 { font-size: 32px; margin: 0 0 var(--space-2); }
#legal-content h2 { font-size: 20px; margin: var(--space-4) 0 var(--space-2); }
#legal-content p { font-size: 15px; line-height: 1.6; color: var(--gray-600); margin: 0 0 var(--space-3); }
.legal-updated { font-size: 13px; color: var(--gray-600); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { background: #0A1A2E; color: #B9C6DD; padding: var(--space-5) 0; }
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: var(--space-2);
}
.footer-logo { height: 40px; width: auto; background: #fff; border-radius: 16px; padding: 6px 12px; }
.footer-tagline {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}
.footer-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 520px; }
.footer-line { display: flex; align-items: flex-start; gap: 8px; }
.footer-line svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: #9FB3D1; }
.footer-email { font-size: 13.5px; font-weight: 600; color: #fff; text-decoration: none; }
.footer-email:hover, .footer-email:focus-visible { text-decoration: underline; }
.footer-addresses { display: flex; flex-direction: column; gap: 6px; }
.footer-addresses p { font-size: 12.5px; color: #B9C6DD; line-height: 1.5; margin: 0; }
.footer-addresses strong { color: #EAEFF7; font-weight: 700; }

.footer-social { display: flex; justify-content: flex-start; gap: var(--space-2); }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid #3C4F6E;
  color: #B9C6DD;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.footer-social a:hover, .footer-social a:focus-visible { border-color: #fff; color: #fff; }
.footer-social svg { width: 18px; height: 18px; }

.footer-nav { display: flex; gap: var(--space-3); flex-wrap: wrap; justify-content: flex-start; }
.footer-nav a { font-size: 13px; color: #B9C6DD; text-decoration: none; }
.footer-nav a:hover, .footer-nav a:focus-visible { color: #fff; text-decoration: underline; }
.footer-copyright { font-size: 13px; color: #8396B4; text-align: left; }

/* =========================================================================
   BREAKPOINT: 768px — nav expands, grids go 2-col, timeline begins to widen
   ========================================================================= */
@media (min-width: 768px) {
  .wrap { padding: 0 var(--space-4); }

  .brand-mark { height: 52px; }

  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .business-unit-grid { grid-template-columns: repeat(2, 1fr); }
  .case-study-grid { grid-template-columns: repeat(2, 1fr); }

  .map-legend-list { column-count: 2; column-gap: var(--space-2); }
  .map-province-mobile { display: none; }
  .map-legend-heading, .map-legend-list { display: block; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }

  .proof-stats-grid { grid-template-columns: repeat(4, 1fr); }

  .logo-strip { flex-wrap: wrap; overflow-x: visible; }
  .logo-tile { flex: 1 1 220px; min-width: 220px; min-height: 160px; }
  .logo-strip-wrap::before, .logo-strip-wrap::after { display: none; }
}

/* =========================================================================
   BREAKPOINT: 1024px — business units / case studies to 3-4 cols,
   history timeline flips to horizontal
   ========================================================================= */
@media (min-width: 1024px) {
  .primary-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
    padding: 0;
    background: transparent;
    border-bottom: none;
    box-shadow: none;
  }
  .primary-nav a {
    min-height: auto;
    height: 40px;
    font-size: 13px;
    padding: 0 10px;
    white-space: nowrap;
  }
  .nav-toggle { display: none; }
  .cta-inquiry { font-size: 14px; white-space: nowrap; }

  .business-unit-grid { grid-template-columns: repeat(4, 1fr); }
  .case-study-grid { grid-template-columns: repeat(3, 1fr); }
  .map-legend-list { column-count: 3; column-gap: var(--space-2); }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }

  .inquiry-form { grid-template-columns: repeat(2, 1fr); }
  .form-row-full { grid-column: 1 / -1; }
}

/* =========================================================================
   BREAKPOINT: 1440px — widen gutters, cap hero headline growth
   ========================================================================= */
@media (min-width: 1440px) {
  :root { --maxw: 1680px; }
  .wrap { padding: 0 var(--space-5); }
  .section { padding: var(--space-7) 0; }
}

/* =========================================================================
   SKELETON LOADING — shimmer placeholder for images/video while they load,
   applied via JS (initImageSkeletons) to the media containers listed there.
   ========================================================================= */
.skel {
  background: linear-gradient(90deg, var(--offwhite) 25%, #ECEEF2 37%, var(--offwhite) 63%);
  background-size: 400% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
}
.skel img, .skel video { opacity: 0; transition: opacity 0.25s ease; }
@keyframes skel-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skel { background: var(--offwhite); animation: none; }
  .skel img, .skel video { transition: none; }
}

/* =========================================================================
   ERROR PAGES — shared visual language for 404.html and error.html
   ========================================================================= */
.error-page {
  min-height: 70vh;
  min-height: 70dvh;
  background: #0A1A2E;
  color: #EAEFF7;
  display: flex;
  align-items: center;
}
.error-page-inner { padding: var(--space-7) var(--space-2); text-align: center; }
.error-code {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 12vw, 6rem);
  line-height: 1;
  color: var(--deck-gold);
  margin: 0 0 var(--space-2);
}
.error-icon { margin: 0 0 var(--space-2); color: var(--deck-gold); }
.error-icon svg { width: 56px; height: 56px; }
.error-page h1 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 0 0 var(--space-2); }
.error-page p { font-size: 15.5px; color: #B9C6DD; max-width: 480px; margin: 0 auto var(--space-4); line-height: 1.6; }
.error-page-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-bottom: var(--space-4); }
.error-page-links { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; font-size: 13.5px; }
.error-page-links a { color: #B9C6DD; text-decoration: none; }
.error-page-links a:hover, .error-page-links a:focus-visible { color: #fff; text-decoration: underline; }

/* =========================================================================
   OFFLINE BANNER — dismissible, shown site-wide when navigator.onLine is
   false (initOfflineBanner). Distinct from the error.html fallback page.
   ========================================================================= */
.offline-banner[hidden] { display: none; }
.offline-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 10px var(--space-2);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: var(--deck-navy);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
}
.offline-banner button {
  min-height: 32px;
  padding: 0 var(--space-2);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  touch-action: manipulation;
}
.offline-banner button:hover { border-color: #fff; }
