/* TINTO & TINTA — sistema cálido y artesanal
   Paleta "tostado clásico" + tipografía "revista moderna"
   ------------------------------------------------------- */
:root {
  /* Paleta café (tostado clásico) */
  --paper:        #f4ede2;
  --paper-warm:   #ede0c8;
  --cream:        #faf3e7;
  --ink:          #2c1810;
  --ink-soft:     #4a2c2a;
  --brown:        #7a4f2a;
  --caramel:      #b7995a;
  --sage:         #6b7d5a;
  --rust:         #a85a2c;
  --line:         rgba(44, 24, 16, 0.14);
  --line-soft:    rgba(44, 24, 16, 0.08);

  /* Tipografía — set "revista moderna" */
  --font-display: "Playfair Display", "DM Serif Display", Georgia, serif;
  --font-body:    "Source Serif Pro", "Lora", Georgia, serif;
  --font-sans:    "Work Sans", "Inter", -apple-system, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;
  --font-script:  "Caveat", "Comic Sans MS", cursive;

  /* Anchos */
  --shell:        1240px;
  --gutter:       40px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); }
body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Textura papel: noise SVG sutil */
.paper-texture {
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.17  0 0 0 0 0.09  0 0 0 0 0.06  0 0 0 0.06 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}
.paper-texture-warm {
  background-color: var(--paper-warm);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.27  0 0 0 0 0.14  0 0 0 0 0.07  0 0 0 0.08 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}

/* ─── Logo · Variant 08 — MINIMAL ──────────────────────────────────
   El wordmark es el logo. Los puntos de las dos "i" se reemplazan
   por un grano de café (en Tinto) y una pluma/nib (en Tinta).
   Usa el char dotless ı (U+0131) + ::before con SVG inline. */
.wordmark-minimal {
  display: inline-flex; align-items: baseline;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 92px);
  letter-spacing: -0.022em;
  color: var(--ink);
  line-height: 1;
  margin: 0;
  white-space: nowrap;
}
.wordmark-minimal .amp {
  font-style: italic; font-weight: 400; color: var(--rust);
  font-family: var(--font-display);
  margin: 0 0.18em;
}
.i-bean, .i-nib {
  position: relative;
  display: inline-block;
}
.i-bean::before, .i-nib::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.62em;       /* el "tittle" (punto) de Playfair vive a ~0.55em sobre x-height */
  transform: translateX(-50%);
  width: 0.22em;        /* ~1.5× ancho del stem de "i" en Playfair 700 */
  height: 0.28em;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}
.i-bean::before {
  /* Grano de café — oval con surco central */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 26'><ellipse cx='10' cy='13' rx='7.2' ry='11.5' fill='%232c1810' transform='rotate(-10 10 13)'/><path d='M 6.8 4.2 Q 10 13 6.8 21.8' stroke='%23f4ede2' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
}
.i-nib::before {
  /* Pluma fuente — punta de pluma con slit central + breather hole */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 26'><path d='M 2 22 L 10 3 L 18 22 L 10 18 Z' fill='%23a85a2c'/><circle cx='10' cy='10' r='1.2' fill='%23f4ede2'/><line x1='10' y1='12' x2='10' y2='18' stroke='%23f4ede2' stroke-width='1.2' stroke-linecap='round'/></svg>");
}

/* Variantes de tamaño — los glifos NO escalan linealmente para
   seguir siendo legibles a tamaños chicos. */
.wordmark-minimal.medium {
  font-size: 36px;
  letter-spacing: -0.014em;
}
.wordmark-minimal.medium .i-bean::before,
.wordmark-minimal.medium .i-nib::before {
  width: 0.30em; height: 0.36em; bottom: 0.62em;
}

.wordmark-minimal.small {
  font-size: 22px;
  letter-spacing: -0.012em;
}
.wordmark-minimal.small .i-bean::before,
.wordmark-minimal.small .i-nib::before {
  width: 0.42em; height: 0.52em; bottom: 0.62em;
}

.wordmark-minimal.tiny {
  font-size: 16px;
  letter-spacing: -0.008em;
}
.wordmark-minimal.tiny .i-bean::before,
.wordmark-minimal.tiny .i-nib::before {
  width: 0.55em; height: 0.65em; bottom: 0.60em;
}

