/* TKF Interactive Timeline - Growing Tree Visualization */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Crimson+Pro:wght@600;700;800&display=swap');

:root {
  --tkf-green: #78be20;
  --tkf-green-dark: #5a9318;
  --tkf-green-light: #9dd94a;
  --tkf-dark: #1a1a1a;
  --tkf-medium: #525252;
  --tkf-white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Timeline Wrapper - Full viewport scroll experience */
.tkf-timeline-wrapper {
  position: relative;
  font-family: 'Inter', sans-serif;
  color: var(--tkf-dark);
  overflow-x: hidden;
}

/* Side Navigation - Fixed menu styled like tree branch */
.tkf-side-nav {
  position: fixed;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 2px solid rgba(120, 190, 32, 0.2);
  z-index: 100;
  max-height: 80vh;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.tkf-side-nav__branch {
  position: absolute;
  left: -2px;
  top: 20%;
  width: 6px;
  height: 60%;
  background: linear-gradient(180deg, var(--tkf-green-dark) 0%, var(--tkf-green-light) 100%);
  border-radius: 3px;
}

.tkf-side-nav__header {
  font-family: 'Crimson Pro', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tkf-dark);
  margin-bottom: 24px;
  padding-left: 16px;
  border-left: 4px solid var(--tkf-green);
}

.tkf-side-nav__menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tkf-side-nav__item {
  margin-bottom: 4px;
}

.tkf-side-nav__link {
  display: block;
  padding: 12px 16px;
  color: var(--tkf-medium);
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.tkf-side-nav__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0;
  background: var(--tkf-green);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.tkf-side-nav__link:hover,
.tkf-side-nav__link--active {
  background: rgba(120, 190, 32, 0.08);
  color: var(--tkf-green-dark);
  padding-left: 24px;
}

.tkf-side-nav__link:hover::before,
.tkf-side-nav__link--active::before {
  height: 100%;
}

.tkf-side-nav__link--active {
  font-weight: 600;
}

.tkf-side-nav__footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid rgba(120, 190, 32, 0.1);
  text-align: center;
}

.tkf-side-nav__badge img {
  transition: transform 0.3s ease;
}

.tkf-side-nav__badge:hover img {
  transform: scale(1.05);
}

/* Mobile Menu Toggle */
.tkf-mobile-menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 56px;
  height: 56px;
  background: var(--tkf-green);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 101;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(120, 190, 32, 0.4);
  transition: all 0.3s ease;
}

.tkf-mobile-menu-toggle:hover {
  transform: scale(1.1);
}

.tkf-mobile-menu-toggle__icon {
  position: relative;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 1px;
}

.tkf-mobile-menu-toggle__icon::before,
.tkf-mobile-menu-toggle__icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: white;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.tkf-mobile-menu-toggle__icon::before {
  top: -8px;
}

.tkf-mobile-menu-toggle__icon::after {
  top: 8px;
}

.tkf-mobile-menu-toggle[aria-expanded="true"] .tkf-mobile-menu-toggle__icon {
  background: transparent;
}

.tkf-mobile-menu-toggle[aria-expanded="true"] .tkf-mobile-menu-toggle__icon::before {
  top: 0;
  transform: rotate(45deg);
}

.tkf-mobile-menu-toggle[aria-expanded="true"] .tkf-mobile-menu-toggle__icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Timeline Wrapper - Full viewport scroll experience */
.tkf-timeline-wrapper {
  position: relative;
  font-family: 'Inter', sans-serif;
  color: var(--tkf-dark);
  overflow-x: hidden;
}

/* Fixed Intro Section */
.tkf-timeline-intro {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9f0 100%);
  position: relative;
  z-index: 2;
}

.tkf-timeline-intro__title {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--tkf-dark);
}

.tkf-timeline-intro__subtitle {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--tkf-medium);
  margin-bottom: 60px;
}

.tkf-timeline-intro__hint {
  font-size: 3rem;
  color: var(--tkf-green);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}

/* Tree Canvas - Fixed SVG that grows as user scrolls */
.tkf-timeline-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.tkf-tree-svg {
  width: 100%;
  height: 100%;
}

