/* Layout: one full-screen hero (copy left, the live menu tilted over the key art right), then a feature index built from menu cards. */
@font-face { font-family: "Sansation"; src: url("fonts/Sansation-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sansation"; src: url("fonts/Sansation-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/BarlowSemiCondensed-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/BarlowSemiCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Mek Icons"; src: url("fonts/lucide-subset.ttf") format("truetype"); font-display: block; }

:root {
  color-scheme: dark;
  /* Colour: the in-game menu's own palette. */
  --bg: #070c16;
  --bg-raised: #0b1424;
  --panel-top: rgba(17, 30, 48, 0.93);
  --panel-bottom: rgba(8, 14, 25, 0.96);
  --line: rgba(125, 170, 220, 0.15);
  --line-strong: rgba(140, 185, 230, 0.35);
  --text: #ecf1f7;
  --muted: #8fa0b5;
  --dim: #5c6d83;
  --accent: #f2aa3b;
  --accent-dark: #c27420;
  --on-accent: #1a1106;
  --info: #42bcf7;
  --danger: #ee5e5a;
  --ok: #54d68f;
  --on-ok: #062b18;
  /* Type: Sansation is the menu's face; Barlow Semi Condensed carries the reading text. */
  --font-display: "Sansation", "Segoe UI", system-ui, sans-serif;
  --font-body: "Barlow Semi Condensed", "Segoe UI", system-ui, sans-serif;
  --gutter-l: max(16px, 3.2vw, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, 3.2vw, env(safe-area-inset-right, 0px));
  --wrap: 1640px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 18px/1.55 var(--font-body);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.scroll-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 140px; pointer-events: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
::selection { background: rgba(66, 188, 247, 0.35); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter-l) + var(--gutter-r));
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

/* ---------- Shared bits ---------- */

.eyebrow {
  margin: 0;
  font: 700 0.78rem/1.2 var(--font-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  background: var(--accent);
  transform: rotate(45deg);
  flex: none;
}

.btn {
  --cut: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0 1.4em;
  font: 700 1rem/1 var(--font-display);
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
  white-space: nowrap;
}
.btn svg { width: 1.35em; height: 1.35em; flex: none; }
.btn-discord {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-discord:hover { background: #ffbe5c; }
.btn-discord:active { transform: translateY(1px); }
/* Focus: a ring inside the shape, since the clip-path cuts off anything drawn outside it. */
.btn-discord:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--on-accent); }
.btn-ghost {
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) top right / calc(100% - var(--cut)) 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) top right / 1px calc(100% - var(--cut)) no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) bottom left / calc(100% - var(--cut)) 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) bottom left / 1px calc(100% - var(--cut)) no-repeat,
    linear-gradient(to bottom right, transparent 50%, var(--accent) 50%, var(--accent) calc(50% + 2px), transparent calc(50% + 2px)) top left / var(--cut) var(--cut) no-repeat,
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--line-strong) calc(50% - 1px), var(--line-strong) 50%, transparent 50%) bottom right / var(--cut) var(--cut) no-repeat,
    rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.btn-ghost:hover { background-color: rgba(255, 255, 255, 0.09); }
/* Purchase: the one green button on the site, a cart in front of the label. */
.btn-buy {
  background: var(--ok);
  color: var(--on-ok);
}
.btn-buy:hover { background: #74e2a6; }
.btn-buy:active { transform: translateY(1px); }
.btn-buy:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--on-ok); }

/* Icon sprite: symbols the pages reference with <use>; sized away since the CSP allows no style attribute. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

kbd {
  display: inline-block;
  padding: 0.05em 0.45em 0.15em;
  font: 700 0.72em/1.4 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  background: linear-gradient(rgba(255, 255, 255, 0.07) calc(100% - 0.18em), rgba(0, 0, 0, 0.45) 0);
  border: 1px solid rgba(175, 200, 226, 0.35);
  border-radius: 0.25em;
  vertical-align: 0.1em;
}

/* ---------- Page veil: on from the first paint until the page is ready, and again while the next page is fetched (veil.js) ---------- */