/* Sobre fondo oscuro (sidebar admin) — invertimos colores del glifo */
.wordmark-minimal.on-dark { color: var(--cream); }
.wordmark-minimal.on-dark .amp { color: var(--caramel); }
.wordmark-minimal.on-dark .i-bean::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 26'><ellipse cx='10' cy='13' rx='7.2' ry='11.5' fill='%23b7995a' transform='rotate(-10 10 13)'/><path d='M 6.8 4.2 Q 10 13 6.8 21.8' stroke='%231f120a' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
}
.wordmark-minimal.on-dark .i-nib::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 26'><path d='M 2 22 L 10 3 L 18 22 L 10 18 Z' fill='%23faf3e7'/><circle cx='10' cy='10' r='1.2' fill='%231f120a'/><line x1='10' y1='12' x2='10' y2='18' stroke='%231f120a' stroke-width='1.2' stroke-linecap='round'/></svg>");
}

/* Tipografía */
.display    { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.012em; }
.body-serif { font-family: var(--font-body); }
.sans       { font-family: var(--font-sans); }
.mono       { font-family: var(--font-mono); letter-spacing: 0.02em; }
.script     { font-family: var(--font-script); }

.meta-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brown);
}

/* Cintas/etiquetas */
.cat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink-soft);
  white-space: nowrap;
}
.cat-pill.solid   { background: var(--ink);     color: var(--cream); border-color: var(--ink); }
.cat-pill.sage    { background: var(--sage);    color: var(--cream); border-color: var(--sage); }
.cat-pill.rust    { background: var(--rust);    color: var(--cream); border-color: var(--rust); }
.cat-pill.caramel { background: var(--caramel); color: var(--ink);   border-color: var(--caramel); }

/* Imágenes placeholder con franjas */
.img-slot {
  position: relative;
  background-color: var(--paper-warm);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(122, 79, 42, 0.10) 0 6px,
    rgba(122, 79, 42, 0.05) 6px 12px
  );
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--brown);
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
}

/* .cover — usado por cover_img() cuando hay imagen real.
   Hereda el aspect-ratio del contexto (.hero, .post-card, .cover-wrap, etc.) */
.cover {
  position: relative;
  width: 100%;
  background-color: var(--paper-warm);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  display: block;
}

/* Cover del post page (encabezado grande arriba del artículo) */
.cover-wrap .cover, .cover-wrap .img-slot {
  aspect-ratio: 16 / 9;
  max-height: 520px;
}
.img-slot.dark {
  background-color: #3a2418;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 248, 232, 0.06) 0 6px,
    rgba(255, 248, 232, 0.02) 6px 12px
  );
  color: var(--caramel);
}
.img-slot::after {
  content: ""; position: absolute; inset: 6px;
  border: 1px dashed currentColor; opacity: 0.4; pointer-events: none;
}
.img-slot > span { position: relative; z-index: 1; padding: 4px 8px; background: rgba(244,237,226,0.85); }
.img-slot.dark > span { background: rgba(58,36,24,0.85); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 500;
  padding: 11px 20px;
  border-radius: 2px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover    { transform: translateY(-1px); }
.btn.ghost    { background: transparent; color: var(--ink); }
.btn.caramel  { background: var(--caramel); border-color: var(--caramel); color: var(--ink); }
.btn.sm       { padding: 6px 12px; font-size: 12px; }

/* Dividers */
.rule        { height: 1px; background: var(--line); }
.rule-dashed { height: 0; border-top: 1px dashed var(--line); }
.rule-ornament {
  display: flex; align-items: center; gap: 14px; color: var(--brown);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase;
}
.rule-ornament::before, .rule-ornament::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 30%, var(--line) 70%, transparent);
}

/* Card */
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 2px;
}

/* Tazas para rating */
.cups { display: inline-flex; gap: 3px; color: var(--brown); }
.cups svg { width: 14px; height: 14px; }
.cups .off { color: var(--line); }

/* ─── Layout shell ─── */
.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── Topbar / Masthead ─── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-soft);
}
.topbar nav { display: flex; gap: 22px; }
.topbar nav a {
  font-weight: 500; letter-spacing: 0.04em;
  position: relative; padding-bottom: 2px;
}
.topbar nav a:hover { color: var(--rust); }
.topbar .right { display: flex; align-items: center; gap: 16px; }
.topbar .search {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brown); cursor: pointer;
}

