/* San Carlos Institute — site styles */

:root {
  --paper: #f7f2e7;
  --surface: #fffdf8;
  --ink: #1e2230;
  --muted: #5c6070;
  --line: #e2d8c3;
  --on-blue: #f4efe2;
  /* Cuban flag blue: header bar, buttons, quote band and footer */
  --cuban-flag-blue: #002590;
  --blue-tint: #96abe9;
  --red: #9b2b24;
  --red-soft: #f3e3dc;
  --sky: #e6edf3;
  --focus: #2f6fd6;
  --shadow: 0 1px 2px rgb(30 34 48 / .06), 0 8px 24px rgb(30 34 48 / .08);
  --radius: 10px;
  --wrap: 72rem;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

/* --stuck-h: height of the header once it's pinned (overridden for narrow screens below) */
:root { --stuck-h: 4.5rem; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--stuck-h); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--red); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.1rem); margin-top: 1.6em; }
h3 { font-size: 1.25rem; margin-top: 1.4em; }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

.skip {
  position: absolute; left: -999px; top: .5rem;
  background: var(--surface); color: var(--ink); padding: .5rem 1rem; z-index: 100;
}
.skip:focus { left: .5rem; }

/* ---------- Header ---------- */

/* Two rows: logo + language on top, a full-width blue nav bar below, then the tiles.
   The negative sticky offset lets the top row scroll away while the bar and tiles stay pinned. */
.site-header {
  --mast-h: 5.25rem;
  position: sticky; top: calc(-1 * var(--mast-h)); z-index: 50;
  background: var(--paper);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header .wrap {
  display: grid; align-items: center; column-gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: var(--mast-h) auto;
  grid-template-areas: "brand lang" "bar bar";
}
.brand {
  --mark-h: 3.1rem; --mark-top: .35rem;
  grid-area: brand; justify-self: start;
  display: flex; align-items: flex-start; gap: .75rem;
  color: var(--ink); text-decoration: none;
}
.brand-emblem { display: flex; align-items: flex-start; gap: .4rem; flex: none; }
.brand-mark { width: auto; height: var(--mark-h); margin-top: var(--mark-top); }
.brand-flag { width: auto; height: 1.75rem; box-shadow: 0 0 0 1px rgb(0 0 0 / .08); }
.brand-arms { width: auto; height: 2.05rem; margin-top: -.1rem; }
/* Text is measured against the building (the flag and arms are ornaments and don't count).
   Desktop: name just below the building's top, subtitle tucked under it.
   Phones: the two name lines span the building's height (see the 560px rules). */
.brand-text {
  display: flex; flex-direction: column; gap: .5rem;
  height: var(--mark-h); margin-top: var(--mark-top); padding-top: 5px; line-height: 1.1;
}
.brand-name, .brand-name > span, .brand-sub { text-box: trim-both cap alphabetic; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; white-space: nowrap; }
.brand-sub { font-size: .82rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.nav {
  grid-area: bar;
  display: flex; align-items: stretch; justify-content: center; gap: .5rem;
  /* paints the blue out to both edges of the viewport, past .wrap */
  background: var(--cuban-flag-blue);
  box-shadow: 0 0 0 100vmax var(--cuban-flag-blue); clip-path: inset(0 -100vmax);
}
.nav a {
  color: var(--on-blue); text-decoration: none; font-weight: 500; font-size: .95rem; line-height: 1.3;
  /* the link fills the bar's full height, so its highlight runs edge to edge */
  padding: calc(.55rem + 2px) .75rem; white-space: nowrap;
}
.nav a:hover { background: rgb(255 255 255 / .08); }
.nav a[aria-current="page"] { background: color-mix(in srgb, var(--cuban-flag-blue), #fff 25%); }.lang {
  grid-area: lang;
  flex: none; text-decoration: none; white-space: nowrap;
  padding: .45rem .9rem; border-radius: 999px;
  font-size: .88rem; font-weight: 600;
  color: var(--on-blue); background: var(--cuban-flag-blue);
  border: 1px solid color-mix(in srgb, var(--cuban-flag-blue), var(--blue-tint) 35%);
}
.lang:hover { color: var(--on-blue); background: color-mix(in srgb, var(--cuban-flag-blue), var(--blue-tint) 25%); }

.menu-btn {
  display: none;
  align-items: center; gap: .4rem;
  font: inherit; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .45rem .9rem; cursor: pointer;
}
.menu-btn svg { width: 1.1rem; height: 1.1rem; }

/* Tile strip under the header and above the footer.
   tiles-mermaids.png: 218×108, the mermaid-and-urn frieze rebuilt from the photo (made by _build/tiles_mermaids.py) */
.tiles {
  height: 20px;
  background: url(tiles-mermaids.png) left center / auto 20px repeat-x;
}

/* Narrow screens: no blue bar. Menu sits beside the language button, the whole top row
   stays pinned so Menu is always reachable, and the links drop down beneath the tiles. */
@media (max-width: 1100px) {
  :root { --stuck-h: 7.75rem; }
  .site-header { top: 0; }
  .site-header .wrap {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: var(--mast-h);
    grid-template-areas: "brand lang menu";
  }
  .menu-btn { display: inline-flex; grid-area: menu; font-size: .85rem; padding: .4rem .75rem; gap: .3rem; }
  .menu-btn svg { width: 1rem; height: 1rem; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    clip-path: none;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: .5rem clamp(1rem, 4vw, 2rem) 1rem;
    max-height: calc(100dvh - 7rem); overflow-y: auto;
  }
  .nav:not(.open) { display: none; }
  .nav a { color: var(--ink); line-height: inherit; padding: .8rem .5rem; border-radius: 6px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav a:hover { background: var(--sky); }
  .nav a[aria-current="page"] { color: var(--red); background: var(--red-soft); }
  .nav a:last-child { border-bottom: 0; }
  .lang { font-size: .85rem; padding: .4rem .75rem; }
}
@media (max-width: 560px) {
  .site-header { --mast-h: 4.5rem; }
  .site-header .wrap { column-gap: .6rem; }
  .tiles { height: 14px; background-size: auto 14px; }
  .brand { gap: .55rem; --mark-h: 2.4rem; --mark-top: .3rem; }
  .brand-text { padding-top: 0; }
  .brand-sub { display: none; }
  .brand-flag { height: 1.35rem; }
  .brand-arms { height: 1.55rem; }
  .brand-name { font-size: 1.15rem; }
  /* name always on two lines: "San Carlos / Institute", "Instituto / San Carlos" */
  .brand-name { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 4px 0 1px; }
}
@media (max-width: 480px) {
  .site-header .wrap { column-gap: .45rem; }
  .brand { gap: .45rem; --mark-h: 2.15rem; }
  .brand-emblem { gap: .25rem; }
  .brand-flag { height: 1.15rem; }
  .brand-arms { height: 1.35rem; }
  .brand-name { font-size: 1.05rem; }
}
@media (max-width: 380px) {
  .menu-btn { padding: .45rem; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 350px) {
  .lang { padding-inline: .6rem; }
}

/* ---------- Page header ---------- */

.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 3vw, 2rem); }
.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin-bottom: .6rem;
}
.lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--muted); max-width: 46rem; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: .75rem; }
.crumbs a { color: var(--muted); }

