:root {
  color-scheme: dark;
  --ash: #0b0d0d;
  --charcoal: #151817;
  --iron: #242827;
  --smoke: #aeb6ad;
  --bone: #f2ead9;
  --ember: #ee4b24;
  --flame: #ffb24d;
  --wine: #6f1622;
  --teal: #6bb6ae;
  --dominion: #b8c5ce;
  --line: rgba(242, 234, 217, 0.16);
  --shadow: rgba(0, 0, 0, 0.58);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(238, 75, 36, 0.19), transparent 24rem),
    linear-gradient(180deg, #0d0f0f 0%, #141716 50%, #0b0d0d 100%);
  color: var(--bone);
}

body:has(.page-shell) {
  background:
    radial-gradient(circle at 18% 0%, rgba(238, 75, 36, 0.18), transparent 24rem),
    linear-gradient(180deg, #0d0f0f 0%, #141716 48%, #0b0d0d 100%);
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 72px;
  padding: 0 32px;
  background: rgba(11, 13, 13, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.site-header nav,
.hero-actions,
.switch-controls {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 178, 77, 0.48);
  background:
    radial-gradient(circle at 50% 66%, #ffcf6d 0 12%, #ee4b24 13% 34%, transparent 35%),
    linear-gradient(145deg, #121413, #5b151d);
  transform: rotate(45deg);
  box-shadow: 0 0 28px rgba(238, 75, 36, 0.38);
}

.site-header nav {
  gap: 4px;
}

.site-header nav a {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--smoke);
  font-size: 0.94rem;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--bone);
}

.flash {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 12;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 24, 23, 0.94);
  color: var(--bone);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.flash.success {
  border-color: rgba(107, 182, 174, 0.58);
}

.flash.error {
  border-color: rgba(238, 75, 36, 0.68);
}

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 128px 32px 72px;
}

.hero-art,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-art {
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(11, 13, 13, 0.91) 0%, rgba(11, 13, 13, 0.54) 42%, rgba(11, 13, 13, 0.16) 76%),
    linear-gradient(180deg, rgba(11, 13, 13, 0.22) 0%, rgba(11, 13, 13, 0.04) 58%, #0d0f0f 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  margin-left: max(0px, calc((100vw - 1180px) / 2));
}

.eyebrow,
.card-kicker,
.path-label {
  margin: 0 0 12px;
  color: var(--flame);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.1rem, 8vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4.6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.32rem;
  line-height: 1.15;
}

p,
li {
  color: var(--smoke);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 30px;
  color: #f7ebdc;
  font-size: clamp(1rem, 2vw, 1.28rem);
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
}

.button.primary {
  background: linear-gradient(135deg, var(--ember), var(--flame));
  color: #190806;
  border-color: rgba(255, 178, 77, 0.46);
  box-shadow: 0 16px 48px rgba(238, 75, 36, 0.28);
}

.button.secondary {
  background: rgba(15, 17, 17, 0.62);
  color: var(--bone);
}

.section {
  padding: 96px 32px;
}

.page-shell {
  min-height: calc(100vh - 140px);
  padding-top: 92px;
}

.section-head,
.world-panel,
.path-switcher,
.system-grid,
.join,
footer {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.section-head {
  max-width: 850px;
  margin-bottom: 38px;
}

.section-head.compact {
  max-width: 760px;
}

.faction-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.faction-card,
.path-switcher,
.system-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 24, 23, 0.72);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.faction-card {
  min-height: 390px;
  padding: clamp(24px, 4vw, 42px);
  position: relative;
  overflow: hidden;
}

.faction-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.7;
}

.blackflame-card::before {
  background: radial-gradient(circle at 10% 0%, rgba(238, 75, 36, 0.3), transparent 22rem);
}

.dominion-card::before {
  background: radial-gradient(circle at 90% 0%, rgba(184, 197, 206, 0.18), transparent 20rem);
}

.faction-card > * {
  position: relative;
}

.faction-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 3.2rem);
}

.faction-card ul {
  margin: 22px 0 0;
  padding-left: 20px;
}

.faction-card li {
  margin-bottom: 10px;
}

.world {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0)),
    #101313;
}

.world-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: start;
}

.world-copy {
  display: grid;
  gap: 18px;
}

.world-copy p {
  margin-bottom: 0;
}

.path-switcher {
  margin-top: 46px;
  padding: 18px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
}

.switch-controls {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
}

.path-tab {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--bone);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.path-tab.active {
  background: rgba(238, 75, 36, 0.18);
  border-color: rgba(255, 178, 77, 0.48);
}

.path-output {
  min-height: 190px;
  padding: 26px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(238, 75, 36, 0.16), rgba(107, 182, 174, 0.08)),
    rgba(255, 255, 255, 0.04);
}

