/* ==========================================================================
   RESET & SYSTEM VARIABLE SYSTEM
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  background-color: #ffffff;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #1e293b;
  background-color: #ffffff;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Premium Scrollbar design */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #ffffff;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, .milestone-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  line-height: 1.1;
  color: #0f172a;
  letter-spacing: -0.03em;
}

p {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  color: #475569;
  line-height: 1.6;
}

/* Highlights */
.highlight-green {
  color: #10b981;
  position: relative;
  display: inline-block;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */

#global-path-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#particle-canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.journey-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}

/* Header & Navigation (Apple Style) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease;
}

/* Transparent overlay state for cinematic dark hero images */
.site-header.transparent {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
}

.site-header.transparent .logo {
  color: #ffffff;
}

.site-header.transparent .logo .underline-stroke path {
  stroke: #ffffff;
}

.site-header.transparent .main-nav a {
  color: rgba(255, 255, 255, 0.8);
}

.site-header.transparent .main-nav a:hover {
  color: #ffffff;
}

.site-header.transparent .btn-primary-nav {
  background: #ffffff;
  color: #0f172a !important;
}

.site-header.transparent .btn-primary-nav:hover {
  background: #10b981;
  color: #ffffff !important;
}

.logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  position: relative;
  letter-spacing: 0.1em;
  color: #0f172a;
  cursor: pointer;
}

.logo .underline-stroke {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.main-nav a {
  text-decoration: none;
  color: #475569;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.25s ease;
  font-family: 'Poppins', sans-serif;
}

.main-nav a:hover {
  color: #0f172a;
}

.main-nav a.btn-primary-nav {
  background: #facc15 !important; /* Yellow background */
  color: #0f172a !important; /* Black text override */
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem !important;
  font-weight: 700 !important; /* Bold text */
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.2) !important;
  transition: background 0.25s ease, transform 0.2s ease !important;
}

.main-nav a.btn-primary-nav:hover {
  background: #eab308 !important; /* Gold hover */
  color: #0f172a !important;
  transform: translateY(-1px) scale(1.02) !important;
}

/* Sections Base - Reduced padding to reduce empty spaces */
.journey-section {
  min-height: 65vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 50px 0;
}

/* Path Spacers - Pulled closer */
.path-spacer {
  height: 12vh;
  position: relative;
  pointer-events: none;
}

/* ==========================================================================
   CINEMATIC SCROLL-DRIVEN HERO SECTION
   ========================================================================== */

.cinematic-scroll-section {
  position: relative;
  width: 100vw;
  height: 100vh; /* Locked to viewport height to prevent unpinned scrolling empty space */
  overflow: hidden;
  background-color: #0f172a; /* Dark base for transitions */
}

.cinematic-pin-wrapper {
  position: relative;
  width: 100%;
  height: 100vh; /* Fixed viewport height to prevent canvas stretch */
  overflow: hidden;
  z-index: 10;
}

.cinematic-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: center center;
}

#cinematic-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.cinematic-overlay-grad {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 15;
  background: linear-gradient(to right, rgba(15, 23, 42, 0.65) 0%, rgba(15, 23, 42, 0.2) 50%, rgba(15, 23, 42, 0.7) 100%);
  pointer-events: none;
}

.cinematic-text-track {
  position: absolute;
  bottom: 100px;
  left: 80px;
  width: 600px;
  z-index: 20;
  color: #ffffff;
  pointer-events: auto; /* Enable container mouse tracking */
}

.cinematic-slide {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none; /* Inactive slides are non-interactive */
}

/* Active class toggled by JS triggers clicks */
.cinematic-slide.active {
  pointer-events: auto;
}

/* Base states for slide transitions (animating via GSAP, no CSS transition conflicts) */
.slide-1 {
  opacity: 1;
  transform: translateY(0);
}

.slide-2, .slide-3 {
  opacity: 0;
  transform: translateY(30px);
}

