/* Portal de Plazanomia: la landing (body.landing) y las páginas de la red
   (body.net: directorio, lo último y cada localidad). Identidad de cartel:
   amarillo y tinta, Anybody condensada para los titulares y Public Sans para el texto.
   Las fuentes van en fonts/ (licencia OFL): sin peticiones a terceros. */
@font-face { font-family: Anybody; src: url(fonts/anybody.woff2) format("woff2"); font-weight: 400 900; font-stretch: 50% 150%; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(fonts/public-sans.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --yellow: #F2B705; --ink: #101820; --paper: #FFFFFF; --muted: #4F5663; --line: #D9DCE1; --tint: #FDF1C4;
  --bg: var(--paper); --fg: var(--ink); --card: #FFFFFF;
  --display: Anybody, "Arial Narrow", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #101820; --muted: #AEB4BE; --line: #2C3642; --tint: #2E2A14; --bg: #101820; --fg: #F3F1EA; --card: #17212B; }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 18px/1.55 "Public Sans", system-ui, sans-serif; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; font-stretch: 62%; line-height: 0.92; letter-spacing: -0.005em; }
.wrap { max-width: 78rem; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 40rem) { .wrap { padding: 0 1rem; } }
.skip { position: absolute; left: 0.5rem; top: -3rem; background: var(--yellow); color: var(--ink); padding: 0.5rem 0.8rem; z-index: 10; }
.skip:focus { top: 0.5rem; }
.muted, .empty, .note { color: var(--muted); }
.small { font-size: 0.85rem; }
.count { color: var(--muted); font-weight: 400; }

/* El logo es un SVG en línea (lib/logo.js) con currentColor; su alto es 1,28 em del font-size */
.logo { display: inline-flex; font-size: 2.1rem; line-height: 0; color: inherit; text-decoration: none; }
.logo svg { display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.2rem; padding: 0 1.6rem; background: var(--ink); color: var(--yellow); font-weight: 700; font-size: 1.1rem; text-decoration: none; white-space: nowrap; border: 3px solid var(--ink); }
.btn:hover { background: var(--yellow); color: var(--ink); }
.btn.small { min-height: 2.6rem; padding: 0 1rem; font-size: 1rem; }

/* ======================= landing ======================= */
.landing { background: var(--yellow); color: var(--ink); }
.landing :focus-visible { outline-color: var(--ink); }
.poster-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.4rem 0; border-bottom: 4px solid var(--ink); }
.poster-bar nav { display: flex; gap: 1.5rem; align-items: center; font-weight: 700; flex-wrap: wrap; }
.poster-bar nav a:not(.btn) { text-decoration: none; }
.poster-bar nav a:not(.btn):hover { text-decoration: underline; }

/* Titular: uno por público, apilados en la misma celda para que no salte el alto al rotar */
.hero { padding-top: 2.5rem; padding-bottom: 4rem; }
.hero .for { margin: 0 0 1.25rem; font-weight: 700; }
.hero.js .for { display: none; }
.for-js { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.5rem; }
.for-js[hidden] { display: none; }
.for-js button { min-height: 2.5rem; padding: 0.3rem 0.85rem; border: 2px solid var(--ink); background: transparent; color: inherit; font: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer; }
.for-js button:hover { background: var(--tint); }
.for-js button[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }
.hero h1 { margin: 0; font-size: clamp(3.6rem, 12vw, 9.5rem); line-height: 0.88; font-stretch: 58%; }
.hero h1 span span { display: block; }
.rotor { display: grid; }
.rotor .v { grid-area: 1 / 1; }
.rotor .v[hidden] { display: none; }
.hero.js .rotor .v:not(.on) { visibility: hidden; }
.hero.anim .rotor .v.on { animation: rise 0.45s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(0.12em); } to { opacity: 1; transform: none; } }
.sub { margin-top: 2.25rem; max-width: 42rem; }
.sub p { margin: 0; font-size: 1.4rem; line-height: 1.4; font-weight: 600; }
.sub .ctas { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; margin-top: 1.75rem; font-weight: 700; }

