/* ============================================
   Galvin AI — Custom Styles
   Brand: "Accelerated Intelligence"
   ============================================ */

/* --- CSS Custom Properties (Brand Tokens) --- */
:root {
  --navy: #001F3F;
  --navy-light: #0A2A4A;
  --teal: #00BFFF;
  --cyan: #00FFFF;
  --purple: #A020F0;
  --purple-light: #B44EFF;
  --white: #FFFFFF;
  --light-bg: #F8FAFC;
  --dark-text: #1E293B;
  --secondary-text: #64748B;
  --gradient-teal: linear-gradient(135deg, #00BFFF, #00FFFF);
  --gradient-brand: linear-gradient(135deg, #001F3F 0%, #0A2A4A 50%, #00BFFF 100%);
  --gradient-hero: linear-gradient(135deg, #001F3F 0%, #0D2B45 40%, #0A3D62 70%, #00BFFF 100%);
  --gradient-purple: linear-gradient(135deg, #001F3F 0%, #1a1a4e 50%, #A020F0 100%);
}

/* --- Base Reset Enhancements --- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--dark-text);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
}

/* --- Gradient Text Utility --- */
.text-gradient {
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Hero Network Pattern (SVG Background) --- */
.hero-pattern {
  position: relative;
  overflow: hidden;
}

.hero-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='800' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3CradialGradient id='g' cx='50%25' cy='50%25' r='60%25'%3E%3Cstop offset='0%25' stop-color='%2300BFFF' stop-opacity='0.08'/%3E%3Cstop offset='100%25' stop-color='%23001F3F' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect fill='url(%23g)' width='800' height='600'/%3E%3Cg stroke='%2300BFFF' stroke-opacity='0.12' fill='none'%3E%3Ccircle cx='100' cy='80' r='3'/%3E%3Ccircle cx='250' cy='150' r='2'/%3E%3Ccircle cx='400' cy='60' r='3'/%3E%3Ccircle cx='550' cy='200' r='2'/%3E%3Ccircle cx='700' cy='100' r='3'/%3E%3Ccircle cx='150' cy='300' r='2'/%3E%3Ccircle cx='350' cy='350' r='3'/%3E%3Ccircle cx='600' cy='320' r='2'/%3E%3Ccircle cx='200' cy='500' r='3'/%3E%3Ccircle cx='500' cy='480' r='2'/%3E%3Ccircle cx='680' cy='450' r='3'/%3E%3Cline x1='100' y1='80' x2='250' y2='150'/%3E%3Cline x1='250' y1='150' x2='400' y2='60'/%3E%3Cline x1='400' y1='60' x2='550' y2='200'/%3E%3Cline x1='550' y1='200' x2='700' y2='100'/%3E%3Cline x1='150' y1='300' x2='350' y2='350'/%3E%3Cline x1='350' y1='350' x2='600' y2='320'/%3E%3Cline x1='100' y1='80' x2='150' y2='300'/%3E%3Cline x1='250' y1='150' x2='350' y2='350'/%3E%3Cline x1='550' y1='200' x2='600' y2='320'/%3E%3Cline x1='700' y1='100' x2='680' y2='450'/%3E%3Cline x1='200' y1='500' x2='350' y2='350'/%3E%3Cline x1='500' y1='480' x2='600' y2='320'/%3E%3Cline x1='500' y1='480' x2='680' y2='450'/%3E%3Cline x1='200' y1='500' x2='500' y2='480'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  pointer-events: none;
}

/* --- Animated Orbital Lines (Hero decoration) --- */
.orbital-line {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 191, 255, 0.15);
  animation: orbit 20s linear infinite;
}

.orbital-line-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -200px;
}

.orbital-line-2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -100px;
  animation-duration: 25s;
  animation-direction: reverse;
}

@keyframes orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- Button Styles --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--gradient-teal);
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 191, 255, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--teal);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--teal);
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: var(--teal);
  color: var(--navy);
  transform: translateY(-2px);
}

/* --- Card Styles --- */
.service-card {
  background: var(--white);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 31, 63, 0.08);
  border: 1px solid rgba(0, 191, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 31, 63, 0.15);
}

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

/* --- Icon Container --- */
.icon-container {
  width: 60px;
  height: 60px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.1), rgba(0, 255, 255, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--teal);
  font-size: 1.5rem;
}

/* --- Testimonial Styles --- */
.testimonial-card {
  background: var(--white);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 31, 63, 0.06);
  border: 1px solid rgba(0, 191, 255, 0.08);
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-family: 'Montserrat', sans-serif;
  font-size: 4rem;
  color: rgba(0, 191, 255, 0.15);
  position: absolute;
  top: 0.5rem;
  left: 1.25rem;
  line-height: 1;
}

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

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

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* --- Accordion (Services page) --- */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion-item.active .accordion-content {
  max-height: 1000px;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-icon {
  transition: transform 0.3s ease;
}

/* --- Blog Card --- */
.blog-card {
  background: var(--white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 31, 63, 0.06);
  border: 1px solid rgba(0, 191, 255, 0.08);
  transition: all 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 31, 63, 0.12);
}

.blog-card-image {
  height: 200px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.blog-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='400' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg stroke='%2300BFFF' stroke-opacity='0.2' fill='none'%3E%3Ccircle cx='80' cy='60' r='2'/%3E%3Ccircle cx='200' cy='100' r='3'/%3E%3Ccircle cx='320' cy='50' r='2'/%3E%3Cline x1='80' y1='60' x2='200' y2='100'/%3E%3Cline x1='200' y1='100' x2='320' y2='50'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat;
}

/* --- Navbar Active State --- */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-teal);
  transition: width 0.3s ease;
}

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

/* --- Mobile Menu --- */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
  transform: translateX(0);
}

/* --- Form Styles --- */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #E2E8F0;
  border-radius: 0.75rem;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  color: var(--dark-text);
  background: var(--white);
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.15);
}

.form-input::placeholder {
  color: #94A3B8;
}

/* --- Footer Gradient Bar --- */
.footer-gradient-bar {
  height: 3px;
  background: var(--gradient-teal);
}

/* --- Section Divider --- */
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-teal);
  border-radius: 2px;
}

/* --- Stat Counter --- */
.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--teal), var(--navy));
  border-radius: 4px;
}

/* --- Selection Color --- */
::selection {
  background: rgba(0, 191, 255, 0.2);
  color: var(--navy);
}

/* --- Loading Spinner (for forms) --- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 31, 63, 0.2);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Pulse Animation (for CTA attention) --- */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3); }
  50% { box-shadow: 0 4px 30px rgba(0, 191, 255, 0.5); }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .stat-number {
    font-size: 2rem;
  }
}
