/* ═══════════════════════════════════════════════════════════════════════════
   Kabi — hoja de estilo única. "Editorial Rural", la misma identidad que la app.
   Paleta y tipografías tomadas de frontend/lib/styles/app_styles.dart.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tipografías propias ─────────────────────────────────────────────────
   WOFF2 recortadas al alfabeto que usa la web (ver src/assets/_optimizar.py).
   Las tres juntas pesan 140 KB en vez de los 426 KB de los TTF originales.
   Nada de Google Fonts: ni rastreo, ni terceros, ni problema de RGPD.        */
@font-face {
  font-family: 'Libre Caslon Text';
  src: url('/assets/fonts/LibreCaslonText-Variable.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Libre Caslon Text';
  src: url('/assets/fonts/LibreCaslonText-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/assets/fonts/HankenGrotesk-Variable.woff2') format('woff2-variations');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  /* Superficies */
  --canvas:      #EFE8D6;   /* beige cálido, el lienzo de la app */
  --surface:     #F3EDE1;
  --card:        #E8E1D3;
  --card-high:   #E3DCCD;
  --divider:     #DDD5C5;
  --dim:         #D5CCBA;

  /* Tinta */
  --ink:         #1C1C15;   /* Warm Ink */
  --ink-soft:    #424845;   /* Stone Gray */
  --ink-faint:   #7C8079;

  /* Marca */
  --forest:      #173028;   /* Deep Forest */
  --forest-deep: #0E1F18;   /* Night Forest */
  --sage:        #3E6B57;   /* Sage Forest */
  --mint:        #CCE9DD;   /* Mint Mist */
  --terracotta:  #974822;
  --clay:        #B05A4C;
  --wheat:       #C08A2E;
  --ochre:       #AE7C47;
  --slate:       #5C7E88;

  /* Ritmo */
  --wrap: 1180px;
  --gap: clamp(1rem, 2.5vw, 1.75rem);
  --band-y: clamp(4.5rem, 11vw, 9rem);
  --radius: 18px;
  --radius-lg: 28px;

  /* Tipografía fluida */
  --fs-display: clamp(2.6rem, 6vw, 4.6rem);
  --fs-h2:      clamp(2rem, 4.6vw, 3.4rem);
  --fs-h3:      clamp(1.28rem, 2.1vw, 1.6rem);
  --fs-lead:    clamp(1.08rem, 1.65vw, 1.32rem);
  --fs-body:    clamp(1rem, 1.15vw, 1.08rem);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 1px 2px rgba(23,48,40,.04), 0 8px 28px -12px rgba(23,48,40,.16);
  --shadow-lg: 0 2px 6px rgba(23,48,40,.05), 0 30px 60px -28px rgba(23,48,40,.3);
}

/* SIN MODO OSCURO, A PROPOSITO.
   La app no tiene tema oscuro: main.dart define solo `AppStyles.lightTheme`,
   no existe ningun `darkTheme` y 39 pantallas lo fuerzan explicitamente.
   "Editorial Rural" ES papel calido con tinta bosque; invertirlo en la web
   dejaba el fondo verde oscuro y no se parecia en nada a la app. */
/* ── Base ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  /* Le dice al navegador que esta web es clara: si no, en modo oscuro
     invierte por su cuenta selects, inputs y barras de scroll. */
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5.5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grano de papel: da el punto "impreso" sin pesar nada */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: 'Libre Caslon Text', 'Iowan Old Style', Georgia, serif;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.018em;
  color: var(--forest);
  text-wrap: balance;
}

a { color: inherit; }
::selection { background: var(--mint); color: var(--forest-deep); }

:focus-visible {
  outline: 2.5px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; position: relative; z-index: 2; }
