/* ============================================
   PROFE ALEXIAI - Clase 03: Empresa, plataforma y modelo
   Mobile-first · Dark theme · Vanilla CSS
   ============================================ */

/* --- CSS Variables --- */
:root {
  --negro:       #0a0a0a;
  --negro-2:     #111111;
  --negro-3:     #1a1a1a;
  --magenta:     #D91A8A;
  --magenta-2:   #F472B6;
  --cyan-tech:   #5EEAD4;
  --naranja-meta:#FBBF24;
  --blanco:      #FFFFFF;
  --gris-1:      #E5E7EB;
  --gris-2:      #9CA3AF;
  --gris-3:      #374151;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* --- Base --- */
body {
  background: var(--negro);
  color: var(--blanco);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--magenta); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--magenta-2); }

strong, b { font-weight: 600; }

::selection {
  background: var(--magenta);
  color: var(--blanco);
}

/* --- Focus States (Accessibility) --- */
:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
}

/* --- Typography --- */
.heading-display {
  font-family: 'Clash Display', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.98;
}

/* --- Layout Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 3rem; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 6rem 1.25rem 4rem;
  position: relative;
}

@media (min-width: 768px) {
  .hero { padding: 6rem 2rem 4rem; }
}

@media (min-width: 1024px) {
  .hero { padding: 8rem 3rem 5rem; max-width: 1200px; margin: 0 auto; }
}

.hero__label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 1.5rem;
  display: block;
}

.hero__title {
  font-family: 'Clash Display', sans-serif;
  font-weight: 700;
  font-size: clamp(2.75rem, 8vw, 7rem);
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--blanco);
  margin-bottom: 1.5rem;
  max-width: 900px;
}

.hero__subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  max-width: 680px;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .hero__subtitle { font-size: 1.15rem; }
}

.hero__notice {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--gris-2);
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--magenta);
  color: var(--blanco);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease-out, box-shadow 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(217, 26, 138, 0.3);
  color: var(--blanco);
}

.link-secondary {
  font-size: 0.9rem;
  color: var(--gris-2);
  text-decoration: none;
  transition: color 0.2s;
}

.link-secondary:hover {
  color: var(--gris-1);
}

/* ============================================
   PROGRESS BAR (sticky)
   ============================================ */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  padding: 0;
}

.progress-bar.visible {
  transform: translateY(0);
}

.progress-bar__track {
  height: 3px;
  background: var(--negro-3);
  position: relative;
}

.progress-bar__fill {
  height: 100%;
  background: var(--magenta);
  width: 0%;
  transition: width 0.1s linear;
}

.progress-bar__info {
  padding: 0.5rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gris-2);
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .progress-bar__info { padding: 0.5rem 2rem; }
}

/* ============================================
   LESSON SECTIONS
   ============================================ */
.leccion {
  padding: 5rem 0;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.leccion:first-of-type {
  border-top: none;
}

@media (min-width: 768px) {
  .leccion { padding: 6rem 0; }
}

@media (min-width: 1024px) {
  .leccion { padding: 8rem 0; }
}

.leccion__header {
  position: relative;
  margin-bottom: 2.5rem;
}

.leccion__numero {
  font-family: 'Clash Display', sans-serif;
  font-weight: 700;
  font-size: clamp(4rem, 12vw, 8rem);
  color: var(--magenta);
  opacity: 0.9;
  line-height: 1;
  letter-spacing: -0.03em;
  display: block;
  margin-bottom: 0.5rem;
}

@media (min-width: 1024px) {
  .leccion__numero {
    position: absolute;
    left: -1rem;
    top: -0.5rem;
    font-size: 9rem;
    opacity: 0.12;
    z-index: 0;
    margin-bottom: 0;
  }

  .leccion__header {
    padding-left: 0;
    position: relative;
    z-index: 1;
  }
}

.leccion__titulo {
  font-family: 'Clash Display', sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--blanco);
  margin-bottom: 1rem;
}

.leccion__intro {
  font-size: 1.05rem;
  color: var(--gris-1);
  line-height: 1.7;
  max-width: 700px;
}

@media (min-width: 768px) {
  .leccion__intro { font-size: 1.1rem; }
}

/* --- Cards Grid --- */
.leccion__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

@media (min-width: 1024px) {
  .leccion__cards {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

/* --- Card --- */
.card {
  background: var(--negro-3);
  border: 1px solid var(--gris-3);
  border-radius: 12px;
  padding: 1.75rem;
  position: relative;
  transition: border-color 0.25s;
}

@media (min-width: 768px) {
  .card { padding: 2rem 2.25rem; }
}

.card:hover {
  border-color: #4b5563;
}

.card--tecnico {
  border-top: 2px solid var(--cyan-tech);
}

.card--paladino {
  border-top: 2px solid var(--naranja-meta);
}

.card__label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 1rem;
}

.card--tecnico .card__label {
  color: var(--cyan-tech);
}

.card--paladino .card__label {
  color: var(--naranja-meta);
}

.card__content {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gris-1);
}

.card__content p {
  margin-bottom: 1em;
}

.card__content p:last-child {
  margin-bottom: 0;
}

.card__content strong {
  color: var(--blanco);
}

/* --- Code Blocks --- */
.code-block {
  background: var(--negro-2);
  border: 1px solid var(--gris-3);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--gris-1);
}

.code-block code {
  font-family: inherit;
  font-size: inherit;
}

/* inline code */
.card__content code,
.leccion__intro code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: var(--negro-2);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--magenta-2);
}

/* ============================================
   TABLES (enhanced for Clase 03)
   ============================================ */
