/* =====================================================================
   TRUCK SIM HUB · Estilos del sitio público
   Los colores principales vienen de variables CSS que se ajustan desde
   el panel (Apariencia) → el sitio se adapta a los colores de tu logo.
   ===================================================================== */
:root {
  --primary: #FFB020;
  --primary-rgb: 255, 176, 32;
  --secondary: #38BDF8;
  --secondary-rgb: 56, 189, 248;
  --bg: #0A0D12;
  --bg-rgb: 10, 13, 18;
  --on-primary: #0B0B0B;

  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #EDF0F3;
  --text-2: #A7B0BA;
  --text-3: #6B7680;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --maxw: 1240px;
  --font-display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Ambiente: brillos suaves con el color del logo + textura de asfalto */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(var(--primary-rgb), 0.10), transparent 60%),
    radial-gradient(800px 600px at -10% 30%, rgba(var(--secondary-rgb), 0.07), transparent 60%),
    radial-gradient(600px 400px at 50% 110%, rgba(var(--primary-rgb), 0.06), transparent 60%);
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------- NAVBAR ---------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(var(--bg-rgb), 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(var(--bg-rgb), 0.88); }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 12px; object-fit: contain; flex: none;
  background: rgba(255,255,255,.04);
  box-shadow: 0 0 0 1px var(--border), 0 0 24px -4px rgba(var(--primary-rgb), .45);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-weight: 500; font-size: .95rem;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); background: rgba(var(--primary-rgb), .12); box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), .3); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; width: 44px; height: 44px; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: var(--text); margin: auto; position: relative; transition: .3s var(--ease); }
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav.open .nav-toggle span { background: transparent; }
.nav.open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav.open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; gap: 4px; padding: 16px;
    background: rgba(var(--bg-rgb), .97); border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s var(--ease);
  }
  .nav.open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 14px 16px; font-size: 1.05rem; }
  .nav-cta { display: none; }
}

/* ---------------------------- BOTONES ---------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .95rem;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.3); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  background: var(--primary); color: var(--on-primary); border-color: transparent;
  box-shadow: 0 10px 30px -10px rgba(var(--primary-rgb), .8);
}
.btn-primary:hover { box-shadow: 0 14px 36px -10px rgba(var(--primary-rgb), 1); }
.btn-yt { background: #FF0033; border-color: transparent; color: #fff; box-shadow: 0 10px 30px -12px rgba(255, 0, 51, .8); }
.btn-sm { padding: 8px 16px; font-size: .88rem; }
.btn-ghost { background: transparent; }

/* ----------------------------- HERO ----------------------------- */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(86vh, 760px); display: flex; align-items: flex-end; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroZoom 22s ease-in-out infinite alternate; }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(var(--bg-rgb), .25) 0%, rgba(var(--bg-rgb), .45) 50%, var(--bg) 100%),
    linear-gradient(90deg, rgba(var(--bg-rgb), .8) 0%, rgba(var(--bg-rgb), .1) 70%);
}
@keyframes heroZoom { to { transform: scale(1.14) translateY(-1.5%); } }
.hero-content { padding: 120px 0 120px; max-width: 760px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 999px;
  background: rgba(var(--primary-rgb), .12); border: 1px solid rgba(var(--primary-rgb), .35);
  color: var(--text); font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 rgba(var(--primary-rgb), .7); animation: pulse 2s infinite; margin-left: 4px; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); } }
.hero h1 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase; line-height: .92;
  font-size: clamp(2.8rem, 8vw, 6rem); letter-spacing: -.01em; margin: 22px 0 18px; white-space: pre-line;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #fff));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { color: var(--text-2); font-size: clamp(1rem, 1.6vw, 1.18rem); max-width: 620px; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 44px; }
.stat strong { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; line-height: 1; }
.stat span { color: var(--text-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }

/* Carretera animada en la base del hero */
.road { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; z-index: -1; overflow: hidden; }
.road::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 28px; height: 4px;
  background: repeating-linear-gradient(90deg, rgba(var(--primary-rgb), .9) 0 60px, transparent 60px 120px);
  background-size: 120px 4px; animation: roadMove 1.1s linear infinite;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  opacity: .55;
}
@keyframes roadMove { to { background-position: -120px 0; } }