.masthead {
  text-align: center;
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.masthead .issue {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--brown);
  margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.masthead .issue::before, .masthead .issue::after {
  content: ""; width: 38px; height: 1px; background: var(--line);
}
.brand-row {
  display: flex; align-items: center; justify-content: center; gap: 22px;
}
.brand-mark { color: var(--ink); }
.brand-mark svg { width: 72px; height: 72px; }
/* .wordmark legacy class — la dejo para back-compat pero el nuevo
   logo usa .wordmark-minimal con la variante 08 (i-bean + i-nib). */
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0;
}
.wordmark .amp { font-style: italic; font-weight: 400; color: var(--rust); font-family: var(--font-display); }
.tagline {
  font-family: var(--font-script);
  font-size: 26px;
  color: var(--brown);
  margin-top: 12px;
}
.byline {
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* ─── Hero / featured ─── */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.hero .img-slot, .hero .cover { aspect-ratio: 4 / 5; }
.hero .meta {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.hero h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 18px;
}
.hero h2 em { font-style: italic; color: var(--rust); font-weight: 400; }
.standfirst {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 26px;
}
.standfirst::first-letter {
  font-family: var(--font-display);
  font-size: 58px; line-height: 1; float: left;
  margin: 4px 10px 0 0; color: var(--ink);
}
.author {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--caramel);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); color: var(--ink); font-size: 16px;
  border: 1px solid var(--line);
}
.author .info { font-family: var(--font-sans); font-size: 13px; }
.author .info b { display: block; color: var(--ink); font-weight: 600; }
.author .info span { color: var(--brown); font-size: 11px; }

/* ─── Section heads ─── */
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  padding: 48px 0 24px;
  gap: 24px;
}
.section-head h3 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 34px; line-height: 1; letter-spacing: -0.01em;
  margin: 0; color: var(--ink);
}
.section-head .kicker {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--brown);
  margin-bottom: 8px;
}
.section-head .right {
  font-family: var(--font-sans); font-size: 12px; color: var(--brown);
}

/* ─── Grid mezcla de medios ─── */
.mix-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
  padding-bottom: 56px;
}
.post-card {
  display: flex; flex-direction: column; gap: 12px;
  background: transparent;
}
.post-card .img-slot, .post-card .cover { aspect-ratio: 4 / 3; }
.post-card .meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.post-card h4 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px; line-height: 1.12;
  letter-spacing: -0.01em; color: var(--ink);
  margin: 0;
}
.post-card .excerpt {
  font-family: var(--font-body); font-size: 14.5px; color: var(--ink-soft);
  line-height: 1.55; margin: 0;
}
.post-card .footer {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-sans); font-size: 11.5px; color: var(--brown);
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

/* Column spans */
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* Variantes específicas */

/* VIDEO — overlay con play */
.video-card .img-slot, .video-card .cover { aspect-ratio: 16 / 9; }
.video-card .img-slot.dark::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 62px; height: 62px; border-radius: 50%;
  background: rgba(244,237,226,0.92);
  transform: translate(-50%, -50%);
  z-index: 0;
}
.video-card .img-slot.dark::after {
  content: ""; position: absolute; inset: 6px;
  border: 1px dashed currentColor; opacity: 0.4; pointer-events: none;
}
.video-card .play {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-46%, -50%);
  z-index: 2;
  color: var(--ink);
}
.video-card .duration {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  background: rgba(28, 16, 10, 0.78); color: var(--cream);
  font-family: var(--font-mono); font-size: 11px;
  padding: 3px 7px; border-radius: 2px;
}

/* PODCAST — waveform */
.podcast-card {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 22px;
}
.podcast-card .top {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.podcast-card .play-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--cream);
  display: inline-flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; flex-shrink: 0;
}
.podcast-card .duration { font-family: var(--font-mono); font-size: 11px; color: var(--brown); }
.waveform {
  display: flex; align-items: end; gap: 2px;
  height: 42px; margin: 14px 0;
}
.waveform span {
  flex: 1; background: var(--brown); opacity: 0.55; border-radius: 1px;
}
.waveform span.played { opacity: 1; background: var(--rust); }
.podcast-card .times {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10px; color: var(--brown);
}

/* RECETA — paso a paso */
.recipe-card { background: var(--cream); border: 1px solid var(--line); }
.recipe-card .img-slot, .recipe-card .cover { aspect-ratio: 16 / 10; }
.recipe-card .body { padding: 22px; }
.recipe-card ol {
  margin: 12px 0 0; padding: 0; list-style: none;
  counter-reset: step;
}
.recipe-card li {
  counter-increment: step;
  display: grid; grid-template-columns: 28px 1fr; gap: 10px;
  font-family: var(--font-body); font-size: 14px;
  padding: 8px 0; border-bottom: 1px dashed var(--line);
}
.recipe-card li:last-child { border-bottom: 0; }
.recipe-card li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--rust); letter-spacing: 0.04em;
  padding-top: 2px;
}

/* RESEÑA / cafetería con score */
.review-card { background: var(--cream); border: 1px solid var(--line); }
.review-card .img-slot, .review-card .cover { aspect-ratio: 4 / 3; }
.review-card .body { padding: 20px; }
.review-card .score-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
  font-family: var(--font-sans); font-size: 12px; color: var(--ink-soft);
}
.review-card .score {
  font-family: var(--font-display); font-size: 24px; color: var(--ink); font-weight: 700;
}

