/* E's own styles (moved here from the <style> block in index.html, so no inline styles are needed)
   plus the Inter font, served from this site. */

/* Inter (SIL Open Font License 1.1, see /fonts/Inter-LICENSE.txt), files from @fontsource-variable/inter */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

/* Responsive media in article content */
.prose iframe, .prose .ql-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
  display: block;
}
.prose img {
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  margin-left: auto;
  margin-right: auto;
}

/* Contact page animation */
@keyframes pan-grid {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}
.contact-page-container .animated-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(249, 250, 251, 1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 250, 251, 1) 1px, transparent 1px),
    linear-gradient(rgba(229, 231, 235, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229, 231, 235, 0.4) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: -1px -1px, -1px -1px, 0 0, 0 0;
  animation: pan-grid 90s linear infinite;
  opacity: 0.7;
}

/* Global loader */
@keyframes loading-bar {
  0% { transform: translateX(-100%) scaleX(0.5); }
  50% { transform: translateX(0) scaleX(1); }
  100% { transform: translateX(100%) scaleX(0.5); }
}
.loading-bar-indeterminate {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  transform-origin: left;
  animation: loading-bar 1.5s infinite ease-in-out;
  background: linear-gradient(to right, transparent, rgba(47, 107, 255, 0.7), transparent);
}

/* Homepage glow cards */
.glow-card {
  position: relative;
  overflow: hidden;
  background-color: white;
  border: 1px solid #e5e7eb;
  --x: 50%;
  --y: 50%;
}
.glow-card:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle 250px at var(--x) var(--y), rgba(47, 107, 255, 0.25), transparent 80%);
  opacity: 0;
  transition: opacity 0.4s ease-out;
  border-radius: inherit;
}
.glow-card:hover:before {
  opacity: 1;
}
.glow-card > * {
  position: relative;
  z-index: 1;
}

/* Reading progress bar */
.reading-progress-bar {
  position: fixed;
  top: 80px;
  left: 0;
  height: 4px;
  background: #2F6BFF;
  transform-origin: 0%;
  z-index: 50;
}

/* AI service background animation */
.ai-service-bg {
  position: relative;
  overflow: hidden;
  background-color: #f3f4f6;
}
.ai-service-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(47, 107, 255, 0.06) 0%, transparent 35%),
    radial-gradient(circle at 85% 75%, rgba(47, 107, 255, 0.06) 0%, transparent 35%);
  animation: float-bg 25s ease-in-out infinite;
  z-index: 0;
}
@keyframes float-bg {
  0% { transform: translate(0, 0); }
  25% { transform: translate(15px, -20px); }
  50% { transform: translate(-10px, 10px); }
  75% { transform: translate(10px, 20px); }
  100% { transform: translate(0, 0); }
}
.ai-service-bg > * {
  position: relative;
  z-index: 1;
}

/* Fine woven texture on dark banners (our own pattern, replaces an outside image) */
.e-carbon {
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.25) 0 2px, transparent 2px 6px);
}

/* Animated diagrams on E's service cards (moved here from an inline <style> in E's code) */
@keyframes svg-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes svg-pulse-glow {
  0%, 100% { opacity: 0.35; r: 3px; filter: drop-shadow(0 0 2px rgba(99, 102, 241, 0.4)); }
  50% { opacity: 0.95; r: 5px; filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.8)); }
}
@keyframes svg-flow-packets {
  to { stroke-dashoffset: -32; }
}
@keyframes svg-scanline {
  0% { transform: translateY(-30px); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { transform: translateY(110px); opacity: 0; }
}
@keyframes svg-radar-fade {
  0% { opacity: 0.15; }
  50% { opacity: 0.45; }
  100% { opacity: 0.15; }
}
@keyframes svg-concentric {
  0% { transform: scale(0.65); opacity: 0.1; }
  50% { opacity: 0.4; }
  100% { transform: scale(1.15); opacity: 0; }
}
@keyframes svg-gear-turn {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes svg-gear-turn-ccw {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}
@keyframes svg-float-node {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-4px) translateX(2px); }
}
@keyframes svg-float-node-alt {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(4px) translateX(-2px); }
}

/* Hover Activation Helpers */
.group:hover .animate-sweep-active {
  animation: svg-sweep 6s linear infinite;
}
.group:hover .animate-sweep-active-fast {
  animation: svg-sweep 3.5s linear infinite;
}
.group:hover .animate-flow-active {
  animation: svg-flow-packets 1.8s linear infinite;
}
.group:hover .animate-flow-active-reverse {
  animation: svg-flow-packets 1.8s linear infinite reverse;
}
.group:hover .animate-gear-cw {
  animation: svg-gear-turn 10s linear infinite;
  transform-origin: center;
}
.group:hover .animate-gear-ccw {
  animation: svg-gear-turn-ccw 8s linear infinite;
  transform-origin: center;
}
.group:hover .animate-concentric-active {
  animation: svg-concentric 3s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  transform-origin: center;
}
