/* --- DESIGN SYSTEM & VARIABLES --- */
:root {
  --bg-dark: #070708;
  --text-primary: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --border-light: rgba(255, 255, 255, 0.1);
  --header-bg: rgba(7, 7, 8, 0.85);
  
  --font-family-title: 'Outfit', sans-serif;
  --font-family-body: 'Montserrat', sans-serif;
}

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

html, body {
  height: 100%;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-family-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Hide default scrollbars for the whole page */
::-webkit-scrollbar {
  display: none;
}
* {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* --- BACKGROUND ANIMATED PARTICLES --- */
.particles-container {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 25s infinite alternate ease-in-out;
}

.particle.p-1 {
  width: 250px;
  height: 250px;
  background-color: #e30613;
  left: 10%;
  top: 15%;
  animation-delay: 0s;
}

.particle.p-2 {
  width: 320px;
  height: 320px;
  background-color: #f97316;
  right: 15%;
  top: 25%;
  animation-delay: -5s;
}

.particle.p-3 {
  width: 280px;
  height: 280px;
  background-color: #10b981;
  left: 20%;
  bottom: 20%;
  animation-delay: -10s;
}

.particle.p-4 {
  width: 350px;
  height: 350px;
  background-color: #06b6d4;
  right: 25%;
  bottom: 10%;
  animation-delay: -15s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(50px, 30px) scale(1.15);
  }
  100% {
    transform: translate(-30px, -50px) scale(0.9);
  }
}

/* --- FIXED TIMELINE HEADER --- */
.timeline-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  display: flex;
  align-items: center;
}

.timeline-container {
  width: 100%;
  max-w: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Horizontal Track & Progress */
.timeline-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  position: absolute;
  top: 15px; /* aligned to dot centers */
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: calc(100% - 4rem);
}

.timeline-progress {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, 
    #e30613 0%, 
    #e30613 20%, 
    #f97316 40%, 
    #10b981 60%, 
    #06b6d4 80%, 
    #e30613 100%
  );
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Nodes Row */
.timeline-nodes {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  width: 100%;
}

.timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  min-width: 60px;
  position: relative;
  padding-bottom: 12px;
}

.node-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background-color: var(--bg-dark);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-top: 10px; /* aligns dot center to 15px line */
}

.node-year {
  margin-top: 10px;
  font-family: var(--font-family-title);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: all 0.4s ease;
}

/* Node Underline Indicator */
.timeline-node::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: transparent;
  transition: all 0.4s ease;
}

.timeline-node.active::after {
  width: 32px;
  background-color: var(--active-color, #e30613);
  box-shadow: 0 0 8px var(--active-glow, rgba(227, 6, 19, 0.4));
}

/* Node Hover States */
.timeline-node:hover .node-dot {
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.timeline-node:hover .node-year {
  color: rgba(255, 255, 255, 0.8);
}

/* Active Year Colors */
.timeline-node.active .node-dot {
  border-color: var(--active-color, #e30613);
  background-color: var(--active-color, #e30613);
  transform: scale(1.35);
  box-shadow: 0 0 15px var(--active-glow, rgba(227, 6, 19, 0.4));
}

.timeline-node.active .node-year {
  color: var(--active-color, #e30613);
  font-weight: 700;
  transform: scale(1.1);
}

/* --- MAIN SCROLL CONTAINER (SNAP SCROLL) --- */
.scroll-container {
  height: 100vh;
  width: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  position: relative;
  z-index: 10;
}

/* --- SECTION STRUCTURE --- */
.scroll-section {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 100px; /* accounting for header height */
}

/* Section Background Image */
.section-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.3, 1);
  transform: scale(1.08); /* slight zoom default */
}

.scroll-section.active .section-bg {
  transform: scale(1.0); /* zoom out on active */
}

/* Section Overlay */
.section-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.85) 100%),
              linear-gradient(180deg, rgba(7,7,8,0.95) 0%, rgba(7,7,8,0.2) 15%, rgba(7,7,8,0.2) 85%, rgba(7,7,8,0.95) 100%);
  z-index: 1;
}

/* Section Content Wrapper */
.section-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-w: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Column Grid Layout */
.grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Left Column: Logo & Badge */
.column-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.3, 1);
  transition-delay: 0.1s;
}

.scroll-section.active .column-left {
  opacity: 1;
  transform: translateY(0);
}

.logo-wrapper {
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.brand-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.year-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-family: var(--font-family-title);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  background-color: var(--accent-glow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-color);
  margin-right: 0.6rem;
  box-shadow: 0 0 8px var(--accent-color);
}

/* Right Column: Description & Button */
.column-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.3, 1);
  transition-delay: 0.2s;
}

.scroll-section.active .column-right {
  opacity: 1;
  transform: translateX(0);
}

.brand-desc {
  font-family: var(--font-family-body);
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2.5rem;
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Glowing Button */
.detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.9rem 2.5rem;
  border-radius: 12px;
  font-family: var(--font-family-title);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent-glow) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.detail-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-color);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.detail-btn span, .detail-btn svg {
  position: relative;
  z-index: 2;
}

.arrow-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.4s ease;
}

/* Button Hover State */
.detail-btn:hover {
  border-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px var(--accent-glow);
}

.detail-btn:hover::before {
  opacity: 0.12;
}

.detail-btn:hover .arrow-icon {
  transform: translateX(4px);
}

.detail-btn:active {
  transform: translateY(-1px);
}

/* --- RESPONSIVENESS --- */
@media (max-width: 1024px) {
  .grid-layout {
    gap: 3rem;
  }
  .logo-wrapper {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 768px) {
  .timeline-header {
    height: 80px;
  }
  .timeline-track {
    top: 13px;
    max-width: calc(100% - 2rem);
  }
  .timeline-container {
    padding: 0 1rem;
  }
  .timeline-node {
    padding-bottom: 8px;
  }
  .timeline-node.active::after {
    width: 24px;
  }
  .node-dot {
    width: 10px;
    height: 10px;
    margin-top: 8px;
  }
  .node-year {
    font-size: 0.75rem;
    margin-top: 6px;
  }
  
  .scroll-section {
    padding-top: 80px;
  }
  
  .grid-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .column-left {
    transform: translateY(20px);
    transition-delay: 0s;
  }
  
  .column-right {
    align-items: center;
    transform: translateY(20px);
    transition-delay: 0s;
  }
  
  .logo-wrapper {
    width: 180px;
    height: 180px;
    margin-bottom: 1.5rem;
  }
  
  .brand-desc {
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.7;
    text-align: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .detail-btn {
    padding: 0.85rem 2.2rem;
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .timeline-container {
    padding: 0 0.5rem;
  }
  .timeline-track {
    max-width: calc(100% - 1.5rem);
  }
  .node-year {
    font-size: 0.68rem;
  }
  .logo-wrapper {
    width: 140px;
    height: 140px;
    margin-bottom: 1rem;
  }
  .brand-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    padding: 0 0.5rem;
  }
}
