/* ==========================================================================
   NOTIFAST 3.0 — ESTILOS BASE Y COMPONENTES WEB
   ========================================================================== */

/* Modern CSS Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100vh;
  line-height: 1.5;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* ==========================================================================
   ACCESIBILIDAD — SKIP LINK & FOCUS VISIBLE (UI/UX PRO MAX)
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background-color: var(--brand-primary);
  color: var(--brand-on-primary);
  padding: 12px 20px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  z-index: 9999;
  text-decoration: none;
  transition: top var(--duration-fast) var(--ease-smooth);
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
}

/* ==========================================================================
   HEADER & NAVEGACIÓN
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background-color: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-hairline);
  transition: background-color var(--duration-normal) var(--ease-smooth);
}

@media (prefers-color-scheme: dark) {
  .header {
    background-color: rgba(250, 249, 246, 0.85);
  }
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-icon-svg {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.logo-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background-color: var(--brand-secondary-light);
  color: var(--brand-secondary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-small);
  transition: color var(--duration-fast) var(--ease-smooth);
}

.nav-links a:hover {
  color: var(--brand-primary);
}

/* ==========================================================================
   BOTONES TÁCTILES — MIN 48px & SPRING 0.97 SCALE (WCAG & DESIGN.MD)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-spring),
              background-color var(--duration-fast) var(--ease-smooth),
              box-shadow var(--duration-fast) var(--ease-smooth);
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--brand-primary);
  color: var(--brand-on-primary);
  border-color: var(--brand-primary);
  box-shadow: 0 2px 10px rgba(158, 27, 50, 0.2);
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
  box-shadow: 0 4px 16px rgba(158, 27, 50, 0.3);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-hairline);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-container);
  border-color: var(--text-secondary);
}

.btn-sm {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 0.8125rem;
}

/* ==========================================================================
   LAYOUT Y SECCIONES
   ========================================================================== */

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

/* Hero */
.hero-section {
  position: relative;
  padding: 100px 24px 60px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  z-index: 2;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-surface-container);
  border: 1px solid var(--border-hairline);
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-title {
  font-size: var(--text-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-title .accent-ruby {
  color: var(--brand-primary);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero-section {
    padding: 60px 16px 40px;
  }
  .section-container {
    padding: 60px 16px;
  }
}


/* ==========================================================================
   STICKERS DE ESTUDIO Y FONDO DINÁMICO (DUOLINGO & NOTIFAST ATOMS)
   ========================================================================== */

#bg-particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.study-sticker {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
  transition: opacity var(--duration-normal) var(--ease-smooth);
}

@media (prefers-color-scheme: dark) {
  .study-sticker {
    opacity: 0.12;
  }
}

.sticker-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
}

.sticker-ruby { color: var(--brand-primary); }
.sticker-aqua { color: var(--brand-secondary); }
.sticker-sage { color: var(--brand-success); }
.sticker-amber { color: var(--brand-warning); }
.sticker-blue { color: var(--subject-calculus); }


/* ==========================================================================
   SCROLLYTELLING SHOWCASE SECTION (LINEAR STYLE)
   ========================================================================== */

.showcase-section {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: start;
}

.story-steps-column {
  display: flex;
  flex-direction: column;
  gap: 120px;
  padding: 40px 0 200px;
}

.story-step {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-tactile);
  transition: transform var(--duration-normal) var(--ease-smooth),
              border-color var(--duration-normal) var(--ease-smooth);
}

.story-step.active-step {
  border-color: var(--brand-primary);
  transform: translateX(8px);
}

.story-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.tag-notes { background-color: var(--brand-primary-light); color: var(--brand-primary); }
.tag-grades { background-color: var(--brand-success-light); color: var(--brand-success); }
.tag-agenda { background-color: var(--brand-secondary-light); color: var(--brand-secondary); }

.story-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.story-desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.story-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.story-features-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

.feature-check-icon {
  width: 20px;
  height: 20px;
  color: var(--brand-success);
  flex-shrink: 0;
}

/* Sticky Phone Column */
.phone-sticky-col {
  position: sticky;
  top: 100px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Mobile Tabs Switcher (< 992px) */
.mobile-tabs-switcher {
  display: none;
  width: 100%;
  margin-bottom: 24px;
  gap: 8px;
}

.mobile-tab-btn {
  flex: 1;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--duration-fast);
}

