:root {
  --nav-h: 62px;
  --banner-h: 38px;
  --bg: #070c18;
  --navy-900: #0a1122;
  --navy-800: #0f182c;
  --gold: #f6c04a;
  --gold-hi: #ffd876;
  --gold-lo: #e7a52f;
  --cream: #f1dfb0;
  --text: #ece8de;
  --muted: #b6b1a4;
  --rule: rgba(205, 162, 86, 0.55);
  --discord-line: rgba(150, 182, 240, 0.8);
  --font: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--banner-h));
}

/* Set by main.js once the playtest is over and the banner is removed. */
html.no-banner {
  --banner-h: 0px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}

/* ---------- Playtest banner ---------- */

.announce {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--banner-h);
  background: linear-gradient(90deg, #7c300d 0%, #a8471a 50%, #7c300d 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
  color: #fff2e0;
}

.announce__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  margin: 0;
  padding: 0 16px;
  white-space: nowrap;
}

.announce__label {
  color: #ffd27a;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.announce.is-live .announce__label {
  color: #fff;
}

.announce.is-live .announce__label::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 8px 1px 0;
  border-radius: 50%;
  background: #ff5a4a;
  vertical-align: middle;
}

.announce__sep {
  color: rgba(255, 214, 160, 0.5);
  font-size: 11px;
}

.announce__dates {
  font-size: 15px;
  font-weight: 800;
}

