/* Pollos Around The World */
:root {
  --yolk: #FFB703; --orange: #FB8500; --comb: #E63946; --sea: #219EBC; --leaf: #8AC926;
  --ink: #2B2118; --ink-2: #5C4A3A; --cream: #FFF8E7; --paper: #FFFDF7; --line: #EADFC8;
  --shadow: 0 10px 30px -12px rgba(43, 33, 24, .35);
  --radius: 18px;
  --display: "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.55 var(--body); color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
a { color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--comb); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -.01em; margin: 0 0 .4em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }

/* ---------- barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(12px, 3vw, 28px); background: rgba(255, 248, 231, .92); backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}
.is-map .topbar {
  position: fixed; left: 12px; right: 12px; top: 12px; border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: var(--shadow); padding: 6px 8px 6px 10px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 44px; height: 44px; transition: transform .3s; }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.wordmark { display: flex; flex-direction: column; line-height: .95; }
.wordmark b { font: 800 22px var(--display); letter-spacing: -.02em; }
.wordmark small { font: 600 11px var(--body); text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px;
}
.nav a:hover { background: #FFE8B0; color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--cream); }
.nav .lang { border: 2px solid var(--ink); padding: 6px 11px; font-size: 13px; margin-left: 4px; }

/* ---------- mapa principal ---------- */
.map-page { position: fixed; inset: 0; }
.map { width: 100%; height: 100%; background: #CFE8EF; }
.map-fallback { display: grid; place-items: center; text-align: center; padding: 20px; }
.maplibregl-ctrl-group { border-radius: 14px !important; border: 2px solid var(--ink); box-shadow: var(--shadow) !important; overflow: hidden; }
.maplibregl-ctrl-attrib { font-size: 11px; }

.stats-card {
  position: absolute; left: 12px; top: 88px; z-index: 5; width: min(340px, calc(100% - 24px));
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px;
}
.tagline { margin: 0 0 12px; font: 600 17px/1.35 var(--display); }
.stats { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 10px; }
.stats li { flex: 1; background: var(--cream); border-radius: 12px; padding: 8px 6px; text-align: center; }
.stats b { display: block; font: 800 24px/1 var(--display); color: var(--orange); }
.stats span { display: block; line-height: 1.25; margin-top: 3px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.flags { font-size: 20px; letter-spacing: 3px; margin: 0 0 8px; line-height: 1.4; }
.top-pollo { font-size: 14px; margin: 0 0 10px; }
.send-cta {
  display: block; text-align: center; background: var(--yolk); color: var(--ink); font-weight: 700; text-decoration: none;
  border: 2px solid var(--ink); border-radius: 999px; padding: 9px 12px; box-shadow: 0 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.send-cta:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.send-cta:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

.latest { position: absolute; left: 12px; right: 60px; bottom: 16px; z-index: 5; pointer-events: none; }
.latest h2 {
  display: inline-block; pointer-events: auto; font-size: 14px; text-transform: uppercase; letter-spacing: .1em;
  background: var(--ink); color: var(--cream); padding: 4px 12px; border-radius: 999px; margin: 0 0 8px;
}
.latest:has(.strip:empty) { display: none; }
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; pointer-events: auto; }
.strip::-webkit-scrollbar { display: none; }
.strip button {
  flex: 0 0 auto; width: 132px; height: 96px; border-radius: 14px; border: 2px solid var(--ink); padding: 0;
  background: #ddd center/cover no-repeat; box-shadow: var(--shadow); cursor: pointer; position: relative; overflow: hidden;
  transition: transform .15s;
}
.strip button:hover { transform: translateY(-3px) rotate(-1deg); }
.strip button span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; text-align: left; color: #fff;
  font: 600 12px/1.2 var(--body); background: linear-gradient(transparent, rgba(0, 0, 0, .7));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.empty-map {
  position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 5; background: var(--paper);
  border: 2px solid var(--ink); border-radius: 999px; padding: 10px 18px; font-weight: 600; box-shadow: var(--shadow);
}

/* ---------- páginas ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 28px clamp(14px, 3vw, 28px) 60px; }
.col-head { margin: 8px 0 20px; }
.col-head h1 { font-size: clamp(32px, 5vw, 54px); }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: 12px; color: var(--orange); margin: 0 0 6px; }
.col-meta { color: var(--ink-2); font-weight: 500; }
.col-desc { max-width: 720px; font-size: 18px; }
.map-inline { height: min(460px, 60vh); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; box-shadow: var(--shadow); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile {
  position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: 2px solid var(--ink);
  background: #e9dcc0 center/cover no-repeat; color: #fff; text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: #fff; }
.tile-cap { position: absolute; inset: auto 0 0; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); }
.tile-cap b { display: block; font: 700 16px/1.2 var(--display); }
.tile-cap small { opacity: .9; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: var(--shadow); color: var(--ink); }
.card-img { aspect-ratio: 16 / 9; background: #e9dcc0 center/cover no-repeat; border-bottom: 2px solid var(--ink); }
.card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.card-body b { font: 800 22px var(--display); }
.card-body small { color: var(--ink-2); }
.card .flags { font-size: 18px; margin: 4px 0 0; }

.pollo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.pollo {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 20px 12px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); color: var(--ink); text-decoration: none;
  transition: transform .15s;
}
.pollo:hover { transform: translateY(-3px) rotate(1deg); color: var(--ink); }
.avatar { width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--yolk); background: #e9dcc0 center/cover; outline: 2px solid var(--ink); margin-bottom: 8px; }
.pollo b { font: 800 20px var(--display); }
.pollo small { color: var(--ink-2); }
.pollo .flags { font-size: 16px; margin: 0; }

/* ficha de foto */
.photo-frame { margin: 0 0 22px; display: flex; justify-content: center; }
.photo-img {
  width: 100%; max-height: 78vh; background: #1c1712 center/contain no-repeat; border-radius: var(--radius);
  border: 2px solid var(--ink); box-shadow: var(--shadow); position: relative;
}
.photo-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: start; }
.photo-info h1 { font-size: clamp(30px, 4.4vw, 48px); }
.place { font-weight: 700; color: var(--orange); margin: 0 0 6px; font-size: 18px; }
.date { color: var(--ink-2); margin-top: -4px; }
.desc { font-size: 18px; margin: 14px 0; }
.minimap { height: 300px; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.nearby { margin-top: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { background: #FFE8B0; color: var(--ink); text-decoration: none; padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.chip:hover { background: var(--yolk); color: var(--ink); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; font: 700 15px var(--body); color: var(--ink); background: var(--yolk);
  border: 2px solid var(--ink); border-radius: 999px; padding: 9px 16px; text-decoration: none; cursor: pointer;
  box-shadow: 0 3px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.btn:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.ghost { background: var(--paper); }
.empty { font-size: 18px; text-align: center; padding: 40px 0; }
.notfound { text-align: center; padding-top: 80px; }

.footer { border-top: 2px solid var(--line); padding: 30px clamp(14px, 3vw, 28px); text-align: center; color: var(--ink-2); }
.footer-send { max-width: 640px; margin: 0 auto 14px; }
.footer-send strong { font: 800 20px var(--display); color: var(--ink); }
.footer-meta { font-size: 13px; }

/* páginas de texto */
.text-page { max-width: 820px; }
.prose { font-size: 18px; line-height: 1.65; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow); }
.prose h2 { font-size: 26px; margin: 1.2em 0 .4em; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .2em 0; }
.prose li::marker { color: var(--orange); }
.flock { margin-top: 40px; }
.page-cta { text-align: center; margin-top: 36px; }
.footer-links { font-weight: 600; }
.footer-links a { color: var(--ink); }
.card-links { font-size: 14px; margin: 0 0 10px; font-weight: 600; }
.card-links a { color: var(--ink-2); }
.nav-about { width: 36px; height: 36px; padding: 0 !important; display: inline-grid !important; place-items: center;
  border: 2px solid var(--ink); font: 800 17px var(--display) !important; }

/* ---------- protección de imágenes ---------- */
.protected { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
.shield { position: absolute; inset: 0; background: transparent; }

/* ---------- visor ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: 1fr 360px;
  background: rgba(24, 18, 12, .94); color: var(--cream); animation: fade .2s;
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-open { overflow: hidden; }
.lb-stage { margin: 0; position: relative; display: grid; place-items: center; padding: 24px 70px; min-height: 0; }
.lb-img { width: 100%; height: 100%; background: center/contain no-repeat; position: relative; transition: filter .3s; }
.lightbox.loading .lb-img { filter: blur(8px); }
.lb-info { background: var(--paper); color: var(--ink); padding: 34px 26px; overflow-y: auto; border-left: 3px solid var(--ink); }
.lb-place { font-weight: 700; color: var(--orange); margin: 0 0 6px; }
.lb-title { font-size: 30px; }
.lb-date { color: var(--ink-2); margin-top: -4px; }
.lb-desc { white-space: pre-line; }
.lb-meta { color: var(--ink-2); font-size: 14px; }
.lb-meta a { color: var(--orange); }
.lb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.lb-close, .lb-nav {
  position: absolute; z-index: 2; border: 2px solid var(--ink); background: var(--yolk); color: var(--ink);
  width: 46px; height: 46px; border-radius: 50%; font: 800 22px/1 var(--body); cursor: pointer; box-shadow: 0 3px 0 var(--ink);
}
.lb-close { top: 16px; right: 376px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 30px; }
.lb-prev { left: 14px; }
.lb-next { right: 374px; }
.lb-nav:disabled { display: none; }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--cream);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow);
}

/* ---------- móvil ---------- */
@media (max-width: 820px) {
  .photo-body { grid-template-columns: 1fr; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 58vh auto; overflow-y: auto; }
  .lb-stage { padding: 12px; }
  .lb-info { border-left: 0; border-top: 3px solid var(--ink); padding: 22px 18px 40px; }
  .lb-close { right: 12px; top: 12px; }
  .lb-nav { top: 29vh; width: 40px; height: 40px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}
@media (max-width: 980px) { .nav-extra:not(.nav-about) { display: none; } }
@media (max-width: 640px) {
  .nav-about { width: 30px; height: 30px; font-size: 15px !important; }
  .wordmark small { display: none; }
  .wordmark b { font-size: 19px; }
  .brand img { width: 36px; height: 36px; }
  .nav a { padding: 7px 9px; font-size: 14px; }
  .is-map .topbar { left: 8px; right: 8px; top: 8px; }
  .stats-card { top: 72px; left: 8px; padding: 10px 12px; width: auto; right: 8px; }
  .stats-card .tagline, .stats-card .flags, .stats-card .top-pollo { display: none; }
  .stats { margin-bottom: 8px; }
  .stats b { font-size: 19px; }
  .send-cta { padding: 6px 10px; font-size: 14px; }
  .latest { left: 8px; right: 8px; bottom: 10px; }
  .strip button { width: 108px; height: 80px; }
  .maplibregl-ctrl-bottom-right { bottom: 120px; }
}
@media (max-width: 440px) {
  .wordmark { display: none; }
  .nav { gap: 2px; }
  .nav a { padding: 7px 8px; }
  .nav .lang { padding: 5px 8px; margin-left: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
