/*
Theme Name: UPRL Card
Theme URI: https://uprl.eu
Author: UPRL
Description: Tarjeta institucional UPRL — composición andina propia, no plantilla compartida.
Version: 2.1.0
Requires at least: 6.0
Text Domain: uprl-card
*/

:root {
  --bg: #140e0c;
  --bg-soft: #1d1512;
  --panel: #241a16;
  --sand: #efe6d8;
  --sand-dim: #d8cbb8;
  --rojo: #d6281c;
  --rojo-deep: #9b180f;
  --amarillo: #f0c94a;
  --oro: #e8b84a;
  --verde: #1f7a3f;
  --verde-deep: #0f4a26;
  --display: "Syne", "Avenir Next Condensed", "Segoe UI", sans-serif;
  --body: "Manrope", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--sand);
  background: var(--bg);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 400;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--oro); }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--oro);
  color: #140e0c;
  padding: 8px 12px;
  z-index: 40;
}
.skip:focus { top: 10px; }

/* ===== HEADER: floating over dark canvas ===== */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding: 28px 5vw 0;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
body.admin-bar .site-header { top: 32px; }

.brand {
  display: grid;
  gap: 2px;
  text-decoration: none;
}
.brand-mark {
  font-family: var(--display);
  font-weight: 780;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
  line-height: 1;
}
.brand-dot {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--oro);
  font-weight: 620;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  background: rgba(20, 14, 12, 0.55);
  border: 1px solid rgba(239, 230, 216, 0.16);
  backdrop-filter: blur(8px);
  padding: 6px;
}
.nav a {
  text-decoration: none;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sand-dim);
}
.nav a[aria-current="page"],
.nav a:hover {
  color: #140e0c;
  background: var(--oro);
}

/* ===== HOME: full-bleed film hero ===== */
.film-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.film-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}
.film-hero .veil {
  position: relative;
  padding: 18vh 5vw 8vh;
  background:
    linear-gradient(180deg, rgba(20, 14, 12, 0.25) 0%, rgba(20, 14, 12, 0.2) 35%, rgba(20, 14, 12, 0.92) 100%);
}
.film-hero .tricolor {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 8px;
  width: min(220px, 40vw);
  margin-bottom: 28px;
}
.film-hero .tricolor span:nth-child(1) { background: var(--rojo); }
.film-hero .tricolor span:nth-child(2) { background: var(--amarillo); }
.film-hero .tricolor span:nth-child(3) { background: var(--verde); }

