/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── VARIABLES ── */
:root {
  --bg: #0a0a0a; --bg3: #161616;
  --line: rgba(255,255,255,0.07); --line2: rgba(255,255,255,0.14);
  --text: #f0ede8; --muted: rgba(240,237,232,0.62);
  --faint: rgba(240,237,232,0.40); --accent: #f5c842; --yellow: #f5c842;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'DM Sans', sans-serif; font-weight: 300; line-height: 1.6; overflow-x: hidden; }

/* ── CONTAINER ── */
.container { max-width: 780px; margin: 0 auto; padding: 0 32px; }

/* ── NAV ── */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px; border-bottom: 0.5px solid var(--line);
  background: var(--bg); position: sticky; top: 0; z-index: 100;
}
.nav-logo { font-size: 14px; font-weight: 400; letter-spacing: 0.06em; color: var(--text); text-decoration: none; white-space: nowrap; }
.nav-logo span { color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; margin-left: auto; }
.nav-links a { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-highlight { color: var(--yellow); border: 0.5px solid var(--yellow); padding: 5px 12px; border-radius: 99px; font-weight: 500; transition: background 0.2s, color 0.2s; }
.nav-links a.nav-highlight:hover { background: var(--yellow); color: #000; }
.nav-links a.nav-login { color: var(--text); border: 0.5px solid var(--line2); padding: 5px 14px; border-radius: 99px; transition: all 0.2s; }
.nav-links a.nav-login:hover { border-color: var(--text); }

/* ── FOOTER ── */
footer { border-top: 0.5px solid var(--line); margin-top: 64px; padding: 20px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; max-width: 780px; margin: 0 auto; padding: 0 32px; }
.footer-left { font-size: 12px; color: var(--faint); letter-spacing: 0.04em; }
.footer-links { display: flex; gap: 20px; align-items: center; }
.footer-links a { font-size: 12px; color: rgba(240,237,232,0.45); text-decoration: none; letter-spacing: 0.06em; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-links a.footer-highlight { color: var(--yellow); border: 0.5px solid var(--yellow); padding: 4px 10px; border-radius: 99px; font-weight: 500; }
.footer-links a.footer-highlight:hover { background: var(--yellow); color: #000; }

/* ── ANIMACIONES ── */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }

/* ── HERO INDEX ── */
.hero { padding: 80px 0 72px; border-bottom: 0.5px solid var(--line); }
.eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; opacity:0; animation: fadeUp 0.8s 0.1s forwards; }
.hero-name { font-family: 'Cormorant Garamond', serif; font-size: clamp(64px, 8vw, 104px); font-weight: 300; line-height: 0.9; letter-spacing: -0.02em; color: var(--text); margin-bottom: 28px; opacity:0; animation: fadeUp 0.8s 0.25s forwards; }
.hero-name strong { font-weight: 500; display: block; }
.hero-tagline { font-size: 20px; color: var(--muted); line-height: 1.7; max-width: 480px; margin-bottom: 36px; opacity:0; animation: fadeUp 0.8s 0.4s forwards; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; opacity:0; animation: fadeUp 0.8s 0.55s forwards; }
.chip { font-size: 12px; padding: 6px 15px; border: 0.5px solid var(--line2); border-radius: 99px; color: var(--muted); letter-spacing: 0.04em; text-decoration: none; transition: all 0.2s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.hero-cta { opacity:0; animation: fadeUp 0.8s 0.7s forwards; }
.btn-ghost-cta { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); text-decoration: none; border: 0.5px solid var(--line2); padding: 10px 24px; border-radius: 99px; transition: all 0.2s; display: inline-block; }
.btn-ghost-cta:hover { border-color: var(--text); color: var(--text); }

/* ── FACETAS INDEX ── */
.facets-section { padding: 48px 0 0; }
.facets-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-family: 'DM Sans', sans-serif; font-size: 24px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.section-title span { color: var(--accent); }
.section-count { font-size: 12px; color: var(--faint); }
.facets-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 0.5px solid var(--line); border-radius: 4px; overflow: hidden; }
.facet { background: var(--bg); padding: 28px 20px 24px; cursor: pointer; transition: background 0.2s; position: relative; text-decoration: none; display: block; color: inherit; }
.facet:hover { background: var(--bg3); }
.facet:hover .facet-arrow { opacity: 1; transform: translate(0,0); }
.facet-num { font-family: 'Cormorant Garamond', serif; font-size: 11px; color: var(--faint); margin-bottom: 14px; }
.facet-icon { font-size: 22px; margin-bottom: 10px; display: block; }
.facet-name { font-size: 15px; font-weight: 400; color: rgba(240,237,232,0.92); margin-bottom: 4px; }
.facet-desc { font-size: 12px; color: var(--faint); line-height: 1.45; }
.facet-arrow { position: absolute; top: 18px; right: 14px; font-size: 11px; color: var(--accent); opacity: 0; transform: translate(-4px,4px); transition: all 0.2s; }

/* ── FACETA PAGE ── */
.hero-faceta { min-height: 52vh; display: flex; flex-direction: column; justify-content: flex-end; padding: 64px 0 52px; border-bottom: 0.5px solid var(--line); }
.hero-icon { font-size: 52px; margin-bottom: 20px; opacity:0; animation: fadeUp 0.7s 0.1s forwards; }
.hero-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; opacity:0; animation: fadeUp 0.7s 0.2s forwards; }
.hero-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(52px, 7vw, 88px); font-weight: 300; line-height: 0.92; letter-spacing: -0.02em; color: var(--text); margin-bottom: 24px; opacity:0; animation: fadeUp 0.7s 0.3s forwards; }
.hero-desc { font-size: 17px; color: var(--muted); line-height: 1.7; max-width: 560px; opacity:0; animation: fadeUp 0.7s 0.45s forwards; }
.content-section { padding: 56px 0; border-bottom: 0.5px solid var(--line); }
.content-section h2 { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 400; color: var(--text); margin-bottom: 20px; }
.content-section p { font-size: 16px; color: var(--muted); line-height: 1.8; max-width: 640px; margin-bottom: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag { font-size: 11px; padding: 5px 14px; border: 0.5px solid var(--line2); border-radius: 99px; color: var(--muted); letter-spacing: 0.04em; }
.cta-section { padding: 56px 0; display: flex; align-items: center; justify-content: space-between; }
.cta-text h3 { font-family: 'Cormorant Garamond', serif; font-size: 36px; font-weight: 300; color: var(--text); margin-bottom: 8px; }
.cta-text p { font-size: 15px; color: var(--muted); max-width: 400px; }
.btn-cta { display: inline-block; font-size: 13px; font-weight: 400; letter-spacing: 0.08em; padding: 14px 32px; background: var(--text); color: var(--bg); border-radius: 99px; text-decoration: none; transition: opacity 0.2s; white-space: nowrap; margin-left: 32px; flex-shrink: 0; }
.btn-cta:hover { opacity: 0.85; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--faint); text-decoration: none; letter-spacing: 0.06em; padding: 24px 0 0; transition: color 0.2s; }
.back-link:hover { color: var(--text); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 14px 20px; flex-direction: column; gap: 10px; }
  .nav-links { margin-left: 0; gap: 12px; justify-content: center; }
  .nav-links a { font-size: 10px; }
  .container { padding: 0 20px; }
  .hero { padding: 48px 0 44px; }
  .hero-name { font-size: clamp(52px, 13vw, 80px); }
  .hero-tagline { font-size: 16px; }
  .facets-grid { grid-template-columns: repeat(2, 1fr); }
  .facets-section { padding: 36px 0 0; }
  footer { margin-top: 40px; }
  .footer-inner { flex-direction: column; gap: 14px; text-align: center; }
  .footer-left { padding-bottom: 10px; border-bottom: 0.5px solid var(--line); width: 100%; }
  .footer-links { justify-content: center; gap: 14px; }
  .hero-faceta { padding: 40px 0 36px; min-height: auto; }
  .hero-title { font-size: clamp(40px, 11vw, 64px); }
  .hero-desc { font-size: 15px; }
  .content-section { padding: 36px 0; }
  .cta-section { flex-direction: column; align-items: flex-start; gap: 24px; padding: 36px 0; }
  .btn-cta { margin-left: 0; }
}

