
:root {
  --bg-primary: #0A0E1A;
  --bg-surface: #111827;
  --bg-footer: #070A14;
  --text-primary: #F1F5F9;
  --text-muted: #dee0e2;
  --text-muted-custom: #b1c0cf;
  --text-dimmed: #64748B;
  --accent: #00D4AA;
  --border-subtle: rgba(255,255,255,0.08);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
}

.font-heading {
  font-family: 'Space Grotesk', sans-serif;
}

.font-mono-data {
  font-family: 'JetBrains Mono', monospace;
}

.text-accent { color: var(--accent) !important; }
.text-muted-custom { color: var(--text-muted-custom) !important; }
.text-dimmed { color: var(--text-dimmed) !important; }
.text-primary-custom { color: var(--text-primary) !important; }

.bg-primary-custom { background-color: var(--bg-primary) !important; }
.bg-surface { background-color: var(--bg-surface) !important; }
.bg-footer { background-color: var(--bg-footer) !important; }
.bg-accent-10 { background-color: rgba(0, 212, 170, 0.1) !important; }
.bg-accent-5 { background-color: rgba(0, 212, 170, 0.05) !important; }

.border-subtle { border-color: var(--border-subtle) !important; }
.border-accent-20 { border-color: rgba(0, 212, 170, 0.2) !important; }
.border-accent-25 { border-color: rgba(0, 212, 170, 0.25) !important; }
.border-accent-50 { border-color: rgba(0, 212, 170, 0.5) !important; }
.hover-border-accent-25:hover { border-color: rgba(0, 212, 170, 0.25) !important; }

.btn-accent {
  background-color: var(--accent);
  color: var(--bg-primary);
  border: none;
}
.btn-accent:hover {
  background-color: var(--accent);
  filter: brightness(1.1);
  color: var(--bg-primary);
}

