/* ============================================================
   LA HABICHUELA — Sistema de diseño
   Editorial caribeño · pop pedagógico
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@500;600;700;800;900&family=Fredoka:wght@400;500;600;700&family=Spectral:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* Color — OKLCH, warm, tinted toward the bean (hue ~30) */
  --cream:        oklch(0.972 0.018 78);   /* paper */
  --cream-deep:   oklch(0.945 0.026 76);   /* sunk surface */
  --paper:        oklch(0.995 0.008 80);   /* cards / raised */
  --ink:          oklch(0.235 0.028 45);   /* warm cacao text */
  --ink-soft:     oklch(0.430 0.030 45);   /* secondary text */
  --ink-faint:    oklch(0.585 0.024 50);   /* meta / captions */
  --line:         oklch(0.880 0.020 60);   /* hairlines */
  --line-strong:  oklch(0.760 0.030 50);

  --bean:         oklch(0.470 0.135 24);   /* primary maroon/guinda */
  --bean-deep:    oklch(0.360 0.110 26);
  --bean-bright:  oklch(0.560 0.165 28);
  --bean-wash:    oklch(0.930 0.040 32);   /* tinted surface */

  --dulce:        oklch(0.760 0.150 66);   /* caramel / canela */
  --dulce-deep:   oklch(0.660 0.150 58);
  --dulce-wash:   oklch(0.945 0.055 75);

  --menta:        oklch(0.640 0.110 178);  /* Caribbean teal-green — AI accent */
  --menta-deep:   oklch(0.520 0.095 180);
  --menta-wash:   oklch(0.935 0.040 178);

  --masthead:     oklch(0.205 0.030 40);   /* deep cacao bar */

  /* Type */
  --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-body:    "Spectral", Georgia, serif;
  --f-char:    "Fredoka", system-ui, sans-serif;

  /* Fluid type scale (~1.28) */
  --t-mega:  clamp(2.9rem, 1.6rem + 6.4vw, 6.6rem);
  --t-h1:    clamp(2.2rem, 1.4rem + 3.8vw, 4.1rem);
  --t-h2:    clamp(1.7rem, 1.2rem + 2.2vw, 2.7rem);
  --t-h3:    clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem);
  --t-h4:    clamp(1.12rem, 1rem + 0.5vw, 1.35rem);
  --t-body:  clamp(1.02rem, 0.97rem + 0.2vw, 1.14rem);
  --t-sm:    0.9rem;
  --t-xs:    0.76rem;

  /* Space — 4pt scale */
  --space-2xs: 4px;
  --space-xs:  8px;
  --space-sm:  12px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  --maxw: 1240px;
  --radius: 14px;
  --radius-sm: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 1px 2px oklch(0.4 0.05 40 / 0.06), 0 12px 30px -16px oklch(0.4 0.08 40 / 0.28);
  --shadow-lg: 0 2px 6px oklch(0.4 0.05 40 / 0.08), 0 28px 60px -24px oklch(0.4 0.1 40 / 0.34);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; padding: 0; }

::selection { background: var(--dulce); color: var(--ink); }

/* ---------- Helpers ---------- */
.wrap { width: min(100% - 2 * var(--space-lg), var(--maxw)); margin-inline: auto; }
.kicker {
  font-family: var(--f-char);
  font-weight: 600;
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.display { font-family: var(--f-display); font-weight: 800; line-height: 0.95; letter-spacing: -0.01em; }

/* category tag */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-char); font-weight: 600;
  font-size: var(--t-xs); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--bean);
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--bean); transform: rotate(45deg); }
.tag.is-dulce { color: var(--dulce-deep); } .tag.is-dulce::before { background: var(--dulce-deep); }
.tag.is-menta { color: var(--menta-deep); } .tag.is-menta::before { background: var(--menta-deep); }
.tag.is-ink   { color: var(--ink); }        .tag.is-ink::before   { background: var(--ink); }

