/* =============================================
   EL CUARTO OSCURO — main.css
   ============================================= */

:root {
  --bg:        #080604;
  --bg2:       #0e0b08;
  --bg3:       #141008;
  --surface:   #181210;
  --border:    rgba(200,180,140,0.10);
  --border2:   rgba(200,180,140,0.18);
  --text:      #c8baa0;
  --text2:     #8a7d68;
  --text3:     #4a4035;
  --accent:    #8b1a1a;
  --accent2:   #b02020;
  --gold:      #c4a44a;
  --cream:     #e8dcc8;
  --font-disp: 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'Courier Prime', 'Courier New', monospace;
  --nav-h:     64px;
  --max-w:     1100px;
  --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-disp);
  font-size: 1.1rem;
  line-height: 1.75;
  overflow-x: hidden;
  cursor: none;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* GRAIN OVERLAY */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1000;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.6) 100%);
}

/* CUSTOM CURSOR */
.cursor-dot {
  width: 6px; height: 6px; background: var(--accent);
  border-radius: 50%; position: fixed; pointer-events: none;
  z-index: 9999; transform: translate(-50%,-50%);
  transition: transform 0.1s var(--ease), background 0.2s;
}
.cursor-ring {
  width: 28px; height: 28px;
  border: 1px solid rgba(139,26,26,0.5);
  border-radius: 50%; position: fixed; pointer-events: none;
  z-index: 9998; transform: translate(-50%,-50%);
  transition: transform 0.18s var(--ease), width 0.2s, height 0.2s, border-color 0.2s;
}
body:hover .cursor-dot { transform: translate(-50%,-50%) scale(1); }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s;
}
.nav.scrolled {
  background: rgba(8,6,4,0.95);
  border-bottom-color: var(--border);
  backdrop-filter: blur(8px);
}
.nav-logo {
  font-family: var(--font-disp);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.02em;
}
.nav-links { display: flex; gap: 36px; }
.nav-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text2);
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-link:hover { color: var(--cream); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: none; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 1px; background: var(--text2); transition: all 0.3s; }

.mobile-menu {
  display: none; flex-direction: column;
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 899;
  background: rgba(8,6,4,0.98);
  border-bottom: 1px solid var(--border);
  padding: 24px 40px;
  gap: 20px;
}
.mobile-menu a {
  font-family: var(--font-mono); font-size: 0.85rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text2);
}
.mobile-menu.open { display: flex; }

/* CONTAINER */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 40px; }

/* SECTION LABELS */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}
.section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 40px;
}
.see-all {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.1em; color: var(--text3);
  transition: color 0.2s;
}
.see-all:hover { color: var(--text); }

/* TAGS */
.tag {
  font-family: var(--font-mono);
  font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text3);
  border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 2px;
}
.read-time {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text3); letter-spacing: 0.1em;
}
.coming-soon {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--accent); letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* BUTTONS */
.btn-primary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cream);
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 12px 28px;
  border-radius: 2px;
  cursor: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-ghost {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text2);
  background: transparent;
  border: 1px solid var(--border2);
  padding: 12px 28px;
  border-radius: 2px;
  cursor: none;
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-ghost:hover { color: var(--cream); border-color: var(--text2); transform: translateY(-1px); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center;
  overflow: hidden;
  padding: var(--nav-h) 40px 80px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: var(--bg);
}
.hero-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(200,180,140,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,180,140,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 30s linear infinite;
}
@keyframes gridDrift {
  0% { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--accent);
  display: block; margin-bottom: 32px;
  animation: fadeUp 1s var(--ease) 0.2s both;
}
.hero-title {
  font-family: var(--font-disp);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 300; line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--cream);
  display: flex; flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}
