/* ================================================
   ENALHE Media — styles.css
   Modo oscuro editorial profesional
   ================================================ */

/* === FUENTES === */
@font-face {
  font-family: 'Anton';
  src: url('assets/Anton.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/Inter-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/Inter-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0A0A0A;
  --black-deep: #050505;
  --white: #FFFFFF;
  --red: #E63946;
  --red-bright: #FF4757;
  --gray: #888888;
  --gray-light: #BBBBBB;
  --gray-dark: #2A2A2A;
  --gray-darker: #1A1A1A;

  --container: 1280px;
  --section-pad: clamp(80px, 12vw, 160px);
  --header-h: 80px;

  --font-display: 'Anton', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 600;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* === HEADER === */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 10, 0.75);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.header.scrolled {
  border-bottom-color: var(--gray-dark);
  background: rgba(10, 10, 10, 0.92);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
}
.logo-text { display: inline-flex; align-items: baseline; }
.logo-text .dot {
  color: var(--red);
  margin-left: 2px;
  font-size: 1em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}
.header-nav a {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gray-light);
  position: relative;
}
.header-nav a:hover { color: var(--white); }
.header-nav a.nav-cta {
  background: var(--red);
  color: var(--white);
  padding: 12px 22px;
  letter-spacing: 1.2px;
  transition: background 0.2s;
}
.header-nav a.nav-cta:hover { background: var(--red-bright); }

.mobile-menu-btn {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}

/* === HERO === */
.hero {
  min-height: 100vh;
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 30%; right: -20%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}
.meta-line {
  display: block;
  width: 60px; height: 1px;
  background: var(--red);
}
.meta-text {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(60px, 11vw, 180px);
  line-height: 0.9;
  letter-spacing: -3px;
  margin-bottom: 60px;
  font-weight: 400;
}
.hero-dot {
  color: var(--red);
  display: inline-block;
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: end;
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--gray-light);
  max-width: 520px;
  line-height: 1.5;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  display: inline-block;
  padding: 16px 32px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  text-align: center;
  transition: all 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-ghost:hover {
  background: var(--white);
  color: var(--black);
}
.btn-block { width: 100%; }

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hero-scroll span {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
}
.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--red), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.4; transform: scaleY(0.6); }
}

/* === SECTION HEADERS === */
.section-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-dark);
}
.section-num {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--red);
}
.section-label {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray);
  font-weight: 700;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 84px);
  line-height: 0.95;
  letter-spacing: -1.5px;
  margin-bottom: 60px;
  font-weight: 400;
}
.section-title.small {
  font-size: clamp(32px, 4.5vw, 56px);
}
.section-title em {
  font-style: italic;
  color: var(--red);
}
.dot-red { color: var(--red); }

/* === MANIFIESTO === */
.manifiesto {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--gray-dark);
}

.manifiesto-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}

.manifiesto-text p {
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.5;
  margin-bottom: 24px;
  color: var(--gray-light);
  font-weight: 500;
}
.manifiesto-text strong {
  color: var(--white);
  font-weight: 700;
}

.pillars {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.pillar {
  padding: 32px;
  background: var(--gray-darker);
  border-left: 3px solid var(--red);
  transition: transform 0.3s, background 0.3s;
}
.pillar:hover {
  transform: translateX(8px);
  background: #1F1F1F;
}
.pillar-num {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--red);
  letter-spacing: 2px;
}
.pillar h3 {
  font-family: var(--font-display);
  font-size: 32px;
  margin: 12px 0 16px;
  letter-spacing: -0.5px;
  font-weight: 400;
}
.pillar p {
  color: var(--gray-light);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
}

/* === SERVICIOS === */
.servicios {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--gray-dark);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--gray-dark);
  border: 1px solid var(--gray-dark);
}
.service {
  background: var(--black);
  padding: 48px 32px;
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
}
.service::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 3px;
  background: var(--red);
  transition: width 0.4s;
}
.service:hover { background: var(--gray-darker); }
.service:hover::before { width: 100%; }

.service-num {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--red);
  letter-spacing: 2px;
  display: block;
  margin-bottom: 16px;
}
.service h3 {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  font-weight: 400;
}
.service p {
  color: var(--gray-light);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}

/* === FUNDADOR === */
.fundador {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--gray-dark);
}

.fundador-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.fundador-photo {
  position: relative;
  background: var(--gray-darker);
  overflow: hidden;
}
.fundador-photo img {
  width: 100%;
  height: auto;
  filter: contrast(1.05);
}
.photo-label {
  position: absolute;
  bottom: 24px;
  left: 24px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--red);
  color: var(--white);
  padding: 8px 14px;
  font-weight: 700;
}

.bio-lede {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  margin-bottom: 24px;
  color: var(--white);
  font-weight: 600;
}
.fundador-text > p {
  color: var(--gray-light);
  margin-bottom: 32px;
  font-weight: 500;
}

