body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(27, 32, 64, 0.05), rgba(27, 32, 64, 0) 280px),
    var(--ends-page-bg);
}

.page-wrapper {
  min-height: calc(100vh - 56px);
}

.home-page .page-body {
  margin-top: 0;
}

.home-page .page-body .container-xl {
  padding-top: 0 !important;
}

.site-hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  min-height: 56vh;
  padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.home-hero {
  position: relative;
  isolation: isolate;
  width: 100vw;
  min-height: min(760px, calc(100vh - 56px));
  margin-inline: calc(50% - 50vw);
  padding: clamp(3rem, 7vw, 6rem) max(clamp(1rem, 4vw, 3rem), calc((100vw - 1320px) / 2));
  color: #fff;
  background-image:
    radial-gradient(circle at 28% 46%, rgba(8, 12, 26, 0.18) 0%, rgba(8, 12, 26, 0.28) 32%, rgba(8, 12, 26, 0.52) 100%),
    linear-gradient(90deg, rgba(8, 12, 26, 0.42) 0%, rgba(8, 12, 26, 0.28) 46%, rgba(8, 12, 26, 0.18) 100%),
    linear-gradient(180deg, rgba(8, 12, 26, 0.06), rgba(8, 12, 26, 0.58)),
    url("../images/banner.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 12, 26, 0), rgba(8, 12, 26, 0.22));
  pointer-events: none;
}

.home-hero .home-hero-content {
  max-width: 720px;
}

.home-hero .site-kicker,
.home-hero .lead,
.home-hero .text-muted {
  color: rgba(255, 255, 255, 0.82) !important;
}

.home-hero h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.36);
}

.home-hero .btn-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.home-hero .btn-outline-light:hover {
  color: var(--ends-navy);
  border-color: #fff;
  background: #fff;
}

.navbar {
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.16);
}

.navbar-brand {
  min-height: 44px;
  padding-block: 0.4rem;
}

.site-brand-logo {
  display: block;
  width: min(184px, 48vw);
  height: auto;
  max-height: 42px;
  object-fit: contain;
}

@media (min-width: 992px) {
  .site-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  }
}

.site-hero h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 13vw, 5.8rem);
  line-height: 0.95;
}

.site-kicker {
  font-family: var(--tblr-font-sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--ends-purple);
  font-weight: 700;
}

.display-3,
.display-4,
.display-5 {
  letter-spacing: 0;
}

.page-body .btn-outline-light {
  color: var(--ends-navy);
  border-color: rgba(27, 32, 64, 0.28);
  background: rgba(255, 255, 255, 0.58);
}

.page-body .btn-outline-light:hover {
  color: #fff;
  border-color: var(--ends-navy);
  background: var(--ends-navy);
}

.hero-dice {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(6, minmax(44px, 1fr));
  max-width: 100%;
}