.kicker {
  margin: 0 0 16px;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--oro);
  font-weight: 650;
}
.film-hero h1 {
  margin: 0;
  max-width: 11ch;
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(3.2rem, 9vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.film-hero .subname {
  margin: 18px 0 0;
  max-width: 28rem;
  font-size: 1.05rem;
  color: var(--sand-dim);
}
.film-hero .lede {
  margin: 28px 0 0;
  max-width: 36rem;
  font-size: 1.2rem;
  color: #f7f0e6;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.86rem;
}
.btn-solid {
  background: var(--rojo);
  color: #fff;
}
.btn-solid:hover { background: var(--amarillo); color: #140e0c; }
.btn-line {
  border: 1px solid rgba(239, 230, 216, 0.45);
  color: var(--sand);
}
.btn-line:hover { border-color: var(--oro); color: var(--oro); }

/* manifesto strip */
.manifesto {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  padding: 72px 5vw;
  background: var(--bg-soft);
  border-top: 1px solid rgba(239, 230, 216, 0.08);
}
.manifesto h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 720;
}
.manifesto p { margin: 0 0 16px; color: var(--sand-dim); }
.manifesto p:last-child { margin-bottom: 0; }

/* stacked work lanes */
.lanes {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 70vh;
}
.lanes-copy {
  padding: 64px 5vw 64px 5vw;
  background: #100c0a;
}
.lanes-copy h2 {
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}
.lane {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid rgba(239, 230, 216, 0.14);
}
.lane:last-child { border-bottom: 1px solid rgba(239, 230, 216, 0.14); }
.lane strong {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--oro);
  letter-spacing: -0.03em;
}
.lane h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
}
.lane p { margin: 0; color: var(--sand-dim); }
.lanes-visual {
  position: relative;
  min-height: 420px;
}
.lanes-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* institution mosaic */
.mosaic-head {
  padding: 64px 5vw 20px;
  background: var(--panel);
}
.mosaic-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}
.mosaic-head p {
  margin: 14px 0 0;
  max-width: 40rem;
  color: var(--sand-dim);
}
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(239, 230, 216, 0.12);
  border-top: 1px solid rgba(239, 230, 216, 0.12);
  border-bottom: 1px solid rgba(239, 230, 216, 0.12);
}
.mosaic article {
  background: var(--bg);
  padding: 28px 22px 32px;
  min-height: 150px;
}
.mosaic article span {
  display: block;
  font-family: var(--display);
  color: var(--rojo);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.mosaic article p {
  margin: 0;
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.closer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg);
}
.closer figure {
  margin: 0;
  min-height: 360px;
  position: relative;
}
.closer figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.closer-copy {
  padding: 64px 5vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(160deg, var(--rojo-deep), #4a120c 60%, #1a0d0a);
}
.closer-copy blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.closer-copy p {
  margin: 22px 0 0;
  color: rgba(239, 230, 216, 0.8);
}

/* ===== INNER PAGES shared ===== */
.page-top {
  padding: 140px 5vw 40px;
  background:
    linear-gradient(180deg, rgba(20, 14, 12, 0.55), rgba(20, 14, 12, 0.92)),
    center / cover no-repeat;
  border-bottom: 8px solid transparent;
  border-image: linear-gradient(90deg, var(--rojo), var(--amarillo), var(--verde)) 1;
}
.page-top h1 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--display);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 750;
}
.page-top .deck {
  margin: 20px 0 0;
  max-width: 34rem;
  font-size: 1.25rem;
  color: var(--sand-dim);
}

.story-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  gap: 48px;
  padding: 48px 5vw 90px;
  background: #100c0a;
}
.story-rail {
  position: sticky;
  top: 28px;
  align-self: start;
  display: grid;
  gap: 10px;
}
.story-rail a {
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand-dim);
  padding-left: 12px;
  border-left: 2px solid rgba(239, 230, 216, 0.18);
}
.story-rail a:hover { color: var(--oro); border-left-color: var(--oro); }
.story-body h2 {
  margin: 48px 0 14px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
}
.story-body h2:first-child { margin-top: 0; }
.story-body p { margin: 0 0 16px; color: var(--sand-dim); }
.story-body .list {
  list-style: none;
  margin: 8px 0 24px;
  padding: 0;
}
.story-body .list li {
  padding: 12px 0 12px 0;
  border-bottom: 1px solid rgba(239, 230, 216, 0.12);
  color: var(--sand);
  padding-left: 18px;
  position: relative;
}
.story-body .list li::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--rojo);
  position: absolute;
  left: 0;
  top: 18px;
}
.story-insert {
  margin: 36px 0;
}
.story-insert img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}
.story-end {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(239, 230, 216, 0.16);
}
.story-end strong {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

/* Bolivia: banner + checklist columns */
.bo-banner {
  position: relative;
  min-height: 62vh;
  display: grid;
  align-items: end;
}
.bo-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bo-banner .veil {
  position: relative;
  padding: 140px 5vw 48px;
  background: linear-gradient(180deg, rgba(20,14,12,0.2), rgba(20,14,12,0.9));
}
.bo-banner h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  max-width: 12ch;
}
.bo-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1px;
  background: rgba(239, 230, 216, 0.12);
}
.bo-grid > * {
  background: #100c0a;
  padding: 48px 5vw;
}
.bo-grid h2 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.bo-grid .expertise,
.bo-grid .list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bo-grid .expertise { counter-reset: n; }
.bo-grid .expertise li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(239, 230, 216, 0.12);
  color: var(--sand-dim);
}
.bo-grid .expertise li::before {
  content: counter(n, decimal-leading-zero);
  font-family: var(--display);
  color: var(--oro);
}
.bo-grid .list li {
  padding: 12px 0;
  border-top: 1px solid rgba(239, 230, 216, 0.12);
}

