@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@400;500;600;700&family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

/* Neue Haas Display (local) — fuente de contenido de las fichas de proyecto. */
@font-face {
  font-family: "Neue Haas Display";
  src: url("../fonts/NeueHaasDisplay-Thin.woff") format("woff");
  font-weight: 100; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Neue Haas Display";
  src: url("../fonts/NeueHaasDisplay-Light.woff") format("woff");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Neue Haas Display";
  src: url("../fonts/NeueHaasDisplay-Roman.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #151515;
  --muted: rgba(21, 21, 21, 0.78);
  --soft: rgba(21, 21, 21, 0.56);
  --line: rgba(21, 21, 21, 0.12);
  --page-max: 2000px;
  --content-max: 1500px;
  --media-max: 1720px;
  --narrow-max: 1180px;
  --poster-max: 620px;
  --gutter: clamp(18px, 2.2vw, 34px);
  /* Contenido de las fichas (titulos y cuerpo) en Neue Haas Display, como
     nosotros/servicios. El menu sigue usando --sans-font (Inter). */
  --serif-font: "Neue Haas Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* Todo el contenido y etiquetas en Neue Haas. El menu (.topbar) se fuerza a
     Inter aparte, para que coincida con la home. */
  --sans-font: "Neue Haas Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* Variables que usa el menu superior (.topbar) para verse IGUAL que en la
     home: acento naranja del enlace "Arraigo" y ancho/canal del header. */
  --accent: #ef4c2c;
  --max-topbar: 2200px;
  --page-gutter: clamp(12px, 1.8vw, 28px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-font);
  font-size: clamp(20px, 1.4vw, 22px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.eyebrow {
  font-family: var(--sans-font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 12px;
  display: inline-block;
}

.back-link {
  font-family: var(--sans-font);
}

img {
  display: block;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

.serif {
  font-family: var(--serif-font);
  font-weight: 400;
}

.project-page {
  padding: 28px 0 96px;
}

.page-shell,
.content-shell,
.media-shell,
.narrow-shell,
.poster-image,
.brand-band,
.dark-band,
.thumb-strip {
  margin: 0 auto;
}

.page-shell {
  width: min(var(--page-max), calc(100% - (var(--gutter) * 2)));
}

.content-shell {
  width: min(var(--content-max), calc(100% - (var(--gutter) * 2)));
}

.media-shell {
  width: min(var(--media-max), calc(100% - (var(--gutter) * 2)));
}

.narrow-shell {
  width: min(var(--narrow-max), calc(100% - (var(--gutter) * 2)));
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 46px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(21, 21, 21, 0.18);
  color: rgba(21, 21, 21, 0.6);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(520px, 1.14fr);
  gap: clamp(44px, 6vw, 132px);
  align-items: start;
  margin-bottom: 92px;
}

.intro-title {
  max-width: 36rem;
}

.intro-title h1 {
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: clamp(56px, 6vw, 90px);
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.intro-location {
  margin-top: 8px;
  font-size: clamp(28px, 2.4vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-style: italic;
  color: var(--soft);
}

.intro-kicker {
  margin-top: 22px;
  max-width: 22ch;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
  font-style: italic;
}

.intro-copy {
  justify-self: end;
  max-width: 48rem;
  display: grid;
  gap: 18px;
}

.intro-copy p,
.note-shell p,
.dark-band p {
  font-size: clamp(20px, 1.4vw, 22px);
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--ink);
  font-family: var(--serif-font);
}

.full-bleed,
.feature-image,
.pair-grid,
.quad-grid,
.poster-image,
.thumb-strip,
.brand-band,
.dark-band {
  margin-bottom: 88px;
}

.full-bleed {
  width: min(var(--media-max), calc(100% - (var(--gutter) * 2)));
}

.feature-image {
  width: min(1380px, calc(100% - (var(--gutter) * 2)));
}

.feature-image.narrow {
  width: min(1220px, calc(100% - (var(--gutter) * 2)));
}

.pair-grid,
.quad-grid {
  width: min(1320px, calc(100% - (var(--gutter) * 2)));
  display: grid;
  gap: 20px;
}

.pair-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pair-grid img {
  aspect-ratio: 1 / 0.95;
  object-fit: cover;
  height: 100%;
}

.pair-grid.tall img {
  aspect-ratio: 1 / 1.18;
}

.quad-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quad-grid img {
  aspect-ratio: 1 / 1.06;
  object-fit: cover;
  height: 100%;
}

.poster-image {
  width: min(var(--poster-max), calc(100% - (var(--gutter) * 2)));
}

.poster-image img {
  aspect-ratio: 1 / 1.12;
  object-fit: cover;
}

.note-shell {
  width: min(var(--content-max), calc(100% - (var(--gutter) * 2)));
  margin-bottom: 82px;
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(520px, 1.14fr);
  gap: clamp(44px, 6vw, 132px);
}

.note-shell p {
  grid-column: 2;
  max-width: 38rem;
}

.note-shell.center {
  display: block;
  text-align: center;
}

.note-shell.center p {
  max-width: 40rem;
  margin: 0 auto;
}

.brand-band,
.dark-band {
  width: min(var(--media-max), calc(100% - (var(--gutter) * 2)));
  background: #0d0d0d;
  color: #ffffff;
}

.brand-band {
  padding: clamp(44px, 8vw, 104px) clamp(24px, 5vw, 48px);
  text-align: center;
}

.brand-band h2 {
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: clamp(44px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.brand-band p {
  margin: 14px auto 0;
  max-width: 30rem;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.dark-band {
  padding: clamp(38px, 7vw, 84px) clamp(24px, 5vw, 48px);
}

.dark-band .serif {
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: clamp(40px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-align: center;
}

.dark-band p {
  max-width: 34rem;
  margin: 16px auto 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
}

.thumb-strip {
  width: min(1320px, calc(100% - (var(--gutter) * 2)));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.thumb-strip img {
  aspect-ratio: 1 / 0.72;
  object-fit: cover;
  height: 100%;
}

.closing-image {
  margin-bottom: 0;
}

/* ===========================================================
   Canva-faithful layout utilities
   These classes reproduce the specific image grids used in the
   approved Canva slides ("javier ok" interiors).
   =========================================================== */

/* Two-column intro: title phrase on the left, body on the right (Canva 1:1) */
.canva-intro {
  width: min(var(--media-max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto 56px;
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 140px);
  align-items: start;
  padding-top: 12px;
}

/* H1 — project name. Official Canva spec: EB Garamond 400, 80px–90px */
.canva-intro .canva-title {
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: clamp(56px, 6vw, 90px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

/* New left-column header block: title + services + location */
.canva-intro .canva-intro-left {
  display: block;
}

/* H1 — project name in the left column. Same Canva spec: 80–90px */
.canva-intro .canva-project-title {
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: clamp(56px, 6vw, 90px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 28px;
  text-wrap: balance;
}

/* Eyebrow — services + location. Canva spec: Inter 14px */
.canva-intro .canva-project-services,
.canva-intro .canva-project-location {
  font-family: var(--sans-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0;
}

.canva-intro .canva-project-services {
  margin-bottom: 14px;
}

/* Body text. Canva spec: EB Garamond 400, 20–22px */
.canva-intro .canva-body p {
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: clamp(20px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 20px;
}

/* H2 — section lead. Canva spec: EB Garamond 400, 56–64px */
.canva-intro .canva-body p.canva-body-lead {
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: clamp(44px, 4.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  text-wrap: balance;
}

.canva-intro .canva-body p:last-child {
  margin-bottom: 0;
}

/* Full-bleed banner (wide landscape) */
.canva-banner {
  width: min(var(--media-max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto 18px;
}

.canva-banner img {
  width: 100%;
  aspect-ratio: 2.1 / 1;
  object-fit: cover;
  display: block;
}

.canva-banner.tall img {
  aspect-ratio: 1.7 / 1;
}

/* Row of 4 equal-width thumbnails */
.canva-thumbs-4 {
  width: min(var(--media-max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.canva-thumbs-4 img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Centered medium image (smaller than full-bleed) */
.canva-centered {
  width: min(560px, calc(100% - (var(--gutter) * 2)));
  margin: 32px auto 38px;
}

.canva-centered img {
  width: 100%;
  aspect-ratio: 1 / 1.18;
  object-fit: cover;
  display: block;
}

/* Body caption — Canva spec: EB Garamond 400, 20–22px */
.canva-caption {
  width: min(820px, calc(100% - (var(--gutter) * 2)));
  margin: 56px auto 64px;
  font-family: var(--serif-font);
  font-weight: 400;
  font-size: clamp(20px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--ink);
  text-align: center;
  font-style: normal;
}

@media (max-width: 980px) {
  .canva-caption {
    margin: 28px auto 32px;
    padding: 0 18px;
    font-size: 17px;
  }
}

/* 2-column pair (Canva-style, same gap and aspect as banner row) */
.canva-pair {
  width: min(var(--media-max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.canva-pair img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.canva-pair.tall img {
  aspect-ratio: 1 / 1.18;
}

.canva-pair.wide img {
  aspect-ratio: 1.4 / 1;
}

/* 2x2 quad grid */
.canva-quad {
  width: min(var(--media-max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.canva-quad img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* 3x2 grid (six photos) — used in NKO, Mercer, etc. */
.canva-six {
  width: min(var(--media-max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.canva-six img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* 3-column row (used between sections) */
.canva-three {
  width: min(var(--media-max), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.canva-three img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Dark/black centered logo panel (used in OLOM, Bad Spaniard, Ovejas Negras) */
.canva-logo-panel {
  width: min(560px, calc(100% - (var(--gutter) * 2)));
  margin: 12px auto 22px;
  aspect-ratio: 1 / 1;
  background: #0d0d0d;
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--serif-font);
  padding: 36px;
}

.canva-logo-panel.light {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}

.canva-logo-panel .logo-mark {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.01em;
  font-weight: 400;
}

.canva-logo-panel .logo-sub {
  margin-top: 12px;
  font-family: var(--sans-font);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

.canva-logo-panel.light .logo-sub {
  color: var(--soft);
}

@media (max-width: 980px) {
  .canva-intro {
    grid-template-columns: 1fr;
    gap: 22px;
    margin: 18px 0 22px;
    /* Inset lateral 18px = mismo borde que los textos de abajo (captions/centrado). */
    padding: 22px 18px 22px;
    background: var(--paper);
    position: sticky;
    top: 0;
    z-index: 0;
  }

  .canva-intro .canva-title,
  .canva-intro .canva-project-title {
    font-size: clamp(30px, 7.5vw, 44px) !important;
    line-height: 1.08;
    text-wrap: balance;
  }
  .canva-intro .canva-project-title br { display: none; }

  .canva-intro .canva-project-services,
  .canva-intro .canva-project-location {
    font-size: 13px;
  }

  .canva-intro .canva-body p {
    font-size: 18px;
    line-height: 1.4;
    font-weight: 300;
  }

  .canva-intro .canva-body p.canva-body-lead {
    font-size: clamp(34px, 8vw, 48px);
    line-height: 1.05;
  }

  .canva-banner,
  .canva-thumbs-4,
  .canva-pair,
  .canva-quad,
  .canva-six,
  .canva-three,
  .canva-centered,
  .canva-logo-panel,
  .canva-caption {
    width: 100%;
    margin: 0;
    /* Hueco vertical entre bloques de imagen ~4px, como el gap del hero de la home. */
    padding: 2px 0;
    background: var(--paper);
    position: relative;
    z-index: 1;
  }

  .canva-banner img,
  .canva-banner.tall img {
    aspect-ratio: 16 / 10;
  }

  .canva-thumbs-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .canva-pair,
  .canva-quad {
    gap: 4px;
  }

  .canva-six,
  .canva-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .canva-centered,
  .canva-caption {
    padding: 10px 18px;
  }

  .canva-logo-panel {
    margin: 8px auto;
    width: calc(100% - 36px);
    aspect-ratio: 1.4 / 1;
    padding: 32px 24px;
  }
}

@media (max-width: 980px) {
  /* On mobile, the intro stays sticky as a background and the
     project images scroll over it (Id&oacute;nea-style behaviour). */
  .project-page {
    padding: 0 0 0;
    background: var(--paper);
  }

  .page-shell {
    display: contents;
  }

  .back-link {
    display: inline-flex;
    margin: 18px 16px 14px;
    position: relative;
    z-index: 2;
  }

  .content-shell,
  .media-shell,
  .narrow-shell,
  .full-bleed,
  .feature-image,
  .pair-grid,
  .quad-grid,
  .poster-image,
  .note-shell,
  .brand-band,
  .dark-band,
  .thumb-strip {
    width: 100%;
  }

  .intro,
  .note-shell {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .intro {
    position: sticky;
    top: 0;
    z-index: 0;
    margin: 0;
    padding: 24px 22px 36px;
    background: var(--paper);
    min-height: auto;
  }

  /* Every block of media after the intro covers it as the user
     scrolls. Each block carries its own paper background and a
     higher z-index so the intro text never peeks through. */
  .full-bleed,
  .feature-image,
  .pair-grid,
  .quad-grid,
  .poster-image,
  .thumb-strip,
  .brand-band,
  .dark-band,
  .note-shell {
    position: relative;
    z-index: 1;
    background: var(--paper);
    margin-bottom: 0;
    padding: 8px 0;
  }

  .pair-grid,
  .quad-grid,
  .thumb-strip {
    padding: 8px 0;
  }

  .closing-image {
    padding-bottom: 56px;
  }

  .intro-title,
  .intro-copy {
    max-width: none;
  }

  .intro-copy {
    justify-self: start;
  }

  .intro-title h1 {
    font-size: clamp(38px, 11vw, 54px);
  }

  .intro-location {
    font-size: clamp(26px, 7vw, 34px);
  }

  .intro-kicker {
    max-width: 16ch;
    font-size: clamp(24px, 7.6vw, 34px);
  }

  .intro-copy p,
  .note-shell p,
  .dark-band p {
    font-size: 16px;
    line-height: 1.46;
  }

  .note-shell p {
    grid-column: auto;
    max-width: none;
  }

  .full-bleed,
  .feature-image,
  .pair-grid,
  .quad-grid,
  .poster-image,
  .thumb-strip,
  .brand-band,
  .dark-band,
  .note-shell {
    margin-bottom: 64px;
  }

  .pair-grid,
  .quad-grid,
  .thumb-strip {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .poster-image img,
  .pair-grid img,
  .quad-grid img,
  .thumb-strip img {
    aspect-ratio: auto;
  }

  .brand-band {
    padding: 42px 20px;
  }

  .dark-band {
    padding: 36px 20px;
  }
}

/* ===========================================================
   Site topbar — mirrors the header on index.html so the same
   nav appears on every project page.
   =========================================================== */

:root {
  --page-gutter: clamp(12px, 1.8vw, 28px);
  --header-offset: 96px;
  --accent: #ef4c2c;
  --muted: rgba(23,23,23,.72);
  --max-topbar: 2200px;
}

body {
  padding-top: var(--header-offset);
}

.topbar-shell {
  width: min(var(--max-topbar), calc(100% - var(--page-gutter)));
  margin: 0 auto;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #ffffff;
  transition: transform .34s cubic-bezier(.22,.8,.24,1), opacity .26s ease, box-shadow .26s ease;
  will-change: transform;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.topbar.is-hidden {
  transform: translateY(calc(-100% - 8px));
  opacity: 0;
  pointer-events: none;
}

.topbar.is-scrolled {
  box-shadow: 0 10px 34px rgba(0,0,0,.06);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px clamp(16px, 2vw, 40px) 26px;
}

.topbar .brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
}

.topbar .brand img {
  width: clamp(220px, 18vw, 310px);
  height: auto;
  display: block;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar nav a {
  position: relative;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s ease;
  text-decoration: none;
}

.topbar nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.topbar nav a:hover {
  color: var(--ink);
}

.topbar nav a:hover::after,
.topbar nav a.is-active::after {
  transform: scaleX(1);
}

.topbar nav a.is-active {
  color: var(--ink);
}

/* Contacto link: same look as the rest of the nav (no pill) */
.topbar nav a.cta {
  padding: 0;
  border: none;
  border-radius: 0;
  color: var(--muted);
}

.topbar nav a.cta:hover {
  color: var(--ink);
}

.topbar nav a.nav-accent,
.topbar .mobile-nav a.nav-accent {
  color: var(--accent);
}

.topbar nav a.nav-accent:hover {
  color: var(--accent);
  opacity: .8;
}

/* Botón hamburguesa (solo móvil) */
.topbar .nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.topbar .nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s cubic-bezier(.22,.8,.24,1), opacity .2s ease;
}
/* Las tres rayas se convierten en una X al abrir */
.topbar.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.topbar.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú desplegable móvil */
.topbar .mobile-menu {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 100vh;
      height: 100dvh;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0;
      padding: var(--header-offset, 76px) clamp(20px, 6vw, 32px) calc(env(safe-area-inset-bottom, 0px) + 28px);
      background: #fff;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      z-index: 1;
    }
    .topbar .mobile-menu a {
      font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
      font-size: clamp(24px, 6.5vw, 28px);
      line-height: 1.1;
      color: var(--ink);
      text-decoration: none;
      padding: 5px 2px;
    }
    .topbar .mobile-menu a.nav-accent { color: var(--accent); }
    .topbar .mobile-menu a::after { display: none; }
    .topbar .mobile-menu .mobile-social {
      display: flex;
      gap: 14px;
      margin-top: 18px;
    }
    .topbar .mobile-menu .mobile-social a { padding: 6px; color: var(--ink); }
    .topbar .mobile-menu .mobile-social svg { width: 22px; height: 22px; display: block; }

/* The project-page back-link sat at the top of the body. Now that
   we have a fixed topbar above, push the back-link down a touch. */
.project-page .page-shell .back-link {
  margin-top: 4px;
}

@media (max-width: 860px) {
  :root {
    --header-offset: 76px;
  }
  .topbar-inner {
    gap: 14px;
    padding: 14px 0 10px;
  }
  .topbar .brand img {
    width: 188px;
  }
  .topbar .nav-toggle { display: flex; }
  .topbar.nav-open .mobile-menu { display: flex; }
  .topbar.nav-open .topbar-inner { position: relative; z-index: 2; }
  .topbar.nav-open { border-bottom-color: transparent; }
  .topbar nav {
    display: none;
  }
}

/* ===========================================================
   Fullbleed banner (true 100vw, no gutter). For images and video
   that should span the entire viewport width — as in the Canva
   slides where some banners and panoramic shots are edge-to-edge.
   =========================================================== */

.canva-banner.fullbleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: none;
}

.canva-banner.fullbleed img,
.canva-banner.fullbleed video {
  width: 100%;
  height: auto;
  display: block;
}

/* Wide variant — the Canva PDF page is 16:9, so a fullbleed banner
   that matches the slide aspect should keep that ratio rather than
   the default 2.1/1 from .canva-banner. */
.canva-banner.fullbleed.cinema img,
.canva-banner.fullbleed.cinema video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Video element inside a banner: keep the same 2.1/1 aspect as
   the regular banner unless .cinema is added. */
.canva-banner video {
  width: 100%;
  aspect-ratio: 2.1 / 1;
  object-fit: cover;
  display: block;
}

/* Fullbleed pair / quad / six variants for sections that should
   span the entire viewport with the original grid layout intact. */
.canva-pair.fullbleed,
.canva-quad.fullbleed,
.canva-three.fullbleed,
.canva-six.fullbleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: none;
}

/* ===========================================================
   Dual back-links at top of project page: "Volver a Candela"
   (home) + "Ver todos los proyectos" (projects index).
   =========================================================== */

.page-shell.back-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.page-shell.back-links .back-link {
  margin-bottom: 30px;
}

/* ===========================================================
   Accent "Arraigo." line — appears at the end of the body copy
   in red, same accent used across the site (#ef4c2c).
   =========================================================== */

.canva-arraigo {
  color: var(--accent, #ef4c2c) !important;
  font-style: normal;
}

/* Allow a <video> inside .canva-centered to behave like an image
   (same 560 px max-width, fluid aspect ratio). */
.canva-centered video {
  width: 100%;
  height: auto;
  display: block;
}

/* When .canva-caption is used as a <div> wrapping multiple <p>,
   stack the paragraphs with a small gap. */
div.canva-caption p {
  margin: 0;
  font: inherit;
}

div.canva-caption p + p {
  margin-top: 14px;
}

/* ===========================================================
   Site-wide footer (injected by site-footer.js).
   Mirrors the .footer block on index.html so the same layout
   appears on every project, news and policy page.
   =========================================================== */

.footer {
  background: var(--paper, #ffffff);
  color: var(--ink);
  font-family: var(--sans-font);
  margin-top: clamp(40px, 6vw, 80px);
}

.footer-shell {
  width: min(var(--media-max, 2200px), calc(100% - var(--page-gutter, 28px)));
  margin: 0 auto;
}

.footer-inner {
  padding: clamp(48px, 7vw, 96px) 0 0;
}

.footer-brand {
  padding-bottom: clamp(28px, 4vw, 48px);
}

.footer-logo {
  display: block;
  width: clamp(180px, 22vw, 320px);
  height: auto;
  margin: 0;
}

.footer-divider {
  height: 1px;
  background: rgba(23,23,23,.08);
  width: 100%;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 56px);
  padding: clamp(32px, 5vw, 56px) 0 clamp(40px, 6vw, 72px);
}

.footer-col h4 {
  margin: 0 0 18px;
  font-family: var(--sans-font);
  font-weight: 600;
  font-size: clamp(15px, 1.05vw, 17px);
  letter-spacing: 0;
  color: var(--ink);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
  line-height: 1.2;
}

.footer-col li {
  line-height: 1.2;
  margin: 0 0 8px;
}

.footer-col a {
  font-family: var(--sans-font);
  font-size: clamp(14px, 1vw, 16px);
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity .2s ease;
}

.footer-col a:hover {
  opacity: .55;
}

.footer-col p {
  margin: 0;
  font-family: var(--sans-font);
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.5;
  color: var(--ink);
}

.footer-follow-title {
  margin: clamp(20px, 2.4vw, 32px) 0 12px !important;
}

.footer-bottom {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  padding: clamp(20px, 2vw, 26px) 0 clamp(24px, 3vw, 36px);
  border-top: 1px solid rgba(23,23,23,.08);
  color: var(--ink);
  font-family: var(--sans-font);
  font-size: clamp(13px, .95vw, 14px);
  line-height: 1.4;
}

.footer-bottom a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 800px) {
  .footer-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(40px, 5vw, 96px);
  }
}

/* ============================================================
   ESTANDARIZACIÓN DE SEPARACIÓN ENTRE FOTOS — SOLO MÓVIL
   Fichas interiores de PROYECTOS (canva-*) y NOTICIAS (article-*).
   Cada pagina trae margenes inline muy variados (canva-* hasta 160px,
   article-* 40px) y gaps distintos (4/8/12px). Aqui imponemos UNA
   separacion unica de 16px entre todas las fotos, con !important para
   ganar a los estilos inline de cada pagina. NO altera la estructura
   (no cambia el numero de columnas de pares/quads).
   ============================================================ */
@media (max-width: 980px) {
  /* Separacion vertical uniforme entre bloques de foto (y captions) */
  .canva-banner, .canva-pair, .canva-quad, .canva-centered,
  .canva-thumbs-4, .canva-six, .canva-three, .canva-logo-panel,
  .canva-caption,
  .article-hero, .article-pair, .article-quad, .article-caption,
  figure[style*="margin"] {
    margin-top: 16px !important;
    margin-bottom: 16px !important;
  }
  /* Imagenes a sangre: sin padding vertical extra, asi la separacion
     visible es exactamente el margen (16px), no 16px + padding. */
  .canva-banner, .canva-pair, .canva-quad, .canva-centered,
  .canva-thumbs-4, .canva-six, .canva-three, .canva-logo-panel,
  .article-hero, .article-pair, .article-quad {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  /* Gap interno uniforme en las rejillas de fotos (par, quad, etc.) */
  .canva-pair, .canva-quad, .canva-thumbs-4, .canva-six, .canva-three,
  .article-pair, .article-quad {
    gap: 16px !important;
  }
}
