/* Hero Section */
.hero {
  padding-block: var(--space-24) var(--space-20);
  background: linear-gradient(135deg, #dbeafe 0%, #c7d9ff 20%, #a5c4ff 40%, #93d5ed 65%, #b4e4f7 85%, #e0f2fe 100%);
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow overlay for depth */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.5) 0%, transparent 70%);
  pointer-events: none;
}

/* ==========================================================================
   HERO SPLIT LAYOUT — Text left, Illustration right
   ========================================================================== */

.hero__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  position: relative;
}

/* Left column: text content */
.hero__content {
  position: relative;
  text-align: left;
}

.hero__badge {
  margin-bottom: var(--space-6);
  position: relative;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: inline-block;
}

.hero__title {
  font-size: var(--font-size-6xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  color: var(--color-gray-900);
  position: relative;
}

.hero__subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-gray-700);
  line-height: var(--line-height-relaxed);
  max-width: 32rem;
  margin-bottom: var(--space-10);
  position: relative;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  position: relative;
}

/* On the gradient hero, make secondary button stand out */
.hero .btn--secondary {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero .btn--secondary:hover {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.8);
}

/* Compact hero variant for sub-pages (pricing, etc.) */
.hero--compact {
  padding-block: var(--space-20) var(--space-10);
  text-align: center;
}

.hero--compact .hero__title {
  max-width: 48rem;
  margin-inline: auto;
}

.hero--compact .hero__subtitle {
  max-width: 36rem;
  margin-inline: auto;
}

/* ==========================================================================
   HERO 3D ILLUSTRATION — CSS Perspective Composition
   ========================================================================== */

.hero-scene {
  position: relative;
  width: 100%;
  height: 420px;
  perspective: 1200px;
  perspective-origin: 50% 40%;
}

/* ---- Main Widget Card (3D tilted) ---- */
.hero-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  transform: translate(-50%, -50%) rotateX(8deg) rotateY(-5deg);
  transform-style: preserve-3d;
  background: linear-gradient(165deg, #ffffff 0%, #f0f4ff 100%);
  border-radius: 20px;
  padding: 0;
  box-shadow:
    0 2px 4px rgba(0, 40, 120, 0.04),
    0 8px 16px rgba(0, 40, 120, 0.08),
    0 24px 48px rgba(0, 40, 120, 0.12),
    0 48px 80px rgba(0, 40, 120, 0.08);
  overflow: hidden;
  animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
  0%, 100% { transform: translate(-50%, -50%) rotateX(8deg) rotateY(-5deg); }
  50% { transform: translate(-50%, -52%) rotateX(10deg) rotateY(-3deg); }
}

/* Card header bar */
.hero-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #f8faff 0%, #f1f5ff 100%);
  border-bottom: 1px solid rgba(0, 50, 150, 0.06);
}

.hero-card__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hero-card__dot--red {
  background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
  box-shadow: 0 1px 3px rgba(238, 90, 90, 0.4);
}

