:root {
  --bg: #F2F6FB;
  --ink: #0B1B33;
  --ink-soft: #4A5A74;
  --coral: #E8583D;
  --teal: #0E8F8A;
  --violet: #6A4CC2;
  --gold: #F2B134;

  --coral-tint: #FBE3DC;
  --teal-tint: #DCF0EE;
  --mint-tint: #E1F3E6;
  --gold-tint: #FCEFD2;
  --blue-tint: #E1EAFB;

  --radius: 16px;
  --shadow: 0 10px 28px rgba(11, 27, 51, 0.10), 0 2px 6px rgba(11, 27, 51, 0.06);
  --shadow-soft: 0 6px 18px rgba(11, 27, 51, 0.08);

  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
  width: 100%;
}

html.lock, body.lock {
  overflow: hidden;
  height: 100%;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; }

/* ---------- Masthead ---------- */

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 16px 0;
  background: var(--bg);
}

.masthead__logo {
  width: min(260px, 70vw);
  height: auto;
}

.masthead__stripe {
  margin-top: 16px;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--coral) 0%, var(--coral) 25%,
    var(--gold) 25%, var(--gold) 50%,
    var(--teal) 50%, var(--teal) 75%,
    var(--violet) 75%, var(--violet) 100%
  );
}

/* ---------- Feed / sections ---------- */

.feed {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 16px 8px;
}

.section {
  margin-bottom: 44px;
}

.section__header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.section__title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0;
}

.section__dots {
  display: flex;
  gap: 5px;
  margin-left: 2px;
}

.section__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.card-img {
  background: #E4E9F2;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.card-img img.loaded { opacity: 1; }

/* ================= ECONOMÍA — staggered 2-col grid ================= */

.eco-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.eco-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.eco-card:nth-child(3) { margin-top: 20px; }
.eco-card:nth-child(4) { margin-top: -6px; }

.eco-card.lead {
  grid-column: 1 / -1;
  flex-direction: row;
  margin-top: 0;
}
.eco-card.lead .card-img { width: 42%; flex-shrink: 0; }
.eco-card.lead .eco-card__body { width: 58%; }
.eco-card.lead .eco-card__title { font-size: 19px; }

.eco-card .card-img { aspect-ratio: 16 / 10; }

.eco-card__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eco-card__title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.28;
  margin: 0;
}

.eco-card__preview {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eco-card .ver-mas {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--coral);
}

/* ================= FINANZAS — color-block cards ================= */

.fin-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  margin-bottom: 12px;
}

.fin-card:nth-child(1) { background: var(--teal-tint); }
.fin-card:nth-child(2) { background: var(--mint-tint); }
.fin-card:nth-child(3) { background: var(--gold-tint); }
.fin-card:nth-child(4) { background: var(--coral-tint); }
.fin-card:nth-child(5) { background: var(--blue-tint); }

.fin-card__thumb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.fin-card__thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.fin-card__thumb img.loaded { opacity: 1; }

.fin-card.no-image .fin-card__thumb { display: none; }

.fin-card__body { flex: 1; min-width: 0; }

.fin-card__title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 4px;
}

.fin-card__preview {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fin-card .ver-mas {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--teal);
}

/* ================= VIAJES Y TURISMO — cinematic cards ================= */

.trv-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  margin-bottom: 18px;
}

.trv-card:nth-child(odd) { border-radius: 26px 16px 26px 16px; }
.trv-card:nth-child(even) { border-radius: 16px 26px 16px 26px; }

.trv-card .card-img { position: absolute; inset: 0; }

.trv-card__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,27,51,0) 38%, rgba(11,27,51,0.78) 100%);
}

.trv-card__content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.trv-card__title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.26;
  color: #fff;
  margin: 0;
}

.trv-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--violet);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
}

/* ---------- Footer ---------- */

.footer {
  max-width: 560px;
  margin: 0 auto;
  padding: 30px 20px 40px;
  text-align: center;
  border-top: 1px solid rgba(11,27,51,0.08);
}

.footer__tagline {
  font-family: var(--serif);
  font-weight: 700;
  font-style: italic;
  font-size: 15px;
  color: var(--ink);
  margin: 18px 0 6px;
}

.footer__email {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(.22,.9,.32,1);
  overflow: hidden;
}
.overlay.open { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .overlay { transition: none; }
}

.overlay__scroll {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.overlay__close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(11,27,51,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.overlay__hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #E4E9F2;
}
.overlay__image { width: 100%; height: 100%; object-fit: cover; }
.overlay__heroFade {
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 50%;
  background: linear-gradient(180deg, rgba(242,246,251,0) 0%, var(--bg) 100%);
}

.overlay__body {
  max-width: 560px;
  margin: 0 auto;
  padding: 4px 20px 48px;
}

.overlay__pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.overlay__title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 26px;
  line-height: 1.22;
  margin: 0 0 10px;
}

.overlay__meta {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.overlay__text {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink);
}
.overlay__text p { margin: 0 0 16px; }

/* ---------- Small screens polish ---------- */

@media (max-width: 360px) {
  .eco-card__title { font-size: 13.5px; }
  .section__title { font-size: 23px; }
  .trv-card__title { font-size: 16px; }
}
