/* ==========================================================================
   PROFEERICK.COM — Estilo principal
   Paleta derivada del logo: morado circuito + azul cable + dorado Némesis
   Tipografía: Space Grotesk (display) + Inter (texto) + JetBrains Mono (datos)
   ========================================================================== */

:root {
  --purple-950: #1a0e33;
  --purple-900: #2a1657;
  --purple-800: #3d1f7a;
  --purple-700: #4e2a96;
  --blue-500: #23a9e8;
  --blue-400: #4fc3f2;
  --gold-500: #f2b400;
  --gold-600: #d99a00;
  --ink: #170f2b;
  --paper: #f8f7fb;
  --paper-dim: #efedf7;
  --line: rgba(23, 15, 43, 0.12);
  --white: #ffffff;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 14px;
  --shadow-soft: 0 20px 50px -20px rgba(26, 14, 51, 0.35);
  --shadow-deep: 0 30px 70px -25px rgba(26, 14, 51, 0.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.1; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-500);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--gold-500);
  display: inline-block;
}

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 3px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn-primary {
  background: var(--gold-500);
  color: var(--purple-950);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(242, 180, 0, 0.6); }
.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--white); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 16px 0;
  transition: background 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease;
}
.site-header.is-scrolled {
  background: rgba(26, 14, 51, 0.92);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  box-shadow: 0 10px 30px -18px rgba(0,0,0,0.6);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; transition: height 0.3s ease; }
.site-header.is-scrolled .brand img { height: 38px; }
.brand-name {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--blue-400);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav ul { display: flex; gap: 28px; }
.main-nav a {
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 2px;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.main-nav a:hover::after, .main-nav a:focus-visible::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* ---------- Hero / Slider ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--purple-950);
  display: flex;
  align-items: flex-end;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero-slide.is-active { opacity: 1; z-index: 2; }
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.92) brightness(0.62);
}
.hero-slide::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,14,51,0.35) 0%, rgba(26,14,51,0.55) 55%, rgba(15,8,30,0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 0 24px 100px;
  color: var(--white);
}
.hero-content-inner { max-width: 1180px; margin: 0 auto; max-width: 720px; }
.hero-content .eyebrow { color: var(--blue-400); }
.hero-title {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.hero-text {
  font-size: 1.08rem;
  color: rgba(255,255,255,0.86);
  max-width: 560px;
  margin-bottom: 30px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.hero-dots {
  display: flex;
  gap: 10px;
}
.hero-dot {
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.hero-dot::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
}
.hero-dot.is-active::before { animation: dotfill 7s linear forwards; }
@keyframes dotfill { from { transform: scaleX(0);} to { transform: scaleX(1);} }

.scroll-cue {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 10;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 10px;
}
.scroll-cue::after {
  content: '';
  width: 1px; height: 46px;
  background: rgba(255,255,255,0.4);
}

/* ---------- Circuito conector (elemento firma) ---------- */
.circuit-divider {
  position: relative;
  height: 90px;
  background: var(--paper);
  overflow: hidden;
}
.circuit-divider svg { position: absolute; top: -1px; left: 0; width: 100%; height: 100%; }
.circuit-divider.flip { transform: scaleY(-1); }

/* ---------- Stats ---------- */
.stats-band {
  background: var(--purple-950);
  padding: 54px 0;
  position: relative;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-card { text-align: center; padding: 10px 12px; border-left: 1px solid rgba(255,255,255,0.12); }
.stat-card:first-child { border-left: none; }
.stat-number {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  color: var(--gold-500);
  font-weight: 700;
}
.stat-label {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin-top: 6px;
}

/* ---------- Secciones genéricas ---------- */
.section { padding: 100px 0; }
.section-tight { padding: 70px 0; }
.section-alt { background: var(--paper-dim); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 20px; }
.split-text { color: rgba(23,15,43,0.75); font-size: 1.03rem; margin-bottom: 26px; }
.split-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.split-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.split-media::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius);
  pointer-events: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--purple-700);
  border-bottom: 2px solid var(--gold-500);
  padding-bottom: 2px;
}
.link-arrow:hover { color: var(--purple-900); }

/* ---------- Galería robótica ---------- */
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: zoom-in;
  box-shadow: var(--shadow-soft);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 16px 14px;
  background: linear-gradient(0deg, rgba(26,14,51,0.92), rgba(26,14,51,0));
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 500;
  transform: translateY(8px);
  opacity: 0.92;
}