.hero-title-line {
  display: block;
  animation: fadeUp 1s var(--ease) both;
}
.hero-title-line[data-delay="0"] { animation-delay: 0.3s; }
.hero-title-line[data-delay="1"] { animation-delay: 0.45s; }
.hero-title-line[data-delay="2"] { animation-delay: 0.6s; }
.hero-title-accent { color: var(--accent); font-style: italic; }
.hero-sub {
  font-size: 1.15rem; font-style: italic; color: var(--text2);
  margin-bottom: 48px;
  animation: fadeUp 1s var(--ease) 0.75s both;
}
.hero-cta {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  animation: fadeUp 1s var(--ease) 0.9s both;
}
.hero-scroll-hint {
  position: absolute; bottom: 20px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  z-index: 2;
  animation: fadeUp 1s var(--ease) 1.2s both;
  pointer-events: none;
}
.hero-scroll-hint span {
  font-family: var(--font-mono); font-size: 0.6rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--text3);
}
.scroll-line {
  width: 1px; height: 40px; background: var(--border2);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0;
  width: 1px; height: 100%; background: var(--accent);
  animation: scrollDrop 2s ease-in-out infinite;
}
@keyframes scrollDrop {
  0% { top: -100%; } 100% { top: 200%; }
}

/* ===================== FEATURED ===================== */
.featured { padding: 100px 0; border-top: 1px solid var(--border); }
.featured-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 48px 56px;
  max-width: 820px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}
.featured-card::before {
  content: '"'; position: absolute;
  top: -20px; right: 40px;
  font-family: var(--font-disp); font-size: 14rem;
  color: rgba(139,26,26,0.06); line-height: 1;
  pointer-events: none;
}
.featured-card:hover { border-color: var(--border2); border-left-color: var(--accent2); }
.featured-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.featured-title {
  font-family: var(--font-disp); font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400; color: var(--cream);
  margin-bottom: 20px; line-height: 1.1;
}
.featured-excerpt { color: var(--text2); margin-bottom: 32px; font-style: italic; }

/* ===================== STORIES GRID ===================== */
.stories-section { padding: 80px 0 100px; }
.stories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
@media (max-width: 768px) { .stories-grid { grid-template-columns: 1fr; } }

.story-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  cursor: none;
  transition: background 0.25s, border-color 0.25s;
  position: relative; overflow: hidden;
}
.story-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(139,26,26,0.04) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.3s;
}
.story-card:hover { background: var(--bg3); border-color: var(--border2); }
.story-card:hover::after { opacity: 1; }
.story-card--locked { opacity: 0.6; cursor: default; }
.story-card--locked:hover { background: var(--bg2); border-color: var(--border); }
.story-card--locked:hover::after { opacity: 0; }
.story-card-inner { padding: 36px; display: flex; flex-direction: column; height: 100%; min-height: 280px; }
.story-number {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text3); letter-spacing: 0.15em;
  margin-bottom: 16px;
}
.story-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.story-title {
  font-family: var(--font-disp); font-size: 1.5rem;
  font-weight: 400; color: var(--cream);
  margin-bottom: 12px; line-height: 1.2; flex: 1;
}
.story-excerpt { color: var(--text2); font-size: 0.95rem; margin-bottom: 24px; }
.story-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.story-arrow { color: var(--accent); font-size: 1.2rem; transition: transform 0.2s; }
.story-card:hover .story-arrow { transform: translateX(4px); }

/* ===================== NARRADAS PROMO ===================== */
.narradas-promo {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.narradas-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
@media (max-width: 768px) { .narradas-inner { grid-template-columns: 1fr; gap: 48px; } }
.narradas-title {
  font-family: var(--font-disp); font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 300; color: var(--cream);
  margin-bottom: 16px; line-height: 1.15;
}
.narradas-text p { color: var(--text2); margin-bottom: 32px; font-style: italic; }
.waveform-demo {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 4px;
}
.waveform-bars { display: flex; align-items: center; gap: 3px; height: 64px; margin-bottom: 16px; }
.waveform-bars .bar {
  flex: 1; background: var(--accent);
  border-radius: 1px;
  animation: wavePulse 1.4s ease-in-out infinite;
  opacity: 0.7;
}
@keyframes wavePulse {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}
.waveform-label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text3); letter-spacing: 0.1em; }