.veil {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
html.veil-on .veil { opacity: 1; visibility: visible; transition: opacity 0.2s ease, visibility 0s; }
.veil-brand { display: grid; justify-items: center; gap: 12px; }
.veil-mark { font: 700 36px/1 var(--font-display); letter-spacing: 0.02em; color: var(--text); }
.veil-bar { position: relative; width: 60px; height: 3px; overflow: hidden; background: rgba(242, 170, 59, 0.22); }
.veil-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 45%;
  background: var(--accent);
  animation: veil-sweep 0.9s ease-in-out infinite;
}
@keyframes veil-sweep { from { transform: translateX(-110%); } to { transform: translateX(230%); } }
@media (prefers-reduced-motion: reduce) {
  .veil-bar::after { animation: none; width: 100%; }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 0.2s, box-shadow 0.2s;
}
.site-header.is-solid {
  background: rgba(7, 12, 22, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  position: relative;
  font: 700 26px/1 var(--font-display);
  letter-spacing: 0.02em;
  padding-bottom: 7px;
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  background: var(--accent);
}
.brand-sub {
  font: 700 11px/1 var(--font-display);
  letter-spacing: 0.32em;
  color: var(--muted);
  padding-bottom: 9px;
}
.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.site-nav a {
  font: 700 0.86rem/1 var(--font-display);
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 0;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--text); }
.site-header .btn { min-height: 44px; padding: 0 1.1em; font-size: 0.9rem; }
.header-divider {
  width: 1px;
  height: 26px;
  margin-inline: -8px;
  background: var(--line-strong);
}
.site-header .btn-signin { --cut: 8px; padding: 0 1em; gap: 0.5em; }
.btn-signin svg { width: 1.15em; height: 1.15em; }

/* ---------- Hero: copy on the left, the live menu tilted over the key art on the right ---------- */

