/**
 * Inversion Selling - Homepage Styles
 * Timeline section CSS is exact duplicate from InversionCRO.com/home.css
 */

/* Override body for homepage dark bg */
body.is-homepage {
  background: var(--void);
  color: var(--signal);
}
body.is-homepage h1, body.is-homepage h2, body.is-homepage h3 {
  font-family: 'DM Serif Display', serif; font-weight: 400; line-height: 1.15;
}

/* Light section overrides for homepage */
.section-light .dimension-line::before { background: var(--cloud); }
.section-light .dimension-label { color: var(--slate); }

/* ═══════════════════════════════════════════════════════════ */
/* TIMELINE - EXACT CSS FROM InversionCRO.com home.css         */
/* ═══════════════════════════════════════════════════════════ */

.timeline-section {
  padding: 120px 0;
  background: radial-gradient(ellipse 800px 500px at 50% 30%, rgba(220, 20, 60, 0.10) 0%, rgba(220, 20, 60, 0.02) 50%, var(--void) 100%) var(--void);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.timeline-section h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 16px;
}

.timeline-section h2 em {
  font-style: italic;
  color: var(--disruptor);
}

.timeline-intro {
  font-size: 20px;
  color: var(--signal);
  margin-bottom: 80px;
  max-width: 600px;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  transform: translateX(-30px);
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  height: calc(100% - 380px);
  width: 1px;
  background: linear-gradient(to bottom, var(--graphite) 0%, var(--graphite) 85%, var(--disruptor) 100%);
  transform: translateX(-50%);
}

/* Each entry is a 3-column grid: era | center | content */
.timeline-entry {
  display: grid;
  grid-template-columns: 1fr 70px 1fr;
  align-items: center;
  margin-bottom: 56px;
  position: relative;
}

/* Era icon + label (left side) */
.timeline-era {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-right: 24px;
  gap: 8px;
}

.era-icon {
  width: 52px;
  height: 52px;
  color: var(--signal);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.era-icon-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.era-icon-photo img {
  width: 180%;
  height: 180%;
  object-fit: cover;
  object-position: center 65%;
  margin-left: -40%;
  margin-top: -50%;
  filter: grayscale(30%);
}

.timeline-entry.is-visible .era-icon {
  opacity: 1;
}

.era-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--signal);
  text-align: center;
  width: 100%;
}

/* Center column - dot + year */
.timeline-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mid);
  border: 1px solid var(--mid);
  transition: all 0.4s ease;
}

.timeline-entry.is-visible .timeline-dot {
  background: var(--white);
  border-color: var(--white);
}

.timeline-year {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--signal);
  letter-spacing: 1px;
}

/* Content (right side) */
.timeline-content {
  padding-left: 24px;
}

.timeline-name {
  font-family: 'DM Serif Display', serif;
  font-size: 30px;
  color: var(--white);
  margin-bottom: 6px;
}

.timeline-context {
  font-size: 16px;
  color: var(--signal);
  font-style: italic;
  line-height: 1.6;
}

.timeline-context-sub {
  font-size: 16px;
  color: var(--signal);
  line-height: 1.8;
  margin-top: 16px;
  max-width: 400px;
}

.timeline-payoff {
  text-align: left;
  max-width: 900px;
  margin: 80px auto 0;
  padding-top: 60px;
}

.timeline-payoff p {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 400;
  color: var(--white);
  line-height: 1.3;
}

.timeline-payoff p em {
  font-style: italic;
  color: var(--disruptor);
}

