/* ============================================
   ProveAIble Foundation — Shared design tokens
   Loaded after each page's inline <style> so it
   overrides + extends the inline declarations.
   ============================================ */

/* ============================================
   Nav overrides — centering + active page
   ============================================ */

/* Nav — three-zone layout: logo | centred links | CTA
   The CTA lives inside .nav-links in HTML but is pulled
   out of flow so the remaining links centre perfectly. */
.nav-inner {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.nav-inner .pa-logo {
  position: absolute !important;
  left: 2rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}
.nav-links {
  display: flex !important;
  justify-content: center !important;
  gap: 1.05rem !important;
  align-items: center !important;
  white-space: nowrap !important;
}
/* CTA — pinned to right edge of nav-inner */
.nav-links .btn-nav {
  position: absolute !important;
  right: 2rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* Active page link — illuminated */
.nav-links a.active {
  color: #fff !important;
  position: relative;
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #6b7bf5, transparent);
  border-radius: 1px;
}

/* Mobile active */
.mob-menu a.active {
  color: #fff !important;
  font-weight: 700 !important;
}

/* ============================================
   Mobile nav — logo left, hamburger right
   Overrides foundation desktop rules at 640px
   ============================================ */
@media (max-width: 640px) {
  .nav-inner {
    justify-content: space-between !important;
  }
  .nav-inner .pa-logo {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
  }
  .nav-links {
    display: none !important;
  }
  .mob-toggle {
    display: block !important;
  }
  .nav-links .btn-nav {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
  }
}

/* Stronger blob colors — level 5 depth */
.blob-primary {
  background: radial-gradient(circle, rgba(53, 67, 240, 0.32) 0%, transparent 70%) !important;
}
.blob-accent {
  background: radial-gradient(circle, rgba(107, 123, 245, 0.22) 0%, transparent 70%) !important;
}

/* ============================================
   Logo component — icon + Poppins Bold wordmark
   Used in the nav of every page
   ============================================ */

.pa-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: #fff;
  letter-spacing: -0.01em;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  transition: opacity 0.2s;
}
.pa-logo:hover {
  opacity: 0.85;
}
.pa-logo img {
  width: 28px;
  height: 28px;
  display: block;
}
.pa-logo .pa-wordmark {
  line-height: 1;
  letter-spacing: 0.005em;
}

/* The mixed case "PROVEAiBLE" wordmark — uppercase letters
   except the lowercase 'i' which keeps its proper case */
.pa-wordmark {
  text-transform: uppercase;
}
.pa-wordmark .pa-i {
  text-transform: lowercase;
}

/* ============================================
   Nav scroll shrink — level 4 micro-animation
   ============================================ */

.nav {
  transition: background 0.3s, height 0.3s, border-color 0.3s;
}
.nav.scrolled {
  height: 52px !important;
  background: rgba(8, 8, 16, 0.92) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* ============================================
   Button hover — level 4 lift + glow
   ============================================ */

.btn-p {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-p:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow:
    0 12px 36px rgba(53, 67, 240, 0.45),
    0 0 0 1px rgba(53, 67, 240, 0.5) inset,
    0 0 60px rgba(53, 67, 240, 0.2) !important;
}
.btn-s {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-s:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.10) !important;
  border-color: rgba(255, 255, 255, 0.20) !important;
}

/* ============================================
   Big hero gradient — Raycast-inspired
   Use class .pa-hero-bg on the hero section
   ============================================ */

.pa-hero-bg {
  position: relative;
  overflow: hidden;
}
.pa-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(53, 67, 240, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(107, 123, 245, 0.20) 0%, transparent 50%),
    linear-gradient(135deg, rgba(53, 67, 240, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.pa-hero-bg > * {
  position: relative;
  z-index: 1;
}

/* ============================================
   Section dividers — softer than full borders
   Adds visual rhythm between sections
   ============================================ */

.pa-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0.08) 70%, transparent);
  max-width: 80%;
  margin: 0 auto;
}

/* ============================================
   Card lift on hover — level 4
   Apply .pa-lift to any card-style container
   ============================================ */

.pa-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s,
              box-shadow 0.3s;
}
.pa-lift:hover {
  transform: translateY(-4px);
  border-color: rgba(53, 67, 240, 0.25) !important;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(53, 67, 240, 0.15) inset,
    0 0 40px rgba(53, 67, 240, 0.1);
}

/* ============================================
   Fade in word-by-word — for hero headlines
   Apply .pa-words-fade to a wrapper, the JS
   in foundation.js will split words and animate
   ============================================ */

.pa-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.pa-words-fade.visible .pa-word {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Sticky scroll narrative — for /the-story
   ============================================ */

.pa-sticky-section {
  position: relative;
}
.pa-sticky-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
}
.pa-sticky-left {
  position: sticky;
  top: 100px;
  height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pa-sticky-right {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pa-story-beat {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
}
.pa-story-beat-num {
  display: inline-block;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--primary-light, #6b7bf5);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.pa-story-beat-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: #fff;
}
.pa-story-beat-body {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--text-2, #9498b0);
  max-width: 460px;
}

@media (max-width: 1024px) {
  .pa-sticky-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .pa-sticky-left {
    position: relative;
    top: auto;
    height: auto;
    min-height: 50vh;
  }
  .pa-story-beat {
    min-height: auto;
    padding: 3rem 0;
  }
}

/* ============================================
   Counter-up animation — for stat numbers
   ============================================ */

.pa-counter {
  font-variant-numeric: tabular-nums;
}

/* ============================================
   Demo placeholder — until Electron handoff
   ============================================ */

.pa-demo-placeholder {
  position: relative;
  background: linear-gradient(145deg, #0d0d1a 0%, #111125 100%);
  border: 1px dashed rgba(53, 67, 240, 0.25);
  border-radius: 0.85rem;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-3, #5a5e73);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 380px;
  overflow: hidden;
}
.pa-demo-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(53, 67, 240, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.pa-demo-placeholder .material-symbols-outlined {
  font-size: 2.5rem;
  color: rgba(107, 123, 245, 0.4);
}
.pa-demo-placeholder strong {
  color: var(--text-2, #9498b0);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pa-demo-placeholder em {
  font-style: normal;
  color: var(--text-3, #5a5e73);
  font-size: 0.75rem;
  max-width: 360px;
  line-height: 1.55;
}
