/* ============================================================
   HOME.CSS — Página de inicio
   ============================================================ */

/* ============================
   HERO HOME
   ============================ */
.hero--home {
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), var(--color-paper-texture) calc(100% - 1px)),
    linear-gradient(180deg, transparent 0, transparent calc(100% - 1px), var(--color-paper-texture) calc(100% - 1px)),
    linear-gradient(160deg, var(--color-surface) 60%, var(--color-bg-soft) 100%);
  background-size: 42px 42px, 42px 42px, auto;
}

.hero--home .hero__title span {
  display: block;
  color: var(--color-primary);
}

/* Foto real de estudiantes */
.hero__photo-frame {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
}

.editorial-seal {
  position: absolute;
  right: calc(-1 * var(--space-4));
  bottom: calc(-1 * var(--space-5));
  width: 132px;
  aspect-ratio: 1;
  border-radius: var(--radius-full);
  background:
    linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-soft) 100%);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  display: grid;
  place-items: center;
  padding: var(--space-4);
  text-align: center;
  z-index: 2;
}

.editorial-seal::before {
  content: '';
  position: absolute;
  inset: var(--space-2);
  border-radius: inherit;
  border: 1px solid var(--color-paper-rule);
}

.editorial-seal::after {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--space-1));
  border-radius: inherit;
  border: 2px solid transparent;
  border-top-color: var(--color-accent-lime);
  border-right-color: var(--color-primary-soft);
  animation: editorial-seal-spin 18s linear infinite;
}

.editorial-seal span {
  position: relative;
  z-index: 1;
  font-size: var(--text-xs);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-primary);
  overflow-wrap: anywhere;
}

@keyframes editorial-seal-spin {
  to {
    transform: rotate(360deg);
  }
}

.hero__photo {
  width: 100%;
  height: auto;
  border-radius: 0;
  border: 1px solid var(--color-border-strong);
  box-shadow: none;
  display: block;
  object-fit: cover;
}

/* Badge flotante sobre la foto */
.hero__photo-badge {
  position: absolute;
  bottom: var(--space-5);
  left: calc(-1 * var(--space-4));
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}

@media (max-width: 767px) {
  .hero__photo-badge {
    left: var(--space-3);
  }

  .editorial-seal {
    right: var(--space-3);
    bottom: calc(-1 * var(--space-6));
    width: 108px;
    padding: var(--space-3);
  }
}

.hero__books-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  max-width: 440px;
}

.editorial-snapshot {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  display: grid;
  gap: var(--space-4);
}

.snapshot-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 0;
  padding: var(--space-6);
  box-shadow: none;
}

.snapshot-card--primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.snapshot-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-bg-soft);
  color: var(--color-primary);
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.snapshot-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.snapshot-card p {
  color: var(--color-text);
}

.snapshot-card--primary h3,
.snapshot-card--primary p {
  color: #fff;
}

.snapshot-card--primary span {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.hero__books-stack .book-card {
  transform-origin: center;
}

.hero__books-stack .book-card:nth-child(1) {
  grid-column: 1;
  align-self: end;
}

.hero__books-stack .book-card:nth-child(2) {
  grid-column: 2;
  transform: translateY(-24px);
}

/* ============================
   PROPUESTA PEDAGÓGICA
   ============================ */
.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.pillar-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: relative;
  overflow: hidden;
  min-height: 260px;
  height: 100%;
  box-shadow: var(--shadow-md);
}

.pillar-card--wide {
  background:
    linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-soft) 100%);
}

.pillar-card--tall {
  background:
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-raised) 100%);
}

.pillar-card::before {
  display: none;
}

.pillar-card__number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-text-dark);
  line-height: 1;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-strong);
}

[data-theme="dark"] .pillar-card__number {
  color: rgba(255, 255, 255, 0.15);
}

.pillar-card h3 {
  font-size: var(--text-xl);
}

.pillar-card p {
  color: var(--color-text);
  font-size: var(--text-base);
}

@media (min-width: 768px) {
  .pillars-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
}

/* ============================
   CATÁLOGO DESTACADO
   ============================ */
.featured-books {
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), var(--color-paper-texture) calc(100% - 1px)),
    linear-gradient(180deg, transparent 0, transparent calc(100% - 1px), var(--color-paper-texture) calc(100% - 1px)),
    var(--color-bg-soft);
  background-size: 36px 36px, 36px 36px, auto;
  border-block: 1px solid var(--color-paper-rule);
}

.featured-books__footer {
  text-align: center;
  margin-top: var(--space-10);
}

@media (min-width: 900px) {
  .featured-books .books-grid {
    align-items: stretch;
  }
}

.featured-books .book-card {
  height: 100%;
}

.plan-card__cover--orange {
  background: linear-gradient(135deg, #fff2d8, #f0a13a);
  color: #8f3d12;
}

.catalog-cover {
  min-height: 260px;
  height: 100%;
  width: 100%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-cover--basica {
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  color: #1e3a8a;
}

.catalog-cover--bachillerato {
  background: linear-gradient(135deg, #0f766e 0%, #064e3b 100%);
  color: #f8fafc;
}

.catalog-cover--ortografia {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
  color: #78350f;
}

.catalog-cover--atencion {
  background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  color: #f8fafc;
}

/* ============================
   TEASER PLATAFORMA
   ============================ */
.platform-teaser {
  background: var(--color-text-dark);
  border: 1px solid var(--color-tech-border);
  border-radius: var(--radius-3xl);
  padding: var(--space-12) var(--space-8);
  overflow: hidden;
  position: relative;
}

.platform-teaser::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, var(--color-tech-wash) 48%, transparent 72%);
  opacity: 0.75;
}

.platform-teaser__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
  position: relative;
  z-index: 1;
}

.platform-teaser__eyebrow {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-accent-lime);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.platform-teaser h2 {
  color: var(--color-tech-text);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: var(--space-6);
}

.platform-teaser__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.platform-teaser__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--color-tech-text-muted);
  font-size: var(--text-base);
}

.platform-teaser__feature-icon {
  width: 24px;
  height: 24px;
  background-color: rgba(199, 242, 94, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent-lime);
  flex-shrink: 0;
  margin-top: 1px;
}

.platform-teaser__mockup {
  background-color: var(--color-tech-panel-soft);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-tech-border);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.platform-teaser__mockup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.mockup-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
  padding: var(--space-8);
}

.mockup-placeholder p {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
}

@media (min-width: 1024px) {
  .platform-teaser__inner {
    grid-template-columns: 1fr 1fr;
  }

  .platform-teaser {
    padding: var(--space-16) var(--space-12);
  }
}

/* ============================
   RUTA DE APRENDIZAJE
   ============================ */
.route-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.route-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 0;
  padding: var(--space-8);
  box-shadow: none;
}

.route-card__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  margin-bottom: var(--space-5);
}

.route-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.route-card p {
  color: var(--color-text);
}

@media (min-width: 768px) {
  .route-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .editorial-seal::after {
    animation: none;
  }
}
