/* ============================================
   MundoIA · css/style.css
   ============================================ */

/* --- Variables --- */
:root {
  --bg:        #06060f;
  --bg-2:      #0c0c1e;
  --surface:   #0f0f24;
  --surface-2: #161630;
  --border:    rgba(255,255,255,0.07);
  --cyan:      #00c8ff;
  --purple:    #8b5cf6;
  --pink:      #ec4899;
  --text:      #e2e8f0;
  --text-muted:#94a3b8;
  --text-dim:  #475569;
  --radius:    12px;
  --radius-sm: 8px;
  --nav-h:     68px;
  --max-w:     1120px;
  --font-head: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow:    0 0 40px rgba(0,200,255,0.08);
}

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

/* --- Grid background --- */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,200,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

/* --- Orbs --- */
.orb {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,200,255,0.5) 0%, transparent 70%);
  top: -200px; right: -150px;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.5) 0%, transparent 70%);
  bottom: 10%; left: -200px;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ============================================
   NAV
   ============================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(6,6,15,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
#navbar.scrolled {
  background: rgba(6,6,15,0.95);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.nav-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: -0.02em;
}
.logo-bracket {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 1.2em;
}
.logo-name {
  color: var(--text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links .nav-pill {
  background: rgba(0,200,255,0.12);
  color: var(--cyan);
  border: 1px solid rgba(0,200,255,0.25);
}
.nav-links .nav-pill:hover {
  background: rgba(0,200,255,0.2);
  color: var(--cyan);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 80px;
  position: relative;
  z-index: 1;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  max-width: 760px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  background: rgba(0,200,255,0.08);
  border: 1px solid rgba(0,200,255,0.2);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 32px;
}
.dot-live {
  width: 7px; height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-heading {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
}
.line-sub {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text-muted);
  font-weight: 600;
}
.line-main {
  font-size: clamp(3.5rem, 9vw, 7rem);
  color: var(--text);
  line-height: 1;
}
.line-role {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text-muted);
  font-weight: 600;
}
.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 28px;
  line-height: 1.7;
}
.hero-desc strong { color: var(--text); font-weight: 600; }
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}
.hero-chips span {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.02);
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cyan);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: 8px;
  transition: opacity 0.2s, transform 0.2s;
  letter-spacing: 0.01em;
}
.btn-main:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 11px 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}
.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid rgba(0,200,255,0.25);
  transition: background 0.2s;
  margin-top: 24px;
}
.btn-outline-sm:hover { background: rgba(0,200,255,0.08); }
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: lowercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}
.section-alt {
  background: rgba(255,255,255,0.015);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================
   ARTICLE CARDS
   ============================================ */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, transform 0.2s;
}
.article-card:hover {
  border-color: rgba(0,200,255,0.2);
  transform: translateY(-2px);
}
.article-featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(0,200,255,0.06) 0%, rgba(139,92,246,0.06) 100%);
  border-color: rgba(0,200,255,0.15);
}
.article-featured h3 {
  font-size: 1.35rem;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tag-regulacion { background: rgba(0,200,255,0.12); color: var(--cyan); }
.tag-legal      { background: rgba(139,92,246,0.12); color: #a78bfa; }
.tag-tech       { background: rgba(236,72,153,0.12); color: #f472b6; }
.article-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}
.article-card h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.article-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}
.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.author-tag {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.author-tag a {
  color: var(--cyan);
  transition: opacity 0.2s;
}
.author-tag a:hover { opacity: 0.7; }
.read-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ============================================
   TOPICS GRID
   ============================================ */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.topic-card:hover {
  border-color: rgba(0,200,255,0.2);
  transform: translateY(-3px);
  background: var(--surface-2);
}
.topic-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}
.topic-card h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.topic-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-left .section-eyebrow { text-align: left; }
.about-left .section-title { text-align: left; font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.about-lead {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
}
.about-body {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}
.about-body strong { color: var(--text); font-weight: 600; }
.about-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.avatar-ring {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  padding: 2px;
  margin: 0 auto 16px;
}
.avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--cyan);
}
.about-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.about-card > p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.about-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.about-pills span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  background: rgba(255,255,255,0.02);
}
.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card strong {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--cyan);
  letter-spacing: -0.02em;
}
.stat-card span {
  font-size: 0.7rem;
  color: var(--text-dim);
  line-height: 1.3;
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-wrapper {
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
}
.newsletter-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}
.newsletter-wrapper .section-title {
  text-align: center;
  margin-bottom: 14px;
}
.newsletter-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.newsletter-form input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-form input::placeholder { color: var(--text-dim); }
.newsletter-form input:focus { border-color: rgba(0,200,255,0.4); }
.newsletter-form button {
  background: var(--cyan);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-body);
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.newsletter-form button:hover { opacity: 0.85; }
.newsletter-form button:disabled { opacity: 0.5; cursor: default; }
.newsletter-legal {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.newsletter-legal a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-message {
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: 6px;
  margin-top: 12px;
}
.form-message.success {
  background: rgba(34,197,94,0.1);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.2);
}
.form-message.error {
  background: rgba(239,68,68,0.1);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 48px 0 40px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.footer-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer p {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.footer-sub a { color: var(--text-muted); transition: color 0.2s; }
.footer-sub a:hover { color: var(--cyan); }

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .article-featured {
    grid-column: 1;
  }
  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  .section { padding: 72px 0; }
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(6,6,15,0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px 20px;
    gap: 4px;
    backdrop-filter: blur(20px);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; width: 100%; }
  .hero-inner { padding: 0 20px; }
  .hero-actions { flex-direction: column; }
  .btn-main, .btn-outline { width: 100%; justify-content: center; }
  .topics-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; }
  .stat-cards { grid-template-columns: 1fr; }
  .footer-links { gap: 16px; }
}
