/* V2G Compliance Page — Professional Styles */

/* ═══════════════════════════════════════════
   1. CSS Custom Properties
   ═══════════════════════════════════════════ */
:root {
  --v2g-primary: #1E40AF;
  --v2g-accent: #3B82F6;
  --v2g-dark: #0a192f;
  --v2g-green: #10B981;
  --v2g-purple: #7C3AED;
  --v2g-gold: #F59E0B;
  --v2g-surface: #F8FAFC;
  --v2g-border: #E2E8F0;
}

/* ═══════════════════════════════════════════
   2. Hero Section
   ═══════════════════════════════════════════ */
.v2g-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  overflow: hidden;
  background: linear-gradient(160deg, #020617 0%, #0a192f 40%, #0f2850 70%, #1e3a5f 100%);
}

.v2g-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 25% 35%, rgba(59, 130, 246, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 75% 65%, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

/* Animated grid background */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
  animation: gridDrift 25s linear infinite;
}

@keyframes gridDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* Hero Badge */
.v2g-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  backdrop-filter: blur(8px);
  animation: fadeInDown 0.8s ease-out both;
}

.v2g-hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* Hero Title */
.v2g-hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.v2g-hero-title .accent {
  background: linear-gradient(135deg, #60A5FA 0%, #34D399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.v2g-hero-desc {
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.v2g-hero-actions {
  animation: fadeInUp 0.8s ease-out 0.45s both;
}

.v2g-hero-meta {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Hero Terminal Card */
.terminal-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 40px rgba(59, 130, 246, 0.08),
    0 25px 50px rgba(0, 0, 0, 0.4);
  animation: terminalFloat 6s ease-in-out infinite, fadeInRight 1s ease-out 0.4s both;
}

@keyframes terminalFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-body {
  padding: 1.5rem;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.8rem;
  line-height: 1.8;
}

.terminal-body .line {
  opacity: 0;
  animation: typeLine 0.4s ease-out forwards;
}

.terminal-body .line:nth-child(1) { animation-delay: 0.8s; }
.terminal-body .line:nth-child(2) { animation-delay: 1.0s; }
.terminal-body .line:nth-child(3) { animation-delay: 1.2s; }
.terminal-body .line:nth-child(4) { animation-delay: 1.4s; }
.terminal-body .line:nth-child(5) { animation-delay: 1.6s; }
.terminal-body .line:nth-child(6) { animation-delay: 1.8s; }
.terminal-body .line:nth-child(7) { animation-delay: 2.0s; }
.terminal-body .line:nth-child(8) { animation-delay: 2.2s; }
.terminal-body .line:nth-child(9) { animation-delay: 2.4s; }

@keyframes typeLine {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Stat Pills (Hero) */
.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.stat-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.stat-pill .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════
   3. Section Styling
   ═══════════════════════════════════════════ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--v2g-accent);
  margin-bottom: 0.75rem;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--v2g-accent);
  border-radius: 1px;
}

/* ═══════════════════════════════════════════
   4. Regulatory Layer Cards
   ═══════════════════════════════════════════ */
.reg-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--v2g-border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reg-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--card-accent, var(--v2g-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.reg-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.15);
}

.reg-card:hover::before {
  transform: scaleX(1);
}

.reg-card.featured {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
  border-color: rgba(59, 130, 246, 0.3);
  color: #FFFFFF;
}

.reg-card .card-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(0, 0, 0, 0.06);
  transition: color 0.3s ease;
}

.reg-card:hover .card-number {
  color: rgba(59, 130, 246, 0.15);
}

.reg-card.featured .card-number {
  color: rgba(255, 255, 255, 0.08);
}

.reg-card.featured:hover .card-number {
  color: rgba(59, 130, 246, 0.25);
}

.reg-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: transform 0.3s ease;
}

.reg-card:hover .card-icon {
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════
   5. Service Module Cards
   ═══════════════════════════════════════════ */
.service-module {
  background: #FFFFFF;
  border: 1px solid var(--v2g-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-module:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.service-module .module-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 2rem;
  background: var(--v2g-surface);
  border-right: 1px solid var(--v2g-border);
  position: relative;
  overflow: hidden;
}

.service-module .module-sidebar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--module-accent, var(--v2g-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.service-module:hover .module-sidebar::after {
  transform: scaleX(1);
}

.module-phase-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.service-module .module-content {
  padding: 2.5rem;
}

.spec-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.spec-item:hover {
  background: var(--v2g-surface);
  transform: translateX(4px);
}

.spec-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════
   6. Process / Step Cards
   ═══════════════════════════════════════════ */
.process-card-v2 {
  background: #FFFFFF;
  border: 1px solid var(--v2g-border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.process-card-v2:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07);
  border-color: rgba(59, 130, 246, 0.18);
}

/* ═══════════════════════════════════════════
   7. Trust / Credentials Bar
   ═══════════════════════════════════════════ */
.trust-bar {
  border-top: 1px solid var(--v2g-border);
  border-bottom: 1px solid var(--v2g-border);
  background: var(--v2g-surface);
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1rem;
  transition: transform 0.3s ease;
}

.trust-item:hover {
  transform: translateY(-3px);
}

.trust-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* ═══════════════════════════════════════════
   8. CTA Section
   ═══════════════════════════════════════════ */
.v2g-cta {
  position: relative;
  background: linear-gradient(160deg, #020617 0%, #0f172a 50%, #1e293b 100%);
  overflow: hidden;
}

.v2g-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 400px 300px at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 80% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   8b. V2G Contact Form
   ═══════════════════════════════════════════ */
.v2g-form-input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}
.v2g-form-input:focus {
  background: rgba(255, 255, 255, 0.08);
}
#v2gContactForm input[type="checkbox"] {
  accent-color: #3B82F6;
}
#v2gFormSuccess {
  animation: fadeInUp 0.5s ease-out;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   9. Buttons
   ═══════════════════════════════════════════ */
.btn-v2g-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

.btn-v2g-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-v2g-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  color: #94A3B8;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-v2g-outline:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════
   10. Animations
   ═══════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal animation helper */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.25s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.35s; opacity: 1; transform: none; }

/* Counter animation */
.count-up {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════
   11. Responsive
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .service-module .module-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--v2g-border);
  }
}

@media (max-width: 768px) {
  .v2g-hero {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 4rem;
  }

  .terminal-card {
    animation: none;
  }

  .stat-pill {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  .process-step {
    text-align: left;
  }

  .step-marker {
    margin: 0 0 1rem 0;
  }
}
