/* EL UNIVERSAL — Descarga México
   Paleta: tinta de periódico + tricolor + azul de marca #0069A2 */

:root {
  --ink: #0b1220;
  --ink-soft: #243044;
  --navy: #0b1c2c;
  --brand: #0069a2;
  --brand-deep: #004e7a;
  --green: #006847;
  --green-bright: #0a8f5c;
  --red: #ce1126;
  --red-deep: #9e0c1c;
  --gold: #c6a15b;
  --gold-light: #e8c872;
  --paper: #f7f1e6;
  --paper-2: #efe6d4;
  --cream: #fffaf2;
  --white: #ffffff;
  --line: rgba(11, 18, 32, 0.12);
  --shadow: 0 24px 60px rgba(11, 28, 44, 0.18);
  --radius: 18px;
  --max: 1180px;
  --serif: "Playfair Display", "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background: var(--paper);
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
}

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

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

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
}

.skip:focus {
  left: 12px;
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
  z-index: 50;
}

/* Tricolor + greca */
.tricolor {
  height: 7px;
  background: linear-gradient(90deg, var(--green) 0 33.33%, var(--cream) 33.33% 66.66%, var(--red) 66.66%);
  position: relative;
  z-index: 5;
}

.greca {
  height: 10px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--navy) 0 10px,
      transparent 10px 14px,
      var(--navy) 14px 18px,
      transparent 18px 28px
    );
  opacity: 0.18;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 241, 230, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img.seal {
  width: 42px;
  height: 42px;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
}

.brand-name small {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.28em;
  font-size: 0.58rem;
  color: var(--brand);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 999px;
  padding: 13px 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(206, 17, 38, 0.28);
}

.btn-red:hover {
  background: var(--red-deep);
}

.btn-navy {
  background: var(--navy);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid rgba(11, 28, 44, 0.22);
}

.btn-green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 104, 71, 0.25);
}

.icon-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--cream);
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: 42px 0 28px;
}

.masthead {
  text-align: center;
  margin-bottom: 28px;
}

.kicker {
  display: flex;
  justify-content: center;
  gap: 14px;
  align-items: center;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.34em;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.kicker::before,
.kicker::after {
  content: "";
  width: 56px;
  height: 1px;
  background: var(--gold);
}

.masthead h1 {
  margin: 8px 0 6px;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 9vw, 6.2rem);
  letter-spacing: 0.04em;
  line-height: 0.9;
  font-weight: 700;
}

.dateline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 8px 2px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  margin-top: 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(206, 17, 38, 0.16);
  animation: pulse 1.6s ease infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 7px rgba(206, 17, 38, 0); }
}

.hero h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  line-height: 1.12;
  margin: 16px 0 14px;
}

.lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 16px;
}

.store-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.store-meta strong {
  color: var(--ink);
}

/* Phone */
.device-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
}

.glow {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 105, 162, 0.22), transparent 70%);
  filter: blur(10px);
}

.phone {
  position: relative;
  width: 280px;
  height: 572px;
  background: #111;
  border-radius: 38px;
  padding: 10px;
  box-shadow: var(--shadow), inset 0 0 0 2px #2a2a2a;
  transform: rotate(4deg);
}

.phone::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 88px;
  height: 18px;
  transform: translateX(-50%);
  background: #000;
  border-radius: 20px;
  z-index: 2;
}

.screen {
  height: 100%;
  background: #f6f3ec;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen-top {
  background: var(--navy);
  color: #fff;
  padding: 28px 14px 12px;
}

.screen-top .mini-brand {
  font-family: var(--serif);
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  text-align: center;
}