.date { font-family: var(--f-char); font-size: var(--t-xs); color: var(--ink-faint); font-weight: 500; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-char); font-weight: 600; font-size: 0.95rem;
  padding: 12px 22px; border-radius: 999px;
  background: var(--bean); color: var(--cream);
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { background: var(--bean-deep); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--menta { background: var(--menta-deep); }
.btn--menta:hover { background: oklch(0.46 0.09 180); }
.btn--ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.btn--ghost:hover { background: var(--ink); color: var(--cream); box-shadow: none; }
.btn svg { width: 18px; height: 18px; }

/* ============================================================
   MASTHEAD
   ============================================================ */
.topbar {
  background: var(--masthead);
  color: oklch(0.93 0.02 70);
  font-family: var(--f-char);
}
.topbar__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md); padding-block: 8px; font-size: var(--t-xs); font-weight: 500;
}
.topbar__date { letter-spacing: 0.04em; opacity: .85; text-transform: capitalize; }
.topbar__links { display: flex; gap: var(--space-md); align-items: center; }
.topbar__links a { opacity: .8; transition: opacity .2s, color .2s; }
.topbar__links a:hover { opacity: 1; color: var(--dulce); }
.topbar__socials { display: flex; gap: 10px; }
.topbar__socials a { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: oklch(1 0 0 / 0.08); }
.topbar__socials svg { width: 13px; height: 13px; }
.topbar__socials a:hover { background: var(--dulce); color: var(--masthead); opacity: 1; }

/* brand row */
.brand {
  background: var(--masthead); color: var(--cream);
  border-bottom: 3px solid var(--dulce);
}
.brand__row { display: flex; align-items: center; gap: var(--space-lg); padding-block: var(--space-md) var(--space-lg); }
.logo { display: inline-flex; align-items: center; gap: 14px; }
.logo__mark { width: 54px; height: 54px; flex: none; filter: drop-shadow(0 6px 12px oklch(0 0 0 / .3)); }
.logo__type { display: flex; flex-direction: column; line-height: 0.86; }
.logo__type b {
  font-family: var(--f-display); font-weight: 900; font-style: italic;
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); letter-spacing: -0.01em;
  color: var(--cream);
}
.logo__type b em { color: var(--dulce); font-style: italic; }
.logo__type span {
  font-family: var(--f-char); font-weight: 500; font-size: 0.72rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: oklch(0.82 0.04 70);
  margin-top: 4px;
}
.brand__aside { margin-left: auto; display: flex; align-items: center; gap: var(--space-md); }
.brand__cta { display: none; }

/* primary nav */
.nav { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--line); }
.nav__row { display: flex; align-items: stretch; gap: var(--space-sm); }
.nav__list { display: flex; flex-wrap: wrap; }
.nav__list a {
  display: inline-flex; align-items: center; height: 100%;
  padding: 16px var(--space-md);
  font-family: var(--f-display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink);
  position: relative; transition: color .2s;
}
.nav__list a::after {
  content: ""; position: absolute; left: var(--space-md); right: var(--space-md); bottom: 10px; height: 3px;
  background: var(--bean); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__list a:hover { color: var(--bean); }
.nav__list a:hover::after, .nav__list a[aria-current="page"]::after { transform: scaleX(1); }
.nav__list a[aria-current="page"] { color: var(--bean); }
.nav__search { margin-left: auto; display: flex; align-items: center; gap: 6px; padding-inline: var(--space-sm); color: var(--ink-soft); }
.nav__search input {
  font: inherit; font-size: var(--t-sm); border: 0; background: var(--cream-deep);
  border-radius: 999px; padding: 8px 14px; color: var(--ink); width: 168px;
  font-family: var(--f-char);
}
.nav__search input::placeholder { color: var(--ink-faint); }
.nav__toggle { display: none; }

/* ticker */
.ticker {
  display: flex; align-items: stretch; background: var(--bean); color: var(--cream);
  font-family: var(--f-char); overflow: hidden;
}
.ticker__label {
  flex: none; display: flex; align-items: center; gap: 8px;
  background: var(--dulce); color: var(--ink); font-weight: 700;
  padding: 10px 16px; font-size: var(--t-xs); letter-spacing: 0.1em; text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}
.ticker__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bean); animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.ticker__track { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker__move { display: flex; gap: var(--space-2xl); white-space: nowrap; padding-left: var(--space-2xl); animation: ticker 38s linear infinite; }
.ticker__move span { font-size: var(--t-sm); font-weight: 500; opacity: .95; }
.ticker__move b { color: var(--dulce); font-weight: 600; }
.ticker:hover .ticker__move { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.sechead { display: flex; align-items: baseline; gap: var(--space-md); margin-bottom: var(--space-lg); }
.sechead h2 {
  font-family: var(--f-display); font-weight: 800; font-size: var(--t-h3);
  text-transform: uppercase; letter-spacing: 0.01em; line-height: 1; white-space: nowrap;
}
.sechead .em { color: var(--bean); }
.sechead__line { flex: 1; height: 2px; background: var(--line); position: relative; top: -4px; }
.sechead__more { font-family: var(--f-char); font-weight: 600; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--bean); white-space: nowrap; }
.sechead__more:hover { color: var(--bean-deep); }

/* ============================================================
   HERO / FEATURE GRID
   ============================================================ */
.hero { padding-block: var(--space-2xl) var(--space-xl); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--space-2xl); }

