:root {
  color-scheme: dark;
  --bg: #080a0f;
  --panel: #121620;
  --panel-strong: #191f2c;
  --text: #f5f7fb;
  --muted: #abb5c8;
  --line: #2a3141;
  --gold: #f0b849;
  --discord: #5865f2;
  --green: #34d399;
  --shadow: rgba(0, 0, 0, 0.35);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 20%, rgba(240, 184, 73, 0.12), transparent 28rem),
    radial-gradient(circle at 82% 28%, rgba(52, 211, 153, 0.09), transparent 26rem),
    linear-gradient(140deg, #080a0f 0%, #11151d 52%, #0b1013 100%);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
}

.home-page {
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  min-height: 100svh;
  padding: 18px 28px 12px;
  overflow-x: hidden;
}

.home-shell {
  width: min(100%, 900px);
  min-width: 0;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(16px, 2.5vh, 26px);
  min-height: 0;
  text-align: center;
}

.hero-copy,
.guide-hero {
  min-width: 0;
}

.hero-copy {
  position: relative;
  isolation: isolate;
  width: 100%;
  padding: clamp(34px, 8vh, 76px) 0 clamp(12px, 3vh, 28px);
}

.banner-cloud {
  position: absolute;
  inset: 50% 50% auto auto;
  z-index: -2;
  width: min(100%, 980px);
  aspect-ratio: 16 / 5.8;
  overflow: hidden;
  opacity: 0.42;
  transform: translate(50%, -50%);
  filter: saturate(1.08) contrast(1.03);
  mask-image: radial-gradient(ellipse at center, #000 0%, #000 45%, transparent 76%);
}

.banner-cloud::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, transparent 0%, transparent 44%, var(--bg) 78%),
    radial-gradient(circle at 14% 12%, var(--bg) 0%, transparent 30%),
    radial-gradient(circle at 86% 88%, var(--bg) 0%, transparent 32%);
}

.banner-cloud img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apostles-icon {
  width: clamp(70px, 12vw, 112px);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3.6rem, 11vw, 8.4rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.tagline {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1.3rem, 3.6vw, 2.4rem);
  font-weight: 700;
}

.social-actions,
.link-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.social-actions {
  gap: 18px;
  margin-top: -18px;
  margin-bottom: 10px;
}

.link-groups {
  display: grid;
  gap: 14px;
  margin-top: 0;
}

.apply-section {
  width: min(100%, 760px);
  margin: 2px auto 4px;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.05;
}

.guild-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.guild-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(18, 22, 32, 0.78);
  padding: 15px 12px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.guild-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(240, 184, 73, 0.2), transparent 58%);
  opacity: 0.72;
  pointer-events: none;
}

.guild-card-primary {
  border-color: rgba(240, 184, 73, 0.42);
}

.guild-card:hover {
  border-color: rgba(240, 184, 73, 0.52);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.28),
    0 0 26px rgba(240, 184, 73, 0.12);
  transform: translateY(-3px);
}

.guild-card h3,
.guild-card p,
.guild-card strong {
  position: relative;
}

.guild-card h3 {
  margin: 0 0 7px;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
}

.guild-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.guild-card strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1;
}

.apply-action {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.group-title {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-weight: 900;
  min-width: 112px;
  justify-content: flex-end;
}

.primary-link,
.icon-link,
.step a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
}

.button-icon,
.primary-link svg,
.step a svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: currentColor;
}

.primary-link svg,
.step a svg,
.step a img {
  margin-right: 8px;
}

.primary-link .trailing-icon {
  margin-right: 0;
  margin-left: 8px;
}

.step a img {
  width: 19px;
  height: 19px;
  filter: invert(1);
}

.primary-link {
  background: var(--gold);
  color: #18130a;
}

.primary-link.apply-button {
  background: var(--green);
  color: #062017;
  min-width: min(100%, 260px);
}

.icon-link,
.topbar nav a,
.step a {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.icon-link {
  flex: 0 0 auto;
  width: 44px;
  padding: 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  aspect-ratio: 1;
  color: var(--text);
  text-decoration: none;
  transition:
    color 160ms ease,
    filter 160ms ease,
    transform 160ms ease;
}

.social-link svg,
.social-link img {
  width: 42px;
  height: 42px;
  fill: currentColor;
}

.social-link img {
  border-radius: 7px;
}

.social-link:hover {
  color: var(--discord);
  filter: drop-shadow(0 0 14px rgba(88, 101, 242, 0.45));
  transform: translateY(-2px) scale(1.04);
}

.hypixel-link:hover {
  filter: drop-shadow(0 0 14px rgba(240, 184, 73, 0.38));
}

.icon-link svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.icon-link img {
  width: 21px;
  height: 21px;
  filter: invert(1);
}

.modrinth-link {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.32);
}

