/* =============================================================
   AlphaSpace — styles.css
   Sistema de diseño v1.0 · Guía de estilo aplicada
   Paleta: #100509 · #1E0C12 · #FF2D75 · #FF7BAC
   Tipografía: Space Grotesk + JetBrains Mono
   v=20260603
   ============================================================= */

/* =============================================================
   1. TOKENS — Sistema AlphaTech
   Regla 60·30·10: fondo · superficies · acento
   ============================================================= */
:root {
  /* ── Backgrounds (60%) ── */
  --bg:          #100509;   /* Negro espacial — fondo principal */
  --bg-2:        #160609;   /* Fondo intermedio */
  --bg-card:     #1e1e28;   /* Gris neutro — superficies / tarjetas */
  --bg-card-2:   #262636;   /* Gris hover / elevación */

  /* ── Text (neutros 90%) ── */
  --ink:         #F6F7FA;   /* Blanco — texto primer plano */
  --ink-soft:    #C9CBD6;   /* Gris claro — texto secundario */
  --ink-muted:   #7E8099;   /* Texto desactivado / metadatos */
  --ink-dim:     #4A4B60;   /* Texto muy tenue / divisores */

  /* ── Acentos (10%) ── */
  --accent:      #FF2D75;   /* Rosa espacial — acento primario, CTAs */
  --accent-2:    #FF7BAC;   /* Rosa claro — acento secundario */
  --accent-dim:  rgba(255, 45, 117, 0.12);
  --accent-2-dim: rgba(255, 123, 172, 0.10);
  --accent-grad: linear-gradient(135deg, #FF2D75 0%, #FF7BAC 100%);

  /* ── Semánticos ── */
  --up:          #22c55e;
  --down:        #ef4444;
  --neutral:     #f59e0b;

  /* ── Líneas y bordes ── */
  --line:        rgba(255, 255, 255, 0.06);
  --line-bright: rgba(255, 255, 255, 0.10);
  --border-card: rgba(255, 255, 255, 0.07);

  /* ── Layout (Rejilla 12 col, máx 1280px, gutter 24px) ── */
  --max-w:       1280px;
  --gutter:      clamp(1.5rem, 5vw, 4rem);   /* ≈ 64px en desktop */
  --col-gap:     1.5rem;                      /* 24px gutter */
  --nav-h:       68px;

  /* ── Espaciado (escala 8·16·24·40·64) ── */
  --sp-1:  8px;
  --sp-2:  16px;
  --sp-3:  24px;
  --sp-4:  40px;
  --sp-5:  64px;

  /* ── Radios ── */
  --r-card: 14px;
  --r-btn:  8px;
  --r-tag:  20px;

  /* ── Tipografía ── */
  --sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

  /* ── Easing ── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =============================================================
   2. RESET & BASE
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  font-family: var(--sans);
  font-size: 18px;                      /* Body: 18px según guía */
  line-height: 1.6;                     /* Interlineado 1.6 */
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }

/* Titulares — Space Grotesk SemiBold, tracking -2% */
h1, h2, h3, h4, h5 {
  text-wrap: balance;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;            /* SemiBold */
}

::selection { background: var(--accent); color: #fff; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-btn);
}

/* =============================================================
   3. UTILIDADES
   ============================================================= */
.skip-link {
  position: fixed; top: -120px; left: 1rem;
  padding: .5rem 1rem; background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: .875rem;
  z-index: 9999; border-radius: var(--r-btn);
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split]  { opacity: 1; transform: none; }   /* defensive */

/* =============================================================
   4. TIPOGRAFÍA — Escala AlphaTech
   ============================================================= */

/* Etiquetas / metadatos — 13px Mono +12% */
.label, .section-kicker, .nc-category, .ticker-sym,
.ticker-val, .ticker-chg, .cc-ticker, .nc-date,
.stat-label, .signal-label, .ap-m-label, .ap-bar-label,
.footer-tagline, .footer-copy, .lang-toggle, .cc-tag {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);            /* Azul claro para etiquetas de sección */
  margin-bottom: var(--sp-2);
}
.section-kicker::before {
  content: "";
  display: inline-block;
  width: 1.25rem; height: 1px;
  background: var(--accent-2);
  flex-shrink: 0;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 6vw, var(--sp-5));
}
.section-header .section-kicker { justify-content: center; }
.section-header .section-kicker::before { display: none; }
.section-header .section-kicker::after {
  content: "";
  display: inline-block;
  width: 1.25rem; height: 1px;
  background: var(--accent-2);
  flex-shrink: 0;
}

/* H2 de sección: 32px Medium */
.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2rem);   /* ≈ 32px */
  font-weight: 500;                         /* Medium */
  color: var(--ink);
  margin-bottom: var(--sp-2);
}

.section-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 54ch;
  margin-inline: auto;
}

/* =============================================================
   5. BOTONES — AlphaTech
   ============================================================= */

/* Primario — violeta sólido */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1.4rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--r-btn);
  transition: opacity .2s, transform .2s var(--ease-bounce), box-shadow .25s;
}
.btn-primary:hover {
  opacity: .88;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(124, 92, 255, 0.35);
}

/* Secundario — outlined */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1.4rem;
  border: 1px solid var(--line-bright);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--r-btn);
  transition: border-color .2s, color .2s, background .2s;
}
.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--ink);
  background: var(--accent-2-dim);
}

/* Outline suave — "ver todo" */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.3rem;
  border: 1px solid var(--border-card);
  color: var(--ink-muted);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--r-btn);
  transition: border-color .25s, color .25s, background .25s;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: var(--accent-dim);
}

