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

:root {
  --primary: #c8c8c8ff;;
  --secondary: #354047;
  --dark: #0f172a;
  --darker: #020617;
  --light: #f8fafc;
  --gray: #64748b;
  --gradient-hero: linear-gradient(135deg, hsl(271 91% 65%) 0%, hsl(187 85% 53%) 100%);
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--light);
  background: var(--darker);
  overflow-x: hidden;
  line-height: 1.6;
}

.gradient-dark-bg {
  /* background-image: linear-gradient(-20deg, #2b5876 0%, #4e4376 100%); */
  background-image: linear-gradient(to top, #020617 0%, black 100%);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all 0.3s ease;
  background: transparent;
}

nav.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;

  .logo img {
    width: 100px;
  }
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-animation {
  width: 40px;
  height: 40px;
  position: relative;
  animation: glow 2s ease-in-out infinite;
}

.slogan {
  margin-top: 8px;
  text-align: end;
  font-weight: 700;
  font-size: large;
  opacity: 0;
  animation: fadeIn 0.8s ease-in-out forwards 2.5s;

  @media (min-width: 1024px) {
    margin-right: 32px;
  }

  @media (max-width: 1023px) {
    text-align: center;
  }
}

.glow {
  padding: 4px 8px;
  border-radius: 4px;
  background-color: #354047;
}

.bulb {
  animation: glow 1.8s ease-in-out infinite alternate;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  cursor: pointer;
}

nav a:hover {
  color: var(--primary);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: black; /* start color */
  animation: bgFade 1.5s linear forwards 2.2s;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(2, 6, 23, 0.9) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  transform: translateY(0);
  transition: transform 0.1s ease-out;
  width: 50%;
  max-width: 800px;
  min-width: 300px;
}

.hero p {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  max-width: 800px;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(245, 158, 11, 0.5);
}

/* Section Styles */
section {
  position: relative;
  /*padding: 8rem 0;*/
  overflow: hidden;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  text-align: center;
}

.section-title-small {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.3rem;
  color: var(--gray);
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-description {
  color: var(--gray);
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.section-subtitle-large {
  font-size: 3rem;
  color: var(--gray);
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

/* Video Showcase Grid */

.showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 20px;

  @media (min-width: 1024px) {
    margin-top: -300px;
  }

  @media (max-width: 1023px) {
    margin-top: -150px;
  }
}

.showcase--grid {
  margin: 0 auto;
  grid-column-gap: 2rem;
  grid-row-gap: 2rem;
  grid-template-rows: auto;
  grid-template-columns: 1fr 1fr;
  grid-auto-columns: 1fr;
  place-items: start center;
  width: 100%;
  max-width: 1000px;
  display: grid;
}

.showcase--grid-item {
  width: 100%;
}

.showcase--grid-item:hover {
  transform: translateY(-200px);
}

.showcase-video {
  position: relative;
  width: 100%;
  max-width: 1920px;
  aspect-ratio: 9 / 16;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.showcase-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures video fills the square without distortion */
  box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
  border-radius: 8px;
}

.showcase-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.95) 0%, transparent 100%);
  transform: translateY(60%);
  transition: transform 0.3s ease;
}

.glowlab-lamp-video {
  width: 100%;
  height: 620px;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.7);
}

#features {
  @media (min-width: 769px) {
    margin: 4rem 0;
  }
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}

.feature-card {
  background: var(--dark);
  padding: 3rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  border: 1px solid rgba(245, 158, 11, 0.1);
  text-align: justify;
  margin-bottom: 3rem;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.2);

  h3 {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--light);
}

.feature-card p {
  color: var(--gray);
  line-height: 1.8;
}

/* Contact Section */
.contact-section {
  padding: 2rem 0;
  /* background: var(--dark); */
  text-align: center;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.contact-item-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.contact-item a {
  color: var(--light);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--primary);
}

/* Footer */
footer {
  background: var(--darker);
  padding: 3rem 0;
  text-align: center;
  color: var(--gray);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--light);
  transition: all 0.3s ease;
}

.text-gradient-neon {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Responsive */
@media (max-width: 768px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--dark);
    flex-direction: column;
    padding: 5rem 2rem;
    gap: 2rem;
    transition: right 0.3s ease;
  }

  nav ul.active {
    right: 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  section {
    padding: 4rem 0;
  }

  .contact-info {
    gap: 2rem;
  }
}

/* Scroll Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* --- ANIMATION SETUP --- */

path {
  stroke-dasharray: var(--length);
  stroke-dashoffset: var(--length);
}

/* 1. Dark Casing - Prints First */
.casing-path {
  fill: transparent;
  stroke: white;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;

  animation:
    draw-line 3.5s ease-in-out forwards,
    fill-dark 2s ease-out forwards 2s;
}

/* 2. White Light - Ignites Second */
.light-path {
  fill: transparent;
  stroke: #ffffff;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;

  animation:
    draw-line 2s ease-in-out forwards 4s,
    ignite 0.5s ease-out forwards 2s,
    neon-pulse 2s ease-in-out infinite alternate 2s;
}

.evenodd {
  fill-rule: evenodd;
}

/* --- KEYFRAMES --- */

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}

@keyframes fill-dark {
  to { fill: #354047; stroke: #354047; }
}

@keyframes ignite {
  to {
    opacity: 1;
    fill: #fdffff;
    stroke: #fdffff;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
  }
}

@keyframes neon-pulse {
  0% {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5))
    drop-shadow(0 0 5px rgba(0, 229, 255, 0.2));
  }
  100% {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9))
    drop-shadow(0 0 20px rgba(0, 229, 255, 0.7))
    drop-shadow(0 0 40px rgba(0, 229, 255, 0.5));
  }
}

@keyframes bgFade {
  from {
    background-color: black;
  }
  to {
    background-color: #c8c8c8ff; /* target color */
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes glow {
  from {
    text-shadow:
      0 0 5px #ffd700,
      0 0 10px #ffd700;
  }
  to {
    text-shadow:
      0 0 10px #ffd700,
      0 0 20px #ffd700,
      0 0 30px #ffeb3b;
  }
}