/* lead story */
.lead { display: grid; gap: var(--space-md); }
.lead__media {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10;
  box-shadow: var(--shadow);
}
.lead__media .cover { width: 100%; height: 100%; }
.lead__badge {
  position: absolute; top: var(--space-md); left: var(--space-md);
  background: var(--bean); color: var(--cream); padding: 7px 14px; border-radius: 999px;
  font-family: var(--f-char); font-weight: 600; font-size: var(--t-xs); letter-spacing: 0.06em; text-transform: uppercase;
}
.lead__meta { display: flex; align-items: center; gap: var(--space-md); }
.lead h1 { font-family: var(--f-display); font-weight: 800; font-size: var(--t-h1); line-height: 0.98; }
.lead h1 a:hover { color: var(--bean); }
.lead__excerpt { color: var(--ink-soft); max-width: 60ch; font-size: 1.18rem; }
.lead__by { display: flex; align-items: center; gap: 10px; font-family: var(--f-char); font-size: var(--t-sm); color: var(--ink-faint); }
.lead__by .byavatar { width: 30px; height: 30px; border-radius: 50%; background: var(--bean-wash); display: grid; place-items: center; }
.lead__by .byavatar svg { width: 22px; height: 22px; }
.lead__by b { color: var(--ink); font-weight: 600; }

/* what's happening stack */
.stack { display: grid; gap: var(--space-lg); align-content: start; }
.mini { display: grid; grid-template-columns: 104px 1fr; gap: var(--space-md); align-items: center; }
.mini__media { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow); }
.mini__media .cover { width: 100%; height: 100%; }
.mini__body { display: grid; gap: 6px; }
.mini__meta { display: flex; gap: var(--space-sm); align-items: center; }
.mini h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.18rem; line-height: 1.02; }
.mini h3 a:hover { color: var(--bean); }
.mini + .mini { border-top: 1px solid var(--line); padding-top: var(--space-lg); }

/* ============================================================
   "EL DATO" — explainer box (signature component)
   ============================================================ */
.dato {
  background: var(--ink); color: var(--cream);
  border-radius: var(--radius); padding: var(--space-lg) var(--space-xl);
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-lg); align-items: center;
  position: relative; overflow: hidden;
}
.dato::after {
  content: "%"; position: absolute; right: -10px; bottom: -34px;
  font-family: var(--f-display); font-weight: 900; font-size: 9rem; color: var(--dulce);
  opacity: 0.14; line-height: 1; pointer-events: none;
}
.dato__mascot { width: 76px; height: 76px; flex: none; }
.dato__label { font-family: var(--f-char); font-weight: 700; font-size: var(--t-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dulce); }
.dato__text { font-family: var(--f-display); font-weight: 600; font-size: var(--t-h4); line-height: 1.15; margin-top: 4px; }
.dato__text em { color: var(--dulce); font-style: normal; }

/* ============================================================
   STORY CARDS GRID
   ============================================================ */
.cardgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-xl); }
.card { display: grid; gap: var(--space-sm); }
.card__media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.card__media .cover { width: 100%; height: 100%; transition: transform .5s var(--ease); }
.card:hover .card__media .cover { transform: scale(1.04); }
.card__num {
  position: absolute; left: 0; bottom: 0;
  font-family: var(--f-display); font-weight: 900; font-size: 2.4rem; line-height: 0.8;
  color: var(--cream); background: var(--bean); padding: 8px 12px 6px; border-top-right-radius: 12px;
}
.card__meta { display: flex; gap: var(--space-sm); align-items: center; }
.card h3 { font-family: var(--f-display); font-weight: 700; font-size: var(--t-h4); line-height: 1.04; }
.card h3 a:hover { color: var(--bean); }
.card p { color: var(--ink-soft); font-size: var(--t-sm); }

/* video chip */
.card__media .play {
  position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%;
  background: oklch(1 0 0 / 0.92); color: var(--bean); display: grid; place-items: center;
  box-shadow: var(--shadow); transition: transform .3s var(--ease), background .3s;
}
.card__media .play svg { width: 24px; height: 24px; margin-left: 3px; }
.card:hover .play { transform: scale(1.1); background: var(--cream); }

/* ============================================================
   SPLIT SECTIONS / FEATURE BANDS
   ============================================================ */
.band { padding-block: var(--space-3xl); }
.band--cream { background: var(--cream-deep); }
.band--bean  { background: var(--bean); color: var(--cream); }
.band--bean .sechead h2, .band--bean .kicker { color: var(--cream); }
.band--bean .sechead__line { background: oklch(1 0 0 / 0.25); }

/* "La Habichuela te lo cuenta" — deep dive feature */
.deep { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--space-2xl); align-items: center; }
.deep__media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 5/4; box-shadow: var(--shadow-lg); }
.deep__media .cover { width: 100%; height: 100%; }
.deep__media .play { position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 50%; background: var(--cream); color: var(--bean); display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.deep__media .play svg { width: 32px; height: 32px; margin-left: 4px; }
.deep__body { display: grid; gap: var(--space-md); }
.deep__body h2 { font-family: var(--f-display); font-weight: 800; font-size: var(--t-h1); line-height: 0.98; }
.deep__list { display: grid; gap: var(--space-sm); margin-top: var(--space-xs); }
.deep__list li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-sm); align-items: start; font-size: var(--t-sm); }
.deep__list .n { font-family: var(--f-display); font-weight: 800; color: var(--bean); font-size: 1.4rem; line-height: 1; }
.band--bean .deep__list .n { color: var(--dulce); }

/* ============================================================
   PREGÚNTALE A LA HABICHUELA (AI feature) — menta accent
   ============================================================ */