/* =============================================================
   6. SPLASH
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
  animation: splashSafety .01s 4.5s forwards;
}
@keyframes splashSafety { to { opacity: 0; pointer-events: none; visibility: hidden; } }
.splash.is-out { opacity: 0; pointer-events: none; transform: translateY(-100%); }

.splash-inner {
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  animation: splashFadeIn .7s var(--ease-out) .15s both;
}
@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Logo AlphaTech: ícono "A" + nombre */
.splash-logo {
  display: flex; align-items: center; gap: .65rem;
}
.splash-icon {
  width: 40px; height: 40px;
  background: transparent;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  animation: splashPulse 1.2s ease-in-out infinite;
}
.splash-icon svg { width: 40px; height: 40px; display: block; }
@keyframes splashPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,92,255,.5); }
  50%       { box-shadow: 0 0 0 8px rgba(124,92,255,0); }
}
.splash-name {
  font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
}
.splash-name span {
  background: linear-gradient(120deg, #FF2D75, #FF7BAC);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}   /* "Tech" con degradado */

.splash-bar {
  width: 160px; height: 2px;
  background: var(--line-bright); border-radius: 2px; overflow: hidden;
}
.splash-progress {
  height: 100%; background: var(--accent-grad);
  animation: splashLoad 1.6s var(--ease-soft) .4s forwards; width: 0;
}
@keyframes splashLoad { to { width: 100%; } }

/* =============================================================
   7. NAV
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; height: var(--nav-h);
  background: transparent;
  transition: background .3s, backdrop-filter .3s, border-bottom-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(13, 14, 19, 0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: var(--line);
}

.nav-inner {
  max-width: var(--max-w); margin-inline: auto;
  padding-inline: var(--gutter); height: 100%;
  display: flex; align-items: center; gap: 2rem;
}

/* Brand: ícono "A" + "AlphaTech" */
.nav-brand {
  display: flex; align-items: center; gap: .55rem;
  flex-shrink: 0;
}
.nav-brand-icon {
  width: 30px; height: 30px;
  background: transparent;
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-brand-icon svg { width: 30px; height: 30px; display: block; }
.nav-brand-name {
  font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
}
.nav-brand-name span {
  background: linear-gradient(120deg, #FF2D75, #FF7BAC);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav-links {
  display: none; align-items: center; gap: .1rem; flex: 1;
}
.nav-link {
  padding: .4rem .8rem;
  font-size: 15px; font-weight: 500;
  color: var(--ink-muted);
  border-radius: 6px;
  transition: color .2s, background .2s;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute; bottom: 2px; left: .8rem; right: .8rem;
  height: 1px; background: var(--accent-2);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease-out);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--ink); }

.nav-actions {
  display: flex; align-items: center; gap: .75rem; margin-left: auto;
}

/* Language toggle */
.lang-toggle {
  display: flex; align-items: center; gap: .25rem;
  padding: .3rem .6rem;
  border: 1px solid var(--line-bright); border-radius: var(--r-tag);
  font-size: 13px; font-weight: 600; letter-spacing: .06em;
  color: var(--ink-muted);
  transition: border-color .2s, color .2s;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--ink); }
.lang-sep { opacity: .3; }
[data-lang="es"] .lang-opt[data-lang-opt="es"],
[data-lang="en"] .lang-opt[data-lang-opt="en"] { color: var(--ink); font-weight: 700; }

/* Hamburger */
.nav-hamburger {
  display: flex; flex-direction: column; gap: 5px;
  padding: .4rem; border-radius: 6px;
  transition: background .2s;
}
.nav-hamburger:hover { background: var(--line); }
.nav-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--ink-soft); border-radius: 2px;
  transition: transform .3s var(--ease-out), opacity .3s;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  display: flex; flex-direction: column;
  padding: 0 var(--gutter);
  background: rgba(13,14,19,.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  max-height: 0; overflow: hidden;
  transition: max-height .4s var(--ease-out), padding .4s var(--ease-out);
}
.nav-mobile.is-open { max-height: calc(100vh - 64px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding-block: 1rem 1.5rem; }
.nav-mobile-link {
  padding: .7rem 0; font-size: 1rem; font-weight: 500;
  color: var(--ink-muted); border-bottom: 1px solid var(--line);
  transition: color .2s;
}
.nav-mobile-link:hover { color: var(--ink); }

/* =============================================================
   8. HERO — Display 64-72px SemiBold, tracking -2%
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  filter: saturate(0.5) brightness(0.25);
}

/* Overlay: degradado oscuro 0→95% (según guía de imágenes) */
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13,14,19,0.35) 0%, rgba(13,14,19,0.75) 55%, var(--bg) 100%),
    linear-gradient(90deg, rgba(13,14,19,0.65) 0%, transparent 65%);
}

/* Mesh violeta-azul */
.hero-mesh {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 72% 28%, rgba(124,92,255,.20) 0%, transparent 65%),
    radial-gradient(ellipse 35% 35% at 18% 65%, rgba(78,197,255,.10) 0%, transparent 55%);
  animation: meshDrift 18s ease-in-out infinite;
}
@keyframes meshDrift {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .8; transform: scale(1.05); }
}