.band { padding-block: var(--band-y); position: relative; }
.band--tint { background: var(--surface); }
.band--deep { background: var(--forest); color: var(--mint); }
.band--deep h2, .band--deep h3 { color: #F1EADA; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--forest); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* ── Rótulos editoriales ─────────────────────────────────────────────────── */
.eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terracotta);
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: '';
  width: 2rem; height: 1px;
  background: currentColor;
  opacity: .55;
  flex: none;
}
.band--deep .eyebrow { color: var(--wheat); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  margin-top: 1.1rem;
  text-wrap: pretty;
}
.band--deep .section-head p { color: #C7D8CD; }

/* ── Navegación ──────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: saturate(1.5) blur(14px);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-stuck { border-bottom-color: var(--divider); }
.nav__inner {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  display: flex; align-items: center; gap: 1.5rem;
  height: 4.6rem;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span {
  font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: 1.42rem;
  color: var(--forest);
  letter-spacing: -.01em;
}
.nav__links { display: flex; align-items: center; gap: 1.9rem; }
.nav__link {
  text-decoration: none;
  font-size: .93rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding-block: .3rem;
  transition: color .2s;
}
.nav__link::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: var(--terracotta);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__link:hover { color: var(--forest); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--forest); }

.nav__toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  padding: .5rem; color: var(--forest);
}

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 4.6rem 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--divider);
    padding: .5rem 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__link { padding: .95rem .25rem; border-bottom: 1px solid var(--divider); font-size: 1.05rem; }
  .nav__link::after { display: none; }
  .nav__links .btn { margin-top: 1rem; text-align: center; justify-content: center; }
}

/* ── Botones ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .82rem 1.55rem;
  border-radius: 999px;
  font-size: .95rem; font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s;
  white-space: nowrap;
}
.btn--primary { background: var(--forest); color: #F1EADA; box-shadow: var(--shadow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); background: var(--forest-deep); }
.btn--ghost { border-color: var(--divider); color: var(--forest); background: transparent; }
.btn--ghost:hover { border-color: var(--forest); transform: translateY(-2px); }
.btn--warm { background: var(--terracotta); color: #FFF3EC; }
.btn--warm:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.band--deep .btn--ghost { border-color: rgba(241,234,218,.35); color: #F1EADA; }
.band--deep .btn--ghost:hover { border-color: #F1EADA; }

/* ── Botones de tienda ───────────────────────────────────────────────────── */
.store-row { display: flex; flex-wrap: wrap; gap: .9rem; }
.store {
  display: inline-flex; align-items: center; gap: .75rem;
  padding: .7rem 1.3rem .7rem 1.05rem;
  background: var(--forest); color: #F1EADA;
  border-radius: 14px; text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s;
  box-shadow: var(--shadow);
}
.store:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.store svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store b { display: block; font-size: .97rem; font-weight: 600; line-height: 1.15; }
.store small { display: block; font-size: .68rem; opacity: .72; letter-spacing: .08em; text-transform: uppercase; }
.band--deep .store { background: #F1EADA; color: var(--forest); }

/* ── Héroe ───────────────────────────────────────────────────────────────── */
.hero { position: relative; padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero::after {
  content: '';
  position: absolute; z-index: 0;
  width: 62vw; height: 62vw; max-width: 780px; max-height: 780px;
  right: -18vw; top: -22vw;
  background: radial-gradient(circle, color-mix(in srgb, var(--mint) 62%, transparent) 0%, transparent 68%);
  pointer-events: none;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 {
  font-size: var(--fs-display);
  letter-spacing: -.032em;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--terracotta);
}
.hero__lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 34rem;
  text-wrap: pretty;
  margin-bottom: 2.2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; margin-bottom: 2.4rem; }
.hero__note { font-size: .87rem; color: var(--ink-faint); display: flex; align-items: center; gap: .5rem; }

.facts { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--divider); }
.fact { padding: 1.15rem 1.6rem 0 0; margin-right: 1.6rem; border-right: 1px solid var(--divider); }
.fact:last-child { border-right: 0; margin-right: 0; }
.fact b {
  display: block;
  font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: 1.62rem; font-weight: 400; color: var(--forest);
  line-height: 1.1;
}
.fact span { font-size: .78rem; color: var(--ink-faint); letter-spacing: .04em; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
}

/* ── Maqueta de móvil ────────────────────────────────────────────────────── */
.phones { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0; }
.phone {
  position: relative;
  width: min(50%, 244px);
  aspect-ratio: 1170 / 2532;
  border-radius: 34px;
  background: var(--forest-deep);
  padding: 7px;
  box-shadow: var(--shadow-lg);
  transition: transform .6s var(--ease);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 27px; }
.phone::after {
  content: '';
  position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  width: 32%; height: 7px; border-radius: 99px; background: var(--forest-deep);
}
.phone--back { transform: rotate(-7deg) translate(14%, -3%) scale(.9); z-index: 1; opacity: .96; }
.phone--front { transform: rotate(3deg) translate(-8%, 0); z-index: 2; }
.phones:hover .phone--back { transform: rotate(-10deg) translate(10%, -5%) scale(.9); }
.phones:hover .phone--front { transform: rotate(2deg) translate(-10%, -2%); }

/* ── Rejillas de tarjetas ────────────────────────────────────────────────── */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--dim); }
.card h3 { font-size: var(--fs-h3); margin-bottom: .7rem; }
.card p { color: var(--ink-soft); font-size: .98rem; text-wrap: pretty; }
.band--tint .card { background: var(--canvas); }
.band--deep .card { background: rgba(241,234,218,.06); border-color: rgba(241,234,218,.14); }
.band--deep .card p { color: #C7D8CD; }

.card__icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--mint); color: var(--forest);
  margin-bottom: 1.15rem;
}
.card__icon svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.card--warm .card__icon { background: color-mix(in srgb, var(--terracotta) 16%, transparent); color: var(--terracotta); }
.card--wheat .card__icon { background: color-mix(in srgb, var(--wheat) 20%, transparent); color: var(--ochre); }
.card--slate .card__icon { background: color-mix(in srgb, var(--slate) 18%, transparent); color: var(--slate); }

