:root {
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
}

body {
  font-family: "Inter", sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: var(--primary-gradient);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes float {
  0% { transform: translateY(0px) scale(1); }
  33% { transform: translateY(-20px) scale(1.05); }
  66% { transform: translateY(10px) scale(0.95); }
  100% { transform: translateY(0px) scale(1); }
}

@keyframes float-secondary {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
  100% { transform: translateY(0px) scale(1); }
}

@keyframes float-subtle {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

@keyframes hero-video-glow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(37, 99, 235, 0.06),
      0 0 50px -12px rgba(37, 99, 235, 0.25),
      0 25px 50px -20px rgba(15, 23, 42, 0.5);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(37, 99, 235, 0.1),
      0 0 70px -12px rgba(37, 99, 235, 0.35),
      0 25px 50px -20px rgba(15, 23, 42, 0.5);
  }
}

@keyframes hero-play-pulse {
  0% { transform: scale(1); box-shadow: 0 16px 36px -22px rgba(37, 99, 235, 0.55), 0 0 0 0 rgba(37, 99, 235, 0.18); }
  50% { transform: scale(1.04); box-shadow: 0 20px 44px -22px rgba(37, 99, 235, 0.7), 0 0 0 10px rgba(37, 99, 235, 0.04); }
  100% { transform: scale(1); box-shadow: 0 16px 36px -22px rgba(37, 99, 235, 0.55), 0 0 0 0 rgba(37, 99, 235, 0.18); }
}

.blob {
  position: absolute;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
  animation: float 10s infinite ease-in-out;
}

.float-subtle {
  animation: float-subtle 9s infinite ease-in-out;
}

.hero-video {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 2rem;
  background:
    linear-gradient(#0f172a, #0f172a) padding-box,
    linear-gradient(135deg, #2563eb 0%, #0891b2 100%) border-box;
  border: 1.5px solid transparent;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.06),
    0 0 50px -12px rgba(37, 99, 235, 0.25),
    0 25px 50px -20px rgba(15, 23, 42, 0.5);
  animation: hero-video-glow 4s ease-in-out infinite;
}

.hero-video-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.22s ease;
}

.hero-video-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(1.01);
  transition: none;
}

.hero-video-play {
  position: relative;
  z-index: 2;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--primary-gradient);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 18px 36px -20px rgba(37, 99, 235, 0.75);
  animation: hero-play-pulse 2.4s ease-in-out infinite;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hero-video-overlay:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.45);
}

.hero-video.is-playing .hero-video-overlay {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .float-subtle {
    animation: none;
  }
  .hero-video {
    animation: none;
  }
  .hero-video-play {
    animation: none;
    transition: none;
  }
  .hero-video-overlay,
  .hero-video-thumbnail {
    transition: none;
  }
}

@media (max-width: 1023px) {
  .hero-video {
    border-radius: 1.5rem;
  }
  .hero-video-play {
    width: 3.8rem;
    height: 3.8rem;
  }
}

body[data-page="about"] .blob,
body[data-page="platform"] .blob,
body[data-page="insights"] .blob {
  animation-name: float-secondary;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 100ms; }
.stagger-2 { transition-delay: 200ms; }
.stagger-3 { transition-delay: 300ms; }
.stagger-4 { transition-delay: 400ms; }

.mobile-menu-overlay {
  transition: opacity 0.3s ease, visibility 0.3s;
}

.mobile-menu-content {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
}

.image-zoom-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.image-zoom-overlay img {
  max-width: min(92vw, 1200px);
  max-height: 85vh;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.45);
}

.image-zoom-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 1023px) {
  .image-zoom-overlay {
    display: none;
  }
}

.blog-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 1.75rem;
  color: #0f172a;
}

.blog-content h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 1.5rem;
  color: #0f172a;
}

.blog-content p {
  margin-top: 1rem;
  line-height: 1.75;
  color: #334155;
}

.blog-content ul,
.blog-content ol {
  margin-top: 1rem;
  padding-left: 1.5rem;
  color: #334155;
}

.blog-content ul {
  list-style: disc;
}

.blog-content ol {
  list-style: decimal;
}

.blog-content li {
  display: list-item;
}

.blog-content li + li {
  margin-top: 0.5rem;
}

.blog-content ul ul,
.blog-content ol ul {
  list-style: circle;
  margin-top: 0.5rem;
}

.blog-content ul ol,
.blog-content ol ol {
  list-style: lower-alpha;
  margin-top: 0.5rem;
}

.blog-content a {
  color: #2563eb;
  text-decoration: underline;
}

.blog-content [style*="background"] {
  background: transparent !important;
}

.modernization-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1100;
}

.modernization-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.modernization-modal {
  position: fixed;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    top 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modernization-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.8);
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modernization-modal-body {
  padding: 32px 36px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.modernization-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modernization-modal-title h3 {
  font-size: 1.25rem !important;
  margin: 0;
}

.modernization-modal-title .w-10 {
  width: 2.5rem;
  height: 2.5rem;
}

.modernization-modal-content {
  color: #475569;
  line-height: 1.75;
  font-size: 0.95rem;
  text-align: justify;
}

.modernization-modal-content p + p {
  margin-top: 12px;
}

@media (max-width: 768px) {
  .modernization-modal-body {
    padding: 24px;
  }
}

.ql-toolbar.ql-snow,
.ql-container.ql-snow {
  border-color: #e2e8f0;
}

.ql-toolbar.ql-snow {
  border-radius: 16px 16px 0 0;
  background: #f8fafc;
}

.ql-container.ql-snow {
  border-radius: 0 0 16px 16px;
}

.ql-editor {
  min-height: 280px;
  font-family: "Inter", sans-serif;
  color: #0f172a;
}