/* ---- Slide animations ---- */
.slide-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.slide-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.timeline-entry.is-visible .slide-left,
.timeline-entry.is-visible .slide-right {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger: content arrives slightly after era */
.timeline-entry.is-visible .slide-right {
  transition-delay: 0.15s;
}

/* ---- Gap with red glow ---- */
.timeline-gap {
  text-align: center;
  padding: 48px 0;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.timeline-gap::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 200px;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(220, 20, 60, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.timeline-gap.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-gap::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 1px;
  height: 44px;
  background: var(--disruptor);
}

.gap-label {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--disruptor);
  text-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
  margin-top: 24px;
}

.arc-year {
  font-family: 'Space Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--disruptor);
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(220, 20, 60, 0.6), 0 0 40px rgba(220, 20, 60, 0.3);
  margin-top: 6px;
}

/* ---- Arc zone: the timeline bends into the curve ---- */
.timeline-arc-zone {
  position: relative;
  padding: 0 0 80px 0;
}

.timeline-arc-bend {
  position: absolute;
  top: 0;
  left: calc(50% - 1px);
  width: 60%;
  height: 100%;
  border: none;
  border-left: 2px solid var(--disruptor);
  border-bottom: 2px solid var(--disruptor);
  border-bottom-left-radius: 200px;
  filter: drop-shadow(0 0 8px rgba(220, 20, 60, 0.2)) drop-shadow(0 0 20px rgba(220, 20, 60, 0.1));
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease 0.3s;
}

.timeline-arc-zone.is-visible .timeline-arc-bend {
  opacity: 1;
}

/* Inversion entry inside the arc zone keeps same grid */
.timeline-arc-zone .timeline-entry {
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

/* ---- Inversion entry - special treatment ---- */
.timeline-inversion .timeline-dot {
  width: 14px !important;
  height: 14px !important;
  background: var(--disruptor) !important;
  border-color: var(--disruptor) !important;
  box-shadow: 0 0 20px rgba(220, 20, 60, 0.5);
}

.timeline-inversion .timeline-year {
  color: var(--disruptor);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(220, 20, 60, 0.6), 0 0 40px rgba(220, 20, 60, 0.3);
}

.timeline-inversion .timeline-name {
  font-size: 42px;
  color: var(--white);
}

.timeline-inversion .timeline-context {
  color: var(--disruptor);
  font-style: normal;
  font-size: 15px;
}

.era-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.era-icon-inversion {
  color: var(--disruptor) !important;
  opacity: 1 !important;
  width: 130px !important;
  height: 130px !important;
}

.era-label-inversion {
  color: var(--disruptor) !important;
  font-size: 11px !important;
  letter-spacing: 3px !important;
}

/* Section number for timeline (positioned absolute like InversionCRO) */
.timeline-section .section-number {
  font-family: 'DM Serif Display', serif;
  font-size: 120px;
  position: absolute;
  top: 60px;
  right: 60px;
  opacity: 0.03;
  pointer-events: none;
  color: var(--signal);
  letter-spacing: 0;
}

/* ═══ Timeline Responsive ═══ */
@media (max-width: 968px) {
  .timeline-section { padding: 80px 0; }

  .timeline-entry {
    grid-template-columns: 1fr 50px 1fr;
  }

  .timeline {
    transform: translateX(-15px);
  }

  .timeline-era {
    padding-right: 16px;
  }

  .timeline-content {
    padding-left: 16px;
  }

  .era-icon {
    width: 36px;
    height: 36px;
  }

  .era-icon-photo {
    width: 90px !important;
    height: 90px !important;
  }

  .era-icon-inversion {
    width: 90px !important;
    height: 90px !important;
  }

  .timeline-name { font-size: 24px; }

  .timeline-inversion .timeline-name { font-size: 32px; }

  .slide-left { transform: translateX(-40px); }
  .slide-right { transform: translateX(40px); }

  .timeline-context,
  .timeline-context-sub {
    font-size: 17px;
  }

  .timeline-intro { margin-bottom: 48px; }
}

/* ═══ WordPress Override Styles (from InversionCRO <head>) ═══ */
/* These prevent WordPress from breaking the timeline grid */
.timeline-entry { display: grid !important; grid-template-columns: 1fr 70px 1fr !important; align-items: center !important; }
.timeline-era { display: flex !important; flex-direction: column !important; align-items: center !important; }
.timeline-content { text-align: left !important; }
.era-icon-photo { width: 130px !important; height: 130px !important; border-radius: 50% !important; overflow: hidden !important; }
.era-icon-photo img { width: 180% !important; height: 180% !important; object-fit: cover !important; max-width: none !important; }
body img { max-width: none; }
.hero img, .timeline-section img, .about img { max-width: none; }