/* ===================== SUPPORT CTA ===================== */
.support-cta { padding: 100px 0; text-align: center; }
.support-inner { max-width: 600px; margin: 0 auto; }
.support-inner h2 {
  font-family: var(--font-disp); font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300; color: var(--cream);
  margin-bottom: 16px;
}
.support-inner p { color: var(--text2); margin-bottom: 36px; font-style: italic; }

/* ===================== FOOTER ===================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
  background: var(--bg);
}
.footer-top { display: grid; grid-template-columns: 1fr auto; gap: 60px; margin-bottom: 48px; align-items: start; }
@media (max-width: 600px) { .footer-top { grid-template-columns: 1fr; gap: 40px; } }
.footer-logo { font-family: var(--font-disp); font-size: 1.4rem; font-weight: 600; color: var(--cream); margin-bottom: 12px; }
.footer-tagline { color: var(--text3); font-style: italic; font-size: 0.95rem; }
.footer-links { display: flex; gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col-title { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text3); margin-bottom: 4px; }
.footer-col a { font-size: 0.9rem; color: var(--text2); transition: color 0.2s; }
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--text3); letter-spacing: 0.08em;
  flex-wrap: wrap; gap: 12px;
}
.footer-warning { color: var(--accent); }

/* ===================== ANIMATIONS ===================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===================== PAGE HERO (inner pages) ===================== */
.page-hero {
  padding: calc(var(--nav-h) + 60px) 0 60px;
  border-bottom: 1px solid var(--border);
}
.page-hero-label {
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px; display: block;
}
.page-hero-title {
  font-family: var(--font-disp); font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300; color: var(--cream); line-height: 1.05;
}

/* ===================== STORY PAGE ===================== */
.story-body {
  max-width: 680px; margin: 0 auto; padding: 60px 40px 100px;
}
.story-body h2 {
  font-family: var(--font-disp); font-size: 1.5rem; font-weight: 400;
  color: var(--cream); margin: 48px 0 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.story-body p {
  margin-bottom: 22px; color: var(--text);
  font-size: 1.15rem; text-align: justify; hyphens: auto;
}
.story-body p.red { color: #c9a898; }
.story-body p.dim { color: var(--text2); }
.story-body blockquote {
  border-left: 2px solid var(--accent); padding: 12px 0 12px 24px;
  margin: 36px 0; color: var(--cream); font-style: italic;
  font-size: 1.2rem;
}
.story-body .chapter-label {
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 12px; display: block;
}
.story-body .divider {
  text-align: center; color: var(--text3); font-size: 1.2rem;
  letter-spacing: 16px; margin: 48px 0;
  font-family: var(--font-mono);
}

/* ===================== AUDIO PLAYER ===================== */
.player-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 28px 32px;
  border-radius: 4px;
  margin: 32px 0;
}
.player-title { font-family: var(--font-disp); font-size: 1.2rem; color: var(--cream); margin-bottom: 8px; }
.player-meta { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text3); letter-spacing: 0.1em; margin-bottom: 20px; }
.player-controls { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.player-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); border: none; cursor: none;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.player-btn:hover { background: var(--accent2); transform: scale(1.05); }
.player-btn svg { width: 18px; height: 18px; fill: var(--cream); }
.player-progress-wrap { flex: 1; }
.player-progress {
  width: 100%; height: 3px; background: var(--border2);
  border-radius: 2px; cursor: none; position: relative;
  -webkit-appearance: none; appearance: none;
}
.player-progress::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); cursor: none;
}
.player-time { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text3); display: flex; justify-content: space-between; margin-top: 6px; }
.player-waveform { height: 48px; display: flex; align-items: center; gap: 2px; margin-bottom: 12px; overflow: hidden; }
.player-waveform .bar { flex: 1; background: var(--accent); border-radius: 1px; opacity: 0.5; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .nav { padding: 0 24px; }
  .container { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding-top: calc(var(--nav-h) + 20px); }
  .featured-card { padding: 32px 28px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .story-body { padding: 40px 24px 80px; }
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}
@media (max-width: 480px) {
  .footer-links { flex-direction: column; gap: 32px; }
}
