/* ============ SVC Tech AI — Shared Styles ============ */

html { scroll-behavior: smooth; }
/* Guard against stray horizontal scroll on small screens (decorative
   absolutely-positioned elements can poke past the viewport edge). */
html, body { overflow-x: hidden; max-width: 100%; }
img, svg, video { max-width: 100%; }
/* Honour reduced-motion for the decorative loops */
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .floaty, .agent-float, .aura-pulse,
  .float-a, .float-b, .float-c, .particle,
  .ring-pulse-1, .ring-pulse-2 { animation: none !important; }
}
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: #0A1430;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: 'Montserrat', system-ui, sans-serif; }

/* Noise / grain overlay */
.grain::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/></svg>");
  opacity: .5; mix-blend-mode: overlay;
}

/* Hero gradient field (dark) */
.hero-bg {
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(67,227,194,0.30), transparent 60%),
    radial-gradient(45% 45% at 12% 20%, rgba(113,214,252,0.35), transparent 65%),
    radial-gradient(70% 60% at 50% 110%, rgba(29,78,162,0.45), transparent 60%),
    linear-gradient(180deg, #08102A 0%, #0B1A45 55%, #0E2466 100%);
}
.grid-lines {
  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: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 35%, transparent 75%);
}

/* Hero (light · sky blue) */
.hero-light {
  background:
    radial-gradient(55% 60% at 80% 25%, rgba(113,214,252,.38), transparent 60%),
    radial-gradient(40% 50% at 12% 75%, rgba(67,227,194,.18), transparent 65%),
    linear-gradient(180deg, #F5FBFF 0%, #FFFFFF 70%);
}
.light-grid {
  background-image:
    linear-gradient(rgba(11,50,145,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,50,145,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 75% 45%, black 30%, transparent 75%);
}

/* Floaty / pulse */
@keyframes floaty { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
.floaty { animation: floaty 7s ease-in-out infinite; }

@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(67,227,194,.45); }
  70%  { box-shadow: 0 0 0 18px rgba(67,227,194,0); }
  100% { box-shadow: 0 0 0 0 rgba(67,227,194,0); }
}
.pulse-dot { animation: pulseRing 2.4s ease-out infinite; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background:#0B3291; color:#fff; box-shadow:0 10px 24px -10px rgba(11,50,145,.55); }
.btn-primary:hover { background:#0E3DAD; box-shadow:0 18px 38px -14px rgba(11,50,145,.6); transform: translateY(-1px); }
.btn-primary:focus-visible { outline:none; box-shadow:0 0 0 4px rgba(67,227,194,.35); }
.btn-ghost { background:rgba(255,255,255,.08); color:#fff; border:1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.btn-ghost:hover { background:rgba(255,255,255,.14); border-color:rgba(255,255,255,.28); transform: translateY(-1px); }
.btn-outline { color:#0B3291; border:1.5px solid #0B3291; background:#fff; }
.btn-outline:hover { background:#0B3291; color:#fff; transform: translateY(-1px); }

/* Card */
.card {
  background: #fff;
  border: 1px solid rgba(11,50,145,.08);
  border-radius: 18px;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, border-color .3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(11,50,145,.06), 0 30px 50px -20px rgba(29,78,162,.18);
  border-color: rgba(29,78,162,.18);
}
.icon-tile {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #E8F0FF 0%, #DCFAF3 100%);
  color: #0B3291;
  box-shadow: inset 0 0 0 1px rgba(11,50,145,.08);
}

/* Marquee */
.marquee { mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent); }
.marquee-track { animation: scroll 28s linear infinite; }
@keyframes scroll { from { transform: translateX(0) } to { transform: translateX(-50%) } }

/* Chip */
.chip { display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  color: #0B3291; background: #EAF1FF; border: 1px solid rgba(11,50,145,.12); }
.chip-dark { color: #9BE7D7; background: rgba(67,227,194,.08); border-color: rgba(67,227,194,.25); }

/* Underline accent */
.accent-underline {
  background-image: linear-gradient(120deg, #43E3C2 0%, #71D6FC 100%);
  background-repeat: no-repeat;
  background-size: 100% 28%;
  background-position: 0 88%;
  padding: 0 .15em;
}

/* Gradient text highlight for key hero words */
.text-gradient {
  background-image: linear-gradient(115deg, #1D4EA2 0%, #4196A2 45%, #43E3C2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Scroll-reveal (fade + rise) */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* Premium animated stat card */
.stat-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid rgba(11,50,145,.08);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(11,50,145,.05);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #43E3C2, #71D6FC);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s cubic-bezier(.22,1,.36,1) .15s;
}
.stat-card.in::before { transform: scaleX(1); }
.stat-card::after {
  content: "";
  position: absolute;
  top: -40%; right: -30%;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(67,227,194,.16) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(11,50,145,.06), 0 30px 50px -20px rgba(29,78,162,.18);
  border-color: rgba(29,78,162,.18);
}
.stat-card:hover::after { opacity: 1; }
.count-up { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .stat-card::before { transform: scaleX(1); transition: none; }
}

.step-line { background: linear-gradient(90deg, #1D4EA2 0%, #43E3C2 100%); height: 2px; }
.nav-blur { backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); }
.nav-active { color: #0A1430; font-weight: 600; }
.nav-active::after { content: ""; display: block; height: 2px; margin-top: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #43E3C2, #71D6FC); }

a:focus-visible, button:focus-visible { outline: 2px solid #43E3C2; outline-offset: 3px; border-radius: 8px; }

/* ============ AI AGENT HERO ANIMATIONS ============ */
@keyframes agentFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-14px); }
}
.agent-float { animation: agentFloat 5s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }

@keyframes armWave {
  0%,100% { transform: rotate(-4deg); }
  50%     { transform: rotate(10deg); }
}
.agent-arm-wave { animation: armWave 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 0% 0%; }

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(0.08); }
}
.agent-blink { animation: blink 5.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@keyframes auraPulse {
  0%,100% { transform: scale(1);   opacity: .85; }
  50%     { transform: scale(1.08); opacity: 1;   }
}
.aura-pulse { animation: auraPulse 6s ease-in-out infinite; }

@keyframes cardA { 0%,100% { transform: translateY(0)  rotate(-2deg); } 50% { transform: translateY(-12px) rotate(-2deg); } }
@keyframes cardB { 0%,100% { transform: translateY(0)  rotate(3deg);  } 50% { transform: translateY(-16px) rotate(3deg);  } }
@keyframes cardC { 0%,100% { transform: translateY(0)  rotate(-1deg); } 50% { transform: translateY(-10px) rotate(-1deg); } }
.float-a { animation: cardA 6s   ease-in-out infinite; }
.float-b { animation: cardB 7s   ease-in-out infinite .5s; }
.float-c { animation: cardC 5.5s ease-in-out infinite 1s; }

@keyframes particleRise {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  15%  { opacity: .9; }
  100% { transform: translateY(-280px) scale(.5); opacity: 0; }
}
.particle {
  position: absolute; width: 8px; height: 8px; border-radius: 9999px;
  background: radial-gradient(circle, #FFFFFF 0%, #71D6FC 60%, rgba(113,214,252,0) 100%);
  filter: blur(.3px);
  animation: particleRise 7s linear infinite;
  pointer-events: none;
}

@keyframes typingDot { 0%,20% { opacity:.25 } 50% { opacity:1 } 80%,100% { opacity:.25 } }
.tdot-1 { animation: typingDot 1.4s ease-in-out infinite; }
.tdot-2 { animation: typingDot 1.4s ease-in-out .2s infinite; }
.tdot-3 { animation: typingDot 1.4s ease-in-out .4s infinite; }

@keyframes dashFlow { to { stroke-dashoffset: -24; } }
.dash-flow { stroke-dasharray: 6 6; animation: dashFlow 1.6s linear infinite; }

@keyframes ringPulse {
  0%   { transform: scale(.85); opacity:.6 }
  80%  { transform: scale(1.25); opacity:0 }
  100% { transform: scale(1.25); opacity:0 }
}
.ring-pulse-1 { animation: ringPulse 2.6s ease-out infinite; }
.ring-pulse-2 { animation: ringPulse 2.6s ease-out 1.1s infinite; }

/* ============ Why-SVC animated growth chart ============ */
.chart-grid line { stroke: rgba(10,20,48,.07); stroke-width: 1; }

.chart-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; }
.reveal.in .chart-line { animation: chartDraw 1.7s cubic-bezier(.4,0,.2,1) .2s forwards; }
@keyframes chartDraw { to { stroke-dashoffset: 0; } }

.chart-area { opacity: 0; }
.reveal.in .chart-area { animation: chartArea 1s ease-out 1.15s forwards; }
@keyframes chartArea { to { opacity: 1; } }

.chart-dot { opacity: 0; transform-box: fill-box; transform-origin: center; }
.reveal.in .chart-dot { animation: chartDot .45s ease-out forwards; }
@keyframes chartDot { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }

.chart-pulse { transform-box: fill-box; transform-origin: center; }
.reveal.in .chart-pulse { animation: chartPulse 2.4s ease-out 1.7s infinite; }
@keyframes chartPulse { 0% { r: 5; opacity: .65; } 70% { r: 18; opacity: 0; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .chart-line { stroke-dashoffset: 0; }
  .chart-area, .chart-dot { opacity: 1; transform: none; }
  .chart-pulse { animation: none; }
}

/* ============ Sub-page hero (compact) ============ */
.page-hero {
  background:
    radial-gradient(55% 65% at 80% 0%, rgba(113,214,252,.35), transparent 60%),
    radial-gradient(40% 50% at 0% 100%, rgba(67,227,194,.18), transparent 65%),
    linear-gradient(180deg, #F5FBFF 0%, #FFFFFF 90%);
}

/* Reveal-on-scroll utility (CSS-only via IntersectionObserver helper in pages) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