.hero-die {
  display: grid;
  place-items: center;
  min-height: 72px;
  border: 1px solid rgba(27, 32, 64, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(27, 32, 64, 0.08);
}

.home-hero .hero-die {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.hero-die .dice {
  width: 2.2rem;
  height: 2.2rem;
}

@media (min-width: 768px) {
  .hero-dice {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    max-width: 480px;
    margin-left: auto;
  }

  .hero-die {
    min-height: 108px;
  }

  .hero-die .dice {
    width: 3.2rem;
    height: 3.2rem;
  }
}

.feature-grid,
.universe-grid,
.sourcebook-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .universe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sourcebook-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.feature-card,
.universe-card,
.sourcebook-card,
.legal-panel {
  background: #fff;
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(27, 32, 64, 0.06);
}

.feature-card p:last-child,
.legal-panel p:last-child {
  margin-bottom: 0;
}

.dice-sheet-card {
  border-color: rgba(27, 32, 64, 0.12);
}

.dice-sheet-download-controls {
  max-width: 34rem;
  flex-wrap: nowrap;
}

.dice-sheet-download-controls .form-select {
  min-width: 0;
}

.dice-sheet-download-controls .btn {
  white-space: nowrap;
}

.dice-sheet-download-note {
  color: var(--tblr-muted) !important;
  font-size: 85%;
  max-width: 34rem;
  margin-top: 0.4rem !important;
  font-style: italic;
}

.community-head {
  margin-bottom: 1.25rem;
}

.community-head h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(2.15rem, 6vw, 3.8rem);
  line-height: 1;
}

.community-grid {
  display: grid;
  gap: 1.5rem;
}

.community-panel {
  padding: 1.5rem;
}

.community-panel h2 {
  margin-bottom: 0.75rem;
}

.community-panel p + p {
  margin-top: 0.85rem;
}

.community-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .community-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.beta-page-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.beta-page-head h1 {
  max-width: 20ch;
  margin-bottom: 0.35rem;
  font-size: clamp(2.15rem, 6vw, 3.8rem);
  line-height: 1;
}

.beta-form-grid {
  display: grid;
  gap: 1rem;
}

.beta-check-grid,
.beta-product-list {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .beta-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .beta-form-grid .span-2 {
    grid-column: span 2;
  }

  .beta-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.feature-card {
  padding: 1.25rem;
}

.feature-card h2,
.feature-card h3 {
  font-size: 1.1rem;
}

.home-intro {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.5rem, 4vw, 2.75rem) 0;
}

.home-intro h2 {
  max-width: 760px;
  margin-bottom: 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.05;
}

.home-intro > div:first-child p {
  max-width: 860px;
  font-size: 1.05rem;
}

.home-pillars {
  display: grid;
  gap: 1rem;
}

.home-pillars > div {
  padding-top: 1rem;
  border-top: 3px solid rgba(26, 127, 255, 0.28);
}

.home-pillars h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.home-pillars p {
  margin-bottom: 0;
}

.start-hero {
  max-width: 920px;
  padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(1.5rem, 4vw, 3rem);
}

.start-hero h1 {
  max-width: 12ch;
  margin-bottom: 1rem;
  font-size: clamp(3rem, 12vw, 5.6rem);
  line-height: 0.96;
}

.start-hero .lead {
  max-width: 820px;
}

.start-actions,
.start-choice-grid,
.start-compare {
  display: grid;
  gap: 1rem;
}

.start-actions {
  grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
  margin-top: 1.25rem;
}

.start-choice-grid {
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.start-choice,
.start-note {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(27, 32, 64, 0.06);
}

.start-choice h2,
.start-note h2 {
  font-size: 1.2rem;
}

.start-choice p,
.start-note p {
  color: var(--tblr-muted);
}

.start-choice p:last-child,
.start-note p:last-child {
  margin-bottom: 0;
}

.start-band {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  color: #fff;
  background: var(--ends-navy);
  border-radius: 8px;
}

.start-band .text-muted {
  color: rgba(255, 255, 255, 0.72) !important;
}

.start-compare > div {
  padding-top: 1rem;
  border-top: 3px solid rgba(255, 255, 255, 0.28);
}

.start-compare h3 {
  margin-bottom: 0.6rem;
}

.start-compare ul,
.start-steps ol {
  margin-bottom: 0;
}

.start-steps {
  display: grid;
  gap: 1rem;
  align-items: start;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.start-steps ol {
  display: grid;
  gap: 0.85rem;
  padding-left: 1.25rem;
}

@media (min-width: 768px) {
  .home-pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .start-choice-grid,
  .start-compare {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .start-compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .start-steps {
    grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
  }
}

.universe-card {
  overflow: hidden;
}

.sourcebook-card {
  display: grid;
  overflow: hidden;
}

@media (min-width: 768px) {
  .sourcebook-card {
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  }
}

.universe-cover {
  min-height: 360px;
  background-size: cover;
  background-position: center;
}

.sourcebook-cover {
  min-height: 240px;
  background-size: cover;
  background-position: center;
}

@media (min-width: 768px) {
  .sourcebook-cover {
    min-height: 100%;
  }
}

.universe-body {
  padding: 1.5rem;
}

.sourcebook-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.25rem;
}

.sourcebook-body h2,
.sourcebook-body p {
  margin-bottom: 0;
}

.sourcebook-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-family: var(--tblr-font-sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--status-text, var(--ends-navy));
  background: var(--status-bg, rgba(26, 127, 255, 0.12));
  border: 1px solid var(--status-border, rgba(26, 127, 255, 0.26));
}

.legal-panel {
  max-width: 880px;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.community-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.about-band {
  background: var(--ends-navy);
  color: #fff;
  border-radius: 8px;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.about-band .text-muted {
  color: rgba(255, 255, 255, 0.72) !important;
}