.cinematic-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; /* Bold style */
  font-size: 4.4rem; /* Slightly larger title size */
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.cinematic-desc {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  color: #cbd5e1;
  line-height: 1.6;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.cinematic-actions {
  margin-top: 20px;
  pointer-events: auto; /* Allow mouse events */
}

.btn-journey-cinematic {
  position: relative; /* Base for absolute shimmer alignment */
  overflow: hidden; /* Hide overflow shimmer sweep */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #facc15; /* Sunny gold yellow */
  color: #0f172a; /* Deep slate black text */
  padding: 18px 44px; /* Increased button size */
  border-radius: 30px;
  font-family: 'Poppins', sans-serif;
  pointer-events: auto; /* Explicitly allow click events */
  font-size: 1.15rem; /* Increased font size */
  font-weight: 700; /* Bold text */
  text-decoration: none;
  transition: background 0.3s ease, transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
  box-shadow: 0 10px 25px rgba(250, 204, 21, 0.25); /* Yellow ambient glow shadow */
}

/* Premium diagonal glass shimmer swipe effect */
.btn-journey-cinematic::before {
  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.45) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 1;
}

.btn-journey-cinematic:hover::before {
  animation: shimmer-swipe 0.8s ease-out;
}

@keyframes shimmer-swipe {
  100% {
    left: 200%;
  }
}

.btn-journey-cinematic:hover {
  background: #eab308; /* Slightly darker gold on hover */
  transform: translateY(-3px) scale(1.02); /* Pop-up lift */
  box-shadow: 0 15px 30px rgba(250, 204, 21, 0.4); /* Stronger glow shadow */
}

/* Press click feedback */
.btn-journey-cinematic:active {
  transform: translateY(-1px) scale(0.97); /* Depress effect on click */
}

/* Slide 3 button arrow slide out animation */
.btn-journey-cinematic .btn-arrow {
  transition: transform 0.25s ease;
}

.btn-journey-cinematic:hover .btn-arrow {
  transform: rotate(-90deg) translateY(-4px) !important; /* Move rotated arrow forward */
}

/* Scroll Mouse Indicator */
.cinematic-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.indicator-mouse {
  width: 20px;
  height: 32px;
  border: 2px solid #ffffff;
  border-radius: 12px;
  position: relative;
}

.indicator-wheel {
  width: 4px;
  height: 6px;
  background: #ffffff;
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 8px); }
}