/* ── Numeradas (cómo funciona) ───────────────────────────────────────────── */
.steps { counter-reset: s; display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.step { counter-increment: s; padding-top: 2.6rem; border-top: 2px solid var(--forest); position: relative; }
.step::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; top: 1rem; left: 0;
  font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: .95rem; color: var(--terracotta); letter-spacing: .08em;
}
.step h3 { font-size: var(--fs-h3); margin-bottom: .55rem; margin-top: .6rem; }
.step p { color: var(--ink-soft); font-size: .98rem; }

/* ── Lugares ─────────────────────────────────────────────────────────────── */
.places { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.place {
  position: relative; border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 3 / 4;
  background: var(--card);
  display: flex; align-items: flex-end;
  text-decoration: none;
  border: 1px solid var(--divider);
  isolation: isolate;
}
.place__bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease), filter .6s;
}
.place:hover .place__bg { transform: scale(1.06); }
.place::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(14,31,24,.9) 0%, rgba(14,31,24,.35) 45%, transparent 75%);
}
.place__txt { padding: 1.4rem; color: #F1EADA; }
.place__txt b { font-family: 'Libre Caslon Text', Georgia, serif; font-size: 1.3rem; font-weight: 400; display: block; }
.place__txt span { font-size: .82rem; opacity: .82; }

/* ── Radar / eventos ─────────────────────────────────────────────────────── */
.event {
  display: flex; gap: 1.2rem; align-items: flex-start;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--divider);
}
.event:last-child { border-bottom: 0; }
.event__date {
  flex: none; width: 5.2rem; text-align: center;
  border-right: 1px solid var(--divider); padding-right: 1rem;
}
.event__date b {
  display: block; font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: 1.75rem; font-weight: 400; color: var(--forest); line-height: 1;
}
.event__date span { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--terracotta); }
.event__body h3 { font-size: 1.12rem; margin-bottom: .25rem; }
.event__body p { font-size: .92rem; color: var(--ink-soft); }
.event__where { font-size: .78rem; color: var(--ink-faint); letter-spacing: .04em; }
.band--deep .event { border-color: rgba(241,234,218,.15); }
.band--deep .event__date { border-color: rgba(241,234,218,.15); }
.band--deep .event__date b { color: #F1EADA; }
.band--deep .event__body p { color: #C7D8CD; }

/* ── Cita ────────────────────────────────────────────────────────────────── */
.pull {
  font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  line-height: 1.28;
  font-style: italic;
  color: var(--forest);
  max-width: 40rem;
  text-wrap: balance;
}
.band--deep .pull { color: #F1EADA; }

/* ── Formularios ─────────────────────────────────────────────────────────── */
.form { display: grid; gap: 1.05rem; }
.form__row { display: grid; gap: 1.05rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .42rem; }
.field label { font-size: .82rem; font-weight: 600; letter-spacing: .03em; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .97rem;
  padding: .82rem .95rem;
  border: 1.5px solid var(--divider);
  border-radius: 12px;
  background: var(--canvas);
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.band--tint .field input, .band--tint .field select, .band--tint .field textarea { background: var(--surface); }
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 18%, transparent);
}
.form__note { font-size: .82rem; color: var(--ink-faint); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__msg { padding: .9rem 1.1rem; border-radius: 12px; font-size: .92rem; display: none; }
.form__msg.is-ok { display: block; background: var(--mint); color: var(--forest-deep); }
.form__msg.is-err { display: block; background: color-mix(in srgb, var(--clay) 20%, transparent); color: var(--terracotta); }

/* ── Prosa (legales y blog) ──────────────────────────────────────────────── */
.prose { max-width: 44rem; margin-inline: auto; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.3rem); margin-bottom: 1rem; }
.prose h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  margin-top: 2.8rem; margin-bottom: .85rem;
  padding-top: 1.4rem; border-top: 1px solid var(--divider);
}
.prose h3 { font-size: 1.18rem; margin-top: 1.9rem; margin-bottom: .6rem; }
.prose p, .prose li { color: var(--ink-soft); text-wrap: pretty; }
.prose p { margin-bottom: 1.05rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem 1.1rem; padding-left: .5rem; display: grid; gap: .45rem; }
.prose li::marker { color: var(--terracotta); }
.prose a { color: var(--sage); text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose blockquote {
  border-left: 3px solid var(--terracotta);
  padding-left: 1.3rem; margin: 1.8rem 0;
  font-family: 'Libre Caslon Text', Georgia, serif; font-style: italic;
  font-size: 1.15rem; color: var(--forest);
}
.prose hr { border: 0; border-top: 1px solid var(--divider); margin: 2.4rem 0; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em; background: var(--card); padding: .15em .42em; border-radius: 5px;
}
.prose pre {
  background: var(--forest-deep); color: #E4EFE8;
  padding: 1.2rem; border-radius: var(--radius);
  overflow-x: auto; margin-bottom: 1.4rem;
}
.prose pre code { background: none; padding: 0; color: inherit; }
.prose img { border-radius: var(--radius); margin: 1.6rem 0; }

.doc-head { text-align: center; max-width: 44rem; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); }
.doc-head .eyebrow { justify-content: center; }
.doc-head h1 { font-size: clamp(2.2rem, 5.4vw, 3.5rem); }
.doc-head p { color: var(--ink-soft); font-size: var(--fs-lead); margin-top: 1rem; }
.doc-updated {
  display: inline-block; margin-top: 1.3rem;
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint); background: var(--card); padding: .4rem .9rem; border-radius: 99px;
}