/* Mission: three color slabs */
.mission-stack { background: #100c0a; }
.slab {
  padding: 72px 5vw;
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 720px);
  gap: 40px;
  align-items: start;
}
.slab-label {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
}
.slab h1, .slab h2 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.slab p { margin: 0 0 14px; max-width: 42rem; }
.slab-rojo { background: linear-gradient(120deg, #8f160f, #5a0f0b); color: #fff7f2; }
.slab-amarillo { background: linear-gradient(120deg, #e0b53a, #b8871a); color: #1a120c; }
.slab-amarillo .slab-label { color: #5a3b08; }
.slab-verde { background: linear-gradient(120deg, #146336, #0b3b20); color: #f2fff6; }
.slab .list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  columns: 1;
}
.slab .list li {
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.slab-amarillo .list li { border-top-color: rgba(26,18,12,0.18); }
.slab-final {
  padding: 56px 5vw 80px;
  background: #100c0a;
}
.slab-final strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.slab-final p { margin: 0 0 8px; color: var(--sand-dim); }

.contact-panel {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: #100c0a;
}
.contact-copy {
  padding: 150px 5vw 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-copy h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-weight: 750;
}
.contact-copy p {
  margin: 18px 0 0;
  max-width: 34rem;
  color: var(--sand-dim);
}
.contact-mail {
  margin-top: 36px;
  padding: 28px 0 0;
  border-top: 1px solid rgba(239, 230, 216, 0.16);
}
.contact-mail span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--oro);
  font-weight: 650;
  margin-bottom: 12px;
}
.contact-mail a {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--sand);
  word-break: break-all;
}
.contact-mail a:hover { color: var(--oro); }
.contact-visual {
  position: relative;
  min-height: 420px;
  background: linear-gradient(160deg, var(--rojo-deep), #2a120e 55%, #100c0a);
}
.contact-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 8px;
  background: linear-gradient(90deg, var(--rojo), var(--amarillo), var(--verde));
}
.contact-visual .mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 40px;
}
.contact-visual .mark strong {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: -0.04em;
}
.contact-visual .mark em {
  margin-top: 10px;
  font-style: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--oro);
}

.site-footer {
  display: grid;
  gap: 8px;
  padding: 36px 5vw 48px;
  background: #0a0706;
  border-top: 1px solid rgba(239, 230, 216, 0.1);
  color: var(--sand-dim);
}
.site-footer .brand-mark {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--sand);
}
.site-footer .sig { color: var(--oro); font-family: var(--display); font-weight: 650; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--sand); }
.site-footer a:hover { color: var(--oro); }

.page-prose {
  padding: 140px 5vw 80px;
  background: #100c0a;
}
.page-prose .sheet-narrow { max-width: 720px; }
.page-prose h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: -0.03em;
}

@media (max-width: 960px) {
  .manifesto,
  .lanes,
  .closer,
  .story-layout,
  .bo-grid,
  .slab,
  .contact-panel {
    grid-template-columns: 1fr;
  }
  .mosaic { grid-template-columns: 1fr 1fr; }
  .story-rail { position: static; display: flex; flex-wrap: wrap; gap: 8px 16px; }
  .story-rail a { border-left: 0; border-bottom: 2px solid rgba(239,230,216,0.2); padding-left: 0; padding-bottom: 4px; }
  .lanes-visual { min-height: 280px; }
  .lanes-visual img { position: relative; height: 280px; }
  .closer figure img { position: relative; height: 280px; }
}
@media (max-width: 860px) {
  body.admin-bar .site-header { top: 46px; }
  .site-header {
    position: relative;
    padding: 16px 5vw;
    background: #100c0a;
  }
  .film-hero .veil { padding-top: 48px; }
  .bo-banner .veil { padding-top: 48px; }
  .page-top { padding-top: 48px; }
  .nav { width: 100%; justify-content: stretch; }
  .nav a { flex: 1 1 auto; text-align: center; padding: 10px 8px; font-size: 0.72rem; }
  .mosaic { grid-template-columns: 1fr; }
}
