/* =========================
   GOOGLE FONTS
========================= */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Lora:wght@400;500;600;700&display=swap');

/* =========================
   VARIABLES
========================= */
:root {
  --bg: #0d0c0b;
  --panel: #111110;
  --panel2: #141312;
  --text: #e8e4dc;
  --muted: #b5ada2;
  --muted2: #6f665c;
  --line: rgba(255, 255, 255, .10);
  --line2: rgba(255, 255, 255, .08);
  --gold: #c6a96b;
  --gold2: #b99754;
  --danger: #ff6b6b;
  --ok: #61d095;
}

/* =========================
   RESET
========================= */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Lato', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* =========================
   TEXTOS
========================= */
h1,
h2,
h3,
h4 {
  font-family: 'Lora', serif;
  font-weight: 500;
  margin: 0;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: 0.2s;
}

a:hover {
  color: var(--gold2);
}

/* =========================
   HEADER
========================= */
header.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(13, 12, 11, 0.9);
  border-bottom: 1px solid var(--line2);
}

.topbar .inner {
  max-width: 1680px;
  margin: auto;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* BRAND */
.brand {
  display: flex;
  gap: 10px;
}

.brand .name {
  font-size: 20px;
  letter-spacing: .6px;
}

.brand span {
  color: var(--gold);
}

/* NAV */
.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================
   BOTONES
========================= */
.btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  cursor: pointer;
  transition: 0.2s;
}

.btn:hover {
  border-color: var(--gold);
  background: rgba(198, 169, 107, 0.08);
}

.btn.primary {
  background: var(--gold);
  color: var(--bg);
  border: none;
}

.btn.primary:hover {
  background: var(--gold2);
}

.btn.danger {
  border-color: rgba(255, 107, 107, .5);
  background: rgba(255, 107, 107, .08);
}

/* =========================
   LAYOUT
========================= */
.wrap,
.hero {
  max-width: 1680px;
  margin: auto;
  padding: 28px 22px;
}

.hero h2 {
  font-size: 40px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* =========================
   INPUTS
========================= */
.input,
.text,
textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(13, 12, 11, .6);
  color: var(--text);
}

.input:focus,
.text:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 169, 107, .12);
}

/* =========================
   GRID
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

@media (max-width: 1400px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (min-width: 900px) and (max-width: 1400px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 372px) and (max-width: 899px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card img {
    height: auto;
  }
}

/* =========================
   CARD
========================= */
.card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--line2);
  background: var(--panel);
  overflow: hidden;
  transition: 0.25s;
  cursor: pointer;
}

.card:hover {
  transform: scale(1.03);
  border-color: rgba(198, 169, 107, .5);
}

.card .cover {
  height: 180px;
  background-size: cover;
  background-position: center;
}

.card .content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card .t {
  font-family: 'Lora', serif;
  font-size: 15px;
}

.card .a {
  font-size: 12px;
  color: var(--muted2);
}

.card .s {
  font-size: 12px;
  color: var(--muted);
}

/* =========================
   PANEL
========================= */
.panel {
  border: 1px solid var(--line2);
  border-radius: 18px;
  padding: 18px;
  background: var(--panel2);
}

/* =========================
   DROPDOWN
========================= */
.dd {
  position: relative;
}

.dd-trigger {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  cursor: pointer;
}

.dd-menu {
  display: none;
  position: absolute;
  top: 110%;
  width: 100%;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--line2);
}

.dd.open .dd-menu {
  display: block;
}

.dd-item {
  padding: 10px;
  cursor: pointer;
}

.dd-item:hover {
  background: rgba(198, 169, 107, .1);
}

/* =========================
   FOOTER
========================= */
.footer {
  margin-top: 60px;
  border-top: 1px solid var(--line2);
  background: var(--panel);
}

.footer-inner {
  max-width: 900px;
  margin: auto;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.footer-main {
  font-family: 'Lora', serif;
  font-size: 15px;
}

.footer-sub {
  font-size: 12px;
  color: var(--muted);
}

/* =========================
   MOBILE
========================= */
@media (max-width: 600px) {
  .hero h2 {
    font-size: 28px;
  }

  .topbar .inner {
    flex-direction: column;
    gap: 10px;
  }
}

/* IMG FIX */
.card .cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  height: auto;
}

.card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================
   STORY PAGE
========================= */

/* CONTENEDOR GENERAL */
.story-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px;
}

/* CARD PRINCIPAL */
.story-card {
  border: 1px solid var(--line2);
  border-radius: 18px;
  background: var(--panel);
  padding: 2em 3em;
  text-align: justify;
}

/* ALERTA */
.story-alert {
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

/* HEADER */
.story-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* TÍTULO */
.story-header h1 {
  font-family: 'Lora', serif;
  font-size: 28px;
  line-height: 1.25;
  color: var(--text);
}

/* AUTOR / META */
.story-meta {
  font-size: 13px;
  color: var(--muted2);
}

/* DIVISOR */
.story-divider {
  border: none;
  border-top: 1px solid var(--line2);
  margin: 18px 0;
}

/* CONTENIDO */
.story-content {
  white-space: pre-wrap;
  line-height: 1.85;
  font-size: 15px;
  color: var(--text);
}

/* PÁRRAFOS */
.story-content p {
  margin-bottom: 14px;
}

/* LINKS DENTRO DEL TEXTO */
.story-content a {
  color: var(--gold);
}

.story-content a:hover {
  color: var(--gold2);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 600px) {
  .story-wrap {
    padding: 24px 16px;
  }

  .story-card {
    padding: 18px;
  }

  .story-header h1 {
    font-size: 22px;
  }

  .story-content {
    font-size: 14px;
  }
}

/* DESCRIPCIÓN */
.story-description {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.6;
}