.hero-card__dot--yellow {
  background: linear-gradient(135deg, #ffd93d, #f0c929);
  box-shadow: 0 1px 3px rgba(240, 201, 41, 0.4);
}

.hero-card__dot--green {
  background: linear-gradient(135deg, #6bcb77, #4caf50);
  box-shadow: 0 1px 3px rgba(76, 175, 80, 0.4);
}

.hero-card__title {
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  margin-left: 4px;
  letter-spacing: 0.01em;
}

/* Card body — toggle rows */
.hero-card__body {
  padding: 6px 0;
}

.hero-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  transition: background 0.15s ease;
}

.hero-card__row-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-card__row-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.hero-card__row-icon--moon {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #6366f1;
}

.hero-card__row-icon--text {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  color: #16a34a;
  font-weight: 700;
  font-size: 14px;
}

.hero-card__row-icon--contrast {
  background: linear-gradient(135deg, #fefce8, #fef9c3);
}

.hero-card__row-icon--spacing {
  background: linear-gradient(135deg, #fdf2f8, #fce7f3);
  color: #ec4899;
}

.hero-card__row-label {
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}

/* Toggle switch */
.hero-toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  position: relative;
  flex-shrink: 0;
}

.hero-toggle--on {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.hero-toggle--off {
  background: linear-gradient(135deg, #d1d5db, #c0c5ce);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hero-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #f8f8f8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: left 0.2s ease;
}

.hero-toggle--on::after {
  left: 20px;
}

.hero-toggle--off::after {
  left: 2px;
}

/* Contrast icon (half circle) */
.hero-contrast-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(90deg, #fbbf24 50%, #1a1a1a 50%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Slider row */
.hero-slider {
  width: 80px;
  height: 5px;
  border-radius: 3px;
  background: #e5e7eb;
  position: relative;
  flex-shrink: 0;
}

.hero-slider__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 55%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.hero-slider__thumb {
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #f0f0f0);
  border: 2.5px solid #3b82f6;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3);
}

/* ---- Floating Orbs & Badges (surrounding the card) ---- */

.hero-float {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* Large blue orb — top left */
.hero-float--orb-blue {
  width: 72px;
  height: 72px;
  top: 18%;
  left: 2%;
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 60%, #1d4ed8 100%);
  box-shadow:
    0 8px 24px rgba(37, 99, 235, 0.35),
    inset 0 -4px 12px rgba(0, 0, 0, 0.1),
    inset 0 4px 8px rgba(255, 255, 255, 0.25);
  animation: floatOrb1 5s ease-in-out infinite;
}

.hero-float--orb-blue::after {
  content: '';
  position: absolute;
  top: 12%;
  left: 22%;
  width: 30%;
  height: 20%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  filter: blur(2px);
}

/* Indigo orb — top right */
.hero-float--orb-indigo {
  width: 56px;
  height: 56px;
  top: 8%;
  right: 10%;
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 60%, #6d28d9 100%);
  box-shadow:
    0 8px 24px rgba(124, 58, 237, 0.35),
    inset 0 -4px 12px rgba(0, 0, 0, 0.1),
    inset 0 4px 8px rgba(255, 255, 255, 0.2);
  animation: floatOrb2 4.5s ease-in-out infinite;
}

.hero-float--orb-indigo::after {
  content: '';
  position: absolute;
  top: 14%;
  left: 20%;
  width: 28%;
  height: 18%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  filter: blur(1.5px);
}

/* Amber orb — bottom right */
.hero-float--orb-amber {
  width: 48px;
  height: 48px;
  bottom: 18%;
  right: 5%;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #d97706 100%);
  box-shadow:
    0 8px 24px rgba(245, 158, 11, 0.35),
    inset 0 -4px 12px rgba(0, 0, 0, 0.08),
    inset 0 4px 8px rgba(255, 255, 255, 0.3);
  animation: floatOrb3 5.5s ease-in-out infinite;
}

.hero-float--orb-amber::after {
  content: '';
  position: absolute;
  top: 12%;
  left: 24%;
  width: 26%;
  height: 18%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  filter: blur(1.5px);
}

/* Teal orb — bottom left */
.hero-float--orb-teal {
  width: 40px;
  height: 40px;
  bottom: 12%;
  left: 8%;
  background: linear-gradient(135deg, #5eead4 0%, #14b8a6 60%, #0d9488 100%);
  box-shadow:
    0 6px 20px rgba(20, 184, 166, 0.35),
    inset 0 -3px 8px rgba(0, 0, 0, 0.08),
    inset 0 3px 6px rgba(255, 255, 255, 0.25);
  animation: floatOrb4 4.8s ease-in-out infinite;
}

.hero-float--orb-teal::after {
  content: '';
  position: absolute;
  top: 14%;
  left: 22%;
  width: 28%;
  height: 18%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  filter: blur(1.5px);
}

/* Small pink orb — top center-right */
.hero-float--orb-pink {
  width: 28px;
  height: 28px;
  top: 5%;
  right: 32%;
  background: linear-gradient(135deg, #f9a8d4, #ec4899, #db2777);
  box-shadow:
    0 4px 14px rgba(236, 72, 153, 0.35),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: floatOrb5 3.8s ease-in-out infinite;
}

/* ---- Floating Pill Badges ---- */

.hero-pill {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* "6 KB" pill — top left area */
.hero-pill--size {
  top: 4%;
  left: 10%;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.85), rgba(2, 132, 199, 0.9));
  color: white;
  box-shadow:
    0 4px 16px rgba(2, 132, 199, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.1);
  animation: floatPill1 5.2s ease-in-out infinite;
}

/* "Aa" pill — right side */
.hero-pill--text {
  top: 38%;
  right: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(67, 56, 202, 0.9));
  color: white;
  font-size: 18px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 16px;
  box-shadow:
    0 4px 16px rgba(99, 102, 241, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.1);
  animation: floatPill2 4.6s ease-in-out infinite;
}

/* "Themes" pill — bottom left */
.hero-pill--themes {
  bottom: 5%;
  left: 5%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.95));
  color: #475569;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.05);
  animation: floatPill3 5.8s ease-in-out infinite;
}

.hero-pill__swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* "Profile" pill — bottom right */
.hero-pill--profile {
  bottom: 2%;
  right: 8%;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.85), rgba(124, 58, 237, 0.9));
  color: white;
  box-shadow:
    0 4px 16px rgba(124, 58, 237, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.1);
  animation: floatPill4 4.2s ease-in-out infinite;
}

/* ---- Sparkle stars ---- */

.hero-sparkle {
  position: absolute;
  pointer-events: none;
}

.hero-sparkle svg {
  display: block;
}

.hero-sparkle--1 {
  top: 12%;
  left: 30%;
  animation: sparkle 2.5s ease-in-out infinite;
}

.hero-sparkle--2 {
  top: 6%;
  right: 18%;
  animation: sparkle 3s ease-in-out infinite 0.5s;
}

.hero-sparkle--3 {
  bottom: 22%;
  left: 18%;
  animation: sparkle 2.8s ease-in-out infinite 1s;
}

.hero-sparkle--4 {
  bottom: 8%;
  right: 25%;
  animation: sparkle 3.2s ease-in-out infinite 0.3s;
}

.hero-sparkle--5 {
  top: 32%;
  left: 4%;
  animation: sparkle 2.6s ease-in-out infinite 0.8s;
}

/* ---- Animations ---- */

@keyframes floatOrb1 {
  0%, 100% { transform: translateY(0) translateX(0); }
  33% { transform: translateY(-12px) translateX(4px); }
  66% { transform: translateY(-4px) translateX(-3px); }
}

@keyframes floatOrb2 {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-14px) translateX(-5px); }
}