.table-wrapper {
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: 8px;
  border: 1px solid var(--gris-3);
  -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 580px;
}

.table-wrapper th,
.table-wrapper td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gris-3);
}

.table-wrapper th {
  background: var(--negro-2);
  color: var(--gris-1);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(217, 26, 138, 0.3);
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-wrapper td {
  color: var(--gris-1);
}

.table-wrapper tr:last-child td {
  border-bottom: none;
}

/* Alternating rows */
.table-wrapper tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Monospace for prices */
.table-wrapper .price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Bold recommendation column */
.table-wrapper td strong,
.table-wrapper td b {
  color: var(--blanco);
}

/* Mobile scroll hint */
.table-scroll-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--gris-2);
  text-align: center;
  padding: 0.5rem 0 0;
  letter-spacing: 0.03em;
}

@media (min-width: 768px) {
  .table-scroll-hint { display: none; }
}

/* Decision table: wider first column */
.table-wrapper--decision table {
  min-width: 700px;
}

.table-wrapper--decision td:first-child {
  font-weight: 500;
  color: var(--blanco);
  min-width: 200px;
}

/* Price table: model column highlight */
.table-wrapper--prices td:first-child {
  font-weight: 500;
  color: var(--blanco);
  white-space: nowrap;
}

/* ============================================
   SVG VISUALIZATIONS / VIZ BLOCKS
   ============================================ */
.viz {
  margin: 2rem 0;
  padding: 2rem 1.25rem;
  background: var(--negro-2);
  border: 1px solid var(--gris-3);
  border-radius: 12px;
  overflow-x: auto;
}

@media (min-width: 768px) {
  .viz { padding: 2.5rem 2rem; }
}

.viz__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gris-2);
  margin-bottom: 1.25rem;
}

.viz svg {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Lineup Columns (L02) --- */
.lineup {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .lineup {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
  }
}

.lineup__col {
  background: var(--negro-3);
  border: 1px solid var(--gris-3);
  border-radius: 10px;
  padding: 1.25rem;
}

.lineup__empresa {
  font-family: 'Clash Display', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  display: block;
}

.lineup__col--anthropic .lineup__empresa { color: var(--magenta-2); }
.lineup__col--openai .lineup__empresa { color: #818CF8; }
.lineup__col--google .lineup__empresa { color: var(--cyan-tech); }

.lineup__plataforma {
  font-size: 0.8rem;
  color: var(--gris-2);
  display: block;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.lineup__models {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lineup__model {
  font-size: 0.85rem;
  color: var(--gris-1);
  padding: 0.4rem 0.6rem;
  background: var(--negro-2);
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.lineup__model--top {
  border-left: 2px solid var(--magenta);
}

.lineup__model--mid {
  border-left: 2px solid var(--cyan-tech);
}

.lineup__model--lite {
  border-left: 2px solid var(--gris-2);
}

/* ============================================
   RESUMEN FINAL
   ============================================ */
.resumen-final {
  padding: 6rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

@media (min-width: 1024px) {
  .resumen-final { padding: 8rem 0; }
}

.resumen-final__titulo {
  font-family: 'Clash Display', sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--blanco);
  margin-bottom: 2.5rem;
}

/* ============================================
   SITE FOOTER
   ============================================ */
.site-footer {
  padding: 3rem 0 1rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer__brand {
  font-family: 'Clash Display', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--gris-1);
  margin-bottom: 0.5rem;
}

.site-footer__note {
  font-size: 0.85rem;
  color: var(--gris-2);
  margin-bottom: 0.25rem;
}

.site-footer__note a {
  color: var(--gris-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer__note a:hover {
  color: var(--gris-1);
}

/* ============================================
   LINK UNDERLINE ANIMATION
   ============================================ */
.card__content a,
.leccion__intro a {
  position: relative;
  color: var(--magenta);
  text-decoration: none;
}

.card__content a::after,
.leccion__intro a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--magenta);
  transition: width 0.25s ease;
}

.card__content a:hover::after,
.leccion__intro a:hover::after {
  width: 100%;
}

/* ============================================
   GSAP ANIMATION INITIAL STATES
   ============================================ */
.anim-fade-up {
  opacity: 0;
  transform: translateY(20px);
}

.anim-fade-left {
  opacity: 0;
  transform: translateX(-30px);
}

.anim-fade-right {
  opacity: 0;
  transform: translateX(30px);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }

  .anim-fade-up,
  .anim-fade-left,
  .anim-fade-right {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  body { background: #fff; color: #000; }
  .progress-bar, .hero__actions { display: none; }
  .card { break-inside: avoid; }
}

/* ============================================
   NAVBAR SUPERIOR
   ============================================ */
.navbar-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  padding: 1rem 1.25rem;
}
@media (min-width: 768px) { .navbar-top { padding: 1.25rem 2rem; } }
@media (min-width: 1024px) { .navbar-top { padding: 1.5rem 3rem; } }

.navbar-top__link {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--gris-2);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.navbar-top__link:hover { color: var(--magenta); }

/* ============================================
   NAV INTER-CLASES
   ============================================ */
.nav-clases {
  margin-top: 5rem;
  margin-bottom: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--gris-3);
}

.nav-clases__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.nav-clases__link {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--gris-2);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-clases__link:hover { color: var(--magenta); }

.nav-clases__link--prev { text-align: left; }
.nav-clases__link--center { text-align: center; font-size: 0.8125rem; }
.nav-clases__link--next { text-align: right; }

.nav-clases__arrow { color: var(--magenta); }

.nav-titulo-largo { display: none; }
@media (min-width: 768px) { .nav-titulo-largo { display: inline; } }
