/* ============================================
   1. VARIABLES (tokens de diseño)
   Centralizamos colores y fuentes aquí para
   poder cambiar todo el tema desde un solo lugar.
============================================ */
:root {
  --bg-void: #0a0e12;
  --bg-panel: #12181f;
  --bg-panel-light: #1a222b;
  --steel: #3a4753;
  --steel-light: #556372;

  --accent-amber: #ffb020;
  --accent-cyan: #00d9c0;
  --danger: #ff5c5c;
  --warning: #ffb020;
  --safe: #00d9c0;

  --text-primary: #e4e9ed;
  --text-dim: #8a97a3;

  --font-display: 'Chakra Petch', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 4px;
  --max-width: 1120px;
}

/* ============================================
   2. RESET BÁSICO
   Quitamos los estilos por defecto del navegador
   para tener un punto de partida consistente.
============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Respeta a quienes prefieren menos animación */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Foco visible para navegación por teclado (accesibilidad) */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   3. BARRA DE ESTADO (elemento de firma)
============================================ */
.status-bar {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--steel);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
}

.status-bar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ============================================
   4. HEADER / NAV
============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 18, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--steel);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}

.logo__mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.logo__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo__accent { color: var(--accent-cyan); }

.nav {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
}

.nav a {
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--accent-cyan); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
}

/* ============================================
   5. HERO
============================================ */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--steel);
}

/* Patrón hexagonal de fondo, muy sutil, con clip-path repetido en SVG inline via background */
.hero__hexgrid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(30deg, var(--bg-panel) 12%, transparent 12.5%, transparent 87%, var(--bg-panel) 87.5%, var(--bg-panel)),
    linear-gradient(150deg, var(--bg-panel) 12%, transparent 12.5%, transparent 87%, var(--bg-panel) 87.5%, var(--bg-panel));
  background-size: 44px 76px;
  opacity: 0.15;
  mask-image: radial-gradient(ellipse at top, black, transparent 70%);
}

.hero__inner {
  position: relative;
  max-width: 720px;
}

.eyebrow {
  font-family: var(--font-mono);
  color: var(--accent-amber);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 20px;
  min-height: 1.15em;
}

.hero__title.is-typing::after {
  content: '_';
  color: var(--accent-cyan);
  animation: blink 0.8s step-end infinite;
}

.hero__tagline {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 1rem;
  min-height: 1.6em;
  margin-bottom: 32px;
}

.cursor {
  color: var(--accent-cyan);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
  display: inline-block;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--accent-cyan);
  color: var(--bg-void);
}
.btn--primary:hover {
  background: #33e6d0;
  box-shadow: 0 0 16px rgba(0, 217, 192, 0.5), 0 0 40px rgba(0, 217, 192, 0.15);
}

.btn--ghost {
  background: transparent;
  border-color: var(--steel-light);
  color: var(--text-primary);
}
.btn--ghost:hover { border-color: var(--accent-cyan); }

/* ============================================
   6. SECCIONES GENERALES
============================================ */
.section-head {
  margin-bottom: 40px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.section-head p { color: var(--text-dim); }

.reports, .categories, .subscribe {
  padding: 80px 0;
  border-bottom: 1px solid var(--steel);
}

/* ============================================
   7. TARJETAS DE INFORME (report-card)
   Bordes cortados en las esquinas = "placa blindada"
============================================ */
.reports__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.report-card {
  background: var(--bg-panel);
  border: 1px solid var(--steel);
  padding: 24px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.report-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.report-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 217, 192, 0.18), 0 0 46px rgba(0, 217, 192, 0.08);
}

.report-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 0.04em;
}
.tag--danger { background: rgba(255,92,92,0.15); color: var(--danger); }
.tag--warning { background: rgba(255,176,32,0.15); color: var(--warning); }
.tag--safe { background: rgba(0,217,192,0.15); color: var(--safe); }

.report-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 10px;
  line-height: 1.35;
}

.report-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.report-card__link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.report-card--soon { opacity: 0.6; }
.report-card__link--disabled {
  color: var(--text-dim);
  cursor: default;
}

/* ============================================
   8. CATEGORÍAS
============================================ */
.categories__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.category-chip {
  background: var(--bg-panel);
  border: 1px solid var(--steel);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.category-chip:hover {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

/* ============================================
   9. SUSCRIPCIÓN
============================================ */
.subscribe__inner {
  text-align: center;
  max-width: 560px;
}
.subscribe__inner h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 10px;
}
.subscribe__inner > p { color: var(--text-dim); margin-bottom: 28px; }

.subscribe__form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.subscribe__form input {
  flex: 1;
  min-width: 220px;
  background: var(--bg-panel);
  border: 1px solid var(--steel);
  border-radius: var(--radius);
  padding: 13px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
}
.subscribe__form input:focus { border-color: var(--accent-cyan); outline: none; }

.subscribe__note {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  min-height: 1.2em;
}

/* ============================================
   10. FOOTER
============================================ */
.site-footer { padding: 32px 0; }
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.site-footer__links { display: flex; gap: 20px; }
.site-footer__links a:hover { color: var(--accent-cyan); }

/* ============================================
   12. PÁGINAS LEGALES (privacidad, contacto)
============================================ */
.legal {
  padding: 70px 0 90px;
}

.legal__inner { max-width: 760px; }

.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 10px;
}

.legal__updated {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  margin-bottom: 40px;
}

.legal__body h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-top: 34px;
  margin-bottom: 12px;
  color: var(--accent-cyan);
}

.legal__body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-top: 22px;
  margin-bottom: 10px;
}

.legal__body p {
  color: var(--text-dim);
  margin-bottom: 14px;
}

.legal__body a {
  color: var(--accent-amber);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal__body a:hover { color: var(--accent-cyan); }

.legal__note {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Tarjetas de contacto */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.contact-card--single {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.contact-card {
  background: var(--bg-panel);
  border: 1px solid var(--steel);
  padding: 22px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.contact-card h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.contact-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.contact-email {
  font-family: var(--font-mono);
  color: var(--accent-cyan) !important;
  font-size: 0.9rem;
  text-decoration: none !important;
}
.contact-email:hover { color: var(--accent-amber) !important; }

/* ============================================
   13. RESPONSIVE
   Estrategia: mobile-first en los valores base
   (clamp, minmax, flex-wrap) + ajustes puntuales
   por breakpoint para lo que no se resuelve solo.
============================================ */

/* Evita que cualquier elemento ancho (imagen, tabla, código)
   rompa el layout horizontal en pantallas chicas */
html, body { overflow-x: hidden; }

/* --- TABLET (≤ 900px) --- */
@media (max-width: 900px) {
  .reports__grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .hero__hexgrid { background-size: 34px 60px; }
}

/* --- MÓVIL GRANDE / TABLET VERTICAL (≤ 720px) --- */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--steel);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
    display: none;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }

  .nav.is-open { display: flex; }

  .hero { padding: 60px 0 60px; }

  .reports__grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .subscribe__form {
    flex-direction: column;
    align-items: stretch;
  }

  .subscribe__form input { min-width: 0; }

  .site-footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .site-footer__links { justify-content: center; }
}

/* --- MÓVIL PEQUEÑO (≤ 480px) --- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .hero { padding: 48px 0 44px; }

  .hero__title { font-size: clamp(1.7rem, 8vw, 2.1rem); }

  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { text-align: center; }

  .section-head h2 { font-size: 1.5rem; }

  .report-card, .contact-card { padding: 18px; }

  .status-bar__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 78vw;
  }

  .logo__text { font-size: 1rem; }
}

