:root {
  color-scheme: dark;
  --ink: #f5f0de;
  --muted: #c4bca3;
  --panel: rgba(12, 16, 12, 0.82);
  --panel-soft: rgba(21, 29, 19, 0.72);
  --line: rgba(255, 255, 255, 0.14);
  --gold: #f4c542;
  --red: #d94d3d;
  --green: #60b85a;
  --stone: #9fa397;
  --shadow: rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: #0e130d;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  min-height: 92svh;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(3, 8, 14, 0.06), rgba(7, 10, 6, 0.28) 56%, #0e130d 96%),
    linear-gradient(90deg, rgba(7, 11, 6, 0.55), rgba(7, 11, 6, 0.06) 44%, rgba(7, 11, 6, 0.44)),
    url("/assets/wycraft-adventure-bg.webp") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 22vh;
  background: linear-gradient(180deg, transparent, #0e130d);
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.corp-brand {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
}

.corp-brand img {
  display: block;
  width: clamp(132px, 18vw, 220px);
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.42));
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  background: rgba(4, 7, 4, 0.38);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.navlinks a {
  min-height: 40px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.navlinks a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 32px));
  min-height: calc(92svh - 92px);
  margin: 0 auto;
  padding: 7vh 0 16vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-logo {
  width: min(820px, 94vw);
  height: auto;
  margin: 18px auto 6px;
  filter: drop-shadow(0 20px 10px rgba(0, 0, 0, 0.75)) drop-shadow(0 34px 36px rgba(0, 0, 0, 0.58));
}

.hero-copy {
  max-width: 790px;
  margin: 0 auto;
  padding: 12px 16px;
  color: #fff7df;
  font-size: clamp(1.08rem, 2.1vw, 1.45rem);
  line-height: 1.48;
  font-weight: 700;
  background: rgba(7, 10, 6, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
  margin-top: 22px;
}

.secondary-action {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border: 2px solid #111;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 0 12px 0 #070907, 0 22px 34px rgba(0, 0, 0, 0.42);
}

.server-address {
  min-width: min(100%, 520px);
  padding: 0;
  border: 2px solid #111;
  background: rgba(9, 12, 7, 0.68);
  color: #191205;
  box-shadow: 0 12px 0 #070907, 0 22px 34px rgba(0, 0, 0, 0.42);
  text-align: left;
  overflow: hidden;
}

.server-address span {
  display: block;
  padding: 8px 14px;
  color: #fff7df;
  background: rgba(0, 0, 0, 0.48);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.server-address button {
  width: 100%;
  min-height: 62px;
  border: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, #ffe56a, var(--gold));
  color: #191205;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.server-address strong {
  display: block;
  font-size: clamp(1.25rem, 4.3vw, 2.15rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.server-address em {
  min-width: 78px;
  padding: 10px 12px;
  color: #fff7df;
  background: #11160e;
  border: 2px solid #000;
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.secondary-action {
  background: linear-gradient(180deg, #e1e7dd, var(--stone));
  color: #0f130e;
}

.secondary-action:hover {
  transform: translateY(-2px);
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 80px 0 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-grid article,
.join-panel,
.download-panel,
.rules,
.split {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent),
    var(--panel);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
}

.feature-grid article {
  padding: 24px;
}

.tile-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: #171f14;
  border: 1px solid rgba(244, 197, 66, 0.36);
  color: var(--gold);
  font-size: 1.3rem;
}

h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3.15rem);
  line-height: 1.02;
}

article h2 {
  font-size: clamp(1.35rem, 2.1vw, 1.8rem);
}

p {
  color: var(--muted);
  line-height: 1.58;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  align-items: center;
  padding: 38px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
}

.world-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.world-list span {
  padding: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  color: #f3ecd7;
  font-weight: 850;
}

.join-panel {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 24px;
  align-items: center;
  padding: 36px;
  background:
    linear-gradient(120deg, rgba(96, 184, 90, 0.28), rgba(217, 77, 61, 0.18)),
    var(--panel);
}

.modpack-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(96, 184, 90, 0.22), rgba(217, 77, 61, 0.16)),
    var(--panel);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
}

.mod-step {
  padding: 34px;
}

.mod-step + .mod-step {
  border-left: 1px solid var(--line);
}

.modrinth-link {
  min-height: 62px;
  margin-top: 20px;
  padding: 14px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #10140d;
  background: linear-gradient(180deg, #37f080, #10c965);
  border: 2px solid #06100a;
  box-shadow: 0 10px 0 #071108, 0 20px 30px rgba(0, 0, 0, 0.35);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 950;
  text-transform: uppercase;
}

.help-line {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px 34px;
  color: #fff4d0;
  background: rgba(0, 0, 0, 0.32);
  border-top: 1px solid var(--line);
  font-weight: 800;
}

.download-button {
  display: block;
}

.download-button img {
  display: block;
  width: min(100%, 390px);
  height: auto;
  margin-top: 16px;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.42));
}

.connect-box {
  padding: 22px;
  background: rgba(4, 7, 4, 0.58);
  border: 1px solid rgba(244, 197, 66, 0.34);
}

.connect-box span {
  display: block;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.connect-box strong {
  display: block;
  font-size: clamp(1.25rem, 3vw, 2rem);
  overflow-wrap: anywhere;
}

.connect-box a {
  display: block;
  color: #fff7df;
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  font-weight: 950;
  line-height: 1.14;
}

.rules {
  padding: 36px;
  margin-bottom: 80px;
}

.rule-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.rule-row span {
  color: var(--gold);
  font-weight: 950;
}

.rule-row p {
  margin: 0;
  color: #e7dec4;
  font-weight: 700;
}

footer {
  padding: 34px 16px 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: #080b07;
  border-top: 1px solid var(--line);
}

footer img {
  width: 170px;
  height: auto;
}

footer p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

footer span {
  color: #ff3f9d;
  text-shadow: 0 0 18px rgba(255, 63, 157, 0.72);
}

@media (max-width: 820px) {
  .topbar {
    flex-direction: column;
  }

  .navlinks {
    width: 100%;
    justify-content: center;
    overflow-x: auto;
  }

  .hero-inner {
    padding-top: 2vh;
  }

  .feature-grid,
  .split,
  .join-panel,
  .modpack-panel {
    grid-template-columns: 1fr;
  }

  .mod-step + .mod-step {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .split,
  .join-panel,
  .rules {
    padding: 24px;
  }

  .world-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero-actions {
    width: 100%;
  }

  .server-address,
  .secondary-action {
    width: 100%;
    min-height: 50px;
    font-size: 0.86rem;
  }

  .navlinks a {
    padding: 9px 10px;
    font-size: 0.7rem;
  }
}
