:root {
  --bg: #09090b;
  --surface: #111114;
  --surface-2: #17171b;
  --line: rgba(255, 255, 255, 0.1);
  --text: #fff7f3;
  --muted: #aaa4a3;
  --red: #f22945;
  --red-deep: #9d0b22;
  --red-dark: #42040d;
  --cream: #fff0e9;
  --radius: 22px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.checkout-privacy { color: var(--muted); font-size: .875rem; margin-bottom: 0; }
#checkout-email { margin-top: 8px; }
.username-panel label[for="checkout-email"] { display: block; margin-top: 20px; }
#checkout-status { color: var(--cream); margin-bottom: 0; }
#checkout-status:empty { display: none; }
.checkout-button:disabled { cursor: wait; opacity: .6; }

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 7%, rgba(242, 41, 69, 0.15), transparent 28rem),
    radial-gradient(circle at 4% 35%, rgba(157, 11, 34, 0.1), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 5vw;
  background: rgba(9, 9, 11, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.brand > span:last-child span,
.footer-brand span {
  color: var(--red);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: linear-gradient(145deg, var(--red), var(--red-deep));
  border-radius: 10px 4px 10px 4px;
  color: white;
  box-shadow: 0 8px 24px rgba(242, 41, 69, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: #c9c4c2;
  font-size: 0.9rem;
  font-weight: 600;
}

.main-nav a {
  position: relative;
  padding: 12px 0;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--red);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  padding: 9px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.section-shell {
  width: min(1180px, 90vw);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  gap: 7vw;
  align-items: center;
  min-height: calc(100vh - 76px);
  padding-top: 80px;
  padding-bottom: 90px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.05;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3.25rem, 8vw, 7.4rem);
  letter-spacing: -0.065em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 14px;
  font-size: 1.65rem;
}

.hero-lead {
  max-width: 660px;
  margin: 0 0 34px;
  color: #c5bfbd;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: stretch;
}

.primary-button,
.secondary-button,
.join-address,
.checkout-button {
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.primary-button,
.join-address {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 15px 22px;
  background: linear-gradient(135deg, var(--red), #c70d2a);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(242, 41, 69, 0.24);
  font-weight: 700;
}

.primary-button small,
.join-address small {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 500;
}

.secondary-button {
  display: grid;
  place-items: center;
  padding: 15px 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 700;
}

.primary-button:hover,
.secondary-button:hover,
.join-address:hover,
.checkout-button:hover {
  transform: translateY(-2px);
}

.secondary-button:hover {
  border-color: rgba(242, 41, 69, 0.65);
}

.server-facts {
  display: flex;
  gap: 34px;
  margin-top: 46px;
}

.server-facts div {
  display: flex;
  flex-direction: column;
}

.server-facts strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.server-facts span {
  color: var(--muted);
  font-size: 0.72rem;
}

.hero-art {
  position: relative;
  display: grid;
  width: min(420px, 78vw);
  aspect-ratio: 1;
  place-items: center;
  justify-self: center;
}

.hero-art::before {
  position: absolute;
  inset: 8%;
  content: "";
  background: radial-gradient(circle, rgba(242, 41, 69, 0.28), rgba(157, 11, 34, 0.05) 60%, transparent 72%);
  filter: blur(24px);
}

.portal-ring {
  position: absolute;
  border: 2px solid rgba(242, 41, 69, 0.45);
  box-shadow: inset 0 0 28px rgba(242, 41, 69, 0.12), 0 0 34px rgba(242, 41, 69, 0.15);
  transform: rotate(45deg);
}

.ring-one {
  inset: 9%;
  border-radius: 34% 14% 34% 14%;
  animation: drift 9s ease-in-out infinite;
}

.ring-two {
  inset: 21%;
  border-color: rgba(255, 240, 233, 0.28);
  border-radius: 16% 36% 16% 36%;
  animation: drift 7s ease-in-out infinite reverse;
}

.portal-core {
  position: relative;
  display: grid;
  width: 42%;
  aspect-ratio: 1;
  place-items: center;
  background: linear-gradient(145deg, #ff4961, #a20720 55%, #3a030b);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 26% 8% 26% 8%;
  box-shadow: 0 30px 70px rgba(157, 11, 34, 0.45), inset 0 0 30px rgba(255, 255, 255, 0.11);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  transform: rotate(45deg);
}

.portal-core::first-line {
  transform: rotate(-45deg);
}

.portal-core {
  color: transparent;
}

.portal-core::after {
  position: absolute;
  content: "LG";
  color: white;
  transform: rotate(-45deg);
}

.pixel {
  position: absolute;
  width: 12px;
  aspect-ratio: 1;
  background: var(--red);
  box-shadow: 0 0 20px rgba(242, 41, 69, 0.7);
  transform: rotate(45deg);
}

.pixel-one { top: 13%; right: 18%; }
.pixel-two { right: 8%; bottom: 26%; width: 7px; }
.pixel-three { bottom: 13%; left: 22%; width: 9px; }

@keyframes drift {
  0%, 100% { transform: rotate(45deg) scale(1); }
  50% { transform: rotate(48deg) scale(1.025); }
}

.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9vw;
  align-items: end;
  padding: 120px 0 70px;
  border-top: 1px solid var(--line);
}

.intro h2 {
  margin-bottom: 0;
}

.intro > p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 1.05rem;
}

.gamemodes {
  padding: 70px 0 130px;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 44px;
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--muted);
}

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

.mode-card {
  position: relative;
  min-height: 450px;
  padding: 30px;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mode-card::after {
  position: absolute;
  right: -30%;
  bottom: -35%;
  width: 260px;
  height: 260px;
  content: "";
  background: radial-gradient(circle, rgba(242, 41, 69, 0.17), transparent 66%);
}

.mode-number {
  color: #555157;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.mode-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 42px 0 30px;
  place-items: center;
  background: rgba(242, 41, 69, 0.11);
  border: 1px solid rgba(242, 41, 69, 0.28);
  border-radius: 16px;
  color: var(--red);
  font-size: 1.7rem;
}

.heart-icon {
  font-size: 2rem;
}

.mode-card > p {
  color: var(--muted);
}

.mode-card ul,
.rank-card ul {
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.mode-card li,
.rank-card li {
  position: relative;
  padding-left: 18px;
  margin: 8px 0;
  color: #d5cfcd;
  font-size: 0.88rem;
}

.mode-card li::before,
.rank-card li::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 6px;
  height: 6px;
  content: "";
  background: var(--red);
  transform: rotate(45deg);
}

.shop-section {
  padding: 120px 0;
  background:
    linear-gradient(rgba(9, 9, 11, 0.94), rgba(9, 9, 11, 0.94)),
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255, 255, 255, 0.04) 22px 23px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.shop-heading {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.username-panel {
  max-width: 720px;
  padding: 22px;
  margin: 0 auto 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.username-panel label {
  display: block;
  margin-bottom: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.username-row {
  display: flex;
  gap: 14px;
  align-items: center;
}

.username-row input {
  flex: 1;
  min-width: 0;
  padding: 13px 15px;
  background: #0b0b0e;
  border: 1px solid #343239;
  border-radius: 10px;
  color: var(--text);
  outline: none;
}

.username-row input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(242, 41, 69, 0.12);
}

.username-row span {
  min-width: 150px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.username-row span.valid {
  color: #74db91;
}

.username-row span.invalid {
  color: #ff7889;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.rank-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 490px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.16);
}

.rank-card::before {
  position: absolute;
  top: 0;
  right: 24px;
  left: 24px;
  height: 2px;
  content: "";
  background: var(--rank-colour);
  box-shadow: 0 0 16px var(--rank-colour);
}

.rank-emerald { --rank-colour: #43d17c; }
.rank-diamond { --rank-colour: #70d8ff; }
.rank-legend { --rank-colour: #ffc64b; }
.rank-champion { --rank-colour: #ff334f; }

.featured-rank {
  border-color: var(--rank-colour);
  transform: translateY(-12px);
}

.rank-legend .popular-label {
  background: var(--rank-colour);
  color: #201506;
}

.popular-label {
  position: absolute;
  top: -13px;
  right: 22px;
  padding: 5px 10px;
  background: var(--red);
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.rank-topline {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--rank-colour);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.rank-gem {
  filter: drop-shadow(0 0 8px var(--rank-colour));
}

.price {
  display: flex;
  align-items: flex-start;
  margin: 28px 0 20px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}

.price > span {
  margin: 7px 4px 0 0;
  color: var(--rank-colour);
  font-size: 1.2rem;
  letter-spacing: 0;
}

.price small {
  margin: 12px 0 0 9px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.rank-card > p {
  min-height: 70px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.rank-card ul {
  margin-bottom: 26px;
}

.rank-card li::before {
  background: var(--rank-colour);
}

.checkout-button {
  width: 100%;
  padding: 13px 16px;
  margin-top: auto;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--rank-colour) 58%, transparent);
  border-radius: 10px;
  color: var(--text);
  font-weight: 700;
}

.checkout-button:hover {
  background: color-mix(in srgb, var(--rank-colour) 12%, transparent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--rank-colour) 12%, transparent);
}

.shop-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
  max-width: 930px;
  padding: 22px 24px;
  margin: 42px auto 0;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.shop-note strong {
  white-space: nowrap;
}

.shop-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.join-section {
  display: flex;
  gap: 50px;
  align-items: center;
  justify-content: space-between;
  padding-top: 130px;
  padding-bottom: 130px;
}

.join-section > div {
  max-width: 660px;
}

.join-section h2 {
  margin-bottom: 12px;
}

.join-section p:last-child {
  margin: 0;
  color: var(--muted);
}

.join-address {
  min-width: 280px;
}

footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 34px 5vw;
  background: #060607;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
  color: #777276;
  font-size: 0.72rem;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 20px;
  color: #aaa4a3;
  font-size: 0.78rem;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--red);
}

.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  max-width: min(380px, calc(100vw - 44px));
  padding: 13px 17px;
  background: #f7efeb;
  border-radius: 10px;
  color: #201b1d;
  box-shadow: var(--shadow);
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1000px) {
  .rank-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-rank {
    transform: none;
  }
}

@media (max-width: 820px) {
  .menu-button {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 76px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    padding: 16px 5vw 22px;
    background: rgba(9, 9, 11, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 11px 0;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 70px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-lead {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-actions,
  .server-facts {
    justify-content: center;
  }

  .hero-art {
    grid-row: 1;
    width: min(320px, 70vw);
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .mode-card {
    min-height: 0;
  }

  .mode-icon {
    margin: 28px 0 22px;
  }

  .join-section {
    flex-direction: column;
    align-items: flex-start;
  }

  footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand,
  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 570px) {
  .site-header {
    padding: 0 20px;
  }

  .brand > span:last-child {
    font-size: 0.87rem;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.4rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    align-items: center;
  }

  .server-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

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

  .username-row {
    flex-direction: column;
    align-items: stretch;
  }

  .username-row span {
    min-width: 0;
    text-align: left;
  }

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

  .join-address {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