@keyframes floatOrb3 {
  0%, 100% { transform: translateY(0) translateX(0); }
  40% { transform: translateY(-10px) translateX(6px); }
  80% { transform: translateY(-3px) translateX(-2px); }
}

@keyframes floatOrb4 {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-8px) translateX(5px); }
}

@keyframes floatOrb5 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes floatPill1 {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes floatPill2 {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-10px) rotate(0deg); }
}

@keyframes floatPill3 {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-6px) rotate(-1deg); }
}

@keyframes floatPill4 {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-9px) rotate(1deg); }
}

@keyframes sparkle {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.4); opacity: 1; }
}

/* ==========================================================================
   HERO STATS
   ========================================================================== */

.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-10);
  margin-top: var(--space-12);
  padding-top: var(--space-10);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  position: relative;
  text-align: center;
}

.hero__stat {
  text-align: center;
}

.hero__stat-value {
  display: block;
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
  line-height: 1;
}

.hero__stat-label {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
  margin-top: var(--space-1);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1023px) {
  .hero {
    padding-block: var(--space-20) var(--space-16);
  }

  .hero--compact {
    padding-block: var(--space-16) var(--space-8);
  }

  .hero__split {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__content {
    text-align: center;
  }

  .hero__subtitle {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__title {
    font-size: var(--font-size-5xl);
  }

  .hero-scene {
    max-width: 440px;
    height: 360px;
    margin-inline: auto;
  }

  .hero-card {
    width: 230px;
  }
}

@media (max-width: 639px) {
  .hero {
    padding-block: var(--space-16) var(--space-12);
  }

  .hero--compact {
    padding-block: var(--space-12) var(--space-6);
  }

  .hero__title {
    font-size: var(--font-size-4xl);
  }

  .hero__subtitle {
    font-size: var(--font-size-lg);
  }

  .hero-scene {
    max-width: 340px;
    height: 300px;
  }

  .hero-card {
    width: 200px;
  }

  .hero-card__header {
    padding: 10px 14px;
  }

  .hero-card__row {
    padding: 8px 14px;
  }

  .hero-card__row-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    font-size: 12px;
  }

  .hero-card__row-label {
    font-size: 11px;
  }

  .hero-float--orb-blue {
    width: 52px;
    height: 52px;
  }

  .hero-float--orb-indigo {
    width: 40px;
    height: 40px;
  }

  .hero-float--orb-amber {
    width: 36px;
    height: 36px;
  }

  .hero-float--orb-teal {
    width: 30px;
    height: 30px;
  }

  .hero-float--orb-pink {
    width: 20px;
    height: 20px;
  }

  .hero-pill {
    font-size: 10px;
    padding: 6px 10px;
    gap: 5px;
  }

  .hero-pill--text {
    font-size: 14px;
    padding: 9px 14px;
  }

  .hero-pill__swatch {
    width: 10px;
    height: 10px;
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--space-6);
  }
}