.screen-top .live {
  margin-top: 10px;
  background: var(--red);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.feed {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.card .thumb {
  height: 78px;
  background:
    linear-gradient(160deg, rgba(11, 28, 44, 0.18), rgba(206, 17, 38, 0.18)),
    repeating-linear-gradient(45deg, #c9ddd4 0 8px, #e7d2c3 8px 16px);
}

.card.alt .thumb {
  background:
    linear-gradient(160deg, rgba(0, 105, 162, 0.28), rgba(0, 104, 71, 0.2)),
    repeating-linear-gradient(-45deg, #d7e4f0 0 8px, #f0e4c8 8px 16px);
}

.card p {
  margin: 0;
  padding: 8px 9px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}

.tabbar {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 8px 4px 12px;
  font-size: 0.58rem;
  text-align: center;
  color: var(--ink-soft);
  font-weight: 700;
}

.tabbar span:first-child {
  color: var(--brand);
}

.float-chip {
  position: absolute;
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  font-weight: 700;
}

.chip-1 {
  left: 8%;
  top: 18%;
  transform: rotate(-8deg);
}

.chip-2 {
  right: 4%;
  bottom: 16%;
  transform: rotate(6deg);
}

.chip-1 b { color: var(--green); }
.chip-2 b { color: var(--red); }

.papel {
  height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='28' viewBox='0 0 120 28'%3E%3Cpath fill='%23006847' d='M0 0h36l-6 28H6z'/%3E%3Ccircle cx='18' cy='12' r='4' fill='%23F7F1E6'/%3E%3Cpath fill='%23F7F1E6' d='M42 0h36l-6 28H48z'/%3E%3Ccircle cx='60' cy='12' r='4' fill='%230B1C2C'/%3E%3Cpath fill='%23CE1126' d='M84 0h36l-6 28H90z'/%3E%3Ccircle cx='102' cy='12' r='4' fill='%23F7F1E6'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 120px 28px;
  opacity: 0.9;
}

/* Ticker */
.ticker {
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
}

.ticker-track {
  display: flex;
  gap: 42px;
  width: max-content;
  animation: marquee 28s linear infinite;
  padding: 10px 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  text-transform: uppercase;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Stats / sections */
.section {
  position: relative;
  z-index: 1;
  padding: 72px 0;
}

.section h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0 0 10px;
}

.section-lead {
  color: var(--ink-soft);
  max-width: 38rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.stat {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--navy);
}

.stat span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 32px;
}

.feature {
  background: linear-gradient(#fff, var(--cream));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  min-height: 180px;
}

.feature .mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold-light);
  font-weight: 800;
  margin-bottom: 12px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
}

.download-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  background: var(--navy);
  color: #fff;
  border-radius: 28px;
  padding: 36px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.download-panel::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 161, 91, 0.25), transparent 70%);
}

.download-panel h2 {
  color: #fff;
}

.download-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.steps {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}

.steps i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 800;
  font-size: 0.8rem;
}

.qr-box {
  background: #fff;
  color: var(--ink);
  border-radius: 22px;
  padding: 22px;
  text-align: center;
  position: relative;
  z-index: 1;
}

#qrcode {
  display: grid;
  place-items: center;
  min-height: 168px;
}

#qrcode img,
#qrcode canvas {
  width: 168px !important;
  height: 168px !important;
}

.qr-box small {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
}

.howto {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 22px;
}

.howto article {
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 22px;
}

.howto h3 {
  margin-top: 0;
}

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.faq p {
  color: var(--ink-soft);
  margin: 10px 0 4px;
}

.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  padding: 42px 0 24px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}

.footer h3,
.footer h4 {
  color: #fff;
  margin: 0 0 10px;
  font-family: var(--serif);
}

.footer a:hover {
  color: var(--gold-light);
}

.legal {
  margin-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 14px;
  font-size: 0.78rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 40;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mobile-cta {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 30;
}

.mobile-cta .btn {
  width: 100%;
}

@media (max-width: 960px) {
  .hero-grid,
  .download-panel,
  .features,
  .howto,
  .footer-grid,
  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .features,
  .stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .nav-links,
  .nav .btn {
    display: none;
  }

  .icon-btn {
    display: grid;
    place-items: center;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 20px;
    background: #fff;
    padding: 16px 18px;
    border-radius: 14px;
    box-shadow: var(--shadow);
  }

  .hero-grid,
  .download-panel,
  .features,
  .howto,
  .footer-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .phone {
    transform: none;
    width: 250px;
    height: 520px;
  }

  .float-chip {
    display: none;
  }

  .mobile-cta {
    display: block;
  }

  body {
    padding-bottom: 76px;
  }
}