/* ---------- Estudiante destacado ---------- */
.spotlight {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: center;
  background: var(--white);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
}
.spotlight-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.spotlight-media img { aspect-ratio: 1/1; object-fit: cover; }
.spotlight-quote {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--purple-900);
  margin: 14px 0 18px;
  position: relative;
  padding-left: 22px;
  border-left: 3px solid var(--gold-500);
}
.spotlight-sub { color: rgba(23,15,43,0.6); font-family: var(--font-mono); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Videos ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
.video-card {
  background: var(--purple-950);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
}
.video-frame {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  cursor: pointer;
}
.video-frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; }
.video-frame iframe { width: 100%; height: 100%; border: 0; position: absolute; inset: 0; }
.play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.play-btn span {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: rgba(242,180,0,0.95);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease;
}
.video-frame:hover .play-btn span { transform: scale(1.08); }
.play-btn svg { width: 24px; height: 24px; fill: var(--purple-950); margin-left: 4px; }
.video-info { padding: 22px 24px 26px; color: var(--white); }
.video-info h3 { font-size: 1.08rem; margin-bottom: 8px; }
.video-info p { color: rgba(255,255,255,0.68); font-size: 0.92rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--purple-950);
  color: rgba(255,255,255,0.75);
  padding: 46px 0 26px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 26px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 36px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 0.88rem; color: rgba(255,255,255,0.7); }
.footer-links a:hover { color: var(--gold-500); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.8rem; color: rgba(255,255,255,0.45);
  font-family: var(--font-mono);
}
.admin-link { color: rgba(255,255,255,0.35) !important; }
.admin-link:hover { color: var(--blue-400) !important; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(15,8,30,0.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  background: none; border: none; color: var(--white);
  font-size: 2rem; cursor: pointer; line-height: 1;
}

/* ---------- Fotos de la semana · animación tipo sprite ---------- */
.sprite-gallery { max-width: 640px; margin: 0 auto; }
.sprite-stage {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--purple-950);
  box-shadow: var(--shadow-deep);
}
.sprite-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
}
.sprite-frame-img.is-active {
  opacity: 1;
  visibility: visible;
  animation: spritePop 0.4s steps(4) both;
}
@keyframes spritePop {
  0%   { transform: scale(0.94); filter: brightness(0.7); }
  25%  { transform: scale(0.98); filter: brightness(0.85); }
  60%  { transform: scale(1.02); filter: brightness(1.05); }
  100% { transform: scale(1); filter: brightness(1); }
}
.sprite-counter {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(15,8,30,0.65);
  color: var(--gold-500);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 5px 11px;
  border-radius: 999px;
  z-index: 5;
  letter-spacing: 0.04em;
}
.sprite-caption {
  text-align: center;
  color: rgba(23,15,43,0.65);
  font-size: 0.92rem;
  margin: 16px 0 0;
  min-height: 1.4em;
}
.sprite-filmstrip {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.sprite-thumb {
  width: 62px; height: 46px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.5;
  padding: 0;
  background: none;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.sprite-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sprite-thumb:hover { opacity: 0.8; }
.sprite-thumb.is-active { opacity: 1; border-color: var(--gold-500); transform: translateY(-2px); }

/* ---------- Entrevista destacada (Facebook) ---------- */
.interview-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 56px;
  align-items: center;
}
.interview-text .split-text { margin-bottom: 0; }
.interview-media { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.interview-video-frame {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
}

@media (max-width: 980px) {
  .interview-layout { grid-template-columns: 1fr; }
  .interview-media { order: -1; }
}

/* ---------- Historia · 21 años ---------- */
.history-section { background: var(--white); }
.history-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.history-badge {
  background: linear-gradient(160deg, var(--purple-800), var(--purple-950));
  border-radius: 20px;
  padding: 26px 16px;
  text-align: center;
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.history-badge-number {
  display: block;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--gold-500);
  line-height: 1;
}
.history-badge-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-top: 8px;
}
.history-head-text h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 14px; }
.history-lead {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--purple-900);
  line-height: 1.5;
  margin: 0;
}
.history-body {
  max-width: 740px;
  margin: 0 auto 50px;
  columns: 1;
}
.history-body p {
  color: rgba(23,15,43,0.8);
  font-size: 1.02rem;
  margin: 0 0 22px;
}
.history-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 700;
  float: left;
  line-height: 0.8;
  padding: 6px 8px 0 0;
  color: var(--blue-500);
}
.history-video {
  max-width: 740px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  background: var(--purple-950);
}
.history-video-frame { aspect-ratio: 16/9; }
.history-video-title {
  color: var(--white);
  margin: 0;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1rem;
}

@media (max-width: 760px) {
  .history-head { grid-template-columns: 1fr; text-align: center; }
  .history-badge { max-width: 180px; margin: 0 auto; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .split, .split.reverse .split-media { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .spotlight { grid-template-columns: 1fr; text-align: left; }
  .spotlight-media { max-width: 220px; }
  .video-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .stat-card:nth-child(3) { border-left: none; }
}

@media (max-width: 760px) {
  .main-nav { position: fixed; top: 0; right: -100%; height: 100vh; width: min(78vw, 320px);
    background: var(--purple-950); padding: 100px 30px 30px; transition: right 0.35s ease; z-index: 400; }
  .main-nav.is-open { right: 0; box-shadow: -20px 0 50px rgba(0,0,0,0.4); }
  .main-nav ul { flex-direction: column; gap: 22px; }
  .nav-toggle { display: block; z-index: 410; }
  .hero-content { padding-bottom: 70px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .section { padding: 66px 0; }
  .spotlight { padding: 26px; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; }
  .brand-name { font-size: 0.92rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
