:root {
  --qo-shadow: 0 20px 45px rgba(185, 28, 61, 0.12);
  --qo-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
  --qo-radius-xl: 24px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 2.8rem;
  margin: 0 0 2rem;
  border: 1px solid rgba(217, 72, 95, 0.16);
  border-radius: var(--qo-radius-xl);
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.22), transparent 32%),
    radial-gradient(circle at left center, rgba(217, 72, 95, 0.14), transparent 35%),
    linear-gradient(135deg, rgba(255, 247, 243, 0.96), rgba(255, 238, 232, 0.96));
  box-shadow: var(--qo-shadow);
}

.hero-kicker {
  margin: 0 0 0.85rem;
  color: #b91c3d;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  color: #0f172a;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 0.95;
}

.hero-lead {
  max-width: 50rem;
  margin: 1.25rem 0 0;
  color: #334155;
  font-size: 1.1rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.hero .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.hero .button:hover {
  transform: translateY(-1px);
}

.hero .button.primary {
  color: #fff7f3;
  background: linear-gradient(135deg, #be123c, #881337);
  box-shadow: 0 12px 24px rgba(185, 28, 61, 0.2);
}

.hero .button.secondary {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(217, 72, 95, 0.18);
}

.section-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1.75rem 0 2.5rem;
}

.section-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  min-height: 12rem;
  padding: 1.25rem;
  border: 1px solid rgba(217, 72, 95, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--qo-shadow-soft);
  color: inherit;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.section-card:nth-child(4),
.section-card:nth-child(5) {
  grid-column: span 3;
}

.section-card:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 72, 95, 0.24);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.card-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: #b91c3d;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-card h2 {
  margin: 0 0 0.65rem;
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.25;
}

.section-card p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.main .toctree-wrapper {
  margin-top: 2rem;
}

.main img {
  border-radius: 18px;
  box-shadow: var(--qo-shadow-soft);
}

@media (max-width: 900px) {
  .section-cards {
    grid-template-columns: 1fr;
  }

  .section-card,
  .section-card:nth-child(4),
  .section-card:nth-child(5) {
    grid-column: auto;
  }

  .hero {
    padding: 2rem;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (prefers-color-scheme: dark) {
  .hero {
    border-color: rgba(251, 113, 133, 0.18);
    background:
      radial-gradient(circle at top right, rgba(251, 191, 36, 0.14), transparent 30%),
      radial-gradient(circle at left center, rgba(244, 63, 94, 0.16), transparent 36%),
      linear-gradient(135deg, rgba(35, 31, 46, 0.98), rgba(27, 26, 36, 0.98));
  }

  .hero h1,
  .section-card h2 {
    color: #f8fafc;
  }

  .hero-lead,
  .section-card p {
    color: #cbd5e1;
  }

  .hero .button.secondary {
    color: #f8fafc;
    background: rgba(38, 34, 51, 0.86);
    border-color: rgba(251, 113, 133, 0.18);
  }

  .section-card {
    background: rgba(38, 34, 51, 0.92);
    border-color: rgba(251, 113, 133, 0.12);
  }
}