.modrinth-link img {
  filter: invert(78%) sepia(27%) saturate(948%) hue-rotate(101deg)
    brightness(87%) contrast(87%);
}

.primary-link:hover,
.icon-link:hover,
.topbar nav a:hover,
.step a:hover,
.copy-field:hover {
  transform: translateY(-1px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100% - 32px, 1060px);
  margin: 0 auto;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 14px;
  font-size: 1.1rem;
  font-weight: 900;
  text-decoration: none;
}

.brand svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.topbar nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 7px;
  padding: 0;
  font-weight: 800;
  text-decoration: none;
}

.topbar nav .icon-link {
  width: auto;
  min-width: 44px;
  padding-right: 12px;
  padding-left: 12px;
}

.guide {
  width: min(100% - 32px, 880px);
  margin: 0 auto;
  padding: 48px 0 34px;
}

.guide-hero {
  margin-bottom: 34px;
}

.guide-hero h1 {
  max-width: 780px;
  font-size: clamp(2.7rem, 8vw, 6rem);
}

.guide-hero p {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.steps {
  display: grid;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 22, 32, 0.86);
  padding: 20px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.step-number {
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  border-radius: 7px;
  background: var(--panel-strong);
  color: var(--gold);
  font-weight: 900;
}

.step h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.step p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
}

.step .inline-link {
  display: inline;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gold);
  padding: 0;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row a {
  max-width: 100%;
  padding-right: 16px;
  padding-left: 16px;
}

.copy-field {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: min(100%, 360px);
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0 14px 0 16px;
}

.copy-field span {
  margin-right: auto;
}

.copy-field::after {
  content: "Copy";
  color: var(--muted);
  font-size: 0.84rem;
}

.copy-field[data-copied="true"] {
  border-color: rgba(52, 211, 153, 0.55);
}

.copy-field[data-copied="true"]::after {
  content: "Copied";
  color: var(--green);
}

.copy-field svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  margin-left: 6px;
}

.guide-image {
  display: block;
  width: min(100%, 720px);
  height: auto;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  image-rendering: pixelated;
}

.status-image {
  width: min(100%, 560px);
}

code {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.24);
  padding: 0.12em 0.32em;
  color: var(--text);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: min(100% - 32px, 1060px);
  margin: 0 auto;
  padding: 18px 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

.legal-page {
  width: min(100% - 32px, 860px);
  margin: 0 auto;
  padding: 62px 0 80px;
}

.legal-page h1 {
  font-size: clamp(2.7rem, 8vw, 6rem);
}

.legal-section {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 24px;
}

.legal-section h2 {
  margin: 0 0 10px;
}

.legal-section p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 720px) {
  .home-page {
    place-items: stretch;
    padding: 14px 16px 10px;
  }

  .hero {
    align-content: center;
    gap: 16px;
  }

  .hero-copy {
    padding: 22px 0 8px;
  }

  .banner-cloud {
    width: min(100%, 620px);
    aspect-ratio: 16 / 7.5;
    opacity: 0.34;
  }

  .apostles-icon {
    border-radius: 18px;
  }

  .social-actions,
  .link-groups,
  .link-group {
    width: 100%;
  }

  .social-actions {
    gap: 22px;
    margin-top: -12px;
    margin-bottom: 8px;
  }

  .group-title,
  .primary-link {
    width: 100%;
    justify-content: center;
  }

  .apply-section {
    width: 100%;
  }

  .guild-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .guild-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 13px 14px;
    text-align: left;
  }

  .guild-card h3 {
    margin: 0;
  }

  .guild-card p {
    grid-column: 1;
    margin-top: 3px;
  }

  .guild-card strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    margin: 0 0 0 12px;
  }

  .icon-link {
    width: 46px;
  }

  .social-link {
    width: 54px;
  }

  .social-link svg,
  .social-link img {
    width: 40px;
    height: 40px;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    width: min(100% - 24px, 1060px);
  }

  .topbar nav,
  .topbar nav a {
    width: auto;
  }

  .step {
    grid-template-columns: 1fr;
  }

  .brand {
    width: auto;
  }

  .copy-field {
    width: 100%;
  }

  h1 {
    font-size: clamp(3.3rem, 18vw, 5.6rem);
  }

  .tagline {
    font-size: clamp(1.1rem, 6vw, 1.65rem);
  }

  .guide {
    padding-top: 36px;
  }

  .button-row {
    width: 100%;
  }

  .button-row a {
    width: 100%;
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (max-height: 760px) and (min-width: 721px) {
  .home-page {
    padding-top: 12px;
  }

  .hero-copy {
    padding: 22px 0 18px;
  }

  .apostles-icon {
    width: 72px;
  }

  h1 {
    font-size: clamp(3.4rem, 10vw, 7rem);
  }

  .tagline {
    margin-top: 12px;
  }

  .site-footer {
    padding: 8px 0 6px;
  }
}
