html {
  scroll-behavior: smooth;
}

html, body.home {
  height: auto;
}

body.home {
  display: block;
}

.home main,
.home-nav,
.home-footer {
  position: relative;
  z-index: 1;
}

/* Nav */
.home-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(19, 18, 16, 0.92);
  border-bottom: 1px solid rgba(109, 92, 60, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.home-nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  max-width: 1200px;
  height: 60px;
  margin: 0 auto;
  padding: 0 24px;
}

.home-brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.home-brand img {
  object-fit: contain;
}

.home-nav-join {
  justify-self: end;
}

.home-nav-links {
  display: flex;
  gap: 28px;
}

.home-nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.home-nav-links a:hover,
.home-nav-links a:focus-visible {
  color: var(--gold-bright);
}

/* Buttons */
.home-btn-quiet {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.home-btn-quiet:hover,
.home-btn-quiet:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan-bright);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
}

/* Hero */
.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 61px);
  padding: 48px 24px;
  overflow: hidden;
  background: #05070a;
  text-align: center;
}

.home-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 70% at 50% 55%, rgba(19, 18, 16, 0.72), rgba(19, 18, 16, 0.2) 75%),
    linear-gradient(180deg, rgba(19, 18, 16, 0.1) 55%, var(--bg) 100%);
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-hero-emblem {
  width: clamp(120px, 15vw, 190px);
  height: auto;
  margin-bottom: 18px;
  filter:
    brightness(0.93)
    drop-shadow(0 12px 16px rgba(0, 0, 0, 0.8))
    drop-shadow(0 0 26px rgba(95, 216, 212, 0.32));
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(32px, 4.6vw, 60px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.12;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.home-stats {
  display: flex;
  gap: 44px;
  margin: 24px 0 0;
}

.home-stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}

.home-stats dd {
  margin: 0;
  color: var(--cyan-bright);
  font-size: 28px;
  font-weight: 700;
  text-shadow: 0 0 14px rgba(95, 216, 212, 0.45);
}

.home-stats dt {
  color: var(--text);
  font-size: 12px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.home-hero .home-btn-quiet {
  border-color: var(--gold);
  background: rgba(19, 18, 16, 0.55);
  color: var(--text);
}

.home-hero .discord-btn {
  background: rgba(19, 18, 16, 0.55);
}

.home-hero .discord-btn:hover,
.home-hero .discord-btn:focus-visible {
  background: var(--gold);
}

.home-h1-sub {
  display: block;
  margin-top: 6px;
  font-size: 0.4em;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.85;
}

.home-hero-line {
  margin: 22px 0 26px;
  font-size: 17px;
  color: var(--text);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}

/* Sections */
.home-section {
  padding: 88px 24px;
}

.home-band {
  background: rgba(234, 229, 217, 0.025);
  border-top: 1px solid rgba(109, 92, 60, 0.3);
  border-bottom: 1px solid rgba(109, 92, 60, 0.3);
}

.home-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.home-section h2 {
  margin: 0;
  font-size: clamp(25px, 2.6vw, 34px);
  font-weight: 700;
}

.home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.home-sub {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

.home-center {
  margin-bottom: 30px !important;
  text-align: center;
}

.home-grid {
  display: grid;
  gap: 18px;
}

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

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

/* About */
.home-about {
  max-width: 820px;
  padding-left: 26px;
  border-left: 1px solid var(--gold-dim);
}

.home-about p {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
}

.home-about .home-about-lead {
  margin-top: 20px;
  color: var(--text);
  font-size: 21px;
  line-height: 1.5;
}

.home-about a {
  color: var(--cyan-bright);
  text-underline-offset: 3px;
}

/* Cards */
.home-card,
.home-clan,
.home-shot {
  margin: 0;
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  background: rgba(234, 229, 217, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-card:hover,
.home-clan:hover,
.home-shot:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(95, 216, 212, 0.15);
}

.home-card {
  padding: 22px;
}

.home-card h3,
.home-clan h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}

.home-card p,
.home-clan p {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.home-shot {
  overflow: hidden;
}

.home-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.home-shot figcaption {
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
  font-size: 14px;
}

.home-shot strong {
  color: var(--text);
  font-size: 15px;
}

.home-shot span {
  margin-top: 2px;
  color: var(--cyan-bright);
  font-size: 13px;
}

.home-shot em {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.home-clan {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 24px 26px;
  text-align: center;
}

.home-clan img {
  width: 104px;
  height: 104px;
  margin-bottom: 16px;
  object-fit: contain;
}

.home-clan .home-clan-meta {
  margin-top: 4px;
  color: var(--gold);
  font-size: 12.5px;
}

.home-clan p:not(.home-clan-meta) {
  flex: 1 0 auto;
  margin-bottom: 16px;
}

.home-clan a {
  color: var(--gold-bright);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
}

.home-clan a:hover,
.home-clan a:focus-visible {
  color: var(--cyan-bright);
  border-color: var(--cyan);
}

/* Clan cards with a longer description */
.home-clan-details {
  flex: 1 0 auto;
  width: 100%;
  margin: 6px 0 16px;
  text-align: left;
}

.home-clan-details p:not(.home-clan-meta) {
  margin-bottom: 0;
}

.home-note {
  max-width: 640px;
  margin: 30px auto 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.home-note a {
  color: var(--cyan-bright);
  text-underline-offset: 3px;
}

/* Shorter hero for inner pages */
.home-hero-short {
  min-height: min(62vh, 620px);
}

.home-hero-compact {
  min-height: min(36vh, 340px);
}

.home-hero-emblems {
  display: flex;
  gap: clamp(14px, 2vw, 26px);
  margin-bottom: 18px;
}

.home-hero-emblems img {
  width: clamp(64px, 7.5vw, 104px);
  height: clamp(64px, 7.5vw, 104px);
  object-fit: contain;
  filter:
    brightness(0.93)
    drop-shadow(0 8px 12px rgba(0, 0, 0, 0.8))
    drop-shadow(0 0 20px rgba(95, 216, 212, 0.32));
}

.home-nav-links a[aria-current="page"] {
  color: var(--gold-bright);
}

/* Events page */
.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: center;
  gap: 48px;
}

.home-split .carousel-container {
  margin: 0;
}

.home .events-desc {
  max-width: 860px;
  margin: 14px 0 0;
  font-size: 16px;
}

.home .giveaways-faq-grid {
  margin-top: 26px;
}

@media (max-width: 980px) {
  .home-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
}

/* FAQ and Rules pages */
.home-section h2 + .faq-grid {
  margin-top: 26px;
}

.home .faq-grid {
  align-items: start;
}

.home-section h2.rule-title {
  margin: 0 0 10px;
  font-size: 16px;
}

.home .rule-subtext {
  font-size: 14.5px;
}

/* Final join */
.home-final {
  border-top: 1px solid rgba(109, 92, 60, 0.55);
  text-align: center;
}

.home-final p {
  margin: 10px 0 24px;
  color: var(--text-muted);
  font-size: 16px;
}

/* Footer */
.home-footer {
  padding: 44px 24px;
  border-top: 1px solid rgba(109, 92, 60, 0.3);
  background: rgba(0, 0, 0, 0.25);
}

.home-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.home-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.home-footer a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.home-footer a:hover,
.home-footer a:focus-visible {
  color: var(--gold-bright);
}

.home-footer nav a {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  text-decoration: none;
}

.home-footer .home-footer-name {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.home-footer .home-footer-title {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .home-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .home-brand span,
  .home-nav-join {
    display: none;
  }

  .home-nav-inner {
    gap: 16px;
    padding: 0 16px;
  }

  .home-nav-links {
    gap: 20px;
  }

  .home-section {
    padding: 56px 16px;
  }

  .home-hero {
    padding: 36px 16px;
  }

  .home-hero-art {
    object-position: 72% 30%;
  }

  .home-hero::after {
    background:
      radial-gradient(90% 55% at 50% 56%, rgba(19, 18, 16, 0.85), rgba(19, 18, 16, 0.35) 85%),
      linear-gradient(180deg, rgba(19, 18, 16, 0.1) 55%, var(--bg) 100%);
  }

  .home-stats {
    gap: 24px;
  }

  .home-grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-about {
    padding-left: 18px;
  }

  .home-about .home-about-lead {
    font-size: 19px;
  }

  .home-footer {
    padding: 36px 16px;
  }

  .home-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-footer-grid > div {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .home-grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

/* Extended rule bible link + moderation page */
.rules-bible-note {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.6;
}
.rules-bible-note a { color: inherit; text-decoration: underline; }
.mod-pdf-frame {
  width: 100%;
  height: 80vh;
  min-height: 480px;
  border: 0;
  border-radius: 8px;
  background: #fff;
}
.mod-pdf-fallback { text-align: center; margin-top: 1rem; font-size: 0.9rem; }

/* Current event page and "live now" banner */
.event-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--gold-dim);
  color: var(--text);
  font-size: 14.5px;
  text-align: center;
  text-decoration: none;
}

.event-banner-cta {
  color: var(--gold-bright);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.event-banner:hover .event-banner-cta,
.event-banner:focus-visible .event-banner-cta {
  color: var(--cyan-bright);
}

.event-hero .home-hero-line {
  max-width: 640px;
  margin: 16px 0 22px;
}

.event-h1-prize {
  display: block;
  margin-top: 8px;
  color: var(--gold-bright);
  font-size: 0.62em;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.event-countdown {
  margin: 0 0 24px;
  color: var(--text);
  font-size: 16px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}

.event-countdown-label {
  color: var(--text);
}

.event-countdown-time {
  margin-left: 6px;
  color: var(--cyan-bright);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.event-countdown.is-closed .event-countdown-label {
  color: var(--gold-bright);
  font-weight: 700;
}

.event-prizes {
  max-width: 560px;
  margin: 26px 0 0;
  padding: 0;
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  list-style: none;
}

.event-prizes li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  color: var(--text);
  font-size: 17px;
}

.event-prizes li + li {
  border-top: 1px solid var(--gold-dim);
}

.event-prizes li span:last-child {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.event-prizes .event-prize-first span:last-child {
  color: var(--gold-bright);
}

.event-prizes .event-prize-joke {
  color: var(--text-muted);
  font-size: 15px;
}

.event-prize-note {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.event-list {
  margin: 16px 0 0;
  padding-left: 22px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
}

.event-list li + li {
  margin-top: 8px;
}

.event-list a {
  color: var(--cyan-bright);
  text-underline-offset: 3px;
}

.event-judging,
.event-faq {
  margin-top: 26px;
}

@media (max-width: 760px) {
  .event-countdown-time {
    display: block;
    margin: 4px 0 0;
  }
}