main { padding-bottom: clamp(3rem, 6vw, 5rem); }

/* ---------- Prose ---------- */

.prose { max-width: 44rem; }
.prose > h2:first-child, .eyebrow + h2 { margin-top: 0; }
/* A heading that opens the page content (Events) sits right under the page title, like other pages' first content */
main > .wrap > h3:first-child { margin: 0 0 3rem; }
.layout {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr) 20rem;
  align-items: start;
}
.layout aside { position: sticky; top: calc(var(--stuck-h) + .5rem); }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .layout aside { position: static; }
}

figure { margin: 0; }
figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; line-height: 1.45; }
.photo img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--line);
  width: 100%;
}
.float-right, .float-left { width: min(46%, 18rem); margin-bottom: 1rem; }
.float-right { float: right; margin-left: 1.75rem; }
.float-left { float: left; margin-right: 1.75rem; }
.clear { clear: both; }
@media (max-width: 600px) {
  .float-right, .float-left { float: none; width: 100%; margin: 1.5rem 0; }
}
.wide { margin-block: 2rem; }

blockquote.pull {
  margin: 2rem 0; padding: 1.5rem 1.75rem;
  background: var(--surface); border-left: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow);
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; font-style: italic;
}
blockquote.pull p:last-of-type { margin-bottom: .5rem; }
blockquote.pull cite { display: block; font: normal 600 .92rem/1.4 var(--sans); color: var(--muted); }
/* Pull quote framed above and below by a strip of the San Carlos's own tiles.
   Each tile image is 108px tall so it can be shown larger later; to resize, change --tile-h
   and set --tile-w to keep the image's proportions.
   "round" fits a whole number of tiles so none are cut off at the ends. */
