/* ========== Prime Engine Technologies — Custom Styles ========== */

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  letter-spacing: -0.011em;
}

/* ---------- Navbar ---------- */
#navbar {
  background: linear-gradient(180deg, rgba(10, 22, 40, 0) 0%, rgba(10, 22, 40, 0) 100%);
  backdrop-filter: blur(0);
}
#navbar.scrolled {
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.08);
}

.nav-brand, .nav-sub { color: rgba(255, 255, 255, 0.95); }
.nav-link {
  color: rgba(255, 255, 255, 0.75);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}
.nav-link:hover { color: white; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3DD9F0, #0FB4D3);
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ---------- Grid pattern background ---------- */
.grid-bg {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center center;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent 80%);
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal.visible + .reveal { transition-delay: 0.1s; }
.reveal.visible + .reveal + .reveal { transition-delay: 0.2s; }
.reveal.visible + .reveal + .reveal + .reveal { transition-delay: 0.3s; }

/* ---------- Service card glow on hover ---------- */
.service-card {
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(15, 180, 211, 0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.service-card:hover::before {
  opacity: 1;
}

/* ---------- Counter typography ---------- */
.counter {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(15, 180, 211, 0.3);
  color: white;
}

/* ---------- Custom scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0A1628; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1E3A6F, #2D5290);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: #2D5290; }

/* ---------- Smooth focus styles ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid #3DD9F0;
  outline-offset: 4px;
  border-radius: 6px;
}

/* ---------- Page transitions on policy pages ---------- */
.policy-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 8rem 1.5rem 4rem;
  line-height: 1.7;
  color: #1E3A6F;
}
.policy-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0A1628;
  margin-bottom: 0.5rem;
}
.policy-content .meta {
  color: #7894C5;
  font-size: 0.875rem;
  margin-bottom: 3rem;
  font-family: 'JetBrains Mono', monospace;
}
.policy-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0A1628;
  margin-top: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
}
.policy-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0A1628;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.policy-content p {
  margin-bottom: 1rem;
  color: #4D6FAD;
}
.policy-content ul {
  margin: 1rem 0 1.5rem 1.5rem;
  list-style-type: disc;
  color: #4D6FAD;
}
.policy-content ul li { margin-bottom: 0.5rem; }
.policy-content a {
  color: #0FB4D3;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.policy-content a:hover { color: #0A1628; }
.policy-content .toc {
  background: #EEF3FA;
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
}
.policy-content .toc h2 { margin-top: 0; font-size: 1.125rem; }
.policy-content .toc ol {
  margin: 0;
  padding-left: 1.5rem;
  color: #4D6FAD;
}
.policy-content .toc ol li { margin-bottom: 0.25rem; }
.policy-content .contact-block {
  background: #0A1628;
  color: white;
  padding: 2rem;
  border-radius: 1rem;
  margin-top: 3rem;
}
.policy-content .contact-block p { color: rgba(255, 255, 255, 0.75); }
.policy-content .contact-block strong { color: white; }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 1024px) {
  .reveal { transform: translateY(20px); }
}
@media (max-width: 640px) {
  .policy-content { padding: 7rem 1rem 3rem; }
  .policy-content h1 { font-size: 2rem; }
}

/* ---------- Print ---------- */
@media print {
  #navbar, footer { display: none; }
  body { background: white !important; }
  .policy-content { color: black !important; }
}
