:root {
  --ink: #24171b;
  --muted: #74666a;
  --paper: #f8f3ee;
  --cream: #fffaf5;
  --wine: #6f1835;
  --wine-dark: #3b0d20;
  --blush: #e8cfd2;
  --line: rgba(59, 13, 32, .14);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.65 var(--sans); }
a { color: inherit; }
img { max-width: 100%; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 20; padding: .65rem 1rem; background: var(--cream); }
.shell { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(248,243,238,.94); backdrop-filter: blur(14px); }
.nav { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: baseline; color: var(--wine-dark); font: 700 1.28rem var(--serif); text-decoration: none; letter-spacing: -.02em; }
.brand::before { content: "✦"; margin-right: .48rem; color: var(--wine); font: .62rem var(--sans); transform: translateY(-.12rem); }
.brand span { margin-left: .06em; color: var(--wine); font-style: italic; font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 1rem; font-size: .88rem; }
.nav-links a { text-decoration: none; }
.nav-links a:hover, .footer a:hover { color: var(--wine); }
.eyebrow { color: var(--wine); font-size: .73rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.08; }
h1 { margin: .6rem 0 1.25rem; font-size: clamp(2.7rem, 8vw, 6.8rem); font-weight: 500; letter-spacing: -.045em; }
h2 { margin: 0 0 1rem; font-size: clamp(2rem, 4vw, 3.8rem); font-weight: 500; }
h3 { margin: 0; font-size: 1.45rem; }
.lede { max-width: 660px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.hero { padding: 3.5rem 0 4rem; background: linear-gradient(145deg, var(--cream), var(--paper)); }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-copy { max-width: 710px; }
.hero h1 { max-width: 760px; }
.hero-art { position: relative; min-height: 360px; overflow: hidden; border-radius: 10rem 10rem 1.3rem 1.3rem; box-shadow: 0 30px 75px rgba(59,13,32,.16); }
.hero-art img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; filter: saturate(.75) contrast(.96); }
.hero-art::after { content: "Relato de la semana"; position: absolute; right: 1rem; bottom: 1rem; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: .55rem .8rem; color: white; background: rgba(38,8,19,.64); backdrop-filter: blur(9px); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { display: inline-block; border: 1px solid var(--wine); border-radius: 999px; padding: .72rem 1.15rem; color: var(--wine); font-weight: 750; text-decoration: none; }
.button.primary { color: white; background: var(--wine); }
.section { padding: 5rem 0; }
.section.alt { background: var(--cream); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section-head a { color: var(--wine); font-weight: 700; }
.grid { display: grid; gap: 1rem; }
.stories { grid-template-columns: 1fr; }
.card { min-height: 370px; display: flex; flex-direction: column; justify-content: end; position: relative; overflow: hidden; padding: 1.4rem; border: 1px solid var(--line); border-radius: 1.25rem; color: white; background: var(--wine-dark); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 28%, rgba(25,5,13,.88) 100%); }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card > :not(img) { position: relative; z-index: 2; }
.card:hover img { transform: scale(1.025); }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(59,13,32,.08); }
.meta { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-bottom: .5rem; color: var(--wine); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.card .meta { color: #f5dce2; }
.card p { margin: .6rem 0 0; color: rgba(255,255,255,.78); }
.card h3 { font-size: clamp(1.65rem, 3vw, 2.45rem); }
.chips { display: flex; flex-wrap: wrap; gap: .65rem; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: .55rem .85rem; background: var(--cream); text-decoration: none; }
.reader { width: min(720px, calc(100% - 2rem)); margin: 0 auto; padding: 5rem 0; }
.reader h1 { font-size: clamp(2.8rem, 8vw, 5rem); }
.reader h2 { margin-top: 3rem; font-size: clamp(1.55rem, 4vw, 2.25rem); }
.reader code { overflow-wrap: anywhere; font-size: .9em; }
.reader-body { margin-top: 3rem; font: 1.18rem/1.76 var(--serif); }
.reader-body p:first-child::first-letter { float: left; margin: .08em .12em 0 0; color: var(--wine); font-size: 4.2rem; line-height: .8; }
.story-cover { width: 100%; aspect-ratio: 16 / 9; margin: 2rem 0; overflow: hidden; border-radius: 1.3rem; }
.story-cover img { width: 100%; height: 100%; object-fit: cover; }
.reader-tools { position: sticky; top: 82px; z-index: 8; display: flex; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,250,245,.94); backdrop-filter: blur(10px); color: var(--muted); font-size: .8rem; }
.reader-tools button { border: 0; color: var(--wine); background: transparent; cursor: pointer; font: 750 .8rem var(--sans); }
.reading-progress { position: fixed; top: 0; left: 0; z-index: 30; width: 0; height: 3px; background: var(--wine); }
.reader.large-text .reader-body { font-size: 1.32rem; }
.collection { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.collection-card { min-height: 170px; display: flex; flex-direction: column; justify-content: space-between; padding: 1.4rem; border: 1px solid var(--line); border-radius: 1.2rem; background: var(--cream); text-decoration: none; }
.collection-card strong { color: var(--wine); font: 500 1.6rem/1.1 var(--serif); }
.mobile-nav { display: none; }
.notice { margin: 2rem 0; border-left: 3px solid var(--wine); padding: 1rem 1.25rem; background: var(--cream); color: var(--muted); }
.footer { padding: 3rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; gap: 2rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: .7rem 1.2rem; }
.age-gate[hidden] { display: none; }
.age-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; background: rgba(31,8,17,.92); }
.age-dialog { width: min(480px, 100%); border-radius: 1.4rem; padding: 2rem; background: var(--cream); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.age-dialog h2 { font-size: 2.25rem; }
.age-dialog p { color: var(--muted); }
.age-actions { display: grid; gap: .75rem; }
.age-actions button, .age-actions a { width: 100%; cursor: pointer; font: inherit; text-align: center; }
.empty { padding: 3rem; border: 1px dashed var(--line); border-radius: 1rem; text-align: center; color: var(--muted); }

@media (min-width: 720px) {
  .shell { width: min(1120px, calc(100% - 4rem)); }
  .stories { grid-template-columns: repeat(3, 1fr); }
  .card:first-child { grid-column: span 2; }
  .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); }
  .hero-art { min-height: 540px; }
  .collection { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr auto; align-items: end; }
  .age-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .nav-links a:not(.button) { display: none; }
  body { padding-bottom: 68px; }
  .hero { padding-top: 2rem; }
  .hero-art { min-height: 300px; border-radius: 7rem 7rem 1.2rem 1.2rem; }
  .hero h1 { font-size: clamp(2.75rem, 14vw, 4rem); }
  .section-head { display: block; }
  .section-head > a { display: inline-block; margin-top: .5rem; }
  .card { min-height: 420px; }
  .collection { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; left: .75rem; right: .75rem; bottom: .65rem; z-index: 25; display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); border-radius: 1.1rem; padding: .45rem; background: rgba(255,250,245,.96); box-shadow: 0 12px 35px rgba(59,13,32,.14); backdrop-filter: blur(14px); }
  .mobile-nav a { padding: .45rem .15rem; color: var(--muted); font-size: .7rem; font-weight: 750; text-align: center; text-decoration: none; }
  .reader-tools { top: 75px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card { transition: none; } }