blockquote.pull.tiled {
  /* tiles-vine.png: 222×108, vine band with the blue rows above and below */
  --tile: url(tiles-vine.png); --tile-w: 62px; --tile-h: 30px;
  position: relative; padding: calc(var(--tile-h) + 1.5rem) 1.75rem;
  background: #fbf4e2; border-left: 0; border-radius: 4px; overflow: hidden;
}
/* tiles-braid.png: 216×108, cleaned-up braid tile with flat black rows (made by _build/tiles_braid.py) */
blockquote.pull.tiled.braid { --tile: url(tiles-braid.png); --tile-w: 60px; }
blockquote.pull.tiled::before, blockquote.pull.tiled::after {
  content: ""; position: absolute; left: 0; right: 0; height: var(--tile-h);
  background: var(--tile) 0 0 / var(--tile-w) var(--tile-h) round;
}
blockquote.pull.tiled::before { top: 0; }
blockquote.pull.tiled::after { bottom: 0; }
blockquote.inline {
  margin: 1.25rem 0; padding: .25rem 0 .25rem 1.25rem;
  border-left: 3px solid var(--line); color: var(--muted); font-style: italic;
}

.notes { font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2.5rem; }
.notes ol { padding-left: 1.25rem; margin: .5rem 0 0; }
sup a { text-decoration: none; font-weight: 600; }

/* ---------- Components ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; text-decoration: none;
  padding: .75rem 1.3rem; border-radius: 999px;
  color: var(--on-blue); background: var(--cuban-flag-blue);
  border: 2px solid color-mix(in srgb, var(--cuban-flag-blue), var(--blue-tint) 35%);
}
.btn:hover { background: color-mix(in srgb, var(--cuban-flag-blue), var(--blue-tint) 25%); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.info-card dl { margin: 0; display: grid; gap: 1rem; }
.info-card dt { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.info-card dd { margin: .15rem 0 0; font-weight: 500; }
.info-card .big { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }

.feature {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgb(30 34 48 / .08), 0 14px 32px rgb(30 34 48 / .12); }
.feature img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.feature div { padding: 1.1rem 1.25rem 1.3rem; }
.feature h3 { margin: 0 0 .35rem; font-size: 1.2rem; }
.feature p { margin: 0; color: var(--muted); font-size: .97rem; }
.feature .more { display: inline-block; margin-top: .75rem; color: var(--red); font-weight: 600; font-size: .95rem; }

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.section-head h2 { margin: 0; }

/* ---------- Home ---------- */

.hero { padding-block: clamp(2rem, 5vw, 4rem); }
.hero .wrap {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center;
}
.hero h1 { font-size: clamp(2.3rem, 1.5rem + 3.4vw, 3.9rem); }
.hero h1 em { font-style: italic; color: var(--red); font-weight: 500; }
.hero-photo { position: relative; }
.hero-photo img { display: block; border-radius: 14px; box-shadow: 0 2px 4px rgb(30 34 48 / .08), 0 14px 32px rgb(30 34 48 / .14); width: 100%; height: auto; aspect-ratio: 1200 / 1495; object-fit: cover; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts > div { padding: 1.25rem 1.25rem; border-right: 1px solid var(--line); }
.facts > div:last-child { border-right: 0; }
.facts strong { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.facts span { color: var(--muted); font-size: .95rem; }
@media (max-width: 680px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .facts > div:last-child { border-bottom: 0; }
}

.split { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.band {
  background: var(--cuban-flag-blue); color: var(--on-blue);
  padding-block: clamp(3rem, 7vw, 5rem);
}
.band blockquote { margin: 0 auto; max-width: 52rem; text-align: center; }
.band blockquote p { font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 1rem + 1.5vw, 2rem); line-height: 1.4; }
.band cite { font-style: normal; font-weight: 600; opacity: .8; letter-spacing: .02em; }
/* Band edged top and bottom with the San Carlos star-lattice tiles.
   tiles-lattice.png: 262×108, one whole tile with its grout, cleaned up from the photo
   (made by _build/tiles_lattice.py). */
.band.tiled {
  --tile-w: 73px; --tile-h: 30px;
  position: relative; padding-block: calc(var(--tile-h) + clamp(3rem, 7vw, 5rem));
}
.band.tiled::before, .band.tiled::after {
  content: ""; position: absolute; left: 0; right: 0; height: var(--tile-h);
  background: url(tiles-lattice.png) 0 0 / var(--tile-w) var(--tile-h) round;
}
.band.tiled::before { top: 0; }
.band.tiled::after { bottom: 0; }

/* ---------- Timeline ---------- */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: .4rem; top: .5rem; bottom: .5rem; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 1rem 1.75rem; font-size: .95rem; line-height: 1.45; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: .35rem;
  width: .85rem; height: .85rem; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--red);
}
.timeline b { display: block; font-family: var(--serif); font-size: 1.05rem; color: var(--red); }
.timeline a { color: inherit; text-decoration: none; }
.timeline a:hover { text-decoration: underline; }

