:root {
  --ink: #14262b;
  --muted: #55666a;
  --paper: #ffffff;
  --mineral: #eef2f1;
  --teal: #0e5a57;
  --line: #cfd8d6;
  --map-bg: #151515;
  /* mapa */
  --foco: #1f9d74;
  --foco-hover: #27b887;
  --seg: #5ecba1;
  --seg-hover: #86dcba;
  --resto: #3d3d3d;
  --resto-hover: #5a5a5a;
    /* cabecera y pantallas */
  --hover: var(--teal);
  --header-h: 4.5rem;
  --screen: calc(100vh - var(--header-h));
}
@supports (height: 100svh) {
  :root { --screen: calc(100svh - var(--header-h)); }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
html.home-page { scroll-snap-type: y mandatory; }
@media (prefers-reduced-motion: reduce) { html, .track { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: Cambria, Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
a, button, input, select, textarea { font-family: Cambria, Georgia, "Times New Roman", serif; }
a:focus-visible, button:focus-visible, .track:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

/* Cabecera */
header { position: sticky; top: 0; z-index: 10; height: var(--header-h); background: var(--paper); border-bottom: 1px solid var(--line); }
.bar { max-width: 72rem; height: 100%; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-size: 1.4rem; font-weight: bold; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; transition: color 0.15s; }
.brand:hover { color: var(--hover); }
nav { display: flex; align-items: center; gap: 1.75rem; }
nav a { color: var(--ink); text-decoration: none; transition: color 0.15s; }
nav a.link:hover { color: var(--hover); text-decoration: underline; text-underline-offset: 4px; }
nav a.box { border: 1.5px solid var(--ink); padding: 0.4rem 1.1rem; transition: background 0.15s, color 0.15s, border-color 0.15s; }
nav a.box:hover { background: var(--hover); border-color: var(--hover); color: var(--paper); }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
section { min-height: var(--screen); padding: 3rem 0; display: flex; flex-direction: column; justify-content: center; scroll-snap-align: start; }
h2 { font-size: 2rem; line-height: 1.2; margin: 0 0 1.25rem; }
p { margin: 0 0 1rem; max-width: 40rem; }

/* 1. Título y subtítulo */
.hero { min-height: var(--screen); padding: 3rem 1.5rem; display: flex; flex-direction: column; justify-content: center; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.1; letter-spacing: -0.01em; font-weight: bold; margin: 0 0 1.75rem; max-width: 21ch; }
.lead { max-width: 40rem; color: var(--muted); font-size: 1.25rem; margin: 0; }

/* Vídeo de fondo del primer apartado */
.hero-wrap { position: relative; overflow: hidden; background: var(--map-bg); scroll-snap-align: start; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-overlay { position: absolute; inset: 0; background: rgba(10, 20, 22, 0.55); z-index: 1; }
.hero { position: relative; z-index: 2; }
.hero h1 { color: #ffffff; }
.hero .lead { color: #dbe4e2; }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
/* 2. Mapa */
.map { background: var(--map-bg); min-height: var(--screen); padding: 2rem 0; display: flex; flex-direction: column; justify-content: center; scroll-snap-align: start; }
.map > .wrap { position: relative; }
.map figure { margin: 0; text-align: center; }
.map figcaption { color: #b9c4c2; font-size: 0.95rem; margin-top: 1.25rem; }
.africa .c { cursor: pointer; }
.africa .c:focus { outline: none; }
.country-publications { position: absolute; z-index: 5; top: 50%; right: 0; width: min(21rem, 30vw); max-height: 18rem; overflow-y: auto; transform: translateY(-50%); padding: 1.25rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); text-align: left; }
.country-publications[hidden] { display: none; }
.country-publications-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.country-publications-head .section-kicker { margin: 0 0 0.35rem; font-size: 0.85rem; }
.country-publications-head h2 { display: flex; align-items: center; gap: 0.7rem; font-size: 1.55rem; margin: 0; }
.country-publications-head button { border: 0; color: var(--muted); background: transparent; font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.country-flag-image { display: block; width: 2.5rem; height: 1.75rem; object-fit: cover; border: 1px solid var(--line); }
.country-flag-fallback { display: inline-block; font-size: 1.5rem; }
.country-publication { display: block; padding: 1rem 0 0.9rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.country-publication:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.country-publication strong, .country-publication small { display: block; line-height: 1.35; }
.country-publication strong { font-size: 1rem; }
.country-publication small { margin-top: 0.3rem; color: var(--muted); font-size: 0.85rem; }
.country-publication-meta { display: block; margin-top: 0.45rem; color: var(--ink); font-size: 0.85rem; }
.country-empty { margin: 1rem 0 0.1rem; color: var(--muted); font-size: 0.9rem; }


/* Mapa vectorial interactivo */
.africa { display: block; width: 100%; max-width: 40rem; min-height: 14rem; max-height: calc(var(--screen) - 11rem); height: auto; margin: 0 auto; }
.africa .c { stroke: var(--map-bg); stroke-width: 0.6; stroke-linejoin: round; transition: fill 0.15s; }
.africa .c.foco { fill: var(--foco); }
.africa .c.seg { fill: var(--seg); }
.africa .c.resto { fill: var(--resto); }
.africa .c.foco:hover { fill: var(--foco-hover); }
.africa .c.seg:hover { fill: var(--seg-hover); }
.africa .c.resto:hover { fill: var(--resto-hover); }
.africa text { font-family: inherit; font-size: 13px; fill: #e6ecea; }
.africa text.b { font-weight: bold; }
.africa text.in { fill: #0d2b22; }
.africa text.in.foco { font-weight: bold; font-size: 15px; }
.africa text.in.sm { font-size: 13px; }
.africa .out line { stroke: #8a9a96; stroke-width: 0.8; }
.africa .out circle { fill: #e6ecea; }
.legend { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 1.25rem 0 0; padding: 0; color: #b9c4c2; font-size: 0.95rem; }
.legend li { display: flex; align-items: center; gap: 0.5rem; }
.sw { width: 0.8rem; height: 0.8rem; display: inline-block; }
.sw.foco { background: var(--foco); } .sw.seg { background: var(--seg); } .sw.resto { background: var(--resto); }

/* 3. Últimas publicaciones */
.pubs-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.pubs-head h2 { margin: 0; }
.arrows { display: flex; gap: 0.5rem; }
.arrows button { width: 2.5rem; height: 2.5rem; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 1.2rem; line-height: 1; cursor: pointer; border-radius: 0; }
.arrows button:hover { background: var(--ink); color: var(--paper); }
.track { display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 1rem; }
.card { flex: 0 0 min(20rem, 82%); scroll-snap-align: start; border: 1px solid var(--line); padding: 1.5rem; background: var(--paper); display: flex; flex-direction: column; }
.card .meta { color: var(--ink); font-size: 0.95rem; font-weight: bold; margin: 0 0 0.5rem; }
.card h3 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 0.75rem; }
.card p { color: var(--muted); font-size: 1rem; margin: 0 0 1.25rem; }
.card a { margin-top: auto; color: var(--ink); text-underline-offset: 4px; }
.card .date { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.75rem; }
.section-kicker { color: var(--ink); font-size: 1rem; font-weight: bold; margin: 0 0 0.35rem; }
.section-intro { max-width: 42rem; color: var(--muted); }
.publications-page { min-height: calc(100vh - var(--header-h)); padding: 4rem 0; }
.about-page { min-height: calc(100vh - var(--header-h)); }
.about-page section { min-height: auto; padding: 5rem 0; }
.about-intro { background: var(--paper); }
.about-intro h1 { max-width: 23ch; }
.about-team { background: var(--mineral); }
.publications-page h1 { max-width: none; margin-bottom: 0.75rem; }
.publications-page .section-intro { margin-bottom: 2rem; }
.publications-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.publications-heading h1 { margin-bottom: 1.25rem; }
.publications-all { color: var(--ink); font-size: 0.95rem; margin-bottom: 1.35rem; text-underline-offset: 4px; }
.publications-all span { color: var(--ink); }
.publication-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.publication-card { position: relative; border: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; overflow: hidden; }
.publication-card:hover { box-shadow: 0 0.5rem 1.5rem rgba(20, 38, 43, 0.1); }
.publication-image { position: relative; height: 13rem; overflow: hidden; display: flex; align-items: flex-end; padding: 1rem; background: var(--teal); }
.publication-image::before, .publication-image::after { content: ""; position: absolute; border: 1px solid var(--seg); transform: rotate(-22deg); }
.publication-image::before { width: 19rem; height: 7rem; right: -4rem; bottom: 1.5rem; }
.publication-image::after { width: 15rem; height: 5rem; left: -4rem; top: 2rem; }
.publication-image-pipeline { background: var(--teal); }
.publication-image-map { background: var(--resto); }
.publication-image-gas { background: var(--foco); }
.image-caption { position: relative; z-index: 1; color: var(--paper); font-size: 0.8rem; letter-spacing: 0.12em; }
.premium-badge { position: absolute; z-index: 1; top: 0.75rem; left: 0.75rem; color: var(--paper); background: var(--ink); padding: 0.3rem 0.5rem; font-size: 0.7rem; letter-spacing: 0.05em; }
.publication-content { padding: 1rem 1.1rem 0.9rem; display: flex; flex-direction: column; flex: 1; }
.publication-card .meta { color: var(--ink); font-size: 0.9rem; font-weight: bold; margin: 0 0 0.65rem; }
.publication-card .date { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.9rem; }
.publication-card h2 { font-size: 1.3rem; line-height: 1.25; margin: 0 0 0.7rem; }
.publication-card > .publication-content p:not(.meta):not(.date) { color: var(--muted); font-size: 0.98rem; margin: 0 0 1rem; }
.country-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.9rem; }
.country-tags span { padding: 0.2rem 0.5rem; border: 1px solid var(--line); color: var(--ink); background: var(--mineral); font-size: 0.85rem; }
.publication-meta { display: flex; gap: 0.75rem; margin-top: auto; padding-top: 0.8rem; border-top: 1px solid var(--line); color: var(--ink); font-size: 0.85rem; }
.publication-cover-link { position: absolute; inset: 0; z-index: 2; }
.publication-placeholder { background: var(--mineral); }
.publication-note { color: var(--muted); font-size: 0.9rem; margin-top: 1.25rem; }
.reader-body { background: var(--mineral); }
.reader-page { min-height: calc(100vh - var(--header-h)); padding: 3.5rem 0 4rem; }
.reader-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 2rem; }
.reader-heading h1 { max-width: 32rem; margin-bottom: 0.7rem; }
.reader-heading p:not(.section-kicker) { color: var(--muted); margin: 0; }
.reader-back { color: var(--ink); text-underline-offset: 4px; white-space: nowrap; }
.reader-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.7rem 1rem; color: var(--paper); background: var(--ink); }
.reader-controls, .reader-actions { display: flex; align-items: center; gap: 0.5rem; }
.reader-toolbar button, .reader-toolbar a { border: 1px solid var(--muted); padding: 0.35rem 0.65rem; color: var(--paper); background: transparent; font: inherit; font-size: 0.9rem; text-decoration: none; cursor: pointer; }
.reader-toolbar button:hover, .reader-toolbar a:hover { border-color: var(--seg); color: var(--seg); }
#zoom-level { min-width: 3.5rem; text-align: center; font-size: 0.9rem; }
.pdf-reader { height: 75vh; min-height: 35rem; overflow: auto; padding: 1.25rem; background: #c8d1cf; }
.pdf-reader iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--paper); transform-origin: top left; }
.pdf-reader:fullscreen { padding: 2rem; }

.alt { background: var(--mineral); }

/* Qué analizamos */
.analysis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.analysis-item { border-top: 2px solid var(--teal); padding-top: 1rem; }
.analysis-item h3 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 0.6rem; }
.analysis-item p { color: var(--muted); font-size: 1rem; margin: 0; }
.latest-publication { display: block; max-width: 40rem; border: 1px solid var(--line); padding: 1.1rem 1.25rem; color: var(--ink); text-decoration: none; transition: border-color 0.15s; }
.latest-publication:hover { border-color: var(--teal); }
.latest-publication strong, .latest-publication span { display: block; }
.latest-label { font-size: 0.85rem; font-weight: bold; color: var(--teal); text-transform: uppercase; letter-spacing: 0.05em; }
.latest-publication strong { font-size: 1.25rem; margin: 0.2rem 0 0.35rem; }
.latest-text { color: var(--muted); font-size: 1rem; }
.latest-meta { margin-top: 0.6rem; font-size: 0.85rem; }
.latest-meta span { display: inline; }
@media (max-width: 720px) { .analysis-grid { grid-template-columns: 1fr; } }
.mail { font-size: 1.5rem; color: var(--teal); }
.contact-form { max-width: 52rem; margin-top: 1.75rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 1rem; line-height: 1.3; }
.field label span, .required-note { color: var(--teal); }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.required-note { font-size: 0.9rem; margin: 0.9rem 0 1rem; }
.contact-form button {
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 0.65rem 1.25rem;
  color: var(--paper);
  background: var(--teal);
  font: inherit;
  cursor: pointer;
}
.contact-form button:hover { background: var(--ink); }
footer { padding: 3rem 0 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: minmax(15rem, 2fr) repeat(2, minmax(9rem, 1fr)); gap: 2rem; }
.footer-brand .brand { display: inline-block; margin-bottom: 0.75rem; }
.footer-brand p { max-width: 22rem; margin: 0; font-size: 0.95rem; }
.footer-brand .footer-location { margin-top: 0.45rem; }
.footer-column { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-column h3 { color: var(--ink); font-size: 1rem; margin: 0 0 0.45rem; }
.footer-column a { color: var(--muted); text-underline-offset: 3px; }
.footer-column a:hover { color: var(--teal); }
.footer-column span { color: var(--muted); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.85rem; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--teal); }
.footer-disclaimer { margin-top: 1rem; }
.footer-disclaimer p { max-width: 52rem; margin: 0; font-size: 0.8rem; line-height: 1.5; }
.legal-page { min-height: calc(100vh - var(--header-h)); padding: 4rem 0; }
.legal-page .wrap { max-width: 52rem; }
.legal-page h1 { max-width: none; font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 0.5rem; }
.legal-page h2 { font-size: 1.35rem; margin-top: 2.25rem; margin-bottom: 0.6rem; }
.legal-page p { max-width: none; }
.legal-page a { color: var(--teal); text-underline-offset: 3px; }
.legal-kicker { color: var(--teal); font-size: 1rem; margin-bottom: 0.5rem; }
.legal-updated { color: var(--muted); font-size: 0.9rem; }
.legal-note { margin-top: 2.5rem; padding: 1rem 1.25rem; border-left: 3px solid var(--teal); background: var(--mineral); font-size: 0.95rem; }
.legal-page code { background: var(--mineral); padding: 0.1rem 0.3rem; }

/* Snap agresivo: cada apartado se encaja entero y no se salta ninguno */
.hero-wrap, .map, section { scroll-snap-stop: always; }
footer { scroll-snap-align: end; }
@media (max-width: 720px) {
  nav { gap: 1rem; }
  .brand { font-size: 1.2rem; letter-spacing: 0.4em;}
  .arrows { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .publications-heading { display: block; }
  .publications-all { display: inline-block; margin: 0 0 1rem; }
  .publication-grid { grid-template-columns: 1fr; }
  .country-publications { top: auto; right: 0.5rem; bottom: 4.5rem; width: min(20rem, calc(100% - 1rem)); max-height: 15rem; transform: none; }
  .country-publication { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  .country-publication-meta { text-align: left; white-space: normal; }
  .reader-heading, .reader-toolbar { align-items: flex-start; flex-direction: column; }
  .reader-toolbar { gap: 0.75rem; }
  .reader-actions { flex-wrap: wrap; }
  .pdf-reader { min-height: 28rem; height: 70vh; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 0.25rem; }
}


/* Barra de scroll oculta */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

/* Puntos de navegación a la derecha */
.dots { position: fixed; right: 1.5rem; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 0.15rem; color: var(--ink); }
.dots.oscuro { color: #ffffff; }
.dots a { width: 1.1rem; height: 1.1rem; display: flex; align-items: center; justify-content: center; }
.dots a::before { content: ""; width: 0.4rem; height: 0.4rem; border: 1px solid currentColor; border-radius: 50%; opacity: 0.45; transition: transform 0.25s, background 0.25s, border-color 0.25s, opacity 0.25s; }
.dots a:hover::before { opacity: 0.9; }
.dots a.activo::before { background: var(--foco); border-color: var(--foco); opacity: 1; transform: scale(1.35); }
@media (max-width: 720px) { .dots { right: 0.15rem; } }


/* Nuestro equipo */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 13rem)); gap: 2.5rem; margin-top: 2rem; }
.person img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; background: var(--mineral); }
.person h3 { font-size: 1.2rem; line-height: 1.3; margin: 1rem 0 0.15rem; }
.person .role { color: var(--muted); font-size: 1rem; margin: 0; }
.person .bio { color: var(--muted); font-size: 0.95rem; margin: 0.5rem 0 0; }

/* En móvil la cabecera no cabe con tres enlaces: se oculta este (los puntos y el scroll llegan igual) */
@media (max-width: 720px) { .solo-pc { display: none; } }