.ask { background: var(--menta-wash); padding-block: var(--space-3xl); position: relative; overflow: hidden; }
.ask__inner { display: grid; grid-template-columns: auto minmax(0,1fr); gap: var(--space-2xl); align-items: center; }
.ask__mascot { width: clamp(150px, 22vw, 240px); height: auto; filter: drop-shadow(0 20px 40px oklch(0.5 0.1 180 / 0.25)); }
.ask__panel { display: grid; gap: var(--space-md); }
.ask h2 { font-family: var(--f-display); font-weight: 900; font-size: var(--t-h1); line-height: 0.96; color: var(--menta-deep); }
.ask p { color: var(--ink-soft); max-width: 52ch; }
.ask__form { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.ask__form input {
  flex: 1; min-width: 220px; font: inherit; font-family: var(--f-char); font-size: 1.02rem;
  padding: 14px 18px; border-radius: 999px; border: 2px solid var(--menta);
  background: var(--paper); color: var(--ink);
}
.ask__form input:focus { outline: none; border-color: var(--menta-deep); box-shadow: 0 0 0 4px var(--menta-wash); }
.ask__chips { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
.chip {
  font-family: var(--f-char); font-weight: 500; font-size: var(--t-sm);
  padding: 8px 14px; border-radius: 999px; background: var(--paper); color: var(--menta-deep);
  box-shadow: inset 0 0 0 1.5px var(--menta); transition: all .2s var(--ease);
}
.chip:hover { background: var(--menta-deep); color: var(--cream); box-shadow: none; transform: translateY(-2px); }
/* answer bubble */
.ask__answer {
  display: none; background: var(--paper); border-radius: var(--radius);
  padding: var(--space-lg); box-shadow: var(--shadow); font-family: var(--f-char);
  position: relative; margin-top: var(--space-xs);
}
.ask__answer.is-on { display: block; animation: pop .4s var(--ease); }
.ask__answer::before {
  content: ""; position: absolute; top: -9px; left: 28px; width: 18px; height: 18px;
  background: var(--paper); transform: rotate(45deg);
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.ask__answer .who { font-weight: 700; color: var(--menta-deep); font-size: var(--t-sm); margin-bottom: 4px; }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.news__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-2xl); align-items: center; }
.news h2 { font-family: var(--f-display); font-weight: 800; font-size: var(--t-h2); line-height: 1; }
.news p { color: oklch(0.9 0.03 70); margin-top: var(--space-sm); }
.band--bean .news p { color: oklch(0.92 0.03 70); }
.news__form { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.news__form input {
  flex: 1; min-width: 220px; font: inherit; font-family: var(--f-char);
  padding: 14px 18px; border-radius: 999px; border: 0; background: var(--cream); color: var(--ink);
}
.band--bean .btn--ghost { color: var(--cream); box-shadow: inset 0 0 0 1.5px oklch(1 0 0 / .5); }
.band--bean .btn--ghost:hover { background: var(--cream); color: var(--bean); }
.band--bean .btn { background: var(--dulce); color: var(--ink); }
.band--bean .btn:hover { background: var(--dulce-deep); }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { background: var(--masthead); color: oklch(0.85 0.02 70); padding-block: var(--space-3xl) var(--space-xl); }
.foot__top { display: grid; grid-template-columns: 1.7fr repeat(4, minmax(0, 1fr)); gap: var(--space-xl) var(--space-2xl); padding-bottom: var(--space-2xl); border-bottom: 1px solid oklch(1 0 0 / .12); }
.foot__brand .logo__type b { font-size: 1.8rem; }
.foot__brand p { margin-top: var(--space-md); max-width: 38ch; color: oklch(0.78 0.02 70); font-size: var(--t-sm); }
.foot h4 { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 1rem; color: var(--cream); margin-bottom: var(--space-md); }
.foot__col a { display: block; padding: 5px 0; font-family: var(--f-char); font-size: var(--t-sm); color: oklch(0.82 0.02 70); transition: color .2s; }
.foot__col a:hover { color: var(--dulce); }
.foot__bottom { display: flex; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; padding-top: var(--space-lg); font-family: var(--f-char); font-size: var(--t-xs); color: oklch(0.7 0.02 70); }
.foot__bottom a:hover { color: var(--dulce); }

/* ============================================================
   COVERS (SVG/CSS editorial graphics — used in place of stock photos)
   ============================================================ */
.cover { position: relative; display: grid; place-items: center; }
.cover svg { width: 100%; height: 100%; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article { padding-block: var(--space-2xl) var(--space-3xl); }
.article__head { max-width: 760px; margin-inline: auto; display: grid; gap: var(--space-md); text-align: left; }
.crumbs { font-family: var(--f-char); font-size: var(--t-xs); color: var(--ink-faint); display: flex; gap: 8px; }
.crumbs a:hover { color: var(--bean); }
.article__head h1 { font-family: var(--f-display); font-weight: 800; font-size: var(--t-h1); line-height: 0.98; }
.article__lede { font-size: 1.3rem; color: var(--ink-soft); line-height: 1.45; }
.article__byline { display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; padding-block: var(--space-md); border-block: 1px solid var(--line); font-family: var(--f-char); font-size: var(--t-sm); }
.article__byline .who { display: flex; align-items: center; gap: 10px; }
.article__byline .byavatar { width: 38px; height: 38px; border-radius: 50%; background: var(--bean-wash); display: grid; place-items: center; }
.article__byline .byavatar svg { width: 30px; height: 30px; }
.article__byline b { color: var(--ink); }
.article__share { margin-left: auto; display: flex; gap: 8px; }
.article__share a { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--cream-deep); color: var(--ink-soft); transition: all .2s; }
.article__share a:hover { background: var(--bean); color: var(--cream); }
.article__share svg { width: 15px; height: 15px; }

.article__hero { margin-block: var(--space-xl); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/8; box-shadow: var(--shadow-lg); }
.article__hero .cover { width: 100%; height: 100%; }
.article__figcap { font-family: var(--f-char); font-size: var(--t-xs); color: var(--ink-faint); text-align: center; margin-top: var(--space-xs); }

.prose { max-width: 68ch; margin-inline: auto; }
.prose > * + * { margin-top: var(--space-lg); }
.prose p { font-size: 1.16rem; line-height: 1.72; }
.prose h2 { font-family: var(--f-display); font-weight: 800; font-size: var(--t-h3); line-height: 1.02; margin-top: var(--space-2xl); }
.prose h3 { font-family: var(--f-display); font-weight: 700; font-size: var(--t-h4); margin-top: var(--space-xl); }
.prose a { color: var(--bean); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul.bullets { display: grid; gap: var(--space-sm); }
/* viñeta absoluta (no grid) para que el contenido en línea —negritas,
   enlaces, cursivas— fluya como un solo párrafo */
.prose ul.bullets li { position: relative; padding-left: calc(var(--space-sm) + 9px); font-size: 1.1rem; }
.prose ul.bullets li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 9px; height: 9px; border-radius: 2px;
  background: var(--dulce-deep); transform: rotate(45deg);
}
.prose .dropcap::first-letter {
  font-family: var(--f-display); font-weight: 900; font-size: 4.2rem; line-height: 0.7;
  float: left; margin: 8px 12px 0 0; color: var(--bean);
}

/* mascot pull-quote */
.saysit {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-lg); align-items: center;
  background: var(--bean-wash); border-radius: var(--radius); padding: var(--space-xl);
  margin-block: var(--space-2xl) !important;
}
.saysit__mascot { width: 92px; height: 92px; flex: none; }
.saysit blockquote { font-family: var(--f-display); font-weight: 600; font-size: var(--t-h4); line-height: 1.18; color: var(--bean-deep); }
.saysit cite { display: block; margin-top: var(--space-xs); font-family: var(--f-char); font-style: normal; font-size: var(--t-sm); color: var(--ink-faint); }

/* glosario / dato inline box */
.callout {
  background: var(--ink); color: var(--cream); border-radius: var(--radius);
  padding: var(--space-lg) var(--space-xl); margin-block: var(--space-2xl) !important;
}
.callout .dato__label { color: var(--dulce); }
.callout p { font-family: var(--f-char); font-size: 1.05rem; line-height: 1.55; margin-top: 6px; }
.callout strong { color: var(--dulce); }

/* related */
.related { margin-top: var(--space-3xl); }

/* ============================================================
   PÁGINAS INSTITUCIONALES / LEGALES
   (privacidad · términos · metodología)
   ============================================================ */
.pagehead {
  background: var(--cream-deep);
  border-bottom: 1px solid var(--line);
  padding-block: var(--space-2xl);
  position: relative; overflow: hidden;
}
.pagehead::after {
  content: ""; position: absolute; inset: auto -60px -140px auto;
  width: 320px; height: 320px; border-radius: 50%;
  background: var(--dulce-wash); opacity: .8; pointer-events: none;
}
.pagehead__inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-xl); align-items: center; position: relative; z-index: 1; }
.pagehead__mascot { width: clamp(92px, 13vw, 148px); height: auto; flex: none; filter: drop-shadow(0 16px 30px oklch(0.4 0.08 40 / .22)); }
.pagehead .kicker { color: var(--bean); }
.pagehead h1 { font-family: var(--f-display); font-weight: 900; font-size: var(--t-h1); line-height: 0.96; margin-top: 6px; }
.pagehead__sub { color: var(--ink-soft); max-width: 62ch; margin-top: var(--space-sm); font-size: 1.14rem; }
.stamp { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-top: var(--space-md); font-family: var(--f-char); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-faint); }
.stamp b { color: var(--ink); font-weight: 600; }

