/* abovepy docs — premium visual design */

/* ------------------------------------------------------------------ */
/* Animated gradient background                                        */
/* ------------------------------------------------------------------ */

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float-up {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 191, 165, 0.2); }
  50% { box-shadow: 0 0 40px rgba(0, 191, 165, 0.4); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ------------------------------------------------------------------ */
/* Brand palette                                                       */
/* ------------------------------------------------------------------ */

:root {
  --abovepy-teal: #00897b;
  --abovepy-teal-light: #4db6ac;
  --abovepy-teal-dark: #00695c;
  --abovepy-accent: #00bfa5;
  --abovepy-gradient: linear-gradient(135deg, #00897b, #00bfa5, #26c6da);
  --abovepy-card-border: rgba(0, 0, 0, 0.06);
  --abovepy-card-bg: rgba(255, 255, 255, 0.7);
  --abovepy-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --abovepy-card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.1);
  --abovepy-glass: rgba(255, 255, 255, 0.6);
  --abovepy-glass-border: rgba(255, 255, 255, 0.3);
}

[data-md-color-scheme="slate"] {
  --abovepy-card-border: rgba(255, 255, 255, 0.06);
  --abovepy-card-bg: rgba(255, 255, 255, 0.04);
  --abovepy-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  --abovepy-card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.4);
  --abovepy-glass: rgba(255, 255, 255, 0.05);
  --abovepy-glass-border: rgba(255, 255, 255, 0.08);
}

/* ------------------------------------------------------------------ */
/* Hero section — immersive dark gradient with particle-like accents   */
/* ------------------------------------------------------------------ */

.mdx-hero {
  background: linear-gradient(135deg, #0a1628 0%, #0d2b26 30%, #004d40 60%, #00363a 100%);
  background-size: 300% 300%;
  animation: gradient-shift 15s ease infinite;
  color: #fff;
  padding: 6rem 2rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: -1.2rem -0.8rem 0;
}

/* Subtle light orbs */
.mdx-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 50%, rgba(0, 191, 165, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(38, 198, 218, 0.1) 0%, transparent 35%),
    radial-gradient(circle at 50% 80%, rgba(77, 182, 172, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

/* Floating dot grid overlay */
.mdx-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.mdx-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 auto 1.2rem;
  max-width: 760px;
  color: #fff;
  position: relative;
  animation: float-up 0.6s ease-out;
}

/* Gradient text highlight for key phrase */
.mdx-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #4db6ac, #26c6da, #80deea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mdx-hero .hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.7;
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  position: relative;
  animation: float-up 0.6s ease-out 0.1s both;
  font-weight: 400;
}

/* Install command — frosted glass pill */
.mdx-hero .install-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2rem;
  padding: 0.6rem 1.6rem;
  font-family: var(--md-code-font-family);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  position: relative;
  backdrop-filter: blur(8px);
  animation: float-up 0.6s ease-out 0.2s both;
  transition: background 0.2s;
}

.mdx-hero .install-pill:hover {
  background: rgba(255, 255, 255, 0.12);
}

.mdx-hero .install-pill::before {
  content: "$";
  opacity: 0.4;
}

/* CTA buttons */
.mdx-hero .hero-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  position: relative;
  animation: float-up 0.6s ease-out 0.3s both;
}

.mdx-hero .hero-buttons a {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 2rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.mdx-hero .hero-buttons a:hover {
  transform: translateY(-2px);
}

.mdx-hero .hero-buttons .btn-primary {
  background: linear-gradient(135deg, #4db6ac, #26c6da);
  color: #0a1628;
  box-shadow: 0 4px 20px rgba(0, 191, 165, 0.3);
}

.mdx-hero .hero-buttons .btn-primary:hover {
  box-shadow: 0 8px 32px rgba(0, 191, 165, 0.5);
}

.mdx-hero .hero-buttons .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
}

.mdx-hero .hero-buttons .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ------------------------------------------------------------------ */
/* Stats bar — trust indicators below hero                             */
/* ------------------------------------------------------------------ */

.md-typeset .stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 2rem 1rem;
  margin: 0 -0.8rem 2rem;
  background: var(--abovepy-glass);
  border: 1px solid var(--abovepy-glass-border);
  border-left: none;
  border-right: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-wrap: wrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.md-typeset .stats-bar .stat {
  text-align: center;
}

.md-typeset .stats-bar .stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--abovepy-teal);
  letter-spacing: -0.02em;
  line-height: 1;
}

.md-typeset .stats-bar .stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.5;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* ------------------------------------------------------------------ */
/* Feature grid — glass morphism cards with icon badges                */
/* ------------------------------------------------------------------ */

.md-typeset .feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 0.5rem 0 2.5rem;
}

.md-typeset .feature-card {
  background: var(--abovepy-card-bg);
  border: 1px solid var(--abovepy-card-border);
  border-radius: 1.25rem;
  padding: 1.6rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    var(--abovepy-card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

/* Liquid glass shimmer — subtle light refraction effect */
.md-typeset .feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.03) 55%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: shimmer 8s ease-in-out infinite;
  pointer-events: none;
}

/* Top edge gradient accent */
.md-typeset .feature-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--abovepy-gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.md-typeset .feature-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow:
    var(--abovepy-card-shadow-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(0, 191, 165, 0.15);
}

.md-typeset .feature-card:hover::after {
  opacity: 1;
}

.md-typeset .feature-card .card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--abovepy-gradient);
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 137, 123, 0.25);
}

.md-typeset .feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.md-typeset .feature-card p {
  font-size: 0.85rem;
  opacity: 0.65;
  margin: 0;
  line-height: 1.6;
}

/* ------------------------------------------------------------------ */
/* Section headers — elegant labels                                    */
/* ------------------------------------------------------------------ */

.md-typeset .section-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: var(--abovepy-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
  display: inline-block;
}

/* ------------------------------------------------------------------ */
/* Code blocks — refined styling                                       */
/* ------------------------------------------------------------------ */

.md-typeset pre {
  border-radius: 0.75rem;
  border: 1px solid var(--abovepy-card-border);
}

.md-typeset pre > code {
  font-size: 0.82rem;
}

/* ------------------------------------------------------------------ */
/* Product table                                                       */
/* ------------------------------------------------------------------ */

.md-typeset table {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--abovepy-card-border);
}

.md-typeset table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Bottom CTA                                                          */
/* ------------------------------------------------------------------ */

.md-typeset .cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 2.5rem 0;
}

.md-typeset .cta-row .md-button {
  border-radius: 2rem;
  padding: 0.65rem 1.8rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.md-typeset .cta-row .md-button:hover {
  transform: translateY(-2px);
}

.md-typeset .cta-row .md-button--primary {
  background: var(--abovepy-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 137, 123, 0.25);
}

.md-typeset .cta-row .md-button--primary:hover {
  box-shadow: 0 8px 24px rgba(0, 137, 123, 0.4);
}

/* ------------------------------------------------------------------ */
/* Announcement banner polish                                          */
/* ------------------------------------------------------------------ */

.md-banner {
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
}

.md-banner code {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
}

/* ------------------------------------------------------------------ */
/* Responsive adjustments                                              */
/* ------------------------------------------------------------------ */

@media (max-width: 768px) {
  .mdx-hero {
    padding: 4rem 1.2rem 3rem;
  }
  .md-typeset .stats-bar {
    gap: 1.5rem;
  }
  .md-typeset .stats-bar .stat-value {
    font-size: 1.3rem;
  }
}
