@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* ==========================================================================
   DANIEL CEDEÑO — SISTEMA DE DISEÑO PREMIUM
   ========================================================================== */

:root {
  /* Paleta EXACTA — "paleta colores final.jpeg" */
  --color-forest:  #1C1C1A;   /* CARBÓN */
  --color-emerald: #4A5240;   /* VERDE OLIVA */
  --color-sage:    #EDE0C8;   /* CREMA (secundario) */
  --color-orange:  #C0392B;   /* TERRACOTA */
  --color-orange-hover: #A93226;
  --color-gold:    #E6A817;   /* MOSTAZA */
  --color-cream:   #F5F0E8;   /* Crema claro para fondos (derivado de #EDE0C8) */
  --color-white:   #FFFFFF;
  --color-charcoal:#1C1C1A;   /* = CARBÓN */
  --color-gray:    #5C5C5C;

  --font-heading: 'Bricolage Grotesque', sans-serif;
  --font-body:    'Libre Baskerville', serif;

  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-pill: 9999px;

  --shadow-sm:   0 4px 15px rgba(28,28,26,0.05);
  --shadow-md:   0 10px 30px rgba(28,28,26,0.08);
  --shadow-lg:   0 20px 50px rgba(28,28,26,0.15);
  --shadow-glow: 0 8px 30px rgba(192,57,43,0.35);

  --transition-fast:   all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-smooth: all 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET Y BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background-color: var(--color-cream);
  color: var(--color-charcoal);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background-color: var(--color-orange); color: var(--color-white); }
img, video { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition-fast); }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container        { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 5%; }
.container-narrow { max-width: 860px; }
.relative         { position: relative; }

/* ==========================================================================
   TIPOGRAFÍA — JERARQUÍA REFINADA
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-forest);
  letter-spacing: -0.025em;
}

/* Hero — Impacto sin abrumar */
.display-1 { font-size: clamp(1.9rem, 3.5vw, 3rem); line-height: 1.12; }

/* Sección — Jerarquía clara */
.display-2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.15; }

/* Sub-sección — Refinado */
.display-3 { font-size: clamp(1.25rem, 2vw, 1.75rem); line-height: 1.2; }

/* Citas / Editoriales */
.editorial {
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  line-height: 1.4;
}

/* Eyebrow — Etiqueta pequeña sobre los títulos */
.eyebrow {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-orange);
  display: block;
  margin-bottom: 14px;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 36px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: var(--radius-pill);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  white-space: nowrap;
}

/* Shine effect */
.btn-shine::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  animation: shine 4s infinite;
  pointer-events: none;
}
@keyframes shine { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }

.btn-orange { background-color: var(--color-orange); color: var(--color-white); box-shadow: var(--shadow-glow); }
.btn-orange:hover { background-color: var(--color-orange-hover); transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 40px rgba(192,57,43,0.45); }

.btn-forest { background-color: var(--color-forest); color: var(--color-white); box-shadow: var(--shadow-md); }
.btn-forest:hover { background-color: var(--color-emerald); transform: translateY(-3px) scale(1.02); }

.btn-outline { border: 1.5px solid var(--color-forest); color: var(--color-forest); background: transparent; }
.btn-outline:hover { background-color: var(--color-forest); color: var(--color-white); transform: translateY(-3px); }

.btn-outline-light { border: 1.5px solid rgba(255,255,255,0.3); color: var(--color-white); backdrop-filter: blur(5px); }
.btn-outline-light:hover { background-color: var(--color-white); color: var(--color-forest); transform: translateY(-3px); }

/* ==========================================================================
   HEADER — Pill flotante con menú móvil hamburguesa
   ========================================================================== */