.legal { padding-block: var(--space-2xl) var(--space-3xl); }
.legal__grid { display: grid; grid-template-columns: 246px minmax(0, 1fr); gap: var(--space-3xl); align-items: start; }
/* evita que una tabla ancha estire la columna y desborde en móvil */
.legal__grid > * { min-width: 0; }

/* índice pegajoso — con scroll propio si el documento tiene muchas secciones */
.toc { position: sticky; top: 86px; font-family: var(--f-char); max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; }
.toc h2 { font-family: var(--f-display); font-weight: 800; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; padding-bottom: var(--space-xs); border-bottom: 2px solid var(--bean); }
.toc ol { list-style: none; padding: 0; margin-top: var(--space-sm); counter-reset: toc; display: grid; }
.toc li { counter-increment: toc; }
.toc ol a { display: grid; grid-template-columns: 22px 1fr; gap: 6px; padding: 7px 0; font-size: 0.86rem; line-height: 1.3; color: var(--ink-soft); transition: color .2s; }
.toc ol a::before { content: counter(toc); font-weight: 600; color: var(--ink-faint); font-size: var(--t-xs); }
.toc ol a:hover { color: var(--bean); }
.toc ol a:hover::before { color: var(--bean); }
.toc__foot { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--ink-faint); line-height: 1.6; }
.toc__foot a { color: var(--bean); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.toc__foot a:hover { color: var(--bean-deep); }

/* cuerpo legal */
.prose--legal { max-width: 74ch; margin-inline: 0; }
.prose--legal h2 { scroll-margin-top: 96px; font-size: var(--t-h4); text-transform: uppercase; letter-spacing: 0.02em; margin-top: var(--space-3xl); padding-top: var(--space-lg); border-top: 2px solid var(--line); }
.prose--legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose--legal h2 .n { color: var(--bean); font-variant-numeric: tabular-nums; }
.prose--legal h3 { font-size: 1.12rem; text-transform: none; margin-top: var(--space-xl); }
.prose--legal p, .prose--legal li { font-size: 1.06rem; line-height: 1.68; }
.prose--legal ul.bullets li { font-size: 1.06rem; }
.prose--legal ol.numbered { display: grid; gap: var(--space-sm); counter-reset: item; list-style: none; padding: 0; }
.prose--legal ol.numbered li { counter-increment: item; position: relative; padding-left: var(--space-xl); }
.prose--legal ol.numbered li::before {
  content: counter(item) "."; position: absolute; left: 0; top: 0;
  font-family: var(--f-char); font-weight: 700; color: var(--bean);
  font-size: 1rem; line-height: 1.75;
}

/* "en cristiano" — traducción del párrafo legal a lenguaje de calle */
.encristiano {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-md); align-items: start;
  background: var(--bean-wash); border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  margin-block: var(--space-lg) !important;
}
.encristiano__mascot { width: 46px; height: 46px; flex: none; margin-top: 2px; }
.encristiano .lbl { display: block; font-family: var(--f-char); font-weight: 700; font-size: var(--t-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--bean); }
.encristiano p { font-family: var(--f-char); font-size: 0.98rem !important; line-height: 1.55 !important; color: var(--bean-deep); margin-top: 3px; }