/* ---------------------------- TICKER ---------------------------- */
.ticker { border-block: 1px solid var(--border); background: rgba(255,255,255,.015); overflow: hidden; }
.ticker-track { display: flex; gap: 48px; width: max-content; padding: 18px 0; animation: ticker 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); white-space: nowrap; }
.ticker-item i { width: 10px; height: 10px; border-radius: 3px; transform: rotate(45deg); background: var(--c, var(--primary)); box-shadow: 0 0 14px var(--c, var(--primary)); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* --------------------------- SECCIONES --------------------------- */
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--primary); font-weight: 700; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.section-title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1; margin: 10px 0 0; letter-spacing: -.005em; }
.section-sub { color: var(--text-2); margin: 10px 0 0; max-width: 560px; }
.link-more { color: var(--text-2); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: color .2s, gap .2s; }
.link-more:hover { color: var(--primary); gap: 12px; }

/* ----------------------------- CARDS ----------------------------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); border-color: rgba(var(--primary-rgb), .35); box-shadow: var(--shadow), 0 0 0 1px rgba(var(--primary-rgb), .1); }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #11161d; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; line-height: 1.1; margin: 0; }
.card-text { color: var(--text-2); font-size: .94rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text-3); font-size: .82rem; margin-top: auto; }
.card-link::after { content: ''; position: absolute; inset: 0; } /* toda la tarjeta es clicable */

/* Portada generada (cuando un post no tiene imagen) */
.gen-cover {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c, var(--primary)) 45%, transparent), transparent 60%),
    linear-gradient(135deg, #121821, #0b0f14);
}
.gen-cover::before {
  content: ''; position: absolute; inset: 0; opacity: .25;
  background: repeating-linear-gradient(-45deg, transparent 0 22px, rgba(255,255,255,.05) 22px 24px);
}
.gen-cover span { position: relative; font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); text-transform: uppercase; color: rgba(255,255,255,.9); letter-spacing: .02em; text-shadow: 0 6px 30px rgba(0,0,0,.6); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: color-mix(in srgb, var(--c, var(--primary)) 16%, transparent);
  color: color-mix(in srgb, var(--c, var(--primary)) 70%, #fff);
  border: 1px solid color-mix(in srgb, var(--c, var(--primary)) 35%, transparent);
}
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; }
.card-media .badge-row { position: absolute; top: 12px; left: 12px; z-index: 2; }
.card-media .badge { backdrop-filter: blur(8px); background: rgba(0,0,0,.5); }

/* ---------------------- DESTACADO / FEATURED ---------------------- */
.feature {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 0; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface); position: relative;
}
.feature-media { position: relative; min-height: 340px; background: #000; cursor: pointer; }
.feature-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: transform .8s var(--ease), opacity .3s; }
.feature-media:hover img { transform: scale(1.04); opacity: 1; }
.feature-body { padding: 36px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.feature-body h3 { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.02; margin: 0; text-transform: uppercase; }
.feature-body p { color: var(--text-2); margin: 0; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } .feature-media { min-height: 0; aspect-ratio: 16/9; } .feature-body { padding: 24px; } }

/* Botón de play */
.play {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: none;
  display: grid; place-items: center; background: rgba(var(--primary-rgb), .95); color: var(--on-primary);
  box-shadow: 0 0 0 0 rgba(var(--primary-rgb), .6), 0 12px 40px rgba(0,0,0,.5);
  animation: pulse 2.2s infinite; transition: transform .3s var(--ease); z-index: 2;
}
.play svg { width: 30px; height: 30px; margin-left: 4px; }
.card:hover .play, .feature-media:hover .play { transform: scale(1.1); }
.play-sm { width: 56px; height: 56px; opacity: 0; transform: scale(.8); animation: none; transition: .3s var(--ease); }
.play-sm svg { width: 22px; height: 22px; }
.card:hover .play-sm, .card:focus-within .play-sm { opacity: 1; transform: scale(1); }
.duration { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.75); padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 600; }