.mobile-tab-btn.active {
  background-color: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

@media (max-width: 991px) {
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .phone-sticky-col {
    position: static;
    order: -1;
    margin-bottom: 40px;
  }
  .mobile-tabs-switcher {
    display: flex;
  }
  .story-steps-column {
    gap: 40px;
    padding: 0;
  }
  .story-step {
    padding: 24px;
  }
}


/* ==========================================================================
   BENTO GRID DE SUPERPODERES ACADÉMICOS
   ========================================================================== */

.bento-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.bento-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}

.bento-header .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background-color: var(--brand-secondary-light);
  color: var(--brand-secondary);
  margin-bottom: 16px;
}

.bento-header .section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.bento-header .section-desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.bento-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-tactile);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-normal) var(--ease-spring),
              box-shadow var(--duration-normal) var(--ease-smooth);
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.bento-col-8 {
  grid-column: span 8;
}

.bento-col-4 {
  grid-column: span 4;
}

.bento-col-6 {
  grid-column: span 6;
}

.bento-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.bento-icon-wrapper svg {
  width: 26px;
  height: 26px;
}

.icon-bg-ruby { background-color: var(--brand-primary-light); color: var(--brand-primary); }
.icon-bg-aqua { background-color: var(--brand-secondary-light); color: var(--brand-secondary); }
.icon-bg-sage { background-color: var(--brand-success-light); color: var(--brand-success); }
.icon-bg-amber { background-color: var(--brand-warning-light); color: var(--brand-warning); }

.bento-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.bento-card-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Micro-visual dentro de las bento cards */
.bento-visual-preview {
  margin-top: 24px;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.preview-pill {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.pill-calc { background-color: var(--brand-primary-light); color: var(--brand-primary); }
.pill-sync { background-color: var(--brand-secondary-light); color: var(--brand-secondary); }
.pill-bell { background-color: var(--brand-warning-light); color: var(--brand-warning); }

/* ==========================================================================
   FINAL CTA SECTION
   ========================================================================== */

.final-cta-section {
  max-width: 1000px;
  margin: 60px auto 100px;
  padding: 0 24px;
}

.final-cta-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 64px 32px;
  text-align: center;
  box-shadow: var(--shadow-hover);
  position: relative;
  overflow: hidden;
}

.final-cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
}

.final-cta-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.final-cta-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
}

.final-cta-meta {
  margin-top: 20px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ==========================================================================
   DOWNLOAD MODAL / TOAST
   ========================================================================== */

.download-toast-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-smooth),
              visibility var(--duration-normal);
}

.download-toast-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.download-toast-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: relative;
  transform: translateY(20px) scale(0.96);
  transition: transform var(--duration-normal) var(--ease-spring);
}

.download-toast-overlay.visible .download-toast-card {
  transform: translateY(0) scale(1);
}

.toast-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-hairline);
  background-color: var(--bg-surface-container);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.125rem;
  transition: background-color var(--duration-fast);
}

.toast-close-btn:hover {
  background-color: var(--border-hairline);
  color: var(--text-primary);
}

.toast-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background-color: var(--brand-primary-light);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.toast-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.toast-message {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Footer Editorial */
.footer {
  border-top: 1px solid var(--border-hairline);
  background-color: var(--bg-surface);
  padding: 64px 24px 32px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.footer-main-grid {
  display: grid;
  grid-template-columns: 2.2fr 1.4fr 1.4fr 1.4fr;
  gap: 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-brand {
  padding-right: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(158, 27, 50, 0.15);
}

.footer-brand .logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.footer-brand .logo-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.footer-mission-text {
  font-size: 0.84375rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.footer-trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-canvas-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.trust-chip svg {
  width: 13px;
  height: 13px;
  color: var(--brand-secondary);
}

.footer-heading {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color var(--duration-fast), transform var(--duration-fast);
}

.footer-nav-list a:hover {
  color: var(--brand-primary);
  transform: translateX(2px);
}

.footer-nav-icon {
  width: 15px;
  height: 15px;
  color: var(--brand-secondary);
  flex-shrink: 0;
}

.tech-list {
  gap: 8px;
}

.tech-item-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.02);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.footer-subtext {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.footer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.footer-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
}

/* Sub-footer bottom bar */
.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-hairline);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-badge-pill {
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-canvas-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.footer-back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  border: 1px solid var(--border-hairline);
  transition: all var(--duration-fast);
}

.footer-back-to-top:hover {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

@media (max-width: 991px) {
  .footer-main-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-col-brand {
    grid-column: span 2;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .footer-main-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-col-brand {
    grid-column: span 1;
  }
  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 991px) {
  .bento-col-8, .bento-col-4, .bento-col-6 {
    grid-column: span 12;
  }
  .final-cta-card {
    padding: 40px 20px;
  }
}