.tkf-tree-path {
  fill: none;
  stroke: var(--tkf-green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 0.3s ease-out;
}

.tkf-tree-leaves {
  fill: var(--tkf-green-light);
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Timeline Content - Scrollable milestones */
.tkf-timeline-content {
  position: relative;
  z-index: 1;
  padding: 100vh 40px 200px 40px;
  min-height: 300vh;
}

.tkf-milestone {
  max-width: 600px;
  margin: 0 auto 200px auto;
  padding: 48px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 2px solid rgba(120, 190, 32, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tkf-milestone--visible {
  opacity: 1;
  transform: translateY(0);
}

.tkf-milestone--left {
  margin-right: auto;
  margin-left: 10%;
}

.tkf-milestone--right {
  margin-left: auto;
  margin-right: 10%;
}

.tkf-milestone__year {
  display: inline-block;
  padding: 8px 20px;
  background: var(--tkf-green);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 50px;
  margin-bottom: 20px;
}

.tkf-milestone__title {
  font-family: 'Crimson Pro', serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--tkf-dark);
}

.tkf-milestone__description {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--tkf-medium);
  margin-bottom: 20px;
}

.tkf-milestone__impact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(120, 190, 32, 0.1);
  border-radius: 12px;
  font-weight: 600;
  color: var(--tkf-green-dark);
  font-size: 0.9375rem;
}

.tkf-milestone__impact::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--tkf-green);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
}

/* Phase Indicators */
.tkf-milestone--origin {
  border-color: rgba(139, 69, 19, 0.3);
}

.tkf-milestone--growth {
  border-color: rgba(120, 190, 32, 0.3);
}

.tkf-milestone--expansion {
  border-color: rgba(120, 190, 32, 0.5);
}

.tkf-milestone--maturity {
  border-color: rgba(90, 147, 24, 0.5);
}

.tkf-milestone--future {
  border-color: rgba(157, 217, 74, 0.6);
  background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(245,249,240,0.98) 100%);
}

/* Interactive Timeline Section */
.tkf-timeline-interactive {
  position: relative;
  z-index: 2;
  padding: 120px 40px;
  background: linear-gradient(180deg, rgba(245,249,240,0.5) 0%, #ffffff 100%);
}

.tkf-timeline-interactive__title {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 80px;
  color: var(--tkf-dark);
}

.tkf-timeline-interactive__track {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 0;
}

.tkf-timeline-interactive__line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    rgba(139,69,19,0.3) 0%, 
    var(--tkf-green-light) 50%, 
    rgba(157,217,74,0.8) 100%
  );
  transform: translateY(-50%);
}

.tkf-interactive-node {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tkf-interactive-node__circle {
  width: 48px;
  height: 48px;
  background: var(--tkf-green);
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(120, 190, 32, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.tkf-interactive-node:hover .tkf-interactive-node__circle {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(120, 190, 32, 0.5);
}

.tkf-interactive-node__tooltip {
  position: absolute;
  bottom: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  background: white;
  padding: 20px 24px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  max-width: 320px;
  transition: all 0.3s ease;
  border: 2px solid rgba(120, 190, 32, 0.2);
  z-index: 10;
}

.tkf-interactive-node__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: white;
}

.tkf-interactive-node:hover .tkf-interactive-node__tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}

.tkf-tooltip__year {
  font-weight: 700;
  color: var(--tkf-green);
  margin-bottom: 8px;
}

.tkf-tooltip__title {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 8px;
  color: var(--tkf-dark);
}

.tkf-tooltip__impact {
  font-size: 0.875rem;
  color: var(--tkf-medium);
}

/* Future Vision Section */
.tkf-timeline-future {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px 40px;
  background: linear-gradient(135deg, var(--tkf-green) 0%, var(--tkf-green-dark) 100%);
  color: white;
}

.tkf-timeline-future__title {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 24px;
}

.tkf-timeline-future__text {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  max-width: 800px;
  margin: 0 auto 48px auto;
  line-height: 1.6;
  opacity: 0.95;
}

.tkf-timeline-future__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 48px;
  font-size: 1.25rem;
  font-weight: 700;
  background: white;
  color: var(--tkf-green);
  text-decoration: none;
  border-radius: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.tkf-timeline-future__cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* Responsive */
/* Responsive */
@media (max-width: 1400px) {
  .tkf-side-nav {
    left: 20px;
    width: 240px;
  }
}

@media (max-width: 1200px) {
  .tkf-side-nav {
    transform: translateX(-100%) translateY(-50%);
  }
  
  .tkf-side-nav.is-open {
    transform: translateX(0) translateY(-50%);
  }
  
  .tkf-mobile-menu-toggle {
    display: flex;
  }
}

@media (max-width: 1024px) {
  .tkf-milestone--left,
  .tkf-milestone--right {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .tkf-timeline-content {
    padding: 100vh 20px 100px 20px;
  }
  
  .tkf-milestone {
    padding: 32px 24px;
    margin-bottom: 120px;
  }
  
  .tkf-milestone__title {
    font-size: 1.5rem;
  }
  
  .tkf-interactive-node__circle {
    width: 40px;
    height: 40px;
  }
  
  .tkf-interactive-node__tooltip {
    min-width: 240px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  
  .tkf-timeline-intro__hint {
    animation: none;
  }
}