/* lista de definiciones (glosario / derechos) */
.deflist { display: grid; gap: var(--space-md); }
.deflist > div { display: grid; gap: 4px; padding-left: var(--space-md); border-left: 3px solid var(--dulce); }
.deflist dt { font-family: var(--f-char); font-weight: 600; font-size: 1rem; color: var(--ink); }
.deflist dd { margin: 0; font-size: 1.02rem; color: var(--ink-soft); line-height: 1.6; }

/* tabla legal */
.tablewrap { overflow-x: auto; margin-block: var(--space-lg) !important; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
table.legaltable { width: 100%; border-collapse: collapse; min-width: 520px; background: var(--paper); }
table.legaltable th, table.legaltable td { text-align: left; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.95rem; }
table.legaltable thead th { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.85rem; background: var(--ink); color: var(--cream); border-bottom: 0; }
table.legaltable tbody tr:last-child td { border-bottom: 0; }
table.legaltable td:first-child { font-family: var(--f-char); font-weight: 600; color: var(--ink); }
table.legaltable .si { color: var(--menta-deep); font-weight: 600; }
table.legaltable .no { color: var(--bean); font-weight: 600; }

/* estado de una función: activa / en demostración */
.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--f-char); font-weight: 600; font-size: var(--t-xs);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 10px; border-radius: 999px;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.is-on  { background: var(--menta-wash); color: var(--menta-deep); }
.badge.is-off { background: var(--dulce-wash); color: var(--bean); }