/* ---------- Lists ---------- */

.people { columns: 2 14rem; column-gap: 2rem; padding: 0; list-style: none; margin: 0; }
.people.one { columns: 1; }
/* Board page: Directors, Emeritus and In Memoriam as equal columns.
   Mid widths: In Memoriam moves below the other two; phones: all three stack. */
.board-lists {
  display: grid; column-gap: clamp(2rem, 4vw, 3rem); row-gap: 2.5rem; align-items: start;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 6fr);
  grid-template-areas: "dir emer mem";
}
.board-lists h2 { margin-top: 0; }
.board-lists .dir { grid-area: dir; }
.board-lists .emer { grid-area: emer; }
.board-lists .mem { grid-area: mem; }
@media (max-width: 1000px) {
  .board-lists { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-areas: "dir emer" "mem mem"; }
}
@media (max-width: 820px) {
  .board-lists { grid-template-columns: 1fr; grid-template-areas: "dir" "emer" "mem"; }
}
.people li { break-inside: avoid; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.role-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); margin-bottom: 2rem; }
.role-grid .card p { margin: 0; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; line-height: 1.35; }
.role-grid .card .label { font: 700 .76rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }

.exhibit { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.exhibit h3 { margin-top: 0; }
.exhibit .sub { margin: 1.25rem 0 0 1.25rem; padding-left: 1rem; border-left: 3px solid var(--line); }
.exhibit .sub h4 { font-family: var(--serif); font-size: 1.05rem; margin: 0 0 .35rem; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px; background: var(--sky); color: var(--muted); margin-bottom: .6rem; }

/* ---------- Gallery ---------- */

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chips a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem;
  padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
}
.chips a:hover { border-color: var(--red); color: var(--red); }

.album { padding-top: 1.5rem; }
.album h2 { margin-top: 1rem; }
.album-count { color: var(--muted); font-size: .95rem; margin: -.25rem 0 1.25rem; }
.thumbs { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.card + .thumbs { margin-top: 2rem; } /* Events: photos below the card */
.thumbs button {
  all: unset; cursor: zoom-in; display: block; position: relative;
  border-radius: 8px; overflow: hidden; background: var(--line);
}
.thumbs button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.thumbs button:hover img { transform: scale(1.04); }
.thumbs span {
  position: absolute; inset: auto 0 0 0; padding: 1.5rem .7rem .55rem;
  color: #fff; font-size: .84rem; line-height: 1.3;
  background: linear-gradient(transparent, rgb(0 0 0 / .72));
  opacity: 0; transition: opacity .2s;
}
.thumbs button:hover span, .thumbs button:focus-visible span { opacity: 1; }
@media (hover: none) { .thumbs span { opacity: 1; } }

.lightbox {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none;
  width: 100%; height: 100dvh; /* 100vw would include the page scrollbar and push the close button under it */ background: rgb(10 12 18 / .94); color: #f2efe8;
}
.lightbox::backdrop { background: rgb(10 12 18 / .6); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: calc(.75rem + env(safe-area-inset-top, 0px)) 1rem .75rem; font-size: .95rem; opacity: .85; }
.lb-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 3.75rem; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-cap { text-align: center; padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px)); max-width: 48rem; margin: 0 auto; font-size: 1.02rem; }
.lb-btn {
  background: rgb(255 255 255 / .1); color: #fff; border: 0; cursor: pointer;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center;
}
.lb-btn:hover { background: rgb(255 255 255 / .2); }
.lb-btn svg { width: 1.3rem; height: 1.3rem; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: .75rem; }
.lb-next { right: .75rem; }
@media (max-width: 600px) {
  .lb-stage { padding: 0 .5rem; }
  .lb-prev, .lb-next { top: auto; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); transform: none; }
  .lb-cap { padding-inline: 4rem; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--cuban-flag-blue); color: var(--on-blue);
  padding: 3rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
  font-size: .95rem;
}
.site-footer a { color: inherit; text-decoration: none; opacity: .85; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.foot-grid h2 { font-family: var(--sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; margin: 0 0 .9rem; font-weight: 700; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.foot-logo-link { display: inline-block; }
.foot-logo { width: 9rem; height: auto; margin-bottom: 1rem; filter: invert(.94) sepia(.12); }
.foot-legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / .15); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; opacity: .85; font-size: .88rem; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 420px) { .foot-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (max-width: 600px) {
  .thumbs { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .thumbs span { display: none; }
}
