:root {
  --bg: #070607;
  --raise: #121014;
  --ink: #f6f1ea;
  --muted: #b7aea6;
  --line: rgba(246, 241, 234, 0.12);
  --red: #e10600;
  --red-deep: #8d120c;
  --sand: #f3efe8;
  --sand-ink: #1a120f;
  --amethyst: #c9a6f5;
  --amethyst-deep: #241c30;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(225, 6, 0, 0.28), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 380;
  font-size: 1.05rem;
  line-height: 1.5;
}

a { color: inherit; }

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

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 0.8rem 5vw;
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(7, 6, 7, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mark img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover { color: var(--ink); }

main { padding: 0 5vw 4.5rem; }

.hero, .info, .rules, .staff, .tiktok, .store { scroll-margin-top: 5.2rem; }

.hero { padding: 1.6rem 0 2.4rem; }

.hero-art {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(225, 6, 0, 0.45);
  box-shadow: 0 30px 80px rgba(225, 6, 0, 0.18);
}

.hero-panel { max-width: 42rem; margin-top: 1.6rem; }

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--red);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

h1, h2, h3 { letter-spacing: -0.03em; line-height: 0.98; }

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 700;
  max-width: 12ch;
}

h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }

h3 { margin: 0 0 0.35rem; font-size: 1.35rem; font-weight: 700; }

.lede {
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.lede a { color: var(--sand); }

.join {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "label address" ". hint";
  gap: 0.25rem 0.8rem;
  align-items: center;
  width: min(100%, 28rem);
  margin-top: 1.4rem;
}

.join-label {
  grid-area: label;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.join-address {
  grid-area: address;
  justify-self: start;
  border: 0;
  background: var(--red);
  color: white;
  font: inherit;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.join-address:hover { filter: brightness(1.08); }

.join-hint {
  grid-area: hint;
  color: var(--muted);
  font-size: 0.85rem;
}

.version {
  color: var(--muted);
  font-size: 0.95rem;
}

.info, .rule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.info { padding-bottom: 2.4rem; border-bottom: 1px solid var(--line); }

.info article, .rule-grid article {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem 1.2rem;
}

.info p, .rule-grid p, .fine {
  margin: 0;
  color: var(--muted);
}

.info strong { color: var(--ink); font-weight: 700; }

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color: var(--sand);
  font-size: 0.95em;
}

.rules, .staff, .tiktok, .store { padding-top: 3rem; }

.staff-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.staff-list article {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem 1.2rem;
}

.staff-list p { margin: 0; color: var(--muted); }

.info .text-link { display: inline-block; margin-top: 0.55rem; }

.section-head { margin-bottom: 1.3rem; }

.rule-grid { padding-bottom: 0.4rem; }

.tiktok-follow {
  display: inline-block;
  margin: 0.2rem 0 1rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: #f6f1ea;
  color: #111;
  text-decoration: none;
  font-weight: 700;
}

.tiktok-follow:hover { filter: brightness(1.06); }

.tiktok-frame iframe {
  width: min(100%, 460px);
  height: 740px;
  border: 0;
  border-radius: 16px;
  background: #fff;
}

.store .banner, .form-error {
  border: 1px solid var(--line);
  background: var(--raise);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  margin: 1.2rem 0;
}

.store .banner.warn { border-color: var(--red); }

.form-error:empty { display: none; }

.form-error { color: #ffb4a8; border-color: var(--red); }

.name-field {
  display: block;
  max-width: 24rem;
  margin: 1.3rem 0 1.5rem;
}

.name-field span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.name-field input {
  width: 100%;
  background: var(--raise);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 1.25rem;
  padding: 0.7rem 0.85rem;
}

.name-field input:focus {
  outline: none;
  border-color: var(--red);
}

.ranks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.rank {
  padding: 1.2rem 1.2rem 1.3rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
}

.rank.supporter { background: var(--sand); color: var(--sand-ink); }
.rank.amethyst { background: var(--amethyst-deep); color: var(--ink); border: 1px solid rgba(201, 166, 245, 0.5); }
.rank.netherite {
  background: #100e0e;
  color: var(--ink);
  border: 1px solid rgba(225, 6, 0, 0.55);
}

.rank-index {
  margin: 0;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  opacity: 0.7;
}

.rank h3 { margin: 0.35rem 0 0; font-size: 2rem; }

.price {
  margin: 0.25rem 0 0.8rem;
  font-size: 2rem;
  font-weight: 700;
}

.rank ul {
  margin: 0 0 1.2rem;
  padding-left: 1.1rem;
  flex: 1;
}

.rank li { margin: 0.25rem 0; }

.rank button {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 0.8rem;
  border-radius: 999px;
}

.supporter button { background: var(--sand-ink); color: var(--sand); }
.amethyst button { background: var(--amethyst); color: #24182f; }
.netherite button { background: var(--red); color: white; }

.rank button:hover { filter: brightness(1.08); }
.rank button:disabled { opacity: 0.6; cursor: wait; }

.fine { margin-top: 1.2rem; font-size: 0.92rem; }

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  padding: 1.2rem 5vw 2rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer a { color: var(--muted); }

.done {
  padding: 4rem 0 6rem;
  max-width: 40rem;
}

.done h1 { max-width: 14ch; font-size: clamp(2.6rem, 6vw, 4.4rem); }

.text-link { color: #ffb4a8; }

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

@media (max-width: 900px) {
  .info, .rule-grid, .ranks, .staff-list { grid-template-columns: 1fr; }
  h1 { max-width: none; }
  .bar { align-items: flex-start; flex-direction: column; }
}

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