/* El producto: una novedad en la web del negocio y dónde aparece */
.product { background: var(--ink); color: #F3F1EA; padding: 4.5rem 0 5rem; }
.product h2 { margin: 0; color: var(--yellow); font-size: clamp(3rem, 7vw, 5.25rem); }
.product .intro { margin: 1.1rem 0 0; max-width: 40em; font-size: 1.2rem; color: #E1DDCF; }
.product :focus-visible { outline-color: var(--yellow); }
.stage { margin: 3rem 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "google web bsky" "insta web masto" "map web ai" ". guide ." "more more more"; gap: 2.25rem 2.75rem; align-items: center; }
.spots { display: contents; }
.stage .google { grid-area: google; } .stage .insta { grid-area: insta; } .stage .map { grid-area: map; } .stage .bsky { grid-area: bsky; } .stage .masto { grid-area: masto; } .stage .ai { grid-area: ai; } .stage .guide { grid-area: guide; } .stage .web { grid-area: web; } .stage .more { grid-area: more; }
.spot { position: relative; background: #fff; color: var(--ink); border-radius: 10px; padding: 1rem 1.1rem; font-size: 0.95rem; line-height: 1.45; }
.spot p { margin: 0.35rem 0 0; }
.spot .where { margin: 0 0 0.5rem; font-size: 0.8rem; font-weight: 700; color: #5A6170; }
.spot .muted { color: #5A6170; }
.spot .card-link { margin-top: 0.7rem; padding: 0.45rem 0.65rem; border: 1px solid #DCDFE5; border-radius: 8px; color: #5A6170; font-size: 0.8rem; }
.spot sup { font-size: 0.7rem; font-weight: 700; background: var(--yellow); padding: 0 0.25rem; border-radius: 3px; }
.pin { display: inline-block; width: 0.85rem; height: 0.85rem; border-radius: 50% 50% 50% 0; background: #C4492F; transform: rotate(-45deg); margin-right: 0.5rem; vertical-align: -1px; }
/* La foto de la novedad: un roscón dibujado con degradados */
.spot .photo { display: block; border-radius: 6px; background: radial-gradient(circle at 50% 52%, #F7E7CB 0 13%, #B8692A 14% 17%, #DE9A48 18% 31%, #B8692A 32% 34%, #F7E7CB 35%); }
.stage .web { align-self: stretch; display: flex; flex-direction: column; padding: 0; overflow: hidden; border: 4px solid var(--yellow); border-radius: 12px; box-shadow: 12px 12px 0 var(--yellow); }
.web .bar { margin: 0; padding: 0.6rem 0.9rem; background: var(--yellow); font-weight: 700; font-size: 0.95rem; }
.web .in { flex: 1; display: flex; flex-direction: column; padding: 1.25rem 1.4rem 1.4rem; }
.web h3 { margin: 0; font-size: 2.4rem; font-stretch: 80%; }
.web .act { margin: 0.3rem 0 0.8rem; color: #5A6170; }
.web .acts { display: flex; gap: 0.5rem; margin: 0 0 1rem; }
.web .acts span { padding: 0.3rem 0.7rem; background: var(--ink); color: #fff; font-weight: 700; font-size: 0.85rem; border-radius: 4px; }
.web .post { border-top: 1px solid #DCDFE5; padding-top: 0.8rem; font-size: 1rem; }
.web .when { display: block; color: #5A6170; font-size: 0.8rem; }
.web .post .photo { height: 7.5rem; margin: 0.4rem 0 0.7rem; }
.web .post + .post { margin-top: 0.8rem; }
.web .hours { margin: auto 0 0; padding-top: 1rem; color: #5A6170; font-size: 0.85rem; }
.ig { display: grid; gap: 0.6rem; }
.ig .photo { height: 6.5rem; }
.stage .more { margin: 0; text-align: center; font-weight: 700; color: var(--yellow); }
/* Las líneas de puntos hacia la web del centro */
.to-right::after, .to-left::after, .to-top::after { content: ""; position: absolute; border: 0 dashed var(--yellow); }
.to-right::after { left: 100%; top: 50%; width: 2.75rem; border-top-width: 3px; }
.to-left::after { right: 100%; top: 50%; width: 2.75rem; border-top-width: 3px; }
.to-top::after { bottom: 100%; left: 50%; height: 2.25rem; border-left-width: 3px; }
.stage figcaption { grid-column: 1 / -1; margin-top: -1.25rem; color: #C9C4B4; font-size: 0.9rem; text-align: center; }
@media (max-width: 64rem) {
  .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "web web" "google bsky" "insta masto" "map ai" "guide guide" "more more"; gap: 1.25rem; }
  .stage .web { box-shadow: 8px 8px 0 var(--yellow); margin-bottom: 1rem; }
  .to-right::after, .to-left::after, .to-top::after { display: none; }
  .stage figcaption { margin-top: 0; }
}
/* En móvil, la web arriba y los demás sitios en un carrusel */
@media (max-width: 40rem) {
  .stage { display: block; }
  .stage .web { margin-bottom: 1.75rem; }
  .spots { display: flex; gap: 0.9rem; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -1rem; padding: 0 1rem 0.75rem; scroll-padding: 0 1rem; }
  .spots .spot { flex: 0 0 82%; scroll-snap-align: start; }
  .stage .more { margin-top: 1.25rem; }
  .stage figcaption { margin-top: 0.5rem; }
}

/* Las tres ideas */
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; padding-top: 4.5rem; padding-bottom: 2rem; }
.points > div { border-top: 8px solid var(--ink); padding-top: 1.1rem; }
.points h2 { margin: 0 0 0.9rem; font-size: clamp(2.4rem, 4vw, 3.1rem); font-stretch: 64%; }
.points p { margin: 0; font-weight: 600; }
@media (max-width: 52rem) { .points { grid-template-columns: 1fr; gap: 2.5rem; } }

/* Cómo funciona, webs de la red y preguntas */
.steps h2, .in-net h2, .faq h2 { margin: 0 0 1.75rem; font-size: clamp(2.8rem, 6vw, 4.5rem); font-stretch: 58%; }
.steps { padding-top: 4rem; }
.steps ol { list-style: none; counter-reset: paso; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
.steps li { counter-increment: paso; }
.steps li::before { content: counter(paso); display: block; font-family: var(--display); font-weight: 900; font-stretch: 62%; font-size: 5rem; line-height: 0.8; margin-bottom: 0.75rem; }
.steps h3 { margin: 0 0 0.6rem; font-size: 2rem; font-stretch: 64%; }
.steps p { margin: 0; font-weight: 600; }
@media (max-width: 52rem) { .steps ol { grid-template-columns: 1fr; gap: 2rem; } }
.in-net { padding-top: 4rem; }
.in-net .sites { margin-bottom: 1rem; }
.landing .site { border-color: var(--ink); }
.more-link { margin: 0; font-weight: 700; }
.faq { padding-top: 4rem; }
.faq details { max-width: 52rem; }
.faq details { border-top: 3px solid var(--ink); }
.faq details:last-of-type { border-bottom: 3px solid var(--ink); }
.faq summary { padding: 1rem 0; font-size: 1.25rem; font-weight: 800; cursor: pointer; }
.faq details p { margin: 0 0 1.25rem; font-weight: 600; max-width: 44rem; }

.close { display: flex; justify-content: space-between; align-items: center; gap: 2.5rem; flex-wrap: wrap; padding-top: 4.5rem; padding-bottom: 5rem; }
.close h2 { margin: 0; font-size: clamp(3.2rem, 8vw, 6rem); font-stretch: 58%; }
.landing .foot { padding-bottom: 2.5rem; font-weight: 600; }
.landing .foot p { margin: 0; padding-top: 1.25rem; border-top: 4px solid var(--ink); }

/* En modo oscuro, el cartel se invierte: tinta de fondo y amarillo para destacar */
@media (prefers-color-scheme: dark) {
  .landing { background: var(--ink); color: #F3F1EA; }
  .landing :focus-visible { outline-color: var(--yellow); }
  .landing .poster-bar, .points > div, .landing .foot p, .faq details, .for-js button, .landing .site { border-color: var(--yellow); }
  .landing .hero h1, .close h2, .points h2, .steps h2, .steps li::before, .in-net h2, .faq h2 { color: var(--yellow); }
  .for-js button:hover { background: #2E2A14; }
  .for-js button[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }
  .landing .btn { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
  .landing .btn:hover { background: transparent; color: var(--yellow); }
  .product { background: #1B2632; }
}

/* ======================= páginas de la red ======================= */
.topbar { background: var(--yellow); color: var(--ink); border-bottom: 4px solid var(--ink); }
.net > .topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.9rem max(2rem, calc((100% - 74rem) / 2)); }
.topbar nav { display: flex; gap: 0.3rem; }
.topbar nav a { padding: 0.35rem 0.85rem; font-weight: 700; text-decoration: none; }
.topbar nav a:hover { text-decoration: underline; }
.topbar nav a[aria-current="page"] { background: var(--ink); color: var(--yellow); }
.topbar :focus-visible { outline-color: var(--ink); }
@media (max-width: 40rem) { .net > .topbar { padding: 0.8rem 1rem; } .topbar .logo { font-size: 1.7rem; } }

.net main.wrap { padding-top: 2.5rem; padding-bottom: 2rem; }
.net h1 { font-size: clamp(2.8rem, 7vw, 5rem); margin: 0 0 0.6rem; }
.net h2 { font-size: 1.9rem; font-stretch: 70%; margin: 0 0 1rem; }
.intro { margin-bottom: 2.25rem; }
.lead { color: var(--muted); font-size: 1.15rem; margin: 0; max-width: 44rem; }
.lead a { color: var(--fg); }
.stats { margin: 1rem 0 0; color: var(--muted); }
.stats strong { color: var(--fg); font-size: 1.15rem; }
.crumbs { font-size: 0.95rem; color: var(--muted); margin-bottom: 0.75rem; }
.more { font-weight: 700; margin: 1rem 0 0; }

/* Localidades como fichas */
.by-place { margin-bottom: 2.5rem; }
.places ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.places a { display: inline-flex; gap: 0.4rem; padding: 0.35rem 0.9rem; border: 2px solid var(--fg); font-weight: 700; text-decoration: none; }
.places a:hover { background: var(--tint); }
.places a[aria-current="page"] { background: var(--fg); color: var(--bg); }
.places a[aria-current="page"] .count { color: inherit; }

.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
@media (max-width: 56rem) { .cols { grid-template-columns: 1fr; gap: 2.5rem; } }
.side { border: 2px solid var(--fg); padding: 1.25rem; background: var(--card); }
.side section + section { margin-top: 1.75rem; }

/* Tarjetas de las webs: enlazan enteras */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.filters input, .filters select { min-height: 2.75rem; padding: 0.45rem 0.8rem; border: 2px solid var(--fg); border-radius: 0; background: var(--card); color: var(--fg); font: inherit; }
.filters input { flex: 1 1 16rem; }
.filters input:focus, .filters select:focus { outline: 3px solid var(--yellow); outline-offset: 0; }
.sites { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 0.75rem; }
.site { position: relative; display: flex; gap: 0.85rem; align-items: center; background: var(--card); border: 2px solid var(--fg); padding: 0.85rem; }
.site:hover { background: var(--tint); }
.site div { display: flex; flex-direction: column; min-width: 0; }
.site .p-name { font-weight: 800; text-decoration: none; }
.site .p-name::after { content: ""; position: absolute; inset: 0; }
.site .p-category, .site .p-locality { color: var(--muted); font-size: 0.9rem; }
.site .open-now { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.site .open-now::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.site .open-now.is-open { color: #1d7a3e; }
@media (prefers-color-scheme: dark) { .site .open-now.is-open { color: #5fd08a; } }
.site a.place { position: relative; z-index: 1; width: fit-content; text-decoration: none; }
.site a.place:hover .p-locality { text-decoration: underline; color: var(--fg); }
.avatar { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; background: var(--accent, var(--ink)); color: var(--on-accent, #fff); font-weight: 800; }

/* Novedades */
.h-feed .h-entry { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.h-feed .h-entry:first-of-type { border-top: 0; padding-top: 0; }
.h-feed .meta { margin: 0; font-size: 0.9rem; color: var(--muted); }
.h-feed .meta a { color: var(--muted); text-decoration: none; }
.h-feed .meta a:hover { text-decoration: underline; }
.h-feed .p-author { font-weight: 800; color: var(--fg) !important; }
.h-feed .p-summary { margin: 0.25rem 0 0; }
.h-feed .u-photo { display: block; max-width: 100%; height: auto; margin: 0.5rem 0; }

/* Eventos */
.events { list-style: none; padding: 0; margin: 0; }
.events li { display: grid; grid-template-columns: auto 1fr; gap: 0.85rem; align-items: start; padding: 0.75rem 0; border-top: 1px solid var(--line); }
.events li:first-child { border-top: 0; padding-top: 0; }
.events li > div { display: flex; flex-direction: column; min-width: 0; }
.events .p-name { font-weight: 800; text-decoration: none; }
.events .p-name:hover { text-decoration: underline; }
.events .meta { color: var(--muted); font-size: 0.9rem; }
.events .meta a { color: var(--muted); }
.date-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 3.2rem; height: 3.4rem; background: var(--yellow); color: var(--ink); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; line-height: 1.1; }
.date-badge b { font-family: var(--display); font-size: 1.6rem; font-stretch: 80%; }

/* Localidad */
.ring { margin-bottom: 2.5rem; }
.note { margin: -0.5rem 0 1rem; }
.map-section { margin: 0 0 2.5rem; }

.net .foot { margin-top: 3rem; padding-bottom: 2.5rem; color: var(--muted); font-size: 0.95rem; }
.net .foot > p:first-child { padding-top: 1.5rem; border-top: 4px solid var(--fg); max-width: none; }
.net .foot p { margin: 0.35rem 0; max-width: 46rem; }
.net .foot strong { color: var(--fg); }

/* Mapa de las webs de una localidad (mapa.js) */
.osm-map { position: relative; height: 24rem; overflow: hidden; border: 2px solid var(--fg); background: #e8e4da; touch-action: none; cursor: grab; user-select: none; }
.osm-map .tiles { position: absolute; inset: 0; }
.osm-map .tiles img { position: absolute; width: 256px; height: 256px; max-width: none; }
.osm-map .pin { position: absolute; width: 22px; height: 22px; margin: -22px 0 0 -11px; padding: 0; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ink); border: 3px solid var(--yellow); box-shadow: 0 1px 3px #0006; cursor: pointer; vertical-align: 0; }
.osm-map .pin:focus-visible { outline: 3px solid #1d1d1b; outline-offset: 2px; }
.osm-map .map-label { position: absolute; transform: translate(-50%, calc(-100% - 30px)); background: #fff; color: #1d1d1b; padding: 0.4rem 0.7rem; box-shadow: 0 2px 8px #0004; font-size: 0.9rem; white-space: nowrap; display: flex; flex-direction: column; }
.osm-map .map-label a { color: #1d1d1b; font-weight: 700; }
.osm-map .map-label span { color: #6a675f; font-size: 0.82rem; }
.osm-map .map-ui { position: absolute; top: 0.5rem; left: 0.5rem; display: flex; flex-direction: column; gap: 2px; }
.osm-map .map-ui button { width: 2rem; height: 2rem; border: 1px solid #0003; background: #fff; color: #222; font: 700 1.1rem/1 system-ui, sans-serif; cursor: pointer; }
.osm-map .map-attr { position: absolute; right: 0; bottom: 0; background: #fffc; color: #333; font-size: 0.7rem; padding: 0 0.3rem; }
.osm-map .map-attr a { color: #2a5db0; }

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