.bio-credentials {
  list-style: none;
  margin-bottom: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--gray-dark);
  border-bottom: 1px solid var(--gray-dark);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bio-credentials li {
  font-size: 14px;
  color: var(--gray-light);
  display: flex;
  gap: 12px;
  align-items: center;
}
.bio-credentials li span {
  color: var(--red);
  font-size: 16px;
}

.bio-socials {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}
.bio-socials a {
  color: var(--white);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.bio-socials a:hover { border-bottom-color: var(--red); }
.bio-socials span { color: var(--gray); }

/* === CONTACTO === */
.contacto {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--gray-dark);
  position: relative;
  overflow: hidden;
}
.contacto::before {
  content: '';
  position: absolute;
  top: 50%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.contacto .container { position: relative; }

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.contacto-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.info-block {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-dark);
}
.info-label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 8px;
  font-weight: 700;
}
.info-value {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.3px;
  color: var(--white);
  font-weight: 400;
  display: block;
}
a.info-value:hover { color: var(--red); }

.contacto-form {
  background: var(--gray-darker);
  padding: 40px;
  border: 1px solid var(--gray-dark);
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 8px;
  font-weight: 700;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--black);
  border: 1px solid var(--gray-dark);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  transition: border-color 0.2s;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--red);
}

/* === FOOTER === */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--gray-dark);
  background: var(--black-deep);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--gray-dark);
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 56px;
  letter-spacing: -1px;
}
.footer-tagline {
  font-size: 14px;
  color: var(--gray-light);
  max-width: 350px;
  text-align: right;
  font-weight: 500;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--gray);
  flex-wrap: wrap;
  gap: 16px;
  font-weight: 500;
}
.footer-socials {
  display: flex;
  gap: 24px;
}
.footer-socials a {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  transition: color 0.2s;
}
.footer-socials a:hover { color: var(--red); }

/* === WHATSAPP FLOAT === */
.whatsapp-float {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 64px;
  height: 64px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: pulseWA 2.5s ease-in-out infinite;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
}
.whatsapp-float svg {
  width: 32px;
  height: 32px;
  color: var(--white);
}
@keyframes pulseWA {
  0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 0 0 16px rgba(37, 211, 102, 0); }
}

/* === ANIMATIONS === */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .manifiesto-grid,
  .fundador-grid,
  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--black);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-dark);
  }
  .header-nav.open { display: flex; }
  .header-nav a.nav-cta {
    text-align: center;
  }
  .mobile-menu-btn {
    display: flex;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-tagline { text-align: left; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .whatsapp-float {
    width: 56px;
    height: 56px;
    bottom: 20px;
    right: 20px;
  }
  .whatsapp-float svg { width: 28px; height: 28px; }

  .contacto-form { padding: 24px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}

/* ================================================
   MOTOR ENALHE — puente con el sistema config-driven
   (páginas de sección, Card, Nota heredan esta paleta)
   ================================================ */

/* Alias: nombres de variables que usan los componentes del motor
   apuntados a la paleta real de la landing. */
:root {
  --bg: var(--black);
  --surface: var(--gray-darker);
  --surface-2: #1F1F1F;
  --text: var(--white);
  --muted: var(--gray-light);
  --border: var(--gray-dark);
  --display: var(--font-display);
  --body: var(--font-body);
}

/* El header es position:fixed. El home lo compensa dentro del hero,
   pero las páginas internas necesitan un empujón para no quedar tapadas. */
main.con-offset { padding-top: var(--header-h); }

/* Estado activo en el nav unificado (sección actual). */
.header-nav a.activo { color: var(--white); }
.header-nav a.activo::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--red);
  margin-top: 4px;
}
.header-nav a.nav-cta.activo { color: var(--white); }
.header-nav a.nav-cta.activo::after { display: none; }

/* Nav con más pestañas (Notas, Videos, Inteligencia Artificial, Opinión: En
   Corto, Servicios, Contacto): que no se apriete ni se corte en pantallas
   medianas/chicas. */
@media (max-width: 1150px) {
  .header-nav { gap: 22px; }
  .header-nav a { font-size: 12px; letter-spacing: 0.6px; }
  .header-nav a.nav-cta { padding: 10px 16px; }
}
/* A ≤900px pasa a menú hamburguesa (columna), así nunca se corta en tablets.
   El toggle .open lo maneja el script.js existente. */
@media (max-width: 900px) {
  .header-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 16px;
    padding: 24px;
    background: var(--black);
    border-bottom: 1px solid var(--gray-dark);
  }
  .header-nav.open { display: flex; }
  .header-nav a { font-size: 13px; letter-spacing: 1px; }
  .header-nav a.nav-cta { text-align: center; }
  .header-nav a.activo::after { display: none; }
  .mobile-menu-btn { display: flex; }
}
