/* Shared AiNastia styles — Core Web Vitals optimized */
body { background: #0B0F19; font-family: Inter, system-ui, sans-serif; }
.gradient-text {
  background: linear-gradient(135deg, #8B5CF6, #EC4899, #8B5CF6);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: grad 8s ease infinite;
}
@keyframes grad { 0%, 100% { background-position: 0 center; } 50% { background-position: 200% center; } }
.gradient-border { position: relative; background: #151C2C; border-radius: 1rem; }
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, #8B5CF6, #EC4899, #8B5CF6);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hero-glow { background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.25), transparent); }
.grid-bg {
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.quiz-option.selected {
  border-color: #8B5CF6;
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}
.quiz-option:hover:not(.selected) {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.08);
}
.article-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #F3F4F6;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}
.article-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #E5E7EB;
  margin: 1.75rem 0 0.75rem;
}
.article-content p { color: #9CA3AF; line-height: 1.8; margin-bottom: 1.25rem; }
.article-content ul { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.article-content ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: #9CA3AF;
  line-height: 1.7;
}
.article-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
}
.article-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; color: #9CA3AF; }
.article-content ol li { margin-bottom: 0.75rem; line-height: 1.7; }
.article-content strong { color: #E5E7EB; font-weight: 600; }
.comparison-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.875rem; }
.comparison-table thead { background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(236, 72, 153, 0.2)); }
.comparison-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #F3F4F6;
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}
.comparison-table td {
  padding: 0.875rem 1rem;
  color: #9CA3AF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(21, 28, 44, 0.6);
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table td:first-child { font-weight: 500; color: #D1D5DB; }
.comparison-table .highlight-col { background: rgba(139, 92, 246, 0.1); color: #C4B5FD; }
.table-wrapper { overflow-x: auto; border-radius: 0.75rem; border: 1px solid rgba(139, 92, 246, 0.2); }
#chat-panel {
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#chat-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.chat-message { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.typing-indicator span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8B5CF6;
  animation: tb 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
@keyframes tb { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
.btn-primary { background: linear-gradient(135deg, #8B5CF6, #EC4899); transition: all 0.3s ease; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4); }
#quiz-result { animation: fadeIn 0.5s ease; }
.legal-content h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 700; color: #F3F4F6; margin: 2rem 0 1rem; }
.legal-content h3 { font-size: 1.125rem; font-weight: 600; color: #E5E7EB; margin: 1.5rem 0 0.75rem; }
.legal-content p, .legal-content li { color: #9CA3AF; line-height: 1.8; margin-bottom: 1rem; }
.legal-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1.25rem; }
@media (max-width: 640px) {
  .comparison-table { font-size: 0.75rem; }
  .comparison-table th, .comparison-table td { padding: 0.625rem 0.5rem; }
}

.feature-card {
  background: #151C2C;
  will-change: transform, opacity;
}
.feature-card-active {
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.4);
}
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.tabular-nums { font-variant-numeric: tabular-nums; }
figure img { display: block; max-width: 100%; height: auto; }

/* Hero media showcase */
.hero-media { margin-top: 0.5rem; }
.hero-media-glow {
  position: absolute;
  inset: 10% 5% auto;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.35), rgba(236, 72, 153, 0.15), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.hero-media-frame {
  position: relative;
  z-index: 1;
  border-radius: 1.25rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.7), rgba(236, 72, 153, 0.45), rgba(139, 92, 246, 0.2));
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(139, 92, 246, 0.2);
  overflow: hidden;
}
.hero-media-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(1.25rem - 1px);
  aspect-ratio: 960 / 743;
  object-fit: cover;
  object-position: center top;
  background: #111827;
}
.hero-media-caption {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1rem;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #E9D5FF;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
}

/* Feature / gallery media */
.feature-media {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feature-media-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  border-radius: 1.5rem;
  padding: 1px;
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.65), rgba(236, 72, 153, 0.4), rgba(255, 255, 255, 0.08));
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(236, 72, 153, 0.15);
}
.feature-media-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(1.5rem - 1px);
  aspect-ratio: 648 / 720;
  object-fit: cover;
  background: #0B0F19;
}
.feature-media-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

@media (min-width: 768px) {
  .feature-media-frame { max-width: 480px; }
}

/* Delayed exit modal */
.exit-delay-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.exit-delay-modal.hidden { display: none; }
.exit-delay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 25, 0.82);
  backdrop-filter: blur(8px);
}
.exit-delay-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
}
.exit-delay-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 1.5rem;
  line-height: 1;
  color: #9CA3AF;
  background: none;
  border: none;
  cursor: pointer;
}
.exit-delay-close:hover { color: #fff; }
.exit-delay-ring {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto;
}
.exit-delay-ring svg {
  width: 96px;
  height: 96px;
  transform: rotate(-90deg);
}
.exit-delay-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 6;
}
.exit-delay-bar {
  fill: none;
  stroke: url(#none);
  stroke: #8B5CF6;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.exit-delay-count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
}
button.js-delay-exit { cursor: pointer; border: none; }