/* Grain */
.hero-grain {
  position: absolute; inset: 0; z-index: 2; opacity: .035; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.hero-content {
  position: relative; z-index: 10;
  max-width: var(--max-w); width: 100%;
  margin-inline: auto; padding-inline: var(--gutter);
  padding-block: 5rem 8rem;
}

.hero-kicker {
  display: flex; align-items: center; gap: .5rem;
  font-size: 13px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-muted);
  margin-bottom: 1.25rem;
  opacity: 0; animation: heroFadeUp .6s var(--ease-out) 1.2s both;
}
.kicker-dot {
  display: block; width: 6px; height: 6px;
  background: var(--up); border-radius: 50%;
  animation: kBlink 2s ease-in-out infinite;
}
@keyframes kBlink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Display: 64-72px SemiBold tracking -2% */
.hero-title {
  font-size: clamp(2.6rem, 8.5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.25rem;
  text-wrap: balance; max-width: 15ch;
}
.hero-title em {
  font-style: italic;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-line { display: block; opacity: 0; transform: translateY(18px); }
.hero-line:nth-child(1) { animation: heroFadeUp .65s var(--ease-out) 1.35s both; }
.hero-line:nth-child(2) { animation: heroFadeUp .65s var(--ease-out) 1.5s both; }
.hero-line:nth-child(3) { animation: heroFadeUp .65s var(--ease-out) 1.65s both; }

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* Body: 18px Regular line-height 1.6 */
.hero-sub {
  font-size: 18px; line-height: 1.6;
  color: var(--ink-soft); max-width: 46ch;
  margin-bottom: 2rem;
  opacity: 0; animation: heroFadeUp .65s var(--ease-out) 1.85s both;
}

.hero-ctas {
  display: flex; flex-wrap: wrap; gap: .75rem;
  opacity: 0; animation: heroFadeUp .65s var(--ease-out) 2s both;
}

/* ── Ticker ── */
.hero-ticker {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 10;
  height: 42px;
  background: rgba(13,14,19,.85); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); overflow: hidden;
  display: flex; align-items: center;
}
.ticker-track { overflow: hidden; flex: 1; }
.ticker-items {
  display: flex; align-items: center; gap: 1rem;
  white-space: nowrap;
  animation: tickerScroll 42s linear infinite;
  will-change: transform;
}
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-item { display: inline-flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.ticker-sym  { font-size: 12px; font-weight: 600; letter-spacing: .05em; color: var(--ink-soft); }
.ticker-val  { font-size: 12px; font-weight: 500; }
.ticker-chg  { font-size: 11px; font-weight: 600; }
.ticker-sep  { color: var(--ink-dim); font-size: .65rem; flex-shrink: 0; }
.up   { color: var(--up); }
.down { color: var(--down); }

/* =============================================================
   9. STATS BAR
   ============================================================= */
.stats-bar {
  background: var(--bg-card); border-bottom: 1px solid var(--line);
  padding-block: var(--sp-4);
}
.stats-inner {
  max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap;
}
.stat-item {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding-inline: clamp(1.5rem, 3vw, 2.5rem);
}

/* Número grande ≈ Display */
.stat-num {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600; letter-spacing: -0.03em; color: var(--ink);
}
.stat-label { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.stat-divider { width: 1px; height: 44px; background: var(--line-bright); flex-shrink: 0; }

/* =============================================================
   10. COMPANIES — tarjetas AlphaTech
   ============================================================= */
.companies {
  padding-block: clamp(3.5rem, 8vw, var(--sp-5));
  max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter);
}

.companies-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--col-gap);
}
@media (max-width: 900px) { .companies-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .companies-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 430px)  { .companies-grid { grid-template-columns: 1fr; } }

/* Sección empresas — botón "ver más" en móvil */
.companies-more { display: none; }
.companies-more-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.3rem; border-radius: var(--r-tag);
  background: var(--bg-card); border: 1px solid var(--border-card);
  color: var(--ink-soft); font-family: var(--sans); font-weight: 500; font-size: .95rem;
  cursor: pointer; transition: border-color .2s, color .2s, background .2s;
}
.companies-more-btn:hover { color: var(--ink); border-color: var(--accent); }
.companies-more-btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease-out); }
.companies-more-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.companies-more-btn .cm-less { display: none; }
.companies-more-btn[aria-expanded="true"] .cm-more { display: none; }
.companies-more-btn[aria-expanded="true"] .cm-less { display: inline; }
@media (max-width: 620px) {
  .companies-grid:not(.is-expanded) .company-card:nth-child(n+5) { display: none; }
  .companies-more { display: flex; justify-content: center; margin-top: var(--sp-3); }
}

/* Tarjeta empresa */
.company-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid color-mix(in srgb, var(--co, var(--accent)) 40%, var(--border-card));
  border-radius: var(--r-card);           /* 14px */
  padding: 20px;
  cursor: pointer; overflow: hidden;
  transition: border-color .3s, transform .3s var(--ease-out), box-shadow .3s;
}
.company-card::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--co-dim, rgba(124,92,255,.06));
  opacity: .55; transition: opacity .3s;
}
.company-card:hover {
  border-color: var(--co, var(--accent));
  transform: translateY(-4px);
  box-shadow:
    0 20px 48px rgba(0,0,0,.45),
    0 0 0 1px var(--co, var(--accent));
}
.company-card:hover::before { opacity: 1; }

/* Glow en hover — sin color-mix() para compatibilidad */
.cc-glow {
  position: absolute; top: -60px; right: -60px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, var(--co, #FF2D75) 0%, transparent 70%);
  filter: blur(28px); opacity: 0; transition: opacity .4s; pointer-events: none;
}
.company-card:hover .cc-glow { opacity: .9; }

/* Header de tarjeta */
.cc-header {
  position: relative; display: flex; align-items: center;
  gap: .85rem; margin-bottom: var(--sp-2); z-index: 1;
}
.cc-logo { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; }
.cc-meta { flex: 1; }

/* H3 tarjeta ≈ H1 escala: 18px SemiBold */
.cc-name {
  font-size: 1rem; font-weight: 600; letter-spacing: -0.015em;
  color: var(--ink); margin-bottom: .1rem; line-height: 1.2;
}
/* Ticker: Mono 13px */
.cc-ticker { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--ink-muted); text-transform: uppercase; }

.cc-price-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; flex-shrink: 0; }
.cc-price { font-size: .95rem; font-weight: 700; color: var(--ink); }
.cc-change { font-size: 11px; font-weight: 600; }

/* Descripción: 18px → reducida a 15px en tarjeta para no saturar */
.cc-desc {
  position: relative; z-index: 1;
  font-size: 15px; line-height: 1.6;
  color: var(--ink-muted); margin-bottom: var(--sp-2);
}