.hero {
  position: relative;
  margin-top: calc(-72px - env(safe-area-inset-top, 0px));
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 30%;
  z-index: -2;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 12, 22, 0.95) 0%, rgba(7, 12, 22, 0.86) 24%, rgba(7, 12, 22, 0.4) 44%, rgba(7, 12, 22, 0.18) 62%, rgba(7, 12, 22, 0.3) 100%),
    linear-gradient(180deg, rgba(7, 12, 22, 0.75) 0%, rgba(7, 12, 22, 0) 18%, rgba(7, 12, 22, 0) 78%, var(--bg) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(0, 860px);
  align-items: center;
  gap: 40px clamp(32px, 4vw, 96px);
  padding-block: calc(72px + 40px + env(safe-area-inset-top, 0px)) 48px;
}
.hero-copy { max-width: 560px; min-width: 0; }
#hero-title { margin: 22px 0 0; font: inherit; }
.wordmark {
  display: block;
  margin: 0;
  font: 700 clamp(84px, 9.5vw, 168px)/0.86 var(--font-display);
  letter-spacing: -0.01em;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.45);
}
.wordmark-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}
.wordmark-bar {
  width: clamp(88px, 8vw, 140px);
  height: clamp(6px, 0.6vw, 10px);
  background: var(--accent);
  flex: none;
}
.wordmark-sub {
  font: 700 clamp(15px, 1.25vw, 20px)/1 var(--font-display);
  letter-spacing: 0.42em;
  color: var(--text);
}
.lede {
  margin: 30px 0 0;
  max-width: 30em;
  font-size: 1.22rem;
  line-height: 1.5;
  color: #c9d4e2;
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.hero-actions .btn-discord,
.hero-actions .btn-buy { min-height: 60px; padding: 0 1.8em; font-size: 1.08rem; }
.hero-invite {
  margin: 16px 0 0;
  font: 700 0.82rem/1 var(--font-display);
  letter-spacing: 0.08em;
  color: var(--muted);
}
.hero-invite span { color: var(--text); }

/* The menu column: perspective for the tilt, a warm glow behind the panel. */
.hero-menu {
  position: relative;
  min-width: 0;
  perspective: 2200px;
  animation: menu-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes menu-rise { from { transform: translateY(36px); } }
.hero-menu::before {
  content: "";
  position: absolute;
  inset: -6% -4% 4%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(242, 170, 59, 0.16), rgba(242, 170, 59, 0.05) 55%, transparent);
  pointer-events: none;
}
.tilt {
  display: flex;
  justify-content: center;
  transform-origin: 50% 45%;
  transform: rotateX(3.5deg) rotateY(-9deg);
}
.tilt > #mek-menu { display: flex; justify-content: center; width: 100%; }
.hero-menu-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 26px 0 0;
  font: 700 0.74rem/1.4 var(--font-display);
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: center;
}
.hero-menu-note span { display: inline-flex; align-items: center; gap: 8px; }
.hero-menu-note .live { color: var(--text); text-transform: uppercase; letter-spacing: 0.14em; }
.hero-menu-note .live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #54d68f;
  box-shadow: 0 0 0 0 rgba(84, 214, 143, 0.6);
  animation: live 2s ease-out infinite;
}
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(84, 214, 143, 0.55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(84, 214, 143, 0); } }
.hero-menu-note kbd { font-size: 0.92em; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 48px;
  align-items: end;
  margin-bottom: 36px;
}
.section-head h2 {
  margin: 14px 0 0;
  font: 700 clamp(32px, 4.2vw, 50px)/1.05 var(--font-display);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section-head p.note {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
  text-wrap: pretty;
}
.section-head .note kbd { font-size: 0.68em; }

/* ---------- Features: one row per menu page, one column per tab, columns lined up across pages ---------- */

.features {
  padding-block: 104px 40px;
}
.features .section-head { margin-bottom: 28px; }
.index { border-top: 1px solid var(--line); }
.index-page {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px 48px;
  padding-block: 40px;
  border-bottom: 1px solid var(--line);
}
.index-title {
  display: flex;
  align-items: center;
  gap: 14px;
  align-self: start;
}
.index-icon {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  font: 22px/1 "Mek Icons";
  color: var(--accent);
  background: rgba(242, 170, 59, 0.1);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
.index-title h3 {
  margin: 0;
  font: 700 1.75rem/1.05 var(--font-display);
}
.index-cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 30px 36px;
}
.index-group { min-width: 0; }
.index-group h4 {
  display: grid;
  grid-template-columns: auto minmax(0, max-content) minmax(16px, 1fr);
  align-items: center;
  gap: 9px;
  margin: 4px 0 14px;
  font: 700 0.74rem/1.3 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}
.index-group h4::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
}
.index-group h4::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.index-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}
.index-group li {
  position: relative;
  padding-left: 17px;
  font-size: 1rem;
  line-height: 1.35;
  color: #cfd8e4;
  text-wrap: pretty;
}
.index-group li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.52em;
  width: 5px;
  height: 5px;
  background: var(--info);
  transform: rotate(45deg);
}

/* ---------- Discord band ---------- */