.header-glass {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1200px;
  z-index: 1000;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  transition: var(--transition-smooth);
  background: transparent;
}
.header-glass.scrolled {
  background: rgba(245,240,232,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(28,28,26,0.08);
  border: 1px solid rgba(28,28,26,0.05);
  top: 14px;
}
.header-dark.scrolled {
  background: rgba(28,28,26,0.96);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo-img { height: 35px; width: auto; object-fit: contain; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  padding: 5px 0;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 2px;
  background-color: var(--color-orange);
  transition: var(--transition-smooth);
}
.nav-links a:hover::after { width: 100%; }

/* Hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-forest);
  border-radius: 2px;
  transition: var(--transition-smooth);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu Overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-forest);
  z-index: 1050;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-white);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.mobile-menu.open a { opacity: 1; transform: translateY(0); }
.mobile-menu.open a:nth-child(1) { transition-delay: 0.15s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.22s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.29s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.36s; }
.mobile-menu .mobile-cta { transition-delay: 0.43s !important; }

/* ==========================================================================
   ANIMACIONES DE ENTRADA
   ========================================================================== */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease-out, transform 0.75s ease-out;
}
.is-visible { opacity: 1 !important; transform: translate(0) scale(1) !important; }
.delay-100 { transition-delay: 0.10s; }
.delay-200 { transition-delay: 0.20s; }
.delay-300 { transition-delay: 0.30s; }
.delay-400 { transition-delay: 0.40s; }

/* Word Reveal — Para H1 del Hero */
.word-reveal-wrapper { overflow: hidden; display: inline-block; }
.word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.word-reveal.revealed { opacity: 1; transform: translateY(0); }

/* Parallax helper */
.parallax-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

/* Tilt card */
.tilt-card { transform-style: preserve-3d; transform: perspective(1000px); transition: transform 0.1s ease; will-change: transform; }
.tilt-inner { transition: transform 0.3s ease; }

/* Float */
.floating { animation: floating 4s ease-in-out infinite; }
@keyframes floating { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ==========================================================================
   BADGES Y PILLS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.badge-orange { background-color: rgba(192,57,43,0.10); color: var(--color-orange); border: 1px solid rgba(192,57,43,0.18); }
.badge-forest { background-color: var(--color-forest); color: var(--color-white); }
.badge-light  { background-color: rgba(255,255,255,0.08); color: var(--color-white); border: 1px solid rgba(255,255,255,0.15); backdrop-filter: blur(4px); }

/* ==========================================================================
   MEDIA QUERIES — MOBILE FIRST
   ========================================================================== */

/* ==========================================================================
   HISTORIA DE DANIEL / STORYTELLING SECTION (STICKY & TIMELINE)
   ========================================================================== */
.story-section {
  position: relative;
  overflow: visible;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start; /* Permite que la columna izquierda sea sticky */
  position: relative;
}

.story-sticky-col {
  position: sticky;
  top: 100px;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.story-card-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
}

.story-img {
  border-radius: var(--radius-lg);
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center 20%;
  box-shadow: var(--shadow-lg);
  display: block;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.story-floating-badge {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 28, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--color-white);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  pointer-events: none;
}

.story-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--color-forest);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.story-scroll-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-orange);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.6); opacity: 1; box-shadow: 0 0 12px var(--color-orange); }
}

.story-progress-wrapper {
  width: 100%;
  max-width: 440px;
  height: 3px;
  background: rgba(28, 28, 26, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

.story-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--color-orange);
  transition: width 0.25s ease-out;
}

/* Timeline vertical estructurado */
.story-timeline {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  border-left: 2px solid rgba(28, 28, 26, 0.1);
  padding-left: 32px;
  margin-bottom: 36px;
}

.story-chapter {
  position: relative;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.story-chapter::before {
  content: '';
  position: absolute;
  left: -38px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid rgba(28, 28, 26, 0.3);
  transition: all 0.35s ease;
}

.story-chapter.active::before {
  background: var(--color-orange);
  border-color: var(--color-orange);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.2);
  transform: scale(1.25);
}

.story-chapter-num {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: 8px;
  display: block;
}

.story-chapter p {
  font-size: 0.98rem;
  color: var(--color-gray);
  line-height: 1.85;
  margin: 0;
}

.story-pullquote {
  background: var(--color-cream);
  border-left: 4px solid var(--color-orange);
  padding: 18px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 16px 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-forest);
  line-height: 1.55;
}

/* Tablet */
@media (max-width: 1024px) {
  .nav-links  { display: none; }
  .hamburger  { display: flex; }
  .mobile-menu { display: flex; }

  .header-glass { width: 100%; top: 0; border-radius: 0; padding: 18px 24px; }
  .header-glass.scrolled { top: 0; border-radius: 0; }
  
  .story-grid { gap: 40px; }
}

/* Mobile */
@media (max-width: 768px) {
  .display-1 { font-size: clamp(1.7rem, 6vw, 2.2rem); }
  .display-2 { font-size: clamp(1.4rem, 5vw, 1.9rem); }
  .display-3 { font-size: clamp(1.15rem, 4vw, 1.5rem); }

  .logo-img { height: 28px; }

  /* Grids → stack */
  .grid-2col,
  .grid-3col { grid-template-columns: 1fr !important; }

  /* Hero */
  .hero-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .hero-grid .hero-img { order: -1; }
  .hero-grid .hero-img img { aspect-ratio: 4/3 !important; }

  /* CTA buttons full width on mobile */
  .btn-group-hero { flex-direction: column !important; }
  .btn-group-hero .btn { width: 100%; justify-content: center; }

  /* Sections padding */
  section { padding-top: 80px !important; padding-bottom: 80px !important; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr !important; gap: 40px !important; }

  /* Stats */
  .stats-bar { padding: 20px 0 !important; gap: 0 !important; }
  .stats-bar > div { padding: 16px !important; }

  /* Manifesto */
  .manifesto-quote { font-size: 1.3rem !important; }

  /* Cards de cursos */
  .course-cards { grid-template-columns: 1fr !important; }

  /* Story section mobile */
  .story-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .story-sticky-col { position: static !important; width: 100% !important; }
  .story-card-wrapper { max-width: 100% !important; }
  .story-timeline { padding-left: 24px !important; }
  .story-chapter::before { left: -30px !important; }
}