/* Acciones de la tarjeta de empresa (sustituyen a la descripción) */
.cc-actions {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: .5rem;
  margin-bottom: var(--sp-2);
}
.cc-actions-row { display: flex; gap: .5rem; }
.cc-btn {
  flex: 1 1 0;
  display: inline-flex; align-items: center; justify-content: center;
  gap: .35rem; padding: .6rem .6rem;
  border-radius: var(--r-btn);
  border: 1px solid var(--line-bright);
  background: rgba(255,255,255,.025);
  color: var(--ink-soft);
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  letter-spacing: .005em; text-align: center; white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s, transform .2s var(--ease-out);
}
.cc-btn:hover {
  border-color: var(--co, var(--accent));
  color: var(--ink);
  background: color-mix(in srgb, var(--co, var(--accent)) 12%, transparent);
  transform: translateY(-1px);
}
.cc-btn--primary {
  background: color-mix(in srgb, var(--co, var(--accent)) 15%, transparent);
  border-color: color-mix(in srgb, var(--co, var(--accent)) 38%, transparent);
  color: var(--ink); font-weight: 600;
}
.cc-btn--primary:hover {
  background: color-mix(in srgb, var(--co, var(--accent)) 24%, transparent);
}

/* Tags */
.cc-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: var(--sp-2); position: relative; z-index: 1; }
.cc-tag {
  padding: .18rem .55rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-card);
  border-radius: var(--r-tag);
  font-size: 11px; font-weight: 500; letter-spacing: .05em;
  color: var(--ink-dim); text-transform: uppercase;
  transition: border-color .2s, color .2s;
}
.company-card:hover .cc-tag {
  border-color: var(--co, var(--accent));
  color: var(--ink-soft);
  opacity: .7;
}

/* Señal */
.cc-signal { display: flex; align-items: center; gap: .4rem; position: relative; z-index: 1; }
.signal-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.signal-bull    { background: var(--up);      box-shadow: 0 0 6px var(--up); }
.signal-neutral { background: var(--neutral); box-shadow: 0 0 6px var(--neutral); }
.signal-bear    { background: var(--down);    box-shadow: 0 0 6px var(--down); }
.signal-label   { font-size: 12px; font-weight: 500; letter-spacing: .05em; color: var(--ink-muted); text-transform: uppercase; }

/* =============================================================
   12. NEWS — Anatomía de tarjeta AlphaTech
   Imagen 16:9 · radio 14px · Categoría mono azul
   Titular SemiBold máx. 2 líneas · Meta gris
   ============================================================= */
.news {
  padding-block: clamp(3.5rem, 8vw, var(--sp-5));
  max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter);
}

.news-grid { display: grid; grid-template-columns: 1fr; gap: var(--col-gap); }

/* Tarjeta noticia */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .3s, transform .3s var(--ease-out), box-shadow .3s;
}
.news-card:hover {
  border-color: var(--line-bright);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}

/* Imagen 16:9 — ratio fijo según guía */
.nc-img-wrap {
  position: relative; aspect-ratio: 16 / 9;
  overflow: hidden; flex-shrink: 0;
}
.nc-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease-out), filter .5s;
  /* Overlay de contraste 0→95% según guía */
  filter: brightness(.75) saturate(.65);
}
.news-card:hover .nc-img-wrap img { transform: scale(1.04); filter: brightness(.85) saturate(.75); }

/* Degradado oscuro sobre imagen (0→95%) */
.nc-img-wrap::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,14,19,0) 30%, rgba(13,14,19,.95) 100%);
  pointer-events: none;
}

/* Fila categoría + badge sobre imagen */
.nc-img-meta {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem .85rem .75rem;
  /* el ::after del wrap ya pone el degradado oscuro — no necesitamos otro */
}

/* Meta inline (impacto · hora) en footer */
.nc-meta-inline {
  display: flex; align-items: center; gap: .3rem;
}

/* Badge empresa */
.nc-badge {
  position: absolute; top: .75rem; left: .75rem; z-index: 2;
  padding: .18rem .5rem;
  border-radius: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: #fff;
}
/* Píldora de fecha — esquina superior derecha de la imagen */
.nc-date-pill {
  position: absolute; top: .75rem; right: .75rem; z-index: 2;
  padding: .22rem .65rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500; letter-spacing: .04em;
  color: var(--ink-soft);
  background: rgba(13,14,19,.72);
  border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  white-space: nowrap;
}

