/* Tokens tomados del sitio real (Zapier Interfaces) de Relatos Pixelados:
   fuente Inter, paleta neutra cálida, radio 0.75rem, columna de 520px. */
:root {
  --background: hsl(30 11% 96%);
  --foreground: hsl(30 3% 15%);
  --foreground-subtle: hsl(30 1% 40%);
  --card: hsl(0 0% 100%);
  --card-foreground: hsl(30 3% 15%);
  --muted: hsl(60 3% 94%);
  --muted-foreground: hsl(0 2% 28%);
  --accent: hsl(30 6% 94%);
  --accent-foreground: hsl(15 6% 40%);
  --primary: hsl(20 6% 53%);
  --primary-foreground: hsl(0 0% 100%);
  --border: hsl(60 1% 83%);
  --radius: 0.75rem;
  --page-width: 600px;
  --shadow-sm: 0 1px 2px rgba(23, 20, 16, 0.05);
  --shadow-md: 0 2px 8px rgba(23, 20, 16, 0.07), 0 1px 2px rgba(23, 20, 16, 0.05);
  --shadow-lg: 0 8px 24px rgba(23, 20, 16, 0.10), 0 2px 6px rgba(23, 20, 16, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--background);
  color: var(--foreground);
  margin: 0;
  padding: 3em 0 1.5em;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--foreground); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; transition: color 0.15s ease; }
a:hover { color: var(--accent-foreground); }

.wrap {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 1.25em 1em;
}

/* Cabecera: el logo vive en una tarjeta propia (igual que el resto de
   tarjetas del sitio) para que no aparezca como un rectángulo suelto de
   otro color sobre el fondo. */
.site-header {
  max-width: var(--page-width);
  margin: 0 auto 2em;
  padding: 0 1.25em;
}

.logo-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.8em 1.6em 1.4em;
  text-align: center;
}

.logo-frame {
  height: 190px;
  display: flex;
  overflow: hidden;
  margin: 0 auto;
  justify-content: center;
  align-items: center;
}

.logo-frame img {
  width: auto;
  max-width: 220px;
  max-height: 100%;
  object-fit: contain;
}

.eyebrow {
  display: inline-block;
  margin-top: 1em;
  padding: 0.32em 0.95em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-foreground);
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-header .subtitulo {
  text-align: center;
  color: var(--foreground-subtle);
  font-size: 0.94em;
  font-style: italic;
  margin: 0.8em 0 0;
  letter-spacing: 0.01em;
}

/* Intro */
.intro {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.7em 1.9em;
  margin-bottom: 2.2em;
  line-height: 1.75;
  font-size: 0.98em;
  letter-spacing: 0.005em;
}

.intro p { margin: 0 0 0.75em; }
.intro p:last-child { margin-bottom: 0; }
.intro strong { font-weight: 700; color: var(--foreground); }
.intro em { color: var(--foreground-subtle); font-style: italic; }

/* Galería */
#contenedor {
  display: flex;
  flex-direction: column;
  gap: 1.6em;
}

.obra {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  animation: aparecer 0.4s ease both;
}

.obra:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

@keyframes aparecer {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.obra img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--muted);
}

.obra .cuerpo { padding: 1.3em 1.5em 1.5em; }

.obra .texto {
  font-size: 1.1em;
  font-weight: 500;
  line-height: 1.6;
  margin: 0 0 0.9em;
  color: var(--foreground);
  position: relative;
}

.obra .autor {
  font-size: 0.86em;
  color: var(--foreground-subtle);
  margin: 0 0 0.75em;
}

.obra .etiquetas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-bottom: 0.55em;
}

.obra .etiquetas .tag {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-foreground);
  border-radius: 999px;
  padding: 0.24em 0.8em;
  font-size: 0.74em;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.obra .id_combinacion {
  font-size: 0.66em;
  color: var(--foreground-subtle);
  opacity: 0.6;
  border-top: 1px solid var(--border);
  padding-top: 0.65em;
  margin-top: 0.25em;
  letter-spacing: 0.02em;
}

/* Estado de carga / fin */
#estado {
  text-align: center;
  font-size: 0.92em;
  font-style: italic;
  color: var(--foreground-subtle);
  margin: 2.2em 0;
  min-height: 1.4em;
}

.dots::after {
  content: "";
  animation: puntos 1.2s steps(4, end) infinite;
}

@keyframes puntos {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
  100% { content: ""; }
}

.boton-cargar {
  display: inline-block;
  margin-top: 0.5em;
  padding: 0.65em 1.6em;
  background: var(--foreground);
  color: var(--card);
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9em;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.boton-cargar:hover { opacity: 0.85; transform: translateY(-1px); }

/* Footer */
.site-footer {
  max-width: var(--page-width);
  margin: 2.6em auto 0;
  border-top: 1px solid var(--border);
  padding: 1.9em 1.25em 2.8em;
  text-align: center;
  font-size: 0.8em;
  color: var(--foreground-subtle);
  line-height: 1.95;
}

.site-footer a { color: var(--foreground-subtle); text-decoration: underline; text-decoration-color: var(--border); }
.site-footer a:hover { color: var(--foreground); }

.site-footer .separador { color: var(--border); margin: 0 0.35em; }

.site-footer .apoyo { margin-top: 1.1em; color: var(--foreground); }

.site-footer .apoyo-btn {
  display: inline-block;
  margin-top: 0.6em;
  padding: 0.55em 1.4em;
  background: var(--foreground);
  color: var(--card);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95em;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.15s ease;
}

.site-footer .apoyo-btn:hover { opacity: 0.85; color: var(--card); }

.site-footer .contacto { margin-top: 0.7em; }