/* ── Blog ────────────────────────────────────────────────────────────────── */
.post-card {
  display: flex; flex-direction: column; gap: .55rem;
  padding: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--dim); }
.post-card__date { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--terracotta); }
.post-card__title { font-size: 1.35rem; }
.post-card__sub { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.post-card__more { font-size: .87rem; font-weight: 600; color: var(--sage); margin-top: .4rem; }

.article-head { margin-bottom: 2.5rem; }
.article-back { font-size: .85rem; color: var(--sage); text-decoration: none; display: inline-block; margin-bottom: 1.5rem; }
.article-back:hover { text-decoration: underline; }
.article-meta { font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-top: 1rem; }
.prose--article { padding-block: clamp(3rem, 7vw, 5rem); }

/* ── CTA final ───────────────────────────────────────────────────────────── */
.band--cta { background: var(--forest); color: #F1EADA; text-align: center; }
.cta-inner { display: grid; justify-items: center; gap: 1.1rem; }
.cta-title { font-size: var(--fs-h2); color: #F1EADA; max-width: 20ch; }
.cta-sub { color: #C7D8CD; font-size: var(--fs-lead); }
.band--cta .store-row { justify-content: center; margin-top: 1rem; }
.band--cta .store { background: #F1EADA; color: var(--forest); }

/* ── Página de pago (success / cancel) ───────────────────────────────────── */
.payment { min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 2rem; }
.payment__card {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: var(--radius-lg); padding: clamp(2.2rem, 5vw, 3.5rem);
  max-width: 30rem; box-shadow: var(--shadow);
}
.payment__mark {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto 1.6rem;
  background: var(--mint); color: var(--forest);
}
.payment__mark svg { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.payment__mark--warm { background: color-mix(in srgb, var(--terracotta) 16%, transparent); color: var(--terracotta); }
.payment h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: .8rem; }
.payment p { color: var(--ink-soft); margin-bottom: 1.6rem; }
.payment .btn { margin-inline: .25rem; }

/* ── Pie ─────────────────────────────────────────────────────────────────── */
.foot { background: var(--forest-deep); color: #B9CCC0; padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.foot a { color: #B9CCC0; text-decoration: none; transition: color .2s; }
.foot a:hover { color: #F1EADA; }
.foot__grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  padding-bottom: 2.5rem; border-bottom: 1px solid rgba(241,234,218,.14);
}
@media (max-width: 820px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot__grid { grid-template-columns: 1fr; } }
.foot__brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.foot__brand img { width: 34px; height: 34px; border-radius: 9px; }
.foot__brand span { font-family: 'Libre Caslon Text', Georgia, serif; font-size: 1.4rem; color: #F1EADA; }
.foot__tag { font-size: .92rem; max-width: 22rem; line-height: 1.6; }
.foot h4 {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #F1EADA; margin-bottom: 1rem;
}
.foot ul { list-style: none; padding: 0; display: grid; gap: .6rem; font-size: .92rem; }
.foot__bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  padding-top: 1.8rem; font-size: .82rem; color: #8CA396;
}

/* ── Aparición al hacer scroll ───────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ── Cifras grandes (la prueba del foso de eventos) ──────────────────────── */
.figures {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  border-top: 1px solid var(--divider);
  padding-top: clamp(1.6rem, 3vw, 2.4rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.figure b {
  display: block;
  font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 400;
  line-height: 1;
  color: var(--forest);
  letter-spacing: -.02em;
}
.figure span {
  display: block;
  margin-top: .5rem;
  font-size: .82rem;
  color: var(--ink-faint);
  letter-spacing: .03em;
}
.band--deep .figure b { color: #F1EADA; }
.band--deep .figure span { color: #9DB3A5; }
.band--deep .figures { border-color: rgba(241,234,218,.16); }

/* ── Tabla de créditos de fotos ──────────────────────────────────────────── */
.tabla-creditos { overflow-x: auto; max-width: 52rem; margin-inline: auto; }
.tabla-creditos table { border-collapse: collapse; width: 100%; min-width: 34rem; }
.tabla-creditos th {
  text-align: left; font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
  padding: 0 .9rem .7rem; border-bottom: 1px solid var(--divider);
}
.tabla-creditos td {
  padding: .9rem; border-bottom: 1px solid var(--divider);
  font-size: .92rem; color: var(--ink-soft); vertical-align: middle;
}
.tabla-creditos img { border-radius: 8px; object-fit: cover; }
.tabla-creditos a { color: var(--sage); text-underline-offset: 3px; }


/* ── Foto a sangre entre secciones ───────────────────────────────────────── */
.tira {
  position: relative;
  height: clamp(16rem, 42vw, 30rem);
  overflow: hidden;
}
.tira img { width: 100%; height: 100%; object-fit: cover; }
.tira figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: clamp(1.4rem, 4vw, 2.6rem);
  background: linear-gradient(transparent, rgba(14, 31, 24, .82));
  color: #F1EADA;
}
.tira figcaption b {
  display: block;
  font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  font-weight: 400;
}
.tira figcaption span { font-size: .86rem; opacity: .8; }

/* Foto de cabecera de las entradas del diario */
.post-hero {
  height: clamp(14rem, 34vw, 24rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.post-hero img { width: 100%; height: 100%; object-fit: cover; }

/* ═══════════════════════════════════════════════════════════════════════════
   MÓVIL — casi todo el tráfico llega del teléfono y de redes sociales
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Barra fija de descarga ──────────────────────────────────────────────── */
.cta-movil {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 55;
  display: none;
  align-items: center;
  gap: .8rem;
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--divider);
  transform: translateY(110%);
  transition: transform .4s var(--ease);
}
.cta-movil.is-on { transform: none; }
.cta-movil img { border-radius: 10px; flex: none; }
.cta-movil__txt { flex: 1; min-width: 0; line-height: 1.2; }
.cta-movil__txt b {
  display: block;
  font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: 1.05rem; font-weight: 400; color: var(--forest);
}
.cta-movil__txt small { display: block; font-size: .74rem; color: var(--ink-faint); }
.cta-movil .btn { padding: .6rem 1.1rem; font-size: .88rem; }

@media (max-width: 860px) {
  .cta-movil[hidden] { display: none; }
  .cta-movil { display: flex; }
  /* Hueco para que la barra no tape el pie */
  .foot { padding-bottom: 6rem; }
}

/* ── Ajustes de pantalla pequeña ─────────────────────────────────────────── */
@media (max-width: 640px) {
  :root {
    --band-y: clamp(3.2rem, 9vw, 5rem);   /* menos aire vertical: menos scroll */
    --wrap: 100%;
  }
  .wrap { width: calc(100% - 2rem); }

  /* Objetivos táctiles de 44 px como mínimo (guía de Apple) */
  .btn { padding: .9rem 1.5rem; min-height: 44px; }
  .store { padding: .8rem 1.2rem; min-height: 48px; }
  .nav__link { min-height: 44px; display: flex; align-items: center; }

  /* En vertical los botones de tienda a lo ancho pesan menos y se pulsan mejor */
  .hero .store-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
  .hero .store { justify-content: center; padding-inline: .7rem; }
  .hero .store small { display: none; }

  /* Las cifras del héroe, en dos columnas en vez de una fila apretada */
  .facts { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; }
  .fact { border-right: 0; margin-right: 0; padding-right: 0; padding-top: .9rem; }
  .fact b { font-size: 1.4rem; }

  .figures { grid-template-columns: 1fr 1fr; }
  .figure b { font-size: 1.9rem; }

  /* El móvil primero ve el producto y luego lee */
  .hero__grid { gap: 2rem; }
  .phone { width: min(46%, 190px); }

  .event { flex-direction: column; gap: .5rem; }
  .event__date {
    width: auto; text-align: left;
    border-right: 0; padding-right: 0;
    display: flex; align-items: baseline; gap: .5rem;
  }
  .event__date b { font-size: 1.3rem; }

  .tabla-creditos td, .tabla-creditos th { padding: .6rem .5rem; font-size: .84rem; }
}

/* El grano fijo cuesta pintura en móviles modestos y casi no se aprecia */
@media (max-width: 640px) {
  body::before { display: none; }
}