.join {
  padding-block: 64px 96px;
}
.join-band {
  --cut: 22px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px 48px;
  padding: clamp(48px, 6vw, 88px) clamp(24px, 5vw, 64px);
  overflow: hidden;
  isolation: isolate;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  background: linear-gradient(180deg, #111e30, #0a1220);
}
.join-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(9, 16, 28, 0.9) 0%, rgba(9, 16, 28, 0.7) 24%, rgba(9, 16, 28, 0.22) 44%, rgba(9, 16, 28, 0.12) 62%, rgba(9, 16, 28, 0.5) 80%, rgba(9, 16, 28, 0.82) 100%),
    linear-gradient(180deg, rgba(9, 16, 28, 0.3), rgba(9, 16, 28, 0) 35%, rgba(9, 16, 28, 0.4)),
    url("assets/join.jpg") 50% 52% / cover no-repeat;
}
.join-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(var(--accent), var(--accent)) top right / 30px 3px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 3px 30px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 30px 3px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 3px 30px no-repeat,
    linear-gradient(to bottom right, transparent 50%, var(--accent) 50%, var(--accent) calc(50% + 3px), transparent calc(50% + 3px)) top left / var(--cut) var(--cut) no-repeat,
    linear-gradient(to bottom right, transparent calc(50% - 3px), var(--accent) calc(50% - 3px), var(--accent) 50%, transparent 50%) bottom right / var(--cut) var(--cut) no-repeat;
}
.join-band h2 {
  margin: 14px 0 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
  font: 700 clamp(32px, 4.4vw, 54px)/1.05 var(--font-display);
  text-wrap: balance;
}
.join-band p {
  margin: 12px 0 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
  color: #c3cedc;
  max-width: 30em;
}
.join-actions {
  display: grid;
  justify-items: start;
  gap: 12px;
}
.join-actions .btn-discord { min-height: 64px; padding: 0 2em; font-size: 1.12rem; }
.invite-copy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
  background: none;
  border: 0;
  color: var(--muted);
  font: 700 0.86rem/1 var(--font-display);
  letter-spacing: 0.06em;
  cursor: pointer;
}
.invite-copy { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.invite-copy b { color: var(--text); font-weight: 700; user-select: all; }
.invite-copy em { font-style: normal; color: var(--accent); }
.invite-copy:hover em { text-decoration: underline; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px));
  color: var(--dim);
  font-size: 0.92rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
}
.site-footer .brand-mark { font-size: 20px; padding-bottom: 6px; }
.site-footer .brand-mark::after { width: 34px; height: 2px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .hero { min-height: 0; display: block; }
  .hero-art, .hero::before { bottom: auto; height: min(100%, 900px); }
  .hero::before {
    background:
      linear-gradient(90deg, rgba(7, 12, 22, 0.92) 0%, rgba(7, 12, 22, 0.6) 45%, rgba(7, 12, 22, 0.15) 75%),
      linear-gradient(180deg, rgba(7, 12, 22, 0.75) 0%, rgba(7, 12, 22, 0) 18%, rgba(7, 12, 22, 0.35) 60%, var(--bg) 100%);
  }
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-bottom: 72px; }
  .hero-menu { perspective: none; }
  .tilt { transform: none !important; }
}
@media (max-width: 1100px) {
  .index-page { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 36px; }
}
@media (max-width: 960px) {
  .section-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .join-band { grid-template-columns: minmax(0, 1fr); }
  .join-band::before {
    background:
      linear-gradient(180deg, rgba(9, 16, 28, 0.86), rgba(9, 16, 28, 0.62) 55%, rgba(9, 16, 28, 0.88)),
      url("assets/join.jpg") 40% 50% / cover no-repeat;
  }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .site-nav { display: none; }
  .site-header .wrap { gap: 12px; justify-content: space-between; }
  .site-header .btn .btn-long { display: none; }
  .header-divider { display: none; }
  .site-header .btn-signin { width: 44px; padding: 0; }
  .signin-label { display: none; }
  .site-header .btn-discord { margin-left: auto; }
  .hero-art, .hero::before { height: 860px; }
  .hero-art { object-position: 80% 30%; }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(7, 12, 22, 0.75) 0%, rgba(7, 12, 22, 0.1) 16%, rgba(7, 12, 22, 0.2) 34%, rgba(7, 12, 22, 0.92) 58%, var(--bg) 78%);
  }
  .hero-grid { padding-top: 300px; gap: 40px; }
  .hero-menu-note { font-size: 0.7rem; }
  .lede { font-size: 1.1rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .index-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  .index-group li { font-size: 0.95rem; }
  .join-actions { justify-items: stretch; }
  .join-actions .btn-discord { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .hero-menu-note .live::before { animation: none; }
}