.systems {
  background: #0d0f0f;
}

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

.system-grid article {
  min-height: 260px;
  padding: 24px;
}

.system-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 178, 77, 0.38);
  border-radius: 50%;
  color: var(--flame);
  font-size: 0.78rem;
  font-weight: 900;
}

.join {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  min-height: 360px;
  padding: clamp(30px, 6vw, 58px);
  border-top: 1px solid rgba(255, 178, 77, 0.28);
  border-bottom: 1px solid rgba(184, 197, 206, 0.18);
  background:
    linear-gradient(135deg, rgba(111, 22, 34, 0.56), rgba(10, 13, 13, 0.24)),
    radial-gradient(circle at 82% 18%, rgba(255, 178, 77, 0.18), transparent 22rem);
}

.join-copy {
  max-width: 770px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px 44px;
  border-top: 1px solid var(--line);
}

.studio-footer {
  display: inline-flex;
  align-items: center;
}

.studio-footer img {
  display: block;
  width: min(270px, 68vw);
  height: auto;
}

footer p {
  margin: 0;
  font-size: 0.92rem;
}

.brand-preview {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 78px 32px 96px;
}

.asset-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 16px;
  margin-top: 34px;
}

.asset-panel {
  display: grid;
  align-items: center;
  min-height: 240px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 24, 23, 0.78);
}

.asset-panel.light {
  background: #f2ead9;
}

.asset-panel.light .path-label {
  color: #7a1823;
}

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

.asset-panel.mark img {
  width: min(220px, 80%);
  margin: 0 auto;
}

.form-layout,
.board-section,
.account-section {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.72fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
  padding: 78px 32px 96px;
}

.form-layout.narrow {
  grid-template-columns: minmax(0, 0.8fr) minmax(340px, 0.62fr);
}

.form-layout h1,
.board-section h1,
.account-section h1 {
  margin-bottom: 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.panel-form,
.notice-panel,
.post-card,
.stat-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 24, 23, 0.78);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.panel-form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
}

.panel-form label {
  display: grid;
  gap: 8px;
  color: var(--bone);
  font-weight: 800;
}

.panel-form input,
.panel-form textarea,
.panel-form select {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid rgba(242, 234, 217, 0.2);
  border-radius: 6px;
  background: rgba(3, 5, 5, 0.48);
  color: var(--bone);
  font: inherit;
}

.panel-form textarea {
  resize: vertical;
}

.panel-form input:focus,
.panel-form textarea:focus,
.panel-form select:focus {
  border-color: rgba(255, 178, 77, 0.58);
  outline: 2px solid rgba(238, 75, 36, 0.24);
}

.form-errors {
  padding: 12px 14px;
  border: 1px solid rgba(238, 75, 36, 0.58);
  border-radius: 6px;
  background: rgba(111, 22, 34, 0.28);
}

.form-errors p,
.form-note {
  margin: 0;
}

.form-note a {
  color: var(--flame);
  font-weight: 800;
}

.board-section,
.account-section {
  padding-left: 32px;
  padding-right: 32px;
}

.board-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.board-form {
  margin-bottom: 28px;
}

.notice-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
  padding: 20px;
}

.notice-panel p {
  margin: 0;
}

.post-list {
  display: grid;
  gap: 14px;
}

.post-card {
  padding: 24px;
}

.post-card p:last-child {
  margin-bottom: 0;
}

.post-card strong {
  color: var(--bone);
}

.post-card time {
  display: block;
  margin-top: 18px;
  color: var(--dominion);
  font-size: 0.88rem;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 36px 0 26px;
}

.stat-panel {
  min-width: 0;
  padding: 22px;
}

.stat-panel h3 {
  overflow-wrap: anywhere;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
    padding: 0 18px;
  }

  .site-header nav {
    display: none;
  }

  .hero {
    min-height: 86vh;
    padding: 112px 20px 52px;
  }

  .section {
    padding: 68px 20px;
  }

  .faction-grid,
  .world-panel,
  .path-switcher,
  .system-grid,
  .join,
  .form-layout,
  .form-layout.narrow,
  .account-grid,
  .asset-grid {
    grid-template-columns: 1fr;
  }

  .faction-card {
    min-height: auto;
  }

  .system-grid article {
    min-height: auto;
  }

  footer {
    flex-direction: column;
    padding-left: 20px;
    padding-right: 20px;
  }

  .form-layout,
  .board-section,
  .account-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .notice-panel {
    align-items: stretch;
    flex-direction: column;
  }

  footer {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .brand span:last-child {
    max-width: 150px;
    line-height: 1.05;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .path-switcher {
    padding: 12px;
  }

  .path-output {
    padding: 20px;
  }
}
