/* Tokens tomados del sitio real (Zapier Interfaces) de Relatos Pixelados:
   fuente Inter, paleta neutra cálida, radio 0.75rem, columna de 600-680px. */
: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;
  --page-width-wide: 680px;
  --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;
}

.wrap-wide { max-width: var(--page-width-wide); }

/* Cabecera: solo el logo, sin tarjeta ni navegación */
.site-header {
  max-width: var(--page-width-wide);
  margin: 0 auto 2em;
  padding: 0 1.25em;
  text-align: center;
}

.logo-card { text-align: center; }

.logo-card a { text-decoration: none; }

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

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

.eyebrow {
  display: inline-block;
  margin-top: 0.9em;
  padding: 0.3em 0.9em;
  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;
}

/* Tarjetas genéricas */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.7em 1.9em;
  margin-bottom: 1.6em;
  line-height: 1.75;
}

.intro { line-height: 1.75; font-size: 0.98em; }
.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; }

/* Tipografía "prose" para contenido largo convertido de markdown */
.prose { font-size: 0.97em; line-height: 1.75; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  color: var(--foreground);
  font-weight: 800;
  line-height: 1.3;
  margin: 1.4em 0 0.6em;
}
.prose h1:first-child, .prose h2:first-child { margin-top: 0; }
.prose h1 { font-size: 1.5em; }
.prose h2 { font-size: 1.22em; }
.prose h3 { font-size: 1.06em; }
.prose h4 { font-size: 0.98em; text-transform: uppercase; letter-spacing: 0.04em; color: var(--foreground-subtle); }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { margin: 0 0 0.4em; }
.prose li::marker { color: var(--foreground-subtle); }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose a { font-weight: 600; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 1.6em 0; }
.prose blockquote {
  margin: 1.2em 0;
  padding: 0.2em 1.2em;
  border-left: 3px solid var(--border);
  color: var(--foreground-subtle);
  font-style: italic;
}
.prose img { max-width: 100%; border-radius: calc(var(--radius) - 4px); display: block; margin: 1em auto; }
.prose .fecha { color: var(--foreground-subtle); font-size: 0.9em; }
.prose .emoji-titulo { margin-right: 0.3em; }

/* Botones */
.btn {
  display: inline-block;
  padding: 0.6em 1.5em;
  background: var(--foreground);
  color: var(--card);
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92em;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.btn:hover { opacity: 0.85; transform: translateY(-1px); color: var(--card); }
.btn-block { display: block; text-align: center; }
.btn-row { text-align: center; margin: 1.4em 0; }

/* Tarjeta de ejemplo de obra (misma clase que la galería) */
.obra {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.6em;
}
.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.08em; font-weight: 500; line-height: 1.6; margin: 0 0 0.9em; color: var(--foreground); }
.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; }
.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;
}

/* Reto semanal (bloque destacado, cargado desde un fragmento editable) */
.reto-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.8em 1.9em;
  margin-bottom: 1.6em;
  position: relative;
}
.reto-card::before {
  content: "Reto de la semana";
  display: inline-block;
  margin-bottom: 0.8em;
  padding: 0.3em 0.9em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-foreground);
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
#reto-semanal-contenido { line-height: 1.7; }
#reto-semanal-contenido h1 { font-size: 1.3em; margin: 0.2em 0 0.5em; }
#reto-semanal-contenido h3 { font-size: 1em; margin: 1em 0 0.3em; }
#reto-semanal-contenido hr { border: none; border-top: 1px solid var(--border); margin: 1em 0; }
#reto-semanal-contenido em { color: var(--foreground-subtle); }

/* Footer */
.site-footer {
  max-width: var(--page-width-wide);
  margin: 2.4em auto 0;
  border-top: 1px solid var(--border);
  padding: 1.8em 1.25em 2.6em;
  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; }

/* Utilidades */
.texto-centrado { text-align: center; }
.nota-fecha { color: var(--foreground-subtle); font-size: 0.9em; }

.dots::after {
  content: "";
  animation: puntos 1.2s steps(4, end) infinite;
}
@keyframes puntos {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
  100% { content: ""; }
}