.indicator-text {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   WINDOWS 95 STYLE CONTAINER BEVELS
   ========================================================================== */

.win95-window {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 3px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  width: 100%;
  text-align: left;
  user-select: none;
}

.win95-header {
  background: linear-gradient(90deg, #000080, #1080d0);
  color: #ffffff;
  padding: 4px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.win95-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.win95-icon {
  font-size: 11px;
}

.win95-title {
  font-weight: bold;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.win95-controls {
  display: flex;
  gap: 2px;
}

.win95-btn {
  background: #c0c0c0;
  border: 1px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  width: 16px;
  height: 14px;
  font-size: 9px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 2px;
}

.win95-btn:active {
  border-color: #808080 #ffffff #ffffff #808080;
}

.win95-btn.close {
  margin-left: 2px;
  font-weight: 900;
}

.win95-menu {
  display: flex;
  gap: 12px;
  padding: 4px 8px;
  background: #c0c0c0;
  font-size: 11px;
  border-bottom: 1px solid #808080;
}

.win95-menu span {
  cursor: pointer;
}

/* Paint Window Inner Body */
.win95-body {
  background: #808080;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}

.paint-layout {
  display: grid;
  grid-template-columns: 32px 1fr;
  height: 250px;
}

.win95-sidebar-tools {
  background: #c0c0c0;
  padding: 4px 2px;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 22px;
  gap: 2px;
  border-right: 1px solid #808080;
  align-content: start;
}

.win95-tool {
  background: #c0c0c0;
  border: 1px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.win95-tool.active {
  border-color: #808080 #ffffff #ffffff #808080;
  background: #e2e8f0;
}

.win95-canvas-wrap {
  background: #ffffff;
  overflow: hidden;
  height: 100%;
}

.win95-canvas-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.win95-palette {
  background: #c0c0c0;
  border-top: 1px solid #808080;
  padding: 4px 6px;
  display: flex;
  gap: 4px;
}

.win95-color {
  width: 12px;
  height: 12px;
  border: 1px solid #808080;
}

/* Text and Draw Layout inner heights */
.text-layout svg, .draw-layout svg, .web-layout svg {
  display: block;
  width: 100%;
  height: 220px;
  background: #ffffff;
}

/* IE Address Bar */
.win95-address {
  background: #c0c0c0;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  border-bottom: 1.5px solid #808080;
}

.addr-lbl {
  color: #555;
}

.addr-box {
  background: #ffffff;
  border: 1.5px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  flex-grow: 1;
  padding: 1px 6px;
}

/* AI Terminal Layout */
.terminal-layout {
  background: #000000;
  color: #10b981;
  font-family: monospace;
  padding: 20px;
  min-height: 220px;
}

.term-line {
  color: #38bdf8;
  margin-bottom: 6px;
  font-size: 12px;
}

.term-line.green-text {
  color: #22c55e;
}

.blink-cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.window-visual {
  max-width: 520px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   MILESTONES GRID LAYOUT
   ========================================================================== */

.milestone-section {
  opacity: 0;
  transform: translateY(50px);
}

.milestone-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.milestone-grid.reverse {
  grid-template-columns: 1.2fr 1fr;
}

.milestone-grid.reverse .milestone-text {
  order: 2;
}

.milestone-grid.reverse .milestone-visual {
  order: 1;
}

.milestone-text {
  position: relative;
}

.checkpoint-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 4.5rem;
  font-weight: 900;
  color: #e2e8f0;
  line-height: 1;
  margin-bottom: 6px;
  transition: color 0.5s ease;
}

.milestone-title {
  font-size: 2.8rem;
  color: #0f172a;
  margin-bottom: 12px;
}

.milestone-desc {
  font-size: 1.15rem;
  font-weight: 500;
  color: #475569;
}

/* Visual Mockup Container */
.milestone-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

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

.footer-section {
  min-height: 70vh;
  justify-content: center;
  text-align: center;
  flex-direction: column;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.footer-heading {
  font-size: 3.2rem;
  color: #0f172a;
}

.btn-cta-premium {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #0f172a;
  color: #ffffff;
  padding: 16px 36px;
  border-radius: 40px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}

.btn-cta-premium:hover {
  background: #10b981;
  transform: translateY(-2px);
}

.sub-footer {
  margin-top: 60px;
  border-top: 1px solid #e2e8f0;
  padding-top: 30px;
  width: 100%;
  text-align: center;
}

.sub-footer p {
  color: #94a3b8;
  font-size: 0.85rem;
}

/* ==========================================================================
   MICRO-INTERACTIONS & REVEALS
   ========================================================================== */

.win95-window {
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.win95-window:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Sparkle particles dots */
.sparkle-dot {
  position: absolute;
  pointer-events: none;
  background: #10b981;
  border-radius: 50%;
  width: 3.5px;
  height: 3.5px;
  opacity: 0.8;
  z-index: 9999;
}

.animate-paint path, .animate-paint line, .animate-paint rect, .animate-paint circle, .animate-paint polygon,
.animate-sketch path, .animate-sketch line, .animate-sketch rect, .animate-sketch circle, .animate-sketch polygon,
.animate-poster path, .animate-poster line, .animate-poster rect, .animate-poster circle, .animate-poster polygon,
.animate-camp path, .animate-camp line, .animate-camp rect, .animate-camp circle, .animate-camp polygon,
.finish-flag path, .finish-flag line, .finish-flag polygon {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}

/* ==========================================================================
   RESPONSIVE LAYOUT
   ========================================================================== */

@media (max-width: 968px) {
  .journey-container {
    padding: 0 24px;
  }
  
  .site-header {
    padding: 16px 32px;
  }
  
  .main-nav {
    display: none;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
}

/* Premium Mobile Responsive Layout (768px and below) */
@media (max-width: 768px) {
  /* Site Header mobile stack */
  .site-header {
    padding: 16px 20px !important;
    flex-direction: column !important;
    gap: 12px !important;
    text-align: center !important;
  }
  
  .logo {
    margin-bottom: 2px !important;
  }
  
  /* Force display nav links horizontally on mobile instead of hiding them */
  .main-nav {
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
  }
  
  .main-nav a {
    font-size: 0.8rem !important;
  }
  
  .main-nav a.btn-primary-nav {
    padding: 6px 14px !important;
    font-size: 0.75rem !important;
  }

  /* Homepage Cinematic text scale down for mobile viewports */
  .cinematic-slide {
    padding: 0 24px !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box !important;
  }
  
  .cinematic-title {
    font-size: 2.2rem !important; /* Scaled down for mobile */
    line-height: 1.25 !important;
    margin-bottom: 12px !important;
  }
  
  .cinematic-desc {
    font-size: 0.95rem !important; /* Scaled down for mobile */
    line-height: 1.5 !important;
  }
  
  .btn-journey-cinematic {
    padding: 14px 28px !important; /* More compact yellow button on mobile */
    font-size: 0.95rem !important;
  }
}