/* GALERÍA */
.gallery-card .grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  aspect-ratio: 4 / 3;
}
.gallery-card .grid .img-slot:nth-child(1) {
  grid-row: span 2;
}

/* GUÍA COMPARATIVA — tabla */
.guide-card { background: var(--cream); border: 1px solid var(--line); padding: 22px; }
.guide-card table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-sans); font-size: 12.5px;
  margin-top: 12px;
}
.guide-card th, .guide-card td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line-soft); }
.guide-card th {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brown); font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.guide-card .win { color: var(--rust); font-weight: 600; }

/* DIARIO — nota personal */
.diary-card {
  background: var(--paper-warm);
  padding: 28px;
  border-left: 3px solid var(--caramel);
  position: relative;
}
.diary-card .quote-mark {
  font-family: var(--font-display);
  font-size: 80px; line-height: 0.6; color: var(--caramel);
  position: absolute; right: 18px; top: 12px;
}
.diary-card .text {
  font-family: var(--font-script);
  font-size: 22px; line-height: 1.35; color: var(--ink-soft);
}
.diary-card .sig {
  font-family: var(--font-script); color: var(--rust); font-size: 22px;
  margin-top: 14px;
}

/* ─── Newsletter ─── */
.newsletter {
  background: var(--ink);
  color: var(--cream);
  padding: 64px var(--gutter);
  text-align: center;
  margin-top: 40px;
}
.newsletter .kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--caramel); margin-bottom: 14px;
}
.newsletter h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 3.4vw, 46px); line-height: 1.05;
  letter-spacing: -0.012em; margin: 0 0 12px;
}
.newsletter h3 em { font-style: italic; color: var(--caramel); font-weight: 400; }
.newsletter p {
  max-width: 520px; margin: 0 auto 28px;
  color: rgba(244,237,226,0.7);
  font-size: 15px;
}
.newsletter form {
  display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  max-width: 560px; width: 100%;
}
.newsletter input[type="email"] {
  flex: 1 1 280px;
  padding: 13px 16px;
  border: 1px solid rgba(244,237,226,0.25);
  background: rgba(244,237,226,0.05);
  color: var(--cream);
  font-family: var(--font-sans); font-size: 14px;
  border-radius: 2px;
  outline: none;
}
.newsletter input[type="email"]::placeholder { color: rgba(244,237,226,0.4); }
.newsletter input[type="email"]:focus { border-color: var(--caramel); background: rgba(244,237,226,0.1); }
.newsletter .btn.caramel { padding: 13px 24px; }

/* ─── Footer ─── */
footer {
  padding: 48px 0 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-soft);
}
footer .grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px;
  padding-bottom: 36px;
}
footer h5 {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--brown); margin: 0 0 14px;
}
footer .col p { margin: 0 0 8px; line-height: 1.55; }
footer .col a { display: block; margin: 6px 0; color: var(--ink-soft); }
footer .col a:hover { color: var(--rust); }
footer .brand-foot { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
footer .brand-foot svg { width: 32px; height: 32px; color: var(--ink); }
footer .brand-foot b { font-family: var(--font-display); font-size: 22px; color: var(--ink); letter-spacing: -0.01em; }
footer .bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 22px; border-top: 1px dashed var(--line);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--brown);
}