/* ── CUENTOS (pública lista + lector) ── */
.cuentos-page { padding-bottom: 72px; }
.cuentos-hero { padding: 56px 0 36px; border-bottom: 0.5px solid var(--line); margin-bottom: 32px; }
.cuentos-hero-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(40px, 6vw, 64px); font-weight: 300; letter-spacing: -0.02em; margin-bottom: 14px; }
.cuentos-hero-lead { font-size: 16px; color: var(--muted); max-width: 560px; line-height: 1.75; }
.cuentos-hero-actions { margin-top: 20px; }
.btn-cuento-primary, .btn-cuento-ghost, .btn-cuento-submit {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 11px 22px; border-radius: 99px; text-decoration: none; border: 0.5px solid transparent;
  font-family: 'DM Sans', sans-serif; font-weight: 400; cursor: pointer; transition: all 0.2s;
}
.btn-cuento-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-cuento-primary:hover { opacity: 0.88; }
.btn-cuento-ghost { color: var(--muted); border-color: var(--line2); background: transparent; }
.btn-cuento-ghost:hover { color: var(--text); border-color: var(--text); }
.cuentos-empty { text-align: center; padding: 56px 0 40px; color: var(--muted); }
.cuentos-empty-icon { font-size: 42px; margin-bottom: 16px; opacity: 0.85; }
.cuentos-empty-text { font-size: 17px; margin-bottom: 16px; color: var(--text); }
.cuentos-empty-sub { font-size: 14px; }
.cuentos-empty-sub a { color: var(--accent); text-decoration: none; }
.cuentos-empty-sub a:hover { text-decoration: underline; }
.cuentos-grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) {
  .cuentos-grid { grid-template-columns: 1fr; gap: 32px; }
}