.btn-outline-custom {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-outline-custom:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.glow-text {
  text-shadow: 0 0 40px rgba(0, 212, 170, 0.15);
}
.glow-accent {
  box-shadow: 0 0 30px rgba(0, 212, 170, 0.15);
}

.hero-gradient {
  background: linear-gradient(to bottom, rgba(10,14,26,0.4), rgba(10,14,26,0.7), rgba(10,14,26,1));
}

.cta-gradient {
  background: radial-gradient(ellipse at center, rgba(0,212,170,0.12) 0%, transparent 70%);
}

.navbar-custom {
  background-color: transparent;
  transition: all 0.3s;
}

.navbar-custom.scrolled {
  background-color: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(10px);
}

.card-custom {
  background-color: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s;
}
.card-custom:hover {
  border-color: rgba(0, 212, 170, 0.25);
  transform: translateY(-4px);
}
.card-custom.featured {
  border-color: rgba(0, 212, 170, 0.5);
  background: linear-gradient(to bottom, rgba(0,212,170,0.05), transparent);
  box-shadow: 0 0 30px rgba(0, 212, 170, 0.08);
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background-color: rgba(0, 212, 170, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-box-sm {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background-color: rgba(0, 212, 170, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-icon {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  background-color: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--accent);
}
@media (min-width: 992px) {
  .stat-number { font-size: 2.25rem; }
}

.badge-accent {
  background-color: var(--accent);
  color: var(--bg-primary);
}

.badge-accent-soft {
  background-color: rgba(0, 212, 170, 0.1);
  color: var(--accent);
}

.step-line {
  position: absolute;
  top: 2rem;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,212,170,0.4), transparent);
}

/* Scroll reveal defaults - visible after jQuery animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

.py-section { padding-top: 6rem; padding-bottom: 6rem; }
.py-section-sm { padding-top: 4rem; padding-bottom: 4rem; }
.pt-hero { padding-top: 6rem; }
.pb-hero { padding-bottom: 10rem; }

@media (max-width: 768px) {
  .py-section { padding-top: 4rem; padding-bottom: 4rem; }
  .step-line { display: none; }
}

/* Navbar overrides */
.navbar-custom .nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.3s;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.show,
.navbar-custom .nav-link.active {
  color: var(--accent);
}
.navbar-custom .navbar-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.375rem;
  color: var(--text-primary);
}
.navbar-custom .navbar-brand:hover {
  color: var(--accent);
}
.navbar-toggler {
  border: none;
  color: var(--text-primary);
}
.navbar-toggler:focus {
  box-shadow: none;
}
.offcanvas-custom {
  background-color: var(--bg-primary);
}
.offcanvas-custom .nav-link {
  color: var(--text-muted);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.offcanvas-custom .nav-link:hover {
  color: var(--accent);
}

.hover-accent:hover {
  color: rgba(0, 212, 170, 0.8) !important;
}

.letter-spacing-wide {
  letter-spacing: 0.12em;
}

/* Pulse animation for badge */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Ensure proper display classes */
.inline-flex {
  display: inline-flex;
}

.text-bg-primary-custom {
  color: var(--accent) !important;
  border: var(--bs-border-width) var(--bs-border-style) var(--accent) !important;
}

.bg-white-10 {
  background-color: rgba(255,255,255,0.1) !important;
}

.bg-white-5 {
  background-color: rgba(255,255,255,0.05) !important;
}

.min-vh-50 {
  min-height: 50vh;
}

.bg-white-2 {
  background-color: rgba(255,255,255,0.02) !important;
}

.bg-white-3 {
  background-color: rgba(255,255,255,0.03) !important;
}

.hover-bg-white-3:hover {
  background-color: rgba(255,255,255,0.03) !important;
}

.text-blue-custom { color: #3B82F6 !important; }
.bg-blue-custom { background-color: #3B82F6 !important; }
.border-blue-30 { border-color: rgba(59, 130, 246, 0.3) !important; }
.bg-blue-5 { background-color: rgba(59, 130, 246, 0.05) !important; }

/* Datacenters gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-auto-flow: dense;
  gap: 1rem;
}
@media (min-width: 576px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  min-height: 160px;
}
.gallery-item.tall {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 340px;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(205,205,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
}

/* Form controls for dark theme */
.form-range::-webkit-slider-runnable-track {
  background-color: rgba(255,255,255,0.1);
  height: 6px;
  border-radius: 0.375rem;
}
.form-range::-webkit-slider-thumb {
  background-color: var(--accent);
  border: none;
}
.form-range::-moz-range-track {
  background-color: rgba(255,255,255,0.1);
  height: 6px;
  border-radius: 0.375rem;
}
.form-range::-moz-range-thumb {
  background-color: var(--accent);
  border: none;
}

.form-range.thin-bar {
  height: 5px;
}

.form-select {
  background-color: rgba(255,255,255,0.05);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.form-select:focus {
  border-color: rgba(0, 212, 170, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(0, 212, 170, 0.15);
}
.form-select option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.form-label {
  color: var(--text-muted);
}

/* Modal dark theme overrides */
.modal-content {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.modal-header {
  background-color: rgba(0, 0, 0, 0.15);
}

.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.form-control-custom {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.form-control-custom::placeholder {
  color: var(--text-dimmed);
}
.form-control-custom:focus {
  background-color: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 212, 170, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(0, 212, 170, 0.15);
  color: var(--text-primary);
}
.form-control-custom:disabled,
.form-control-custom[readonly] {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-dimmed);
}

/* Megamenu */
.has-megamenu {
  position: static;
}

.megamenu.dropdown-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  width: 100%;
  border-radius: 0 0 1rem 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: none;
  padding: 2rem 0;
  margin: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.megamenu-card {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.megamenu-card:hover {
  transform: translateY(-4px);
}

.megamenu-card img {
  border: 1px solid var(--border-subtle);
  transition: border-color 0.3s ease;
}

.megamenu-card:hover img {
  border-color: rgba(0, 212, 170, 0.5);
}

.megamenu-card:hover span {
  color: var(--accent);
}

/* Show megamenu on hover for desktop */
@media (min-width: 992px) {
  .has-megamenu .dropdown-toggle svg {
    transition: transform 0.2s ease;
  }

  .has-megamenu:hover .dropdown-toggle svg {
    transform: rotate(180deg);
  }

  .has-megamenu:hover .megamenu.dropdown-menu,
  .has-megamenu .megamenu.dropdown-menu.show {
    display: block;
    animation: megamenuFadeIn 0.2s ease;
  }
}

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

/* Hide default Bootstrap dropdown caret since we use custom icon */
.has-megamenu .dropdown-toggle::after {
  display: none;
}

/* About page timeline */
.timeline-wrap {
  position: relative;
}
.timeline-line {
  position: absolute;
  left: 0.375rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), rgba(0, 212, 170, 0.5), transparent);
}
.timeline-item {
  position: relative;
}
.timeline-dot {
  position: absolute;
  left: 0.375rem;
  top: 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 10px rgba(0, 212, 170, 0.5);
  transform: translateX(-50%);
}
.timeline-content {
  margin-left: 1.75rem;
}
@media (min-width: 992px) {
  .timeline-line {
    left: 50%;
    transform: translateX(-50%);
  }
  .timeline-dot {
    left: 50%;
  }
  .timeline-content {
    margin-left: 0;
  }
}

/* License badges */
.license-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background-color: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border-subtle);
  color: var(--text-dimmed);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}