/* --------------------------- FILTROS --------------------------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 28px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: .88rem; font-weight: 600; transition: .2s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-pressed="true"] { color: var(--text); background: color-mix(in srgb, var(--c, var(--primary)) 18%, transparent); border-color: color-mix(in srgb, var(--c, var(--primary)) 55%, transparent); }
.search {
  margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 42px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); min-width: min(100%, 260px);
}
.search input { background: none; border: none; outline: none; color: var(--text); font: inherit; width: 100%; }
.search svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
@media (max-width: 640px) { .search { margin-left: 0; width: 100%; } }

/* --------------------------- ARTÍCULO --------------------------- */
.article-hero { padding: 56px 0 24px; }
.article-hero h1 { font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 4rem); line-height: .98; text-transform: uppercase; margin: 16px 0; max-width: 900px; }
.article-cover { border-radius: 24px; overflow: hidden; aspect-ratio: 21/9; position: relative; border: 1px solid var(--border); background: #11161d; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding: 48px 0 96px; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } }
.prose { font-size: 1.08rem; line-height: 1.8; color: #D5DBE1; max-width: 72ch; }
.prose h2, .prose h3 { font-family: var(--font-display); text-transform: uppercase; color: var(--text); line-height: 1.1; margin: 2em 0 .6em; }
.prose h2 { font-size: 2rem; } .prose h3 { font-size: 1.5rem; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose blockquote { margin: 1.6em 0; padding: 16px 22px; border-left: 3px solid var(--primary); background: rgba(var(--primary-rgb), .07); border-radius: 0 12px 12px 0; color: var(--text-2); }
.prose blockquote p { margin: 0; }
.prose img { border-radius: 14px; margin: 1.5em 0; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose pre { background: #0e1319; padding: 18px; border-radius: 12px; overflow: auto; border: 1px solid var(--border); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li::marker { color: var(--primary); }
.prose iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 14px; }
.aside-box { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.panel h4 { margin: 0 0 12px; font-family: var(--font-display); text-transform: uppercase; font-size: 1.2rem; letter-spacing: .03em; }
.share { display: flex; gap: 8px; flex-wrap: wrap; }
.share a, .share button { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); transition: .2s; }
.share a:hover, .share button:hover { border-color: var(--primary); color: var(--primary); }
.share svg { width: 18px; height: 18px; }
.mini-list { display: flex; flex-direction: column; gap: 14px; }
.mini-list a { display: block; font-weight: 600; line-height: 1.3; transition: color .2s; }
.mini-list a:hover { color: var(--primary); }
.mini-list small { color: var(--text-3); font-weight: 400; display: block; margin-top: 2px; }

/* ----------------------------- TIENDA ----------------------------- */
.disclosure {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-radius: 14px; margin-bottom: 28px;
  background: rgba(var(--secondary-rgb), .07); border: 1px solid rgba(var(--secondary-rgb), .25); color: var(--text-2); font-size: .92rem;
}
.disclosure svg { width: 22px; height: 22px; color: var(--secondary); flex: none; margin-top: 2px; }
.product .card-media { aspect-ratio: 4/3; background: radial-gradient(circle at 50% 40%, #1b222c, #0d1117); }
.product .card-media img { object-fit: contain; padding: 18px; }
.product-icon { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(var(--primary-rgb), .9); }
.product-icon svg { width: 46%; height: 46%; filter: drop-shadow(0 10px 30px rgba(var(--primary-rgb), .35)); }
.price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.ribbon { position: absolute; top: 14px; right: -34px; transform: rotate(45deg); background: var(--primary); color: var(--on-primary); font-size: .7rem; font-weight: 800; letter-spacing: .1em; padding: 4px 40px; z-index: 3; text-transform: uppercase; }

/* ------------------------------ CTA ------------------------------ */
.cta {
  position: relative; overflow: hidden; border-radius: 28px; padding: 56px 40px; text-align: center;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(var(--primary-rgb), .25), transparent 60%),
    radial-gradient(600px 300px at 80% 100%, rgba(var(--secondary-rgb), .18), transparent 60%),
    #0f141b;
  border: 1px solid var(--border);
}
.cta h2 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.4rem); text-transform: uppercase; line-height: 1; margin: 0 0 12px; }
.cta p { color: var(--text-2); max-width: 560px; margin: 0 auto 26px; }
.cta-logo { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 20px; object-fit: contain; box-shadow: 0 0 0 1px var(--border), 0 20px 50px -10px rgba(var(--primary-rgb), .5); background: rgba(255,255,255,.03); }
@media (max-width: 600px) { .cta { padding: 40px 20px; } }

/* --------------------------- FEED OFICIAL --------------------------- */
.feed-list { display: grid; gap: 12px; }
.feed-item { display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); transition: .2s; }
.feed-item:hover { border-color: rgba(var(--secondary-rgb), .4); transform: translateX(4px); }
.feed-item img { width: 96px; height: 60px; object-fit: cover; border-radius: 8px; flex: none; background: #11161d; }
.feed-item strong { display: block; line-height: 1.3; }
.feed-item small { color: var(--text-3); }

/* ------------------------------ FOOTER ------------------------------ */
.footer { border-top: 1px solid var(--border); padding: 56px 0 32px; margin-top: 40px; background: rgba(0,0,0,.2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer h5 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.05rem; letter-spacing: .08em; margin: 0 0 14px; color: var(--text-2); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer ul a { color: var(--text-3); transition: color .2s; }
.footer ul a:hover { color: var(--primary); }
.socials { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.socials a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); transition: .25s var(--ease); }
.socials a:hover { color: var(--primary); border-color: rgba(var(--primary-rgb), .5); transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }
.copyright { color: var(--text-3); font-size: .85rem; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* --------------------------- MODAL VIDEO --------------------------- */
.video-modal {
  width: min(1100px, 94vw); max-width: none; padding: 0; border: none; background: transparent; color: var(--text);
  overflow: visible;
}
.video-modal::backdrop { background: rgba(3, 5, 8, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.video-modal[open] { animation: modalIn .35s var(--ease); }
.video-modal[open]::backdrop { animation: fadeIn .3s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.97); } }
@keyframes fadeIn { from { opacity: 0; } }
.video-frame { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 40px 100px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08), 0 0 80px -20px rgba(var(--primary-rgb), .5); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-info { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 18px 4px 0; flex-wrap: wrap; }
.video-info h3 { margin: 0; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; text-transform: uppercase; }
.video-info p { margin: 6px 0 0; color: var(--text-2); font-size: .92rem; max-width: 700px; }
.modal-close {
  position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: rgba(255,255,255,.08); display: grid; place-items: center; transition: .2s;
}
.modal-close:hover { background: var(--primary); color: var(--on-primary); transform: rotate(90deg); }
.modal-close svg { width: 20px; height: 20px; }
@media (max-width: 600px) { .modal-close { top: -54px; } .video-info h3 { font-size: 1.25rem; } }

/* --------------------------- EXTRAS --------------------------- */
.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-2); }
.empty svg { width: 44px; height: 44px; color: var(--primary); margin-bottom: 10px; }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); min-height: 280px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.demo-banner { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(15, 20, 27, .92); border: 1px solid rgba(var(--primary-rgb), .4); font-size: .82rem; color: var(--text-2); box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.demo-banner a { color: var(--primary); font-weight: 600; }
.demo-banner button { background: none; border: none; color: var(--text-3); padding: 0 0 0 6px; font-size: 1.1rem; line-height: 1; }
.back-top { position: fixed; right: 16px; bottom: 16px; z-index: 55; width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--border-strong); background: rgba(15, 20, 27, .9); display: grid; place-items: center; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .3s var(--ease); }
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { border-color: var(--primary); color: var(--primary); }
.back-top svg { width: 20px; height: 20px; }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

#toasts { position: fixed; top: 84px; right: 16px; z-index: 100; display: grid; gap: 8px; }
.toast { padding: 12px 18px; border-radius: 12px; background: #141a22; border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: .9rem; animation: modalIn .3s var(--ease); transition: .4s; }
.toast-ok { border-color: rgba(48, 164, 108, .6); } .toast-err { border-color: rgba(229, 72, 77, .7); }
.toast.out { opacity: 0; transform: translateX(20px); }

.page-enter { animation: pageIn .5s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
.link-more svg { width: 18px; height: 18px; }
.btn-primary svg, .play svg { color: inherit; }
.embed { position: relative; aspect-ratio: 16/9; margin: 1.5em 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* =====================================================================
   IDENTIDAD EGS · cromo + rojo/azul del logo
   ===================================================================== */
/* Logo con fondo transparente: sin caja, con un brillo suave */
.brand-logo { width: 50px; height: 50px; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 4px 14px rgba(var(--primary-rgb), .28)); }
.cta-logo { width: 140px; height: 140px; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .6)) drop-shadow(0 0 30px rgba(var(--secondary-rgb), .25)); }
.brand-name {
  background: linear-gradient(180deg, #ffffff 0%, #c9d0d8 55%, #8e98a3 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Acento del título: rojo → azul como "EGS" */
.hero h1 .accent, .intro-title .accent {
  background: linear-gradient(95deg, var(--primary) 10%, color-mix(in srgb, var(--primary) 50%, var(--secondary)) 55%, var(--secondary) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Botón de suscripción en cromo (no compite con el rojo del acento) */
.btn-yt {
  background: linear-gradient(180deg, #ffffff 0%, #dde2e7 45%, #aeb6bf 100%);
  color: #0b0d12; border-color: rgba(255, 255, 255, .6);
  box-shadow: 0 10px 28px -12px rgba(255, 255, 255, .45), inset 0 1px 0 #fff;
}
.btn-yt svg { color: #FF0033; }
.btn-yt:hover { border-color: #fff; }
.road::before { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .7) 0 60px, transparent 60px 120px); background-size: 120px 4px; }

/* --------- Portada "showcase": el banner se ve completo, nada lo tapa --------- */
.showcase {
  position: relative; overflow: hidden; isolation: isolate; background: #000;
  height: min(calc(100svh - 72px), 66.67vw); min-height: 220px;
}
.showcase-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 48%; animation: showcaseIn 1.4s var(--ease) both; }
@keyframes showcaseIn { from { opacity: 0; transform: scale(1.06); filter: blur(6px); } }
.showcase::after { /* fundido inferior hacia el fondo de la página */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 28%; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--bg));
}
.showcase .road { z-index: 1; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 2;
  width: 30px; height: 48px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, .55); background: rgba(0, 0, 0, .25);
}
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 4px; height: 9px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 640px) { .scroll-cue { display: none; } }

.hero-intro { padding: 56px 0 72px; position: relative; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.intro-title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase; line-height: .92;
  font-size: clamp(2.6rem, 6.5vw, 5.2rem); margin: 20px 0 16px; white-space: pre-line;
}
.hero-intro .lead { color: var(--text-2); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 620px; margin: 0 0 28px; }
.intro-stats { display: grid; gap: 14px; }
.intro-stats .stat {
  position: relative; padding: 20px 22px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .12);
}
.intro-stats .stat::before { /* franja rojo→azul como el tacómetro del logo */
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}
.intro-stats .stat strong { font-size: 2.6rem; }
@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; gap: 28px; }
  .intro-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .intro-stats .stat { padding: 14px; }
  .intro-stats .stat strong { font-size: 1.8rem; }
  .intro-stats .stat span { font-size: .65rem; letter-spacing: .08em; }
  .hero-intro { padding: 32px 0 48px; }
}
.showcase .road { display: none; }
@media (max-width: 880px) { .nav .nav-cta { display: none; } }
@media (max-width: 480px) { .brand-name { font-size: 1.12rem; } .brand-logo { width: 42px; height: 42px; } }
/* Portada generada dentro del video destacado: el texto baja para no quedar bajo el botón de play */
.feature-media .gen-cover span { margin-top: 150px; font-size: clamp(1.4rem, 3vw, 2rem); opacity: .85; }
.card-media .gen-cover span { font-size: clamp(1.4rem, 3vw, 2rem); }