.nc-badge--nvidia    { background: #76b900; }
.nc-badge--microsoft { background: #0078d4; }
.nc-badge--meta      { background: #0082fb; }
.nc-badge--tsmc      { background: #e31837; }
.nc-badge--amd       { background: #ed1c24; }
.nc-badge--intel     { background: #0071c5; }
.nc-badge--apple     { background: #555; }

.nc-body { padding: var(--sp-3); display: flex; flex-direction: column; gap: .6rem; flex: 1; }

.nc-meta { display: flex; align-items: center; gap: .6rem; }

/* Categoría — mono, azul claro (#4EC5FF) según guía */
.nc-category {
  font-size: 13px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2);   /* Azul claro */
}
.nc-date { font-size: 13px; letter-spacing: .04em; color: var(--ink-dim); }

/* Titular SemiBold máx. 2 líneas ≈ H1 44px → aquí proporcional */
.nc-title {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 600;              /* SemiBold */
  color: var(--ink);
  line-height: 1.3; letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Body 18px */
.nc-excerpt { font-size: 15px; line-height: 1.6; color: var(--ink-muted); }

/* Meta (autor · hora) — gris */
.nc-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; flex-wrap: wrap; margin-top: auto;
  padding-top: var(--sp-2); border-top: 1px solid var(--line);
}
.nc-impact { font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.nc-impact.positive { color: var(--up); }
.nc-impact.negative { color: var(--down); }

.nc-read { font-size: 14px; font-weight: 600; color: var(--ink-muted); transition: color .2s; }
.nc-read:hover { color: var(--accent-2); }

/* Tarjeta destacada */
.news-card--featured .nc-title { font-size: clamp(1.1rem, 2vw, 1.3rem); }
.news-cta { text-align: center; margin-top: var(--sp-4); }

/* =============================================================
   13. ANALYSIS TEASER
   ============================================================= */
.analysis {
  padding-block: clamp(3.5rem, 8vw, var(--sp-5));
  background: var(--bg-card); border-block: 1px solid var(--line);
}
.analysis-inner {
  max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center;
}
.analysis-text { max-width: 500px; }

/* H2: 32px Medium */
.analysis-text h2 {
  font-size: clamp(1.75rem, 3.5vw, 2rem); /* ≈ 32px */
  font-weight: 500; margin-bottom: var(--sp-2);
}
.analysis-body { font-size: 18px; line-height: 1.6; color: var(--ink-muted); margin-bottom: 1.25rem; }
.analysis-features { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.analysis-features li { font-size: 15px; color: var(--ink-soft); }

/* Card preview análisis */
.analysis-card-preview { display: flex; justify-content: center; }
.ap-card {
  background: var(--bg-2); border: 1px solid var(--line-bright);
  border-radius: var(--r-card); padding: var(--sp-3);
  width: 100%; max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.ap-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-2); }
.ap-company { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ap-date    { font-size: 13px; letter-spacing: .04em; color: var(--ink-dim); }
.ap-title   { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.45; margin-bottom: 1.1rem; }
.ap-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: var(--sp-2); }
.ap-metric  { display: flex; flex-direction: column; gap: .2rem; }
.ap-m-label { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-dim); }
.ap-m-val   { font-size: 14px; font-weight: 700; color: var(--ink); }
.ap-bar     { height: 3px; background: var(--line-bright); border-radius: 3px; overflow: hidden; margin-bottom: .35rem; }
.ap-bar-fill { height: 100%; border-radius: 3px; transition: width 1.5s var(--ease-soft); }
.ap-bar-label { font-size: 12px; color: var(--ink-dim); }

/* =============================================================
   14. FOOTER
   ============================================================= */
.footer { background: var(--bg); border-top: 1px solid var(--line); padding-block: var(--sp-4); }
.footer-inner {
  max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; flex-direction: column; gap: 1.25rem;
  align-items: center; text-align: center;
}
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.footer-icon {
  width: 32px; height: 32px; background: transparent; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
}
.footer-icon svg { width: 32px; height: 32px; display: block; }
.footer-name { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; }
.footer-name span {
  background: linear-gradient(120deg, #FF2D75, #FF7BAC);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer-tagline { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem .4rem; }
.footer-links a {
  padding: .28rem .6rem; font-size: 15px;
  color: var(--ink-muted); border-radius: 6px; transition: color .2s, background .2s;
}
.footer-links a:hover { color: var(--ink); background: var(--line); }
.footer-disclaimer { font-size: 13px; letter-spacing: .03em; color: var(--ink-dim); max-width: 50ch; line-height: 1.5; }
.footer-copy { font-size: 12px; letter-spacing: .05em; color: var(--ink-dim); }

/* Estado de cotización (bar bajo el hero de empresas) */
.quote-status-bar {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem .65rem;
  margin-top: 1.25rem;
  padding: .5rem .7rem .5rem .55rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-muted);
}
.quote-status-bar .quote-status-sep { color: var(--ink-dim); opacity: .8; }
.quote-status-bar .quote-status-label {
  text-transform: uppercase; letter-spacing: .12em; font-size: 10px;
}

/* =============================================================
   14b. AVISO LEGAL DESPLEGABLE
   ============================================================= */
.legal-notice {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.legal-notice-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--sp-3);
}
.legal-notice-details {
  border: 1px solid var(--border-card);
  border-radius: var(--r-card);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color .25s var(--ease-soft), background .25s var(--ease-soft);
}
.legal-notice-details[open] {
  border-color: rgba(124, 92, 255, 0.35);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
}
.legal-notice-summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.legal-notice-summary::-webkit-details-marker { display: none; }
.legal-notice-summary::marker { content: ''; }
.legal-notice-summary:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: -2px;
}
.legal-notice-badge {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(124, 92, 255, 0.25);
  padding: .35rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.legal-notice-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
.legal-notice-headline {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  letter-spacing: .005em;
}
.legal-notice-headline strong {
  color: var(--ink);
  font-weight: 600;
}
.legal-notice-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px solid var(--line-bright);
  padding: .45rem .7rem;
  border-radius: 999px;
  transition: color .2s, border-color .2s, background .2s;
  white-space: nowrap;
}
.legal-notice-summary:hover .legal-notice-toggle {
  color: var(--ink);
  border-color: rgba(124, 92, 255, 0.4);
  background: var(--accent-dim);
}
.legal-notice-toggle svg {
  transition: transform .3s var(--ease-soft);
}
/* Toggle text: muestra "Desplegar" o "Ocultar" según estado.
   Está en dos <span> con data-i18n para que el sistema i18n los traduzca. */
.legal-notice-toggle-open,
.legal-notice-toggle-close { display: none; }
.legal-notice-details:not([open]) .legal-notice-toggle-open { display: inline; }
.legal-notice-details[open] .legal-notice-toggle-close { display: inline; }
/* Eliminadas reglas antiguas con ::after y content: 'Ocultar'/'Desplegar' */
.legal-notice-details[open] .legal-notice-toggle svg {
  transform: rotate(180deg);
}
.legal-notice-body {
  padding: 0 1.25rem 1.25rem;
  display: grid;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.65;
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.legal-notice-details[open] .legal-notice-body {
  padding-top: 1.1rem;
  animation: legalFade .35s var(--ease-soft);
}
@keyframes legalFade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.legal-notice-body p { margin: 0; max-width: 78ch; }
.legal-notice-body strong { color: var(--ink); font-weight: 600; }
.legal-notice-body a {
  color: var(--accent-2);
  text-decoration: underline;
  text-decoration-color: rgba(78, 197, 255, 0.35);
  text-underline-offset: 3px;
}
.legal-notice-body a:hover { text-decoration-color: var(--accent-2); }
.legal-notice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .65rem 1.25rem;
  padding: .85rem 1rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
}
.legal-notice-grid dt {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.legal-notice-grid dd {
  margin: 0 0 .4rem;
  color: var(--ink-soft);
}
.legal-notice-grid dd:last-child { margin-bottom: 0; }
@media (min-width: 720px) {
  .legal-notice-grid {
    grid-template-columns: max-content 1fr;
    align-items: baseline;
    gap: .4rem 1.5rem;
  }
  .legal-notice-grid dd { margin-bottom: 0; }
}
@media (max-width: 640px) {
  .legal-notice-summary {
    grid-template-columns: 1fr;
    gap: .65rem;
  }
  .legal-notice-badge { justify-self: start; }
  .legal-notice-toggle { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .legal-notice-details[open] .legal-notice-body { animation: none; }
  .legal-notice-toggle svg { transition: none; }
}

/* =============================================================
   15. RESPONSIVE
   ============================================================= */
@media (min-width: 540px) {
  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-card--featured { grid-column: span 2; }
}

@media (min-width: 720px) {
  .nav-hamburger { display: none; }
  .nav-links { display: flex; }
  .nav-mobile { display: none !important; }
  .analysis-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; text-align: left; }
  .footer-brand { align-items: flex-start; }
  .footer-links { justify-content: flex-start; }
}

@media (min-width: 960px) {
  .news-grid { grid-template-columns: 1.35fr 1fr 1fr; }
  .news-card--featured { grid-column: span 1; }
}

/* =============================================================
   16. REDUCED MOTION — solo efectos intrusivos
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .ticker-items { animation-play-state: paused; }
  .hero-mesh     { animation: none; }
  .splash-progress { animation-duration: .1s; }
}

/* =============================================================
   17. PÁGINAS INTERIORES — page-hero, filtros, news-feed,
       company-profile. Compartido entre noticias.html,
       empresas.html, analisis.html, mercados.html
   ============================================================= */

/* View Transitions API — desactivado: en algunos navegadores genera
   "Transition was skipped" cuando una navegación interrumpe otra. */
/* @view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtFadeOut .3s var(--ease-out) both; }
::view-transition-new(root) { animation: vtFadeIn  .3s var(--ease-out) both; } */

/* ── Cabecera compacta de página interior ── */
.page-hero {
  padding-top: calc(var(--nav-h) + var(--sp-5));
  padding-bottom: var(--sp-4);
  padding-inline: var(--gutter);
  max-width: var(--max-w);
  margin-inline: auto;
}
.page-hero .section-kicker { margin-bottom: var(--sp-1); }
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: .6rem;
  line-height: 1.08;
}
.page-hero p {
  font-size: 18px;
  color: var(--ink-muted);
  max-width: 56ch;
  line-height: 1.6;
}

/* Línea divisoria decorativa bajo el page-hero */
.page-divider {
  height: 1px;
  background: var(--line);
  margin-bottom: var(--sp-4);
}

/* ── Barra de filtros por empresa ── */
.filter-bar {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  margin-bottom: var(--sp-4);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.filter-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-right: .4rem;
  flex-shrink: 0;
}
.filter-btn {
  padding: .3rem .75rem;
  border: 1px solid var(--border-card);
  border-radius: var(--r-tag);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink-muted);
  background: transparent;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.filter-btn:hover,
.filter-btn.is-active {
  border-color: var(--accent);
  color: var(--ink);
  background: var(--accent-dim);
}
.filter-btn.is-active { color: var(--accent); }

/* Pulso al llegar desde un deep-link (?empresa=…) */
@keyframes filterChipPulse {
  0%   { box-shadow: 0 0 0 0 rgba(124, 92, 255, .55); }
  60%  { box-shadow: 0 0 0 10px rgba(124, 92, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0); }
}
.filter-btn--pulse {
  animation: filterChipPulse 1.4s ease-out 2;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--accent-dim) !important;
}

/* ── Feed de noticias (noticias.html) ── */
.news-feed {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-bottom: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Separador de fecha */
.feed-date-sep {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-block: var(--sp-3);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.feed-date-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Tarjeta de noticia horizontal (feed) */
.feed-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card);
  overflow: hidden;
  margin-bottom: var(--sp-2);
  transition: border-color .3s, transform .3s var(--ease-out), box-shadow .3s;
}
.feed-card:hover {
  border-color: var(--line-bright);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.feed-card[data-hidden="true"] { display: none; }

.feed-card-img {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  flex-shrink: 0;
}
.feed-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.7) saturate(.6);
  transition: transform .5s var(--ease-out), filter .5s;
}
.feed-card:hover .feed-card-img img { transform: scale(1.03); filter: brightness(.8) saturate(.7); }
.feed-card-img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,14,19,0) 20%, rgba(13,14,19,.9) 100%);
}

