/* ============================================================
   NPGA · cartographic-industrial design language
   Single shared stylesheet across all pages (ES + EN mirror).
   ============================================================ */

html { scroll-behavior: smooth; }
body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  color: #1A1A1A;
  background: #F2EDE3;
  font-feature-settings: 'ss01', 'cv11';
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, .font-display { font-family: 'Fraunces', Georgia, serif; }
.font-mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

/* --- Coordinate marker (section meta in left margin) --- */
.coord {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #C67B3C;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.coord::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: currentColor;
}

/* --- Eyebrow (above section H2) --- */
.eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6B7280;
}
.eyebrow-copper { color: #C67B3C; }
.eyebrow-cream  { color: rgba(242, 237, 227, 0.7); }

/* --- Display & section headings (Fraunces, optical-size aware) --- */
.h-display {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
  font-weight: 400;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}
.h-section {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 60, 'SOFT' 0;
  font-weight: 500;
  font-size: clamp(1.65rem, 3.1vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.h-section-num {
  display: inline-block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.55em;
  font-weight: 500;
  color: #C67B3C;
  vertical-align: 0.35em;
  margin-right: 0.6em;
  letter-spacing: 0;
}

/* --- Body prose --- */
.body-prose {
  font-size: 1.0625rem;
  line-height: 1.72;
  color: #1A1A1A;
}
.body-prose-muted { color: #3a3a3a; }
.body-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: rgba(242, 237, 227, 0.82);
  max-width: 38ch;
}
.body-lead-ink {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: #1A1A1A;
  max-width: 42ch;
}

/* --- Survey tick rule (1px copper + perpendicular ticks every 12-24px) --- */
.tick-rule {
  position: relative;
  height: 10px;
  background-image:
    linear-gradient(to right, #C67B3C 0 100%),
    repeating-linear-gradient(to right, transparent 0 23.5px, #C67B3C 23.5px 24px);
  background-repeat: no-repeat, repeat;
  background-size: 100% 1px, 24px 8px;
  background-position: 0 5px, 0 0;
}
.tick-rule-short {
  display: inline-block;
  width: 56px;
  height: 8px;
  background-image:
    linear-gradient(to right, #C67B3C 0 100%),
    repeating-linear-gradient(to right, transparent 0 11.5px, #C67B3C 11.5px 12px);
  background-repeat: no-repeat, repeat;
  background-size: 100% 1px, 12px 6px;
  background-position: 0 4px, 0 0;
}

/* --- Topographic background pattern (concentric ellipses, contour-line feel) --- */
.topo-bg {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='540' height='540' viewBox='0 0 540 540'><g fill='none' stroke='%230B2340' stroke-width='0.6' opacity='0.07'><ellipse cx='180' cy='200' rx='40' ry='28'/><ellipse cx='180' cy='200' rx='75' ry='52'/><ellipse cx='180' cy='200' rx='112' ry='78'/><ellipse cx='180' cy='200' rx='150' ry='106'/><ellipse cx='180' cy='200' rx='192' ry='136'/><ellipse cx='180' cy='200' rx='236' ry='168'/><ellipse cx='420' cy='400' rx='34' ry='44'/><ellipse cx='420' cy='400' rx='68' ry='88'/><ellipse cx='420' cy='400' rx='104' ry='132'/><ellipse cx='420' cy='400' rx='142' ry='176'/><ellipse cx='60' cy='480' rx='28' ry='20'/><ellipse cx='60' cy='480' rx='58' ry='42'/><ellipse cx='60' cy='480' rx='90' ry='66'/></g></svg>");
  background-size: 540px 540px;
  background-repeat: repeat;
}
.topo-bg-navy {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='540' height='540' viewBox='0 0 540 540'><g fill='none' stroke='%23F2EDE3' stroke-width='0.5' opacity='0.05'><ellipse cx='180' cy='200' rx='40' ry='28'/><ellipse cx='180' cy='200' rx='75' ry='52'/><ellipse cx='180' cy='200' rx='112' ry='78'/><ellipse cx='180' cy='200' rx='150' ry='106'/><ellipse cx='180' cy='200' rx='192' ry='136'/><ellipse cx='180' cy='200' rx='236' ry='168'/><ellipse cx='420' cy='400' rx='34' ry='44'/><ellipse cx='420' cy='400' rx='68' ry='88'/><ellipse cx='420' cy='400' rx='104' ry='132'/><ellipse cx='420' cy='400' rx='142' ry='176'/><ellipse cx='60' cy='480' rx='28' ry='20'/><ellipse cx='60' cy='480' rx='58' ry='42'/><ellipse cx='60' cy='480' rx='90' ry='66'/></g></svg>");
  background-size: 540px 540px;
  background-repeat: repeat;
}

/* --- Section structure --- */
.section {
  position: relative;
  padding: 96px 24px;
}
@media (min-width: 768px)  { .section { padding: 128px 40px; } }
@media (min-width: 1280px) { .section { padding: 144px 64px; } }

.section > .coord {
  position: absolute;
  top: 36px;
  left: 24px;
}
@media (min-width: 768px)  { .section > .coord { top: 48px; left: 40px; } }
@media (min-width: 1280px) { .section > .coord { top: 56px; left: 64px; } }
@media (max-width: 639px)  {
  .section > .coord {
    position: static;
    margin-bottom: 28px;
  }
}

/* --- Hairline frames & buttons --- */
.frame { border: 0.5px solid rgba(11, 35, 64, 0.18); }
.frame-strong { border: 1px solid rgba(11, 35, 64, 0.6); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: #C67B3C;
  color: #F2EDE3;
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  transition: background 200ms ease, transform 200ms ease;
}
.btn-primary:hover { background: #9C530D; }
.btn-primary svg { transition: transform 220ms ease; }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid currentColor;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
  transition: background 180ms ease, color 180ms ease;
}

/* --- Link underline draw on hover --- */
.link-underline {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 280ms ease;
}
.link-underline:hover { background-size: 100% 1px; }
.link-underline-active { background-size: 100% 1px; }

/* --- Stat numerals --- */
.stat-num {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 144;
  font-weight: 300;
  font-size: clamp(4.5rem, 12vw, 11.5rem);
  line-height: 0.92;
  color: #C67B3C;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  padding-bottom: 0.18em;
  border-bottom: 1px solid currentColor;
}
.stat-num .plus {
  font-size: 0.55em;
  font-weight: 400;
  vertical-align: 0.45em;
  margin-right: 0.05em;
  letter-spacing: 0;
}

/* --- Hero compass motif --- */
.hero-compass {
  position: absolute;
  right: -10%;
  bottom: -28%;
  width: clamp(420px, 70vw, 820px);
  height: clamp(420px, 70vw, 820px);
  opacity: 0.28;
  mix-blend-mode: lighten;
  filter: brightness(1.45) saturate(1.35) hue-rotate(-6deg);
  pointer-events: none;
  will-change: transform;
}
@media (max-width: 767px) {
  .hero-compass { right: -28%; bottom: -34%; opacity: 0.22; }
}

@keyframes compass-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- Hero load orchestration --- */
.hero-anim > * {
  opacity: 0;
  transform: translateY(8px);
}
@keyframes fade-in-up { to { opacity: 1; transform: translateY(0); } }
@keyframes coord-wipe {
  from { clip-path: inset(0 100% 0 0); opacity: 1; transform: none; }
  to   { clip-path: inset(0 0 0 0); opacity: 1; transform: none; }
}
@keyframes h1-tighten {
  0%   { opacity: 0; letter-spacing: 0.04em; }
  100% { opacity: 1; letter-spacing: -0.015em; }
}

@media (prefers-reduced-motion: no-preference) {
  .anim-mark   { animation: fade-in-up 600ms ease-out 200ms forwards; }
  .anim-coord  { animation: coord-wipe   500ms ease-out 350ms forwards; }
  .anim-h1     { animation: h1-tighten   780ms ease-out 500ms forwards; }
  .anim-lead   { animation: fade-in-up  500ms ease-out 850ms forwards; }
  .anim-cta    { animation: fade-in-up  500ms ease-out 1050ms forwards; }
  .hero-compass { animation: compass-spin 240s ease-in-out infinite; }

  .reveal { opacity: 0; transform: translateY(12px); transition: opacity 700ms ease, transform 700ms ease; }
  .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-anim > * { opacity: 1; transform: none; }
}

/* --- Methodology stations (chart-like) --- */
.axis {
  position: relative;
  height: 1px;
  background: rgba(11, 35, 64, 0.3);
}
.station-marker {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #C67B3C;
  box-shadow: 0 0 0 4px #F2EDE3;
  display: inline-block;
}

/* --- Service area card (Servicios page) --- */
.area-card {
  position: relative;
  padding: 32px 28px 32px;
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid #0B2340;
}
.area-card::before {
  content: attr(data-num);
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: #C67B3C;
}

/* --- Plan evaluation question block --- */
.eval-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(11, 35, 64, 0.15);
}
.eval-row:first-child { border-top: 1px solid rgba(11, 35, 64, 0.15); }
.eval-num {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 96;
  font-weight: 300;
  font-size: 3rem;
  line-height: 1;
  color: #C67B3C;
  font-variant-numeric: tabular-nums;
}

/* --- Case study panel --- */
.case-panel {
  background: #0B2340;
  color: #F2EDE3;
  padding: 56px 32px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) { .case-panel { padding: 72px 56px; } }
.case-panel .case-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #C67B3C;
}

/* --- Selection --- */
::selection { background: #C67B3C; color: #F2EDE3; }
