/* ============================================================
   Historia, Crímenes y Enigmas · enigmas.l33tpro.com
   Estética: dark cinematográfica (banner del canal)
   Negros azules, teales, acento dorado cálido.
   ============================================================ */

:root {
  --bg: #060b12;
  --bg-2: #0a1929;
  --bg-3: #0c1d2e;
  --teal: #1a3a5a;
  --teal-soft: #2a5a7a;
  --moon: #e6f1ff;
  --gold: #d4a24e;
  --gold-soft: #e3b76c;
  --text: #e8eef4;
  --muted: #8fa6b8;
  --line: rgba(159, 195, 217, 0.14);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(42, 90, 122, 0.18), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-soft); }

.wrap {
  width: min(1160px, 92vw);
  margin: 0 auto;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4, 8, 14, 0.86) 0%, rgba(6, 11, 18, 0.62) 45%, rgba(6, 11, 18, 0.96) 82%, var(--bg) 100%),
    radial-gradient(120% 90% at 50% 0%, rgba(42, 74, 106, 0.35), transparent 55%),
    url("/assets/banner.jpg") center 38% / cover no-repeat,
    var(--bg-2);
}

/* Niebla baja sutil */
.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(26, 58, 90, 0.22) 55%, rgba(10, 25, 41, 0.65));
  pointer-events: none;
}

/* Viñeta */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 85% at 50% 45%, transparent 55%, rgba(2, 5, 9, 0.55) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 8vh 6vw 6vh;
  max-width: 780px;
}

.hero-avatar {
  width: 112px;
  height: 112px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 1px solid rgba(230, 241, 255, 0.25);
  box-shadow:
    0 0 0 5px rgba(6, 11, 18, 0.65),
    0 0 34px rgba(42, 90, 122, 0.55),
    0 18px 40px rgba(0, 0, 0, 0.6);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 6.5vw, 4rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--moon);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.7);
}

.tagline {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 500;
  color: var(--text);
}

.tagline em {
  font-style: italic;
  color: var(--gold-soft);
}

.hero-sub {
  margin: 16px auto 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 0.98rem;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex: none;
}

.btn-gold {
  color: #1a1206;
  background: linear-gradient(160deg, var(--gold-soft), var(--gold) 60%, #b8862f);
  box-shadow: 0 6px 26px rgba(212, 162, 78, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(212, 162, 78, 0.4);
}

.btn-ghost {
  color: var(--moon);
  border: 1px solid rgba(159, 195, 217, 0.38);
  background: rgba(10, 25, 41, 0.45);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  border-color: rgba(230, 241, 255, 0.7);
  transform: translateY(-2px);
}

.hero-scroll {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 44px;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-scroll svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.hero-scroll:hover { color: var(--moon); }
.hero-scroll:hover svg { transform: translateY(3px); }

/* ---------- Secciones ---------- */

.section {
  padding: 72px 0;
}

.section-dim {
  background:
    linear-gradient(180deg, transparent, rgba(10, 25, 41, 0.5) 12% 88%, transparent),
    var(--bg);
}

.overline {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  line-height: 1.15;
  color: var(--moon);
}

.section-lead {
  margin-top: 12px;
  max-width: 56ch;
  color: var(--muted);
}

/* ---------- Grid de episodios ---------- */

.grid {
  margin-top: 40px;
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
}

.grid-soon {
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(170deg, var(--bg-3), #081521);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  scroll-margin-top: 24px;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 162, 78, 0.45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.card-media {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #000;
}

.card-media video,
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-body h3 {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--moon);
}

.ep-num {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.card-body p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Etiquetas temáticas */

.tag {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.tag-crimen { color: #e5988f; background: rgba(150, 60, 52, 0.22); border: 1px solid rgba(197, 106, 96, 0.35); }
.tag-enigma { color: #9fd2e0; background: rgba(42, 90, 122, 0.25); border: 1px solid rgba(79, 163, 184, 0.4); }
.tag-oceano { color: #a9c3ea; background: rgba(52, 84, 138, 0.28); border: 1px solid rgba(105, 141, 205, 0.4); }
.tag-desaparicion { color: #e3c48d; background: rgba(160, 118, 44, 0.2); border: 1px solid rgba(212, 162, 78, 0.4); }

/* Próximamente */

.card-soon { cursor: default; }

.card-soon:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
}

.card-soon .card-media img {
  filter: grayscale(0.85) brightness(0.62);
}

.soon-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--moon);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}

.soon-badge::before {
  content: "Próximamente";
}

/* ---------- Sobre el canal ---------- */

.about-grid {
  margin-top: 42px;
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.about-item {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(170deg, var(--bg-3), #081521);
}

.about-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 162, 78, 0.35);
  background: rgba(212, 162, 78, 0.09);
  margin-bottom: 16px;
}

.about-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--gold-soft);
}

.about-item h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--moon);
  margin-bottom: 8px;
}

.about-item p {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.footer {
  border-top: 1px solid var(--line);
  padding: 52px 0 44px;
  text-align: center;
  background:
    radial-gradient(90% 140% at 50% 115%, rgba(26, 58, 90, 0.28), transparent 60%),
    var(--bg);
}

.footer-avatar {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 1px solid rgba(230, 241, 255, 0.2);
}

.footer-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--moon);
}

.footer-legal {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  opacity: 0.85;
}

.footer-links {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--gold-soft);
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

.footer-links span { color: var(--muted); }

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .hero { min-height: 88vh; }
  .hero-inner { padding: 10vh 5vw 6vh; }
  .hero-avatar { width: 92px; height: 92px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .section { padding: 56px 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .card-body { padding: 13px 13px 15px; }
  .card-body h3 { font-size: 1.02rem; }
  .card-body p { font-size: 0.84rem; }
}

/* Respeto por movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .hero-scroll svg { transition: none; }
}


/* ── Tarjetas como enlace externo (sin vídeo embebido) ── */
.watch { position: relative; display: block; border-radius: inherit; overflow: hidden; }
.watch img { width: 100%; height: auto; transition: transform .4s ease, filter .4s ease; }
.watch::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,11,18,0) 45%, rgba(6,11,18,.6));
  transition: opacity .3s ease;
}
.watch:hover img, .watch:focus-visible img { transform: scale(1.03); filter: brightness(.92); }
.watch .play {
  position: absolute; z-index: 2; top: 50%; left: 50%;
  width: 62px; height: 62px; margin: -31px 0 0 -31px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 6px 24px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.22);
  transition: transform .25s ease, background .25s ease;
}
.watch .play::after {
  content: ""; position: absolute; top: 50%; left: 54%;
  transform: translateY(-50%);
  border-style: solid; border-width: 12px 0 12px 19px;
  border-color: transparent transparent transparent #0a1520;
}
.watch:hover .play, .watch:focus-visible .play { transform: scale(1.08); background: var(--gold-soft); }
.watch-links { display: flex; gap: 10px; margin-top: 14px; }
.watch-links a {
  flex: 1; text-align: center; padding: 10px 12px; border-radius: 9px;
  font: 600 13px/1 var(--sans); letter-spacing: .02em;
  text-decoration: none; transition: filter .2s ease, transform .2s ease;
}
.watch-links a:hover { filter: brightness(1.12); transform: translateY(-1px); }
.wl-yt { background: #c4302b; color: #fff; }
.wl-tt { border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.03); }