/* Badge empresa en imagen */
.feed-badge {
  position: absolute; top: .65rem; left: .65rem; z-index: 2;
  padding: .18rem .5rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #fff;
}
.feed-badge--nvidia    { background: #76b900; }
.feed-badge--microsoft { background: #0078d4; }
.feed-badge--meta      { background: #0082fb; }
.feed-badge--tsmc      { background: #e31837; }
.feed-badge--amd       { background: #ed1c24; }
.feed-badge--intel     { background: #0071c5; }
.feed-badge--apple     { background: #555; }
.feed-badge--alphabet  { background: #4285f4; }

.feed-card-body {
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.feed-card-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.feed-card-cat {
  font-family: var(--mono);
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.feed-card-time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.feed-card-title {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.feed-card-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
}
.feed-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
  padding-top: var(--sp-2);
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.feed-impact { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.feed-impact.positive { color: var(--up); }
.feed-impact.negative { color: var(--down); }
.feed-impact.neutral  { color: var(--neutral); }
.feed-read {
  font-size: 14px; font-weight: 600;
  color: var(--ink-muted);
  transition: color .2s;
}
.feed-read:hover { color: var(--accent-2); }

/* ── Tarjeta de perfil de empresa (empresas.html) ── */
.companies-profiles {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-bottom: var(--sp-5);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--col-gap);
  align-items: start;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .3s var(--ease-out);
  position: relative;
  /* Animación CSS de entrada — no depende de JS */
  animation: profileCardIn .5s var(--ease-out) both;
}
@keyframes profileCardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
/* Escalonar las 8 tarjetas con nth-child */
.companies-profiles .profile-card:nth-child(1) { animation-delay: .05s; }
.companies-profiles .profile-card:nth-child(2) { animation-delay: .10s; }
.companies-profiles .profile-card:nth-child(3) { animation-delay: .15s; }
.companies-profiles .profile-card:nth-child(4) { animation-delay: .20s; }
.companies-profiles .profile-card:nth-child(5) { animation-delay: .25s; }
.companies-profiles .profile-card:nth-child(6) { animation-delay: .30s; }
.companies-profiles .profile-card:nth-child(7) { animation-delay: .35s; }
.companies-profiles .profile-card:nth-child(8) { animation-delay: .40s; }

.profile-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--co, var(--accent));
  opacity: 0;
  transition: opacity .3s;
}
/* Hover — sin color-mix() para compatibilidad con todos los navegadores */
.profile-card:hover { opacity: 1; border-color: var(--co, var(--accent)); }
.profile-card:hover::before { opacity: 1; }
.profile-card:hover { box-shadow: 0 16px 48px rgba(0,0,0,.4); transform: translateY(-3px); }

/* Header en CSS Grid: posiciones FIJAS para que el precio quede siempre
   arriba a la derecha y todas las tarjetas tengan la misma estructura/altura.
   Col1 = logo · Col2 = nombre+ticker · Col3 = precio (fila 1) + señal (fila 2) */
.profile-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 1rem;
  row-gap: .5rem;
  padding: var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.profile-logo {
  grid-column: 1; grid-row: 1 / 3; align-self: center;
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.profile-logo img { width: 28px; height: 28px; object-fit: contain; display: block; }
.profile-id { grid-column: 2; grid-row: 1 / 3; align-self: center; min-width: 0; }
.profile-name {
  font-size: 1.1rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--ink);
  line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-ticker {
  font-family: var(--mono);
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  color: var(--ink-muted); text-transform: uppercase;
}
.profile-price-block {
  grid-column: 3; grid-row: 1; justify-self: end; align-self: center;
  display: flex; flex-direction: column; align-items: flex-end; gap: .1rem;
}
.profile-price {
  font-family: var(--mono);
  font-size: 1.1rem; font-weight: 700; color: var(--ink);
  white-space: nowrap;
}
.profile-change {
  font-family: var(--mono);
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.profile-signal {
  grid-column: 3; grid-row: 2; justify-self: end; align-self: center;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .6rem;
  border: 1px solid var(--border-card);
  border-radius: var(--r-tag);
}

/* profile-body: padding ajustado, sin gap extra (el toggle lo gestiona) */
.profile-body { padding: 0; display: flex; flex-direction: column; }

.profile-section-label {
  font-family: var(--mono);
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: .4rem;
}
/* Descripción — sin clamp, vive dentro del expandable */
.profile-desc,
.profile-desc-full {
  font-size: 15px; line-height: 1.65; color: var(--ink-soft);
}
.profile-history {
  font-size: 14px; line-height: 1.7; color: var(--ink-muted);
}

.profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  padding-top: var(--sp-2);
  border-top: 1px solid var(--line);
}
.profile-meta-item {
  display: flex; flex-direction: column; gap: .1rem;
}
.profile-meta-key {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-dim);
}
.profile-meta-val {
  font-size: 14px; font-weight: 600; color: var(--ink);
}

.profile-tags { display: flex; flex-wrap: wrap; gap: .35rem; }

.profile-cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem 1rem;
  border: 1px solid var(--border-card);
  border-radius: var(--r-btn);
  font-size: 13px; font-weight: 600;
  color: var(--ink-muted);
  transition: border-color .2s, color .2s, background .2s;
  align-self: flex-start;
}
.profile-cta:hover {
  border-color: var(--co, var(--accent));
  color: var(--ink);
  background: rgba(124,92,255,.06);
}

/* ── Expand / collapse de tarjeta de empresa ── */

/* Botón toggle — siempre visible, justo debajo del header */
.profile-toggle {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .75rem var(--sp-3);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: color .2s, background .2s;
  width: 100%;
  text-align: left;
}
.profile-toggle:hover {
  color: var(--ink);
  background: rgba(255,255,255,.02);
}
.profile-toggle-icon {
  margin-left: auto;
  transition: transform .4s var(--ease-out);
  flex-shrink: 0;
}
.profile-card.is-open .profile-toggle-icon {
  transform: rotate(180deg);
}
/* Cuando está abierta, quitar el borde inferior del toggle */
.profile-card.is-open .profile-toggle {
  border-bottom-color: transparent;
}

/* Sección expandible: oculta por defecto */
.profile-expandable {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease-out);
}
.profile-expandable-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);       /* 16px entre bloques de contenido */
  padding: 0 var(--sp-3); /* padding lateral igual que el header */
}
/* Abierta */
.profile-card.is-open .profile-expandable {
  grid-template-rows: 1fr;
}
/* Padding vertical cuando el contenido es visible */
.profile-card.is-open .profile-expandable-inner {
  padding-top: var(--sp-2);
  padding-bottom: var(--sp-3);
}

/* ── Página placeholder (Análisis / Mercados) ── */
.placeholder-section {
  min-height: calc(100vh - var(--nav-h) - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  padding-inline: var(--gutter);
  padding-top: var(--nav-h);
}
.placeholder-icon {
  width: 56px; height: 56px;
  border: 1.5px solid var(--line-bright);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-2);
  margin-bottom: .5rem;
}
.placeholder-section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600; color: var(--ink);
}
.placeholder-section p {
  font-size: 16px; color: var(--ink-muted);
  max-width: 42ch; line-height: 1.6;
}
.placeholder-badge {
  font-family: var(--mono);
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(124,92,255,.25);
  border-radius: var(--r-tag);
  padding: .25rem .75rem;
}

/* Responsive páginas interiores */
@media (min-width: 720px) {
  .feed-card { grid-template-columns: 280px 1fr; }
  .feed-card-img { aspect-ratio: auto; }
  .companies-profiles { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  /* 3 columnas por fila en desktop */
  .companies-profiles { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .feed-card { grid-template-columns: 320px 1fr; }
}

/* =============================================================
   18. MÓVIL — Legibilidad y accesibilidad táctil (< 720px)
   · Textos por debajo de 12px se suben a 12px (legibilidad).
   · Controles del nav alcanzan el área táctil mínima de 44px.
   El prefijo `html` da prioridad sobre los <style> de cada página.
   ============================================================= */
@media (max-width: 719.98px) {
  /* Etiquetas y badges definidos en styles.css */
  html .ticker-chg, html .cc-change, html .cc-tag,
  html .nc-badge, html .feed-badge, html .ap-m-label,
  html .quote-status-bar, html .quote-status-bar .quote-status-label,
  html .legal-notice-badge, html .legal-notice-toggle,
  html .profile-section-label, html .profile-meta-key,
  html .placeholder-badge,
  /* Etiquetas definidas en los <style> de cada página */
  html .hud-tag, html .hud-tag .hud-sub,
  html .art-badge, html .art-claves-label, html .art-key-label, html .art-sources-label,
  html .ov-tag, html .pulse-sub, html .bl-lbl, html .tm-ticker, html .tm-perf-lbl,
  html .mkt-ticker-sym, html .mkt-trend, html .mkt-stat-label,
  html .an-quote-label, html .an-target-label, html .an-target-sub,
  html .an-pin-lab, html .an-range-end, html .an-sec-label, html .an-scn-name {
    font-size: 12px;
  }

  /* Áreas táctiles mínimas de 44×44px (recomendación WCAG / Apple / Google) */
  html .nav-hamburger {
    min-width: 44px; min-height: 44px;
    align-items: center; justify-content: center;
  }
  html .lang-toggle { min-height: 44px; padding-inline: .8rem; }
  html .nav-mobile-link { padding-block: .9rem; }
}

/* ── SECTORES dropdown ──────────────────────────────────── */
.nav-sectors { position: relative; }
.nav-sectors-btn {
  display: flex; align-items: center; gap: .35rem;
  padding: .4rem .8rem;
  font-size: 15px; font-weight: 500; letter-spacing: 0;
  text-transform: none;
  font-family: inherit;
  color: var(--ink-muted);
  border: 0;
  border-radius: 6px;
  background: transparent;
  transition: color .2s, background .2s;
  cursor: pointer; white-space: nowrap;
}
.nav-sectors-btn:hover,
.nav-sectors:hover .nav-sectors-btn {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.nav-sectors-chevron {
  width: 9px; height: 7px;
  transition: transform .2s;
}
.nav-sectors:hover .nav-sectors-chevron { transform: rotate(180deg); }
.nav-sectors-drop {
  position: absolute; top: calc(100% + 12px); left: 0;
  min-width: 168px;
  background: #1E1E28;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: .35rem;
  opacity: 0; pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s;
  z-index: 200;
  box-shadow: 0 20px 44px -18px rgba(0,0,0,.65);
}
.nav-sectors:hover .nav-sectors-drop {
  opacity: 1; pointer-events: all;
  transform: translateY(0);
}
.nav-sectors-drop::before {
  content: ""; position: absolute;
  top: -10px; left: 0; right: 0; height: 10px;
}
.nav-sectors-item {
  display: flex; align-items: center; gap: .4rem;
  padding: .46rem .7rem;
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,.82);
  border-radius: 8px;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.nav-sectors-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-sectors-item.off { color: rgba(255,255,255,.4); cursor: not-allowed; }
.nav-sectors-item.off:hover { background: transparent; color: rgba(255,255,255,.4); }
.nav-sectors-item.off small {
  margin-left: auto; font-family: var(--mono, monospace);
  font-size: .58rem; letter-spacing: .08em; text-transform: uppercase;
}
.nav-sectors-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.nav-sectors-mobile { display: flex; flex-direction: column; }
.nav-sectors-mobile-label {
  padding: .6rem 1.2rem .25rem;
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--accent);
}
.nav-sectors-sub { padding-left: 2rem !important; }

.nav-sectors-hub {
  display: block;
  text-align: center;
  padding: .5rem .8rem;
  font-size: 14px; font-weight: 700; letter-spacing: -.01em;
  color: #fff;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 8px;
  margin-bottom: .3rem;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.nav-sectors-hub:hover {
  background: rgba(214,49,74,.14);
  border-color: rgba(214,49,74,.4);
}
.nav-sectors-hub-x { color: #D6314A; }