/* ─── Responsive ─── */
@media (max-width: 980px) {
  :root { --gutter: 24px; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 36px 0; }
  .topbar nav { display: none; }
  .topbar .right { display: flex; }
  .mix-grid { gap: 22px; }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .span-4.sm-half, .span-6.sm-half { grid-column: span 6; }
  .section-head h3 { font-size: 28px; }
  footer .grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 560px) {
  :root { --gutter: 18px; }
  .masthead { padding: 32px 0 24px; }
  .brand-row { gap: 12px; }
  .brand-mark svg { width: 52px; height: 52px; }
  .standfirst { font-size: 16.5px; }
  .standfirst::first-letter { font-size: 44px; }
  .mix-grid { gap: 28px; }
  .span-4.sm-half, .span-6.sm-half { grid-column: span 12; }
  .newsletter { padding: 44px var(--gutter); }

  /* Footer móvil — espaciado generoso, separadores, tap-friendly */
  footer { padding: 36px 0 22px; font-size: 14px; }
  footer .grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 24px;
  }
  footer .col {
    padding: 22px 0;
    border-top: 1px dashed var(--line);
  }
  footer .col:first-child {
    padding-top: 0;
    border-top: 0;
  }
  footer .brand-foot { margin-bottom: 14px; }
  footer .brand-foot b { font-size: 20px; }
  footer .col p { font-size: 14px; line-height: 1.6; max-width: 100%; color: var(--brown); }
  footer h5 { margin-bottom: 12px; font-size: 11px; }
  footer .col a {
    margin: 0;
    padding: 11px 0;
    border-bottom: 1px solid var(--line-soft, rgba(122,79,42,.08));
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  footer .col a:last-child { border-bottom: 0; }
  footer .col a[style] {
    /* anula el "acceso editor →" inline opacity en mobile para que sea visible */
    opacity: 1 !important;
    font-size: 13px !important;
    margin-top: 8px !important;
    color: var(--brown);
  }
  footer .bottom {
    flex-direction: column;
    gap: 14px;
    padding-top: 22px;
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.14em;
    line-height: 1.6;
  }
  footer .bottom > span:first-child { line-height: 1.7; }
  footer .bottom a {
    display: inline-block;
    padding: 6px 10px;
    margin: 0 2px !important;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 10px;
  }
}

/* ─────────────────────────────────────────────
 * GALERÍA · Grid editorial en post tipo gallery
 * ─────────────────────────────────────────────*/
.gallery-public {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}
.gallery-public .g-fig {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.gallery-public .g-fig-hero {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery-public .g-img {
  background: var(--paper-warm);
  background-size: cover;
  background-position: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.gallery-public .g-fig-hero .g-img { aspect-ratio: 1 / 1; }
.gallery-public figcaption {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--brown);
  margin-top: 8px;
  line-height: 1.35;
}
.gallery-public .g-num {
  font-weight: 600;
  color: var(--rust);
  margin-right: 6px;
}
@media (max-width: 720px) {
  .gallery-public { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery-public .g-fig-hero { grid-column: span 2; grid-row: auto; }
}

/* ─────────────────────────────────────────────
 * GUÍA · Tabla comparativa editorial
 * ─────────────────────────────────────────────*/
.guide-compare {
  margin: 28px 0;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.guide-compare table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  font-family: var(--font-body, 'Source Serif Pro', Georgia, serif);
  font-size: 15px;
}
.guide-compare thead th {
  text-align: left;
  padding: 16px 18px;
  background: var(--paper-warm, #ede2cb);
  border-bottom: 2px solid var(--ink, #2c1810);
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink, #2c1810);
  text-transform: none;
  white-space: nowrap;
}
.guide-compare thead th span {
  display: inline-block;
  position: relative;
}
.guide-compare thead th:not(.first-col) span::after {
  content: '';
  display: block;
  width: 24px; height: 2px;
  background: var(--rust, #7a4f2a);
  margin-top: 6px;
}
.guide-compare thead th.first-col {
  background: var(--ink, #2c1810);
  color: var(--cream, #faf3e7);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.guide-compare tbody tr {
  border-top: 1px solid var(--line-soft, rgba(122,79,42,.12));
  transition: background .15s;
}
.guide-compare tbody tr:nth-child(even) { background: rgba(122,79,42,.025); }
.guide-compare tbody tr:hover { background: rgba(122,79,42,.06); }
.guide-compare td {
  padding: 14px 18px;
  vertical-align: top;
  color: var(--ink, #2c1810);
  line-height: 1.45;
}
.guide-compare td.first-col {
  background: rgba(28,16,10,.04);
  border-right: 1px solid var(--line-soft, rgba(122,79,42,.12));
  font-weight: 600;
  white-space: nowrap;
  width: 1%;
}
.guide-compare td.first-col .cell-label {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 15px;
  color: var(--ink, #2c1810);
}

/* Badges para celdas especiales */
.guide-compare .cell-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 100px;
  font-family: var(--font-sans, 'Work Sans', sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
  white-space: nowrap;
}
.guide-compare .cell-badge-win {
  background: var(--rust, #7a4f2a);
  color: var(--cream, #faf3e7);
  box-shadow: 0 1px 3px rgba(122,79,42,.3);
}
.guide-compare .cell-badge-low {
  background: rgba(28,16,10,.08);
  color: var(--brown, #7a4f2a);
}
.guide-compare td.cell-win {
  position: relative;
}
.guide-compare td.cell-win::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--rust, #7a4f2a);
}

@media (max-width: 720px) {
  .guide-compare { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); border-radius: 0; border-left: 0; border-right: 0; }
  .guide-compare table { font-size: 14px; }
  .guide-compare thead th, .guide-compare td { padding: 12px 14px; }
}