.cuento-row { display: flex; gap: 40px; align-items: start; padding: 24px 0; border-bottom: 0.5px solid var(--line); width: 100%; overflow: hidden; }
.cuento-row:last-child { border-bottom: none; }
.cuento-col-left { flex: 1; min-width: 0; }
.cuento-col-right { width: 240px; flex-shrink: 0; }
.cuento-row-title { font-family: 'Cormorant Garamond', serif; font-size: 38px; font-weight: 400; line-height: 1.1; margin-bottom: 12px; }
.cuento-row-title a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.cuento-row-title a:hover { color: var(--accent); }
.cuento-row-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; font-size: 13px; color: var(--faint); }
.cuento-meta-item { display: flex; align-items: center; gap: 6px; }
.cuento-meta-item svg { width: 14px; height: 14px; fill: currentColor; }
.cuento-row-preview { font-size: 15px; color: var(--muted); line-height: 1.65; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-wrap: break-word; overflow-wrap: break-word; }
.cuento-row-link { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: all 0.2s; }
.cuento-row-link:hover { border-bottom-color: var(--accent); }
.cuento-row-thumb { width: 100%; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; border: 0.5px solid var(--line); background: var(--bg3); }
.cuento-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 768px) {
  .cuento-row { flex-direction: column-reverse; gap: 20px; }
  .cuento-col-right { width: 100%; }
  .cuento-row-title { font-size: 32px; }
}
.cuento-card { border-radius: 12px; border: 0.5px solid var(--line); background: var(--bg3); overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
.cuento-card:hover { border-color: var(--line2); transform: translateY(-2px); }
.cuento-card-link { display: block; color: inherit; text-decoration: none; }
.cuento-card-media { aspect-ratio: 16 / 10; background: #111; overflow: hidden; }
.cuento-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cuento-card-placeholder { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 36px; color: var(--faint); letter-spacing: 0.2em; }
.cuento-card-body { padding: 18px 20px 20px; }
.cuento-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; font-size: 11px; color: var(--faint); letter-spacing: 0.06em; text-transform: uppercase; }
.cuento-card-date, .cuento-card-time { color: var(--muted); }
.cuento-card-title { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 400; line-height: 1.2; margin-bottom: 8px; }
.cuento-card-tagline { font-size: 14px; color: var(--muted); line-height: 1.55; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cuento-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 0.5px solid var(--line); margin-top: 4px; padding-top: 14px; }
.cuento-card-cta { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.cuento-card:hover .cuento-card-cta { color: var(--text); }
.cuento-status { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; border: 0.5px solid var(--line2); color: var(--muted); }
.cuento-status.is-pub { color: #8fd4a4; border-color: rgba(143,212,164,0.35); }
.cuento-status.is-draft { color: #e0c48a; border-color: rgba(224,196,138,0.35); }
.cuento-pill { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; border: 0.5px solid var(--line2); color: var(--muted); }
.cuento-pill-pend { color: #e0c48a; border-color: rgba(224,196,138,0.45); }
.cuento-flash { margin: 0 0 20px; padding: 12px 16px; border-radius: 8px; font-size: 14px; border: 0.5px solid var(--line2); }
.cuento-flash.ok { background: rgba(143,212,164,0.08); border-color: rgba(143,212,164,0.35); color: #b8e6c4; }
.cuento-flash.error { background: rgba(220,80,80,0.08); border-color: rgba(220,80,80,0.35); color: #f0a8a8; }

.cuento-read { padding-bottom: 80px; }
.cuento-read-inner { max-width: 720px; }
.cuento-read-header { padding: 32px 0 24px; border-bottom: 0.5px solid var(--line); margin-bottom: 28px; }
.cuento-read-cover { margin: 0 0 20px; border-radius: 10px; overflow: hidden; border: 0.5px solid var(--line); }
.cuento-read-cover img { width: 100%; height: auto; display: block; vertical-align: middle; }
.cuento-read-meta { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.cuento-read-date, .cuento-read-time { color: var(--muted); }
.cuento-read-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(36px, 6vw, 52px); font-weight: 400; line-height: 1.08; margin-bottom: 12px; }
.cuento-read-tagline { font-size: 18px; color: var(--muted); line-height: 1.65; max-width: 640px; }
.cuento-read-sep { border: none; border-top: 1px solid #fff; margin: 24px 0; opacity: 0.8; }
.cuento-body { font-size: 18px; line-height: 1.85; color: rgba(240,237,232,0.92); margin-bottom: 48px; width: 100%; word-wrap: break-word; overflow-wrap: break-word; }
.cuento-body p { margin-bottom: 1em; }
.cuento-body h1, .cuento-body h2, .cuento-body h3 { font-family: 'Cormorant Garamond', serif; font-weight: 400; margin: 1.4em 0 0.5em; color: var(--text); }
.cuento-body h2 { font-size: 32px; }
.cuento-body h3 { font-size: 24px; }
.cuento-body blockquote { border-left: 3px solid var(--accent); padding-left: 16px; margin: 1.2em 0; color: var(--muted); }
.cuento-body a { color: var(--accent); }
.cuento-body img { max-width: 100%; border-radius: 6px; height: auto; }
.cuento-body-html .ql-editor { min-height: 0; }
.cuento-empty { color: var(--muted); font-size: 16px; margin-bottom: 40px; }

.cuento-comments { padding-top: 8px; border-top: 0.5px solid var(--line); }
.cuento-comments-title { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 400; margin-bottom: 20px; }
.cuento-comments-empty { color: var(--muted); margin-bottom: 20px; font-size: 15px; }
.cuento-comment-list { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.cuento-comment { padding: 16px 18px; border-radius: 10px; border: 0.5px solid var(--line); background: var(--bg3); }
.cuento-comment-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; margin-bottom: 8px; font-size: 12px; color: var(--faint); }
.cuento-comment-author { color: var(--text); font-weight: 500; letter-spacing: 0.04em; }
.cuento-comment-text { font-size: 15px; color: rgba(240,237,232,0.88); line-height: 1.65; }
.cuento-comment-form { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.cuento-comment-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cuento-comment-form textarea {
  width: 100%; min-height: 120px; resize: vertical; padding: 14px 16px; border-radius: 8px;
  border: 0.5px solid var(--line2); background: #111; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 15px; line-height: 1.55; outline: none;
}
.cuento-comment-form textarea:focus { border-color: var(--accent); }
.btn-cuento-submit { align-self: flex-start; margin-top: 4px; background: var(--accent); color: #141414; border-color: var(--accent); }
.btn-cuento-submit:hover { filter: brightness(1.05); }
.cuento-comment-guest { padding: 16px 18px; border-radius: 10px; border: 0.5px dashed var(--line2); color: var(--muted); font-size: 15px; }
.cuento-comment-guest a { color: var(--accent); text-decoration: none; }
.cuento-comment-guest a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .cuentos-hero { padding: 40px 0 28px; }
  .cuento-read-header { padding-top: 16px; }
  .cuento-body { font-size: 17px; }
}