/* plantilla de solicitud lista para copiar */
.plantilla {
  background: var(--paper); border-radius: var(--radius);
  border-left: 4px solid var(--dulce);
  padding: var(--space-lg) var(--space-xl);
  box-shadow: inset 0 0 0 1px var(--line);
  margin-block: var(--space-lg) !important;
}
.plantilla__label { font-family: var(--f-char); font-weight: 700; font-size: var(--t-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--bean); }
.plantilla pre {
  margin: var(--space-sm) 0 0; white-space: pre-wrap; word-break: break-word;
  font-family: var(--f-char); font-size: 0.95rem; line-height: 1.6; color: var(--ink);
}

/* dato pendiente de completar por la empresa */
.fill {
  background: var(--dulce-wash); color: var(--bean-deep);
  font-family: var(--f-char); font-size: 0.92em; font-weight: 600;
  padding: 1px 7px; border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1.5px var(--dulce);
}

/* bloque de contacto al cierre */
.legalcta {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-lg); align-items: center;
  background: var(--ink); color: var(--cream); border-radius: var(--radius);
  padding: var(--space-lg) var(--space-xl); margin-top: var(--space-2xl);
}
.legalcta__mascot { width: 74px; height: 74px; flex: none; }
.legalcta h2 { font-family: var(--f-display); font-weight: 800; font-size: var(--t-h4); line-height: 1.1; text-transform: uppercase; }
.legalcta p { color: oklch(0.85 0.02 70); font-size: var(--t-sm); margin-top: 6px; }
.legalcta a { color: var(--dulce); text-decoration: underline; text-underline-offset: 3px; }

/* enlaces entre documentos */
.docnav { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-md); margin-top: var(--space-2xl); }
.docnav a {
  display: grid; gap: 4px; background: var(--paper); border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.docnav a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.docnav .k { font-family: var(--f-char); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--bean); }
.docnav .t { font-family: var(--f-display); font-weight: 700; font-size: 1.12rem; line-height: 1.05; }

@media (max-width: 1024px) {
  .legal__grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .toc { position: static; background: var(--paper); border-radius: var(--radius); padding: var(--space-lg); box-shadow: inset 0 0 0 1px var(--line); }
  .toc ol { grid-template-columns: 1fr 1fr; gap: 0 var(--space-lg); }
}
@media (max-width: 760px) {
  .pagehead__inner { grid-template-columns: 1fr; gap: var(--space-md); }
  .pagehead__mascot { width: 84px; }
  .toc ol { grid-template-columns: 1fr; }
  .legalcta { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .encristiano { grid-template-columns: 1fr; }
  .encristiano__mascot { display: none; }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-2xl); }
  .deep, .ask__inner, .news__inner { grid-template-columns: 1fr; }
  .ask__inner { gap: var(--space-lg); }
  .ask__mascot { width: 140px; }
  .foot__top { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
  .foot__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .topbar__links { display: none; }
  .nav__search { display: none; }
  .nav__list { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--paper); box-shadow: var(--shadow-lg); border-bottom: 3px solid var(--bean); }
  .nav { position: sticky; }
  .nav__list.is-open { display: flex; }
  .nav__list a { width: 100%; border-bottom: 1px solid var(--line); padding: 16px var(--space-lg); }
  .nav__list a::after { display: none; }
  .nav__toggle { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 14px var(--space-md); font-family: var(--f-display); font-weight: 700; text-transform: uppercase; }
  .nav__toggle svg { width: 22px; height: 22px; }
  .nav__row { position: relative; }
  .dato { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: var(--space-md); }
  .article__byline { flex-direction: column; align-items: flex-start; }
  .article__share { margin-left: 0; }
  .saysit { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .foot__top { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .mini { grid-template-columns: 84px 1fr; }
  .lead__excerpt { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