.announce__count {
  color: rgba(255, 238, 215, 0.88);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: var(--banner-h) 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  /* Logo left, links and Store centred on the page, Search and Sign In right. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 24px;
  padding: 0 26px;
  background: linear-gradient(180deg, rgba(14, 21, 39, 0.97) 0%, rgba(8, 13, 27, 0.97) 100%);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 10px 30px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(205, 162, 86, 0.05), rgba(205, 162, 86, 0.4) 18%, rgba(205, 162, 86, 0.08) 60%);
}

.nav__brand {
  flex: none;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding-right: 6px;
}

/* Red hanko seal stamped next to the wordmark. */
.nav__seal {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  background: radial-gradient(circle at 35% 30%, #d8382a, #a91d16 75%);
  color: #fde9cf;
  font: 900 16px/1 "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  box-shadow: inset 0 0 0 1.5px rgba(255, 232, 205, 0.55), 0 2px 6px rgba(0, 0, 0, 0.5);
  transform: rotate(-7deg);
  transition: transform 0.3s ease;
}

.nav__brand:hover .nav__seal {
  transform: rotate(0deg) scale(1.08);
}

.nav__brand img {
  flex: none;
  height: 52px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.nav__brand:hover img {
  transform: scale(1.04);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 10px rgba(246, 192, 74, 0.35));
}

/* On desktop the menu's two groups sit directly in the nav grid; on small screens it becomes the drawer. */
.nav__menu {
  display: contents;
}

.nav__center {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav__links {
  display: flex;
  align-items: center;
  height: 44px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  background: none;
  color: #ebe7dd;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
}

.ico {
  flex: none;
  width: 19px;
  height: 19px;
}

.nav__link .ico {
  color: #e4e4ea;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav__link.is-active .ico,
.nav__link:hover .ico {
  color: var(--gold);
}

.nav__link:hover {
  color: #fff;
}

.nav__link:hover .ico {
  transform: translateY(-1px);
}

.nav__link .ico--spin {
  transition: color 0.2s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.nav__link:hover .ico--spin,
.nav__drop.is-open .ico--spin {
  transform: rotate(270deg);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.nav__link:hover::after,
.nav__link.is-active::after {
  opacity: 0.8;
  transform: scaleX(1);
}

.nav__chev {
  margin-left: 4px;
  font-size: 11px !important;
  color: #a9abb4 !important;
}

.nav__drop {
  position: relative;
}

.nav__dropmenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 6px;
  min-width: 190px;
  padding: 6px;
  background: rgba(9, 15, 30, 0.98);
  border: 1px solid rgba(205, 162, 86, 0.35);
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.nav__drop:hover .nav__dropmenu,
.nav__drop:focus-within .nav__dropmenu,
.nav__drop.is-open .nav__dropmenu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav__dropmenu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  color: #e3dfd4;
}

.nav__dropmenu a .ico {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

.nav__dropmenu a:hover {
  background: rgba(246, 192, 74, 0.1);
  color: #fff;
}

.btn-store {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 32px 0 15px;
  border: 1px solid #ffe39c;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffd66c 0%, #f7c14a 50%, #efaf33 100%);
  color: #1c1405;
  font-size: 16px;
  font-weight: 800;
  box-shadow:
    0 0 22px rgba(246, 184, 64, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(150, 92, 8, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-store:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 0 30px rgba(246, 184, 64, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -2px 0 rgba(150, 92, 8, 0.25);
}

.btn-store__ryo {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 1px 1.5px rgba(70, 35, 0, 0.45));
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* The Ryo coin flips once on hover. */
.btn-store:hover .btn-store__ryo {
  transform: rotateY(360deg);
}

.nav__right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
}

.nav__search {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 194px;
  height: 44px;
  padding: 0 14px 0 16px;
  background: rgba(4, 8, 17, 0.85);
  border: 1px solid rgba(160, 170, 192, 0.2);
  border-radius: 3px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav__search:focus-within {
  border-color: rgba(246, 192, 74, 0.6);
  box-shadow: 0 0 0 3px rgba(246, 192, 74, 0.12);
}

.nav__search i {
  font-size: 16px;
  color: #9097a3;
}

.nav__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: 600 16px var(--font);
}

.nav__search input::placeholder {
  color: #898e99;
}

.btn-signin {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 44px;
  padding: 0 28px 0 26px;
  background: rgba(4, 8, 17, 0.6);
  border: 1px solid rgba(214, 200, 170, 0.32);
  border-radius: 3px;
  color: #f4ebd8;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-signin i {
  font-size: 17px;
}

.btn-signin:hover {
  border-color: rgba(246, 192, 74, 0.7);
  background: rgba(246, 192, 74, 0.08);
}

.nav__burger {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 11px 10px;
  border: 1px solid rgba(214, 200, 170, 0.32);
  border-radius: 3px;
  background: rgba(4, 8, 17, 0.6);
  cursor: pointer;
}

.nav__burger span {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--cream);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav.is-open .nav__burger span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav.is-open .nav__burger span:nth-child(2) {
  opacity: 0;
}

.nav.is-open .nav__burger span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: max(660px, calc(100svh - 25px));
  padding-top: calc(var(--nav-h) + var(--banner-h));
  overflow: hidden;
  background: #0b1120;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  height: 2px;
  background: linear-gradient(90deg, rgba(205, 150, 60, 0.15) 0%, rgba(214, 160, 70, 0.55) 30%, #f7c35c 50%, rgba(214, 160, 70, 0.55) 70%, rgba(205, 150, 60, 0.15) 100%);
  box-shadow: 0 0 18px 1px rgba(246, 184, 64, 0.35);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}

.hero__poster,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  filter: saturate(1.2) contrast(1.05);
}

.hero__video {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero.is-playing .hero__video {
  opacity: 1;
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(40% 56% at 50% 52%, rgba(10, 17, 36, 0.62) 0%, rgba(10, 17, 36, 0.36) 55%, rgba(10, 17, 36, 0) 100%),
    linear-gradient(180deg, rgba(6, 10, 22, 0.5) 0%, rgba(6, 10, 22, 0.04) 20%, rgba(6, 10, 22, 0) 60%, rgba(6, 10, 22, 0.86) 100%),
    linear-gradient(90deg, rgba(5, 8, 18, 0.3) 0%, rgba(5, 8, 18, 0) 18%, rgba(5, 8, 18, 0) 82%, rgba(5, 8, 18, 0.2) 100%),
    /* overall tint: a navy wash so the video sits darker, like the mockup */
    rgba(10, 16, 36, 0.34);
}

.hero__sparks {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: calc(76px - var(--banner-h) * 0.6) 24px 112px;
  text-align: center;
}

.hero__eyebrow,
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 0;
  color: var(--cream);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.hero__eyebrow::before,
.hero__eyebrow::after,
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 62px;
  height: 2px;
}

/* Tapered rules: a fine point on the outside, widening towards the words. */
.hero__eyebrow::before,
.eyebrow::before {
  background: linear-gradient(90deg, rgba(241, 223, 176, 0), rgba(241, 223, 176, 0.8));
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

.hero__eyebrow::after,
.eyebrow::after {
  background: linear-gradient(270deg, rgba(241, 223, 176, 0), rgba(241, 223, 176, 0.8));
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* "your" is the emphasis: gold with a soft glow. */
.hero__eyebrow em {
  margin: 0 0.06em;
  font-size: 1.3em;
  font-style: normal;
  font-weight: 900;
  color: #ffbf2e;
  text-shadow: 0 0 14px rgba(255, 176, 40, 0.75), 0 0 2px rgba(255, 220, 140, 0.9), 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* The logo image carries its own baked bolt glow, so it has a transparent margin.
   --logo-w is the image width; the negative block margins cancel the extra margin in the layout. */
.hero__logo {
  --logo-w: min(652px, 35.2vw, calc((100svh - 400px - var(--banner-h)) * 1.43));
  position: relative;
  width: var(--logo-w);
  min-width: 310px;
  margin: calc(6px - var(--logo-w) * 0.0093) 0 calc(var(--logo-w) * -0.0093);
  line-height: 0;
  animation: logo-float 7s ease-in-out infinite;
}

.hero__logo::before {
  content: "";
  position: absolute;
  inset: 14% 10% 12%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(60, 130, 255, 0.3), rgba(45, 105, 255, 0.12) 55%, rgba(40, 90, 255, 0) 100%);
  filter: blur(14px);
  animation: aura-breathe 4.8s ease-in-out infinite;
}

.hero__logo img {
  position: relative;
  width: 100%;
  height: auto;
}

/* Chakra particles drawn around the logo; larger than the logo so they can drift out of it. */
.hero__logo-fx {
  position: absolute;
  top: -18%;
  left: -14%;
  width: 128%;
  height: 136%;
  pointer-events: none;
}

@keyframes aura-breathe {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(0.97);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes logo-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.hero__lead {
  max-width: 720px;
  margin: -6px 0 0;
  color: #e6e2d9;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.58;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

.hero__lead strong {
  color: var(--gold);
  font-weight: 800;
}

/* "Hytale" opens hytale.com: the H emblem, a soft blue from the emblem's runes and a faint arrow. No box. */
.hytale-link {
  color: #a9bcff;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s ease;
}

.hytale-link img {
  display: inline-block;
  width: auto;
  height: 19px;
  margin-right: 4px;
  vertical-align: -3px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.hytale-link i {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.65;
  vertical-align: 2px;
  transition: opacity 0.2s ease;
}

.hytale-link:hover {
  color: #d3dcff;
  text-decoration: underline;
  text-decoration-color: rgba(169, 188, 255, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.hytale-link:hover i {
  opacity: 1;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.btn-primary,
.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  border-radius: 3px;
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease, background 0.2s ease;
}

.btn-primary {
  gap: 18px;
  min-width: 260px;
  padding: 0 34px;
  border: 1px solid #ffe39c;
  background: linear-gradient(180deg, #ffd56a 0%, #f8c34b 50%, #f0b136 100%);
  color: #1c1405;
  font-size: 19px;
  font-weight: 800;
  box-shadow:
    0 0 34px rgba(246, 184, 64, 0.45),
    0 8px 22px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 0 rgba(150, 92, 8, 0.22);
}

.btn-primary i {
  font-size: 19px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 0 46px rgba(246, 184, 64, 0.65),
    0 12px 26px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -3px 0 rgba(150, 92, 8, 0.22);
}

.btn-discord {
  gap: 14px;
  min-width: 226px;
  padding: 0 30px;
  border: 1.5px solid var(--discord-line);
  background: rgba(10, 22, 52, 0.84);
  color: #f2f4fa;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), inset 0 0 18px rgba(88, 124, 220, 0.12);
}

.btn-discord i {
  font-size: 23px;
  letter-spacing: 0;
}

.btn-discord:hover {
  transform: translateY(-2px);
  background: rgba(88, 101, 242, 0.32);
  box-shadow: 0 0 28px rgba(88, 101, 242, 0.45), 0 10px 24px rgba(0, 0, 0, 0.4);
}

/* Server plate: address and player count on one slim plate; clicking copies the address. */
.server-ip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  margin-top: 28px;
  padding: 0 15px 0 12px;
  border: 1px solid rgba(241, 223, 176, 0.13);
  border-radius: 999px;
  background: rgba(6, 11, 24, 0.32);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.server-ip:hover {
  border-color: rgba(246, 192, 74, 0.4);
  background: rgba(6, 11, 24, 0.45);
}

.server-ip__leaf {
  width: 17px;
  height: 17px;
  color: #93c4ff;
  animation: chakra-pulse 2.6s ease-in-out infinite;
}

@keyframes chakra-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 3px rgba(110, 170, 255, 0.6));
    opacity: 0.85;
  }
  50% {
    filter: drop-shadow(0 0 9px rgba(120, 180, 255, 1));
    opacity: 1;
  }
}

.server-ip__addr {
  min-width: 8.5em;
  color: #e9dfc8;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: left;
}

.server-ip.is-copied .server-ip__addr {
  color: var(--gold-hi);
}

.server-ip__divider {
  width: 1px;
  height: 18px;
  background: rgba(241, 223, 176, 0.3);
}

.server-ip__count {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.server-ip__count b {
  color: var(--gold);
  font-weight: 800;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  transform: translateX(-50%);
  color: #e8d3a0;
  transition: color 0.2s ease;
}

.hero__scroll:hover {
  color: var(--gold-hi);
}

.hero__scroll-label {
  /* Letter spacing also trails the last letter; pad the left so the text stays centred over the arrow. */
  padding-left: 0.27em;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.27em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero__scroll-arrow {
  font-size: 20px;
  color: var(--gold);
  filter: drop-shadow(0 0 6px rgba(246, 192, 74, 0.45));
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.85;
  }
  50% {
    transform: translateY(6px);
    opacity: 1;
  }
}

/* ---------- Recent featured content (carousel) ---------- */

.featured {
  --card-w: min(900px, 86vw);
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  background:
    radial-gradient(46% 60% at 50% 55%, rgba(246, 184, 64, 0.09), transparent 70%),
    linear-gradient(180deg, #070c19 0%, #090f1f 100%);
}

.featured__title {
  display: flex;
  align-items: center;
  gap: 14px;
  width: calc(var(--card-w) + 40px);
  margin: 0 auto;
  color: #fff3d9;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.featured__title::before {
  content: "";
  flex: none;
  width: 4px;
  height: 26px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo));
  box-shadow: 0 0 10px rgba(246, 192, 74, 0.6);
}

.carousel {
  margin-top: 44px;
  outline: none;
}

.carousel__track {
  position: relative;
  width: var(--card-w);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  touch-action: pan-y;
}

.slide {
  --off: 0;
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1.5px solid rgba(205, 162, 86, 0.25);
  border-radius: 16px;
  background: #0a1122;
  transform: translateX(calc(var(--off) * 50%)) scale(0.7);
  opacity: 0;
  filter: brightness(0.32) saturate(0.7);
  transition:
    transform 0.75s cubic-bezier(0.22, 0.75, 0.2, 1),
    opacity 0.75s ease,
    filter 0.75s ease,
    border-color 0.75s ease,
    box-shadow 0.75s ease;
}

.slide.no-anim {
  transition: none;
}

.slide.is-side {
  z-index: 1;
  opacity: 1;
  transform: translateX(calc(var(--off) * 50%)) scale(0.82);
  cursor: pointer;
}

.slide.is-center {
  z-index: 2;
  opacity: 1;
  filter: none;
  transform: none;
  border-color: rgba(246, 192, 74, 0.85);
  box-shadow:
    0 0 0 1px rgba(246, 192, 74, 0.15),
    0 0 38px rgba(246, 184, 64, 0.28),
    0 24px 60px rgba(0, 0, 0, 0.55);
}

/* Thin inner frame, like a scroll's border. */
.slide::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 2;
  border: 1px solid rgba(241, 223, 176, 0.16);
  border-radius: 8px;
  pointer-events: none;
}

.slide__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  transition: transform 6s ease;
}

.slide.is-center .slide__img {
  transform: scale(1.04);
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(5, 9, 20, 0.95) 0%, rgba(5, 9, 20, 0.6) 34%, rgba(5, 9, 20, 0) 62%),
    linear-gradient(90deg, rgba(5, 9, 20, 0.55) 0%, rgba(5, 9, 20, 0) 55%);
}

.slide__body {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 30px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.slide__tag {
  padding: 5px 10px;
  border: 1px solid rgba(246, 192, 74, 0.5);
  border-radius: 4px;
  background: rgba(246, 192, 74, 0.16);
  color: var(--gold-hi);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.slide__title {
  margin: 12px 0 0;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.15;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.slide__text {
  max-width: 640px;
  margin: 10px 0 0;
  color: #e6e2d9;
  font-size: 16px;
  line-height: 1.55;
}

.slide__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  margin-top: 18px;
  padding: 0 20px;
  border: 1px solid #ffe39c;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffd66c 0%, #f7c14a 50%, #efaf33 100%);
  color: #1c1405;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 0 22px rgba(246, 184, 64, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slide__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(246, 184, 64, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.slide__cta i {
  font-size: 13px;
  transition: transform 0.2s ease;
}

.slide__cta:hover i {
  transform: translateX(3px);
}

.carousel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}

.carousel__dot {
  position: relative;
  width: 10px;
  height: 10px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(214, 214, 224, 0.35);
  cursor: pointer;
  transition: width 0.4s ease, background 0.3s ease;
}

.carousel__dot:hover {
  background: rgba(214, 214, 224, 0.6);
}

.carousel__dot.is-active {
  width: 32px;
  background: rgba(246, 192, 74, 0.3);
}

/* The active dot fills up while the slide is shown; when it is full the carousel moves on. */
.carousel__dot-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi));
}

.carousel__dot.is-active .carousel__dot-fill {
  width: 100%;
}

.carousel.is-autoplay .carousel__dot.is-active .carousel__dot-fill {
  width: 0;
  animation: dot-fill var(--autoplay, 6.5s) linear forwards;
}

.carousel.is-paused .carousel__dot.is-active .carousel__dot-fill {
  animation-play-state: paused;
}

@keyframes dot-fill {
  to {
    width: 100%;
  }
}

/* ---------- Realms ---------- */

.realms {
  position: relative;
  padding: 110px 24px 120px;
  text-align: center;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(246, 192, 74, 0.08), transparent 70%),
    linear-gradient(180deg, #080d1b 0%, var(--bg) 100%);
}

.realms__title {
  margin: 18px 0 0;
  color: #fff6e2;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.realms__grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: 18px;
  max-width: 1240px;
  margin: 48px auto 0;
  text-align: left;
}

/* A realm is a panel over a frame from the game, darkened where the text sits. */
.realm {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  min-height: 360px;
  background: #0b1224;
  border: 1px solid rgba(205, 162, 86, 0.28);
  border-radius: 3px;
}

.realm__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  filter: saturate(1.1);
}

.realm::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(7, 12, 24, 0.96) 0%, rgba(7, 12, 24, 0.7) 38%, rgba(7, 12, 24, 0.05) 100%);
}

.realm__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
  padding: 28px 30px;
}

.realm__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.realm h3 {
  margin: 0;
  color: #fff3d9;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* Square status chip: gold once played, plain while it is still being built. */
.realm__state {
  padding: 5px 10px;
  border: 1px solid rgba(214, 200, 170, 0.35);
  border-radius: 2px;
  color: #d9d3c4;
  font-size: 13.5px;
  font-weight: 800;
}

.realm__state--done {
  border-color: #ffe39c;
  background: linear-gradient(180deg, #ffd66c, #efaf33);
  color: #1c1405;
}

.realm__line {
  max-width: 46ch;
  margin: 0;
  color: #cfd3dd;
  font-size: 16.5px;
  line-height: 1.55;
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 24px 46px;
  border-top: 1px solid rgba(205, 162, 86, 0.25);
  background: #050912;
  color: #7f8492;
  font-size: 14px;
}

.footer img {
  height: 46px;
  width: auto;
  opacity: 0.9;
}

.footer p {
  margin: 0;
}

/* ---------- Responsive ---------- */

/* The links stay centred only while each side column can hold Search and Sign In, so tighten first,
   then switch to the menu button. */
@media (max-width: 1600px) {
  .nav__link {
    padding: 0 15px;
  }

  .nav__search {
    width: 150px;
  }
}

@media (max-width: 1500px) {
  .nav__link {
    padding: 0 12px;
  }

  .nav__search {
    width: 130px;
  }

  .btn-signin {
    padding: 0 22px;
  }
}

@media (max-width: 1420px) {
  .nav__link {
    gap: 8px;
    padding: 0 10px;
  }

  .nav__center {
    gap: 14px;
  }

  .nav__search {
    width: 120px;
  }
}

@media (max-width: 1360px) {
  .nav {
    display: flex;
    gap: 18px;
  }

  .nav__burger {
    display: block;
  }

  .nav__menu {
    display: flex;
    position: fixed;
    top: calc(var(--nav-h) + var(--banner-h));
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    max-height: calc(100svh - var(--nav-h) - var(--banner-h));
    padding: 16px;
    overflow-y: auto;
    background: rgba(8, 13, 27, 0.98);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .nav.is-open .nav__menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__center {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .nav__links {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 6px;
  }

  .nav__link {
    width: 100%;
  }

  .nav__link::after {
    display: none;
  }

  .nav__dropmenu {
    position: static;
    display: none;
    margin: 0 0 6px 30px;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
  }

  .nav__drop.is-open .nav__dropmenu {
    display: block;
  }

  .btn-store {
    justify-content: center;
  }

  .nav__right {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
  }

  .nav__search {
    width: 100%;
  }

  .btn-signin {
    justify-content: center;
  }
}

@media (max-width: 1140px) {
  .hero__logo {
    --logo-w: min(571px, 63vw, calc((100svh - 400px - var(--banner-h)) * 1.43));
  }

  .realms__grid {
    grid-template-columns: 1fr;
    max-width: 720px;
  }

  .realm {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-h: 58px;
  }

  .nav {
    padding: 0 16px;
  }

  .nav__brand img {
    height: 46px;
  }

  .hero {
    min-height: 100svh;
  }

  .hero__content {
    padding: 36px 16px 110px;
  }

  .hero__eyebrow {
    gap: 10px;
    font-size: 12px;
    letter-spacing: 0.2em;
    white-space: nowrap;
  }

  .hero__eyebrow::before,
  .hero__eyebrow::after {
    width: 22px;
  }

  .hero__logo {
    --logo-w: min(94vw, 448px);
    min-width: 0;
  }

  .hero__lead {
    font-size: 17px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
    gap: 12px;
  }

  .btn-primary,
  .btn-discord {
    min-width: 0;
    width: 100%;
  }

  .server-ip {
    gap: 9px;
    height: 34px;
    padding: 0 13px 0 11px;
    font-size: 14px;
  }

  .realms {
    padding: 80px 16px 90px;
  }
}

/* Carousel on tablets and phones: taller cards on phones so the text has room. */
@media (max-width: 900px) {
  .slide__title {
    font-size: 24px;
  }

  .slide__text {
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .featured {
    --card-w: 90vw;
    padding: 56px 0 48px;
  }

  .featured__title {
    width: var(--card-w);
    gap: 10px;
    font-size: 18px;
    letter-spacing: 0.03em;
  }

  .featured__title::before {
    height: 20px;
  }

  /* Only slivers of the side cards show on a phone; their text would just be clutter. */
  .slide.is-side .slide__body {
    opacity: 0;
  }

  .carousel {
    margin-top: 30px;
  }

  .carousel__track {
    aspect-ratio: 4 / 5;
  }

  .slide__body {
    left: 22px;
    right: 22px;
    bottom: 24px;
  }

  .slide__tag {
    font-size: 11px;
  }

  .slide__title {
    font-size: 22px;
  }

  .slide__text {
    font-size: 14.5px;
  }

  .slide__cta {
    height: 38px;
    margin-top: 14px;
    font-size: 14px;
  }
}

/* Banner on phones: slightly smaller text so the line still fits. */
@media (max-width: 480px) {
  .announce__inner {
    gap: 8px;
    padding: 0 10px;
  }

  .announce__label {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .announce__dates {
    font-size: 13.5px;
  }

  .announce__count {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
