/* =========================================
   Vertex Smart Energy Academy
   styles.css
   ========================================= */

/* 1. CSS Reset & Variables
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-deep: #020617;
  --bg-base: #0b1121;
  --bg-surface: #111d32;
  --primary-cyan: #00f0ff;
  --primary-green: #39ff14;
  --accent-green: #00ff88;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 1rem;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(17, 29, 50, 0.6);
  --glass-border: rgba(0, 240, 255, 0.12);
  --glass-border-hover: rgba(0, 240, 255, 0.3);
  --shadow-glow: 0 0 25px rgba(0, 240, 255, 0.15);
  --shadow-green: 0 0 25px rgba(57, 255, 20, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

address {
  font-style: normal;
}

/* 2. Utilities & Layout
   ========================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

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

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
  transform: translateY(0);
}

.glass:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0.5rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary-green);
  color: var(--bg-deep);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.35), inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 35px rgba(57, 255, 20, 0.55), inset 0 0 10px rgba(255, 255, 255, 0.3);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.btn-success {
  background: var(--primary-cyan) !important;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.4) !important;
}

/* Section headers */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary-cyan);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, var(--primary-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.7;
}

body.menu-open {
  overflow: hidden;
}

/* 3. Navigation
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--glass-border);
  padding: 0.875rem 0;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.logo-accent {
  color: var(--primary-green);
  font-size: 1.75rem;
}

.logo-sub {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-menu {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-green);
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1100;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary-cyan);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.mobile-toggle.active .hamburger {
  background: transparent;
}

.mobile-toggle.active .hamburger::before {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active .hamburger::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* 4. Hero Section
   ========================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--bg-deep);
  background-image: 
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 2;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
}

.hero-eyebrow {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary-cyan);
  margin-bottom: 1.5rem;
  display: inline-block;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 3;
  opacity: 0.7;
}

.scroll-text {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary-cyan);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--primary-cyan), transparent);
  animation: scrollPulse 2s infinite;
}

/* 5. About Section
   ========================================= */
.about {
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-list {
  margin-top: 2rem;
}

.about-list li {
  padding: 0.75rem 0;
  padding-left: 1.75rem;
  position: relative;
  color: var(--text-main);
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.about-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.1rem;
  width: 8px;
  height: 8px;
  background: var(--primary-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-green);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat-card {
  padding: 2rem;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-cyan);
  line-height: 1;
}

.stat-suffix {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-left: 0.15rem;
}

.stat-label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* 6. Programs Section
   ========================================= */
.programs {
  background: var(--bg-base);
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.program-card {
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.program-card:hover::before {
  opacity: 1;
}

.program-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 240, 255, 0.1);
}

.program-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  color: var(--primary-cyan);
  background: rgba(0, 240, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.program-icon svg {
  width: 28px;
  height: 28px;
}

.program-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.program-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* 7. Energy Lab Section
   ========================================= */
.energy-lab {
  background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-deep) 100%);
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.lab-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lab-card:hover {
  transform: translateY(-8px);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-glow);
}

.lab-visual {
  height: 200px;
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lab-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, var(--bg-surface) 100%);
}

.lab-visual-1 { background: linear-gradient(135deg, #0f172a 0%, #064e3b 100%); }
.lab-visual-2 { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); }
.lab-visual-3 { background: linear-gradient(135deg, #0f172a 0%, #0e7490 100%); }
.lab-visual-4 { background: linear-gradient(135deg, #0f172a 0%, #14532d 100%); }
.lab-visual-5 { background: linear-gradient(135deg, #0f172a 0%, #7c3aed 100%); }
.lab-visual-6 { background: linear-gradient(135deg, #0f172a 0%, #be123c 100%); }

.lab-badge {
  position: relative;
  z-index: 2;
  padding: 0.4rem 1rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-cyan);
  backdrop-filter: blur(4px);
}

.lab-content {
  padding: 1.75rem;
}

.lab-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.lab-meta {
  font-size: 0.8rem;
  color: var(--primary-green);
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lab-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 8. Contact Section
   ========================================= */
.contact {
  background: radial-gradient(ellipse at top, var(--bg-surface) 0%, var(--bg-deep) 70%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form {
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-cyan);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

.form-input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.form-input:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15), inset 0 0 10px rgba(0, 240, 255, 0.05);
  background: rgba(255,255,255,0.06);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2300f0ff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-surface);
  color: var(--text-main);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
}

.info-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--primary-green);
  background: rgba(57, 255, 20, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(57, 255, 20, 0.2);
}

.info-icon svg {
  width: 22px;
  height: 22px;
}

.info-card h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.info-card a,
.info-card address {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  transition: color var(--transition);
}

.info-card a:hover {
  color: var(--primary-cyan);
}

/* 9. Footer
   ========================================= */
.footer {
  background: var(--bg-deep);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 2.5rem 0;
  text-align: center;
}

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

.footer-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* 10. Animations & Keyframes
   ========================================= */
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* 11. Responsive Media Queries
   ========================================= */
@media (max-width: 1024px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .about-stats {
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 6rem 2rem 2rem;
    gap: 1.5rem;
    border-left: 1px solid var(--glass-border);
    transition: right var(--transition);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-link {
    font-size: 1.1rem;
  }
  
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  .programs-grid,
  .lab-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 1.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .contact-form {
    padding: 1.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .btn {
    width: 100%;
    padding: 1rem;
  }
  
  .about-stats {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}