/* Vital SEO — independent Tools overview introduction */

html {
  --ai-bg: #f0f5fa;
  --ai-centre: #ffffff;
  --ai-ink: #17334d;
  --ai-accent: #246b9f;
  --ai-muted: #42627e;
  --ai-line: #568eb9;
  --ai-pulse: #217cb9;
  --ai-button: rgba(255,255,255,.72);
}

html[data-theme="dark"] {
  --ai-bg: #081523;
  --ai-centre: #142d46;
  --ai-ink: #f4f8ff;
  --ai-accent: #a3d6ff;
  --ai-muted: #c3ddf4;
  --ai-line: #6099c5;
  --ai-pulse: #8ed4ff;
  --ai-button: rgba(255,255,255,.06);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --ai-bg: #081523;
    --ai-centre: #142d46;
    --ai-ink: #f4f8ff;
    --ai-accent: #a3d6ff;
    --ai-muted: #c3ddf4;
    --ai-line: #6099c5;
    --ai-pulse: #8ed4ff;
    --ai-button: rgba(255,255,255,.06);
  }
}

.vital-individual-intro:not([open]) {
  display: none !important;
}

html.vti-active,
html.vti-active body {
  overflow: hidden !important;
}

.vital-individual-intro[open] {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
  color: var(--ai-ink);
  background: radial-gradient(
    ellipse at 50% 45%,
    var(--ai-centre),
    var(--ai-bg) 80%
  );
  text-align: center;
  font-family: inherit;
}

.vital-individual-intro::backdrop {
  background: transparent;
}

.ai-pathways {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ai-diagonals {
  position: absolute;
  inset: -50%;
  background: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 63px,
    var(--ai-line) 64px,
    transparent 65px,
    transparent 110px
  );
  opacity: .14;
  animation: aiDiagonalMotion 16s linear infinite;
}

.ai-circuit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--ai-line);
}

.ai-circuit-base {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  opacity: .36;
  vector-effect: non-scaling-stroke;
}

.ai-circuit-pulse {
  fill: none;
  stroke: var(--ai-pulse);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 9 91;
  stroke-dashoffset: 100;
  vector-effect: non-scaling-stroke;
  animation: aiLightTravel 5s linear infinite;
}

.ai-circuit-pulse:nth-child(2) {
  animation-delay: -1.7s;
}

.ai-circuit-pulse:nth-child(3) {
  animation-delay: -3.2s;
}

.ai-circuit-pulse:nth-child(4) {
  animation-delay: -.8s;
}

.ai-circuit-pulse:nth-child(5) {
  animation-delay: -2.4s;
}

.ai-circuit-pulse:nth-child(6) {
  animation-delay: -4.1s;
}

.ai-brand {
  position: absolute;
  top: max(6%, env(safe-area-inset-top));
  left: 0;
  right: 0;
  font-size: clamp(12px, 1.5vw, 20px);
  font-weight: 800;
  letter-spacing: .32em;
  color: var(--ai-muted);
}

.ai-stage {
  position: absolute;
  inset: 14% 5% 18%;
  display: grid;
  place-items: center;
}

.ai-scene {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 1200px;
  opacity: 0;
  pointer-events: none;
}

.ai-scene-one {
  animation: aiScene 3.5s 0s both;
}

.ai-scene-two {
  animation: aiScene 3.5s 3.5s both;
}

.ai-scene-three {
  animation: aiScene 3.5s 7s both;
}

.ai-scene-four {
  animation: aiFinalScene 3.5s 10.5s both;
}

.ai-eyebrow {
  margin: 0 0 20px;
  color: var(--ai-muted);
  font-size: clamp(11px, 1.4vw, 17px);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.ai-headline {
  margin: 0;
  font-size: clamp(36px, 7.2vw, 106px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.08;
  color: var(--ai-ink);
}

.ai-headline span {
  display: block;
  color: var(--ai-accent);
}

.ai-scene-three .ai-headline {
  font-size: clamp(30px, 5.8vw, 86px);
}

.ai-description {
  max-width: 720px;
  margin: 22px auto 0;
  padding: 0 10px;
  font-size: clamp(15px, 2vw, 25px);
  line-height: 1.5;
  color: var(--ai-muted);
}

.ai-divider {
  width: 64px;
  height: 3px;
  margin: 26px auto 0;
  border-radius: 3px;
  background: var(--ai-pulse);
}

.ai-skip {
  position: absolute;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ai-line);
  border-radius: 30px;
  background: var(--ai-button);
  color: var(--ai-ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.ai-skip:focus-visible {
  outline: 3px solid var(--ai-accent);
  outline-offset: 4px;
}

.ai-skip:hover {
  background: var(--ai-centre);
}

.ai-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--ai-bg);
}

.ai-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ai-pulse);
  transform-origin: left;
  animation: aiProgress 14s linear both;
}

.vital-individual-intro.ai-exiting {
  animation: aiExit .65s ease forwards;
}

@keyframes aiDiagonalMotion {
  from { transform: translate(0, 0); }
  to { transform: translate(155.56px, 0); }
}

@keyframes aiLightTravel {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

@keyframes aiScene {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(.98);
  }
  14%, 85% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: translateY(-12px);
  }
}

@keyframes aiFinalScene {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  14%, 100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes aiProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes aiExit {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (max-width: 600px) {
  .ai-headline {
    font-size: clamp(32px, 9vw, 54px);
  }

  .ai-scene-three .ai-headline {
    font-size: clamp(28px, 7.8vw, 48px);
  }

  .ai-description {
    margin-top: 16px;
    font-size: 15px;
  }

  .ai-eyebrow {
    margin-bottom: 14px;
    letter-spacing: .1em;
  }

  .ai-circuit {
    opacity: .75;
  }
}

@media (max-height: 480px) {
  .ai-headline,
  .ai-scene-three .ai-headline {
    font-size: clamp(25px, 9vh, 46px);
  }

  .ai-description {
    margin-top: 10px;
    font-size: 14px;
  }

  .ai-eyebrow {
    margin-bottom: 8px;
  }

  .ai-divider {
    margin-top: 12px;
  }

  .ai-skip {
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vital-individual-intro,
  .vital-individual-intro * {
    animation: none !important;
    transition: none !important;
  }
}

.vital-individual-intro {
  --individual-intro-ready: 1;
}

/* Individual tool introduction adaptations. */

.vital-individual-intro .ai-scene-single {
  animation: aiFinalScene 1.35s ease both;
}

.vital-individual-intro .ai-headline {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.vital-individual-intro .ai-progress span {
  animation-duration: 2s;
}

html.vti-pending {
  background: #f0f5fa !important;
}

html.vti-pending[data-theme="dark"] {
  background: #081523 !important;
}

@media (prefers-color-scheme: dark) {
  html.vti-pending:not([data-theme]) {
    background: #081523 !important;
  }
}

html.vti-pending body {
  visibility: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
  html.vti-pending body {
    visibility: visible !important;
  }
}
