:root {
  --bg: #050505;
  --steel-950: #070707;
  --steel-900: #0b0c0c;
  --steel-850: #101111;
  --steel-800: #151616;
  --steel-750: #1b1c1c;
  --steel-700: #222323;

  --text: #eee7dc;
  --muted: #b4a697;
  --dim: #776d63;

  --orange: #a84f1f;
  --orange-2: #c46325;
  --orange-3: #d46d2c;
  --rust: #6f321b;

  --line: rgba(196, 99, 37, 0.38);
  --line-strong: rgba(212, 109, 44, 0.64);
  --line-soft: rgba(255, 255, 255, 0.075);

  --cut: 18px;
  --cut-small: 11px;

  --shadow-heavy: 0 28px 80px rgba(0, 0, 0, 0.62);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(circle at 16% 4%, rgba(168, 79, 31, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 14%, rgba(111, 50, 27, 0.12), transparent 32rem),
    linear-gradient(180deg, #070707 0%, #0d0e0e 44%, #050505 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.18;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.025) 0 1px,
      transparent 1px 9px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.38) 0 2px,
      transparent 2px 11px
    );
  mix-blend-mode: overlay;
}

.forge-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 8%, rgba(196, 99, 37, 0.11), transparent 26rem),
    radial-gradient(circle at 88% 76%, rgba(111, 50, 27, 0.08), transparent 30rem),
    linear-gradient(115deg, transparent 0 47%, rgba(255,255,255,0.022) 48%, transparent 50% 100%);
  opacity: 0.9;
}

a {
  color: var(--orange-3);
  text-decoration: none;
}

a:hover {
  color: #f19a57;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--orange-3);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  z-index: 999;
  padding: 0.75rem 1rem;
  color: #000;
  background: #fff;
  font-weight: 800;
}

.skip-link:focus {
  left: 1rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background:
    linear-gradient(90deg, rgba(18, 19, 19, 0.98), rgba(5, 5, 5, 0.96)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.035) 0 1px,
      transparent 1px 9px
    );
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand-logo {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--orange-3);
  font-weight: 950;
  background: linear-gradient(145deg, #202121, #070707);
  border: 1px solid var(--line-strong);
  clip-path: polygon(
    0 var(--cut-small),
    var(--cut-small) 0,
    100% 0,
    100% calc(100% - var(--cut-small)),
    calc(100% - var(--cut-small)) 100%,
    0 100%
  );
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.82),
    0 0 22px rgba(168, 79, 31, 0.14);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--rust);
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.brand-mark::before {
  left: 7px;
  bottom: 7px;
}

.brand-mark::after {
  right: 7px;
  top: 7px;
}

.brand-text {
  display: block;
}

.brand-name {
  display: block;
  color: var(--text);
  font-weight: 950;
  letter-spacing: 0.045em;
  line-height: 1;
}

.brand-sub {
  display: block;
  margin-top: 0.22rem;
  color: var(--dim);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.site-nav a {
  color: var(--muted);
  padding: 0.62rem 0.9rem;
  border: 1px solid rgba(196, 99, 37, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(0, 0, 0, 0.18)),
    rgba(196, 99, 37, 0.04);
  clip-path: polygon(
    0 var(--cut-small),
    var(--cut-small) 0,
    100% 0,
    100% calc(100% - var(--cut-small)),
    calc(100% - var(--cut-small)) 100%,
    0 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff0df;
  border-color: var(--line-strong);
  background: rgba(168, 79, 31, 0.13);
  box-shadow:
    inset 0 0 20px rgba(168, 79, 31, 0.12),
    0 0 18px rgba(168, 79, 31, 0.08);
}

/* Layout */

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  margin-top: 1.35rem;
  padding: clamp(2.35rem, 6vw, 5.75rem);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.catalog-shell,
.content-shell {
  margin: 1rem 0 3rem;
}

.catalog-head,
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
}

.catalog-count {
  color: var(--dim);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.compact {
  margin: 1rem 0;
  padding: clamp(1.6rem, 4vw, 3.2rem);
}

.faq {
  margin: 3rem 0;
}

/* Forged Panels */

.forge-panel,
.forge-card,
details {
  position: relative;
  isolation: isolate;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(30, 31, 31, 0.97), rgba(8, 8, 8, 0.99));
  border: 1px solid var(--line);
  clip-path: polygon(
    0 var(--cut),
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -30px 55px rgba(0, 0, 0, 0.42),
    var(--shadow-heavy);
  overflow: hidden;
}

.forge-card:nth-child(even),
details:nth-of-type(even) {
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}

.forge-panel::before,
.forge-card::before,
details::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.22;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.075), transparent 28%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.022) 0 1px,
      transparent 1px 8px
    );
}

.forge-panel::after,
.forge-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(196, 99, 37, 0.85), transparent);
  opacity: 0.72;
}

.forge-card {
  min-height: 245px;
  padding: 1.35rem;
}

.forge-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    inset 0 -30px 55px rgba(0, 0, 0, 0.46),
    0 34px 92px rgba(0, 0, 0, 0.66),
    0 0 34px rgba(168, 79, 31, 0.13);
}

/* Typography */

.eyebrow,
.card-kicker {
  color: var(--orange-3);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.card-kicker {
  display: inline-flex;
  margin-bottom: 1.25rem;
}

h1,
h2,
h3,
p {
  color: inherit;
}

h1 {
  max-width: 1200px;
  margin: 0.6rem 0 1rem;
  color: var(--text);

  font-size: clamp(3rem, 7vw, 6.75rem);

  line-height: 0.92;
  letter-spacing: -0.055em;

  text-wrap: balance;

  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.72),
    0 0 30px rgba(168, 79, 31, 0.08);
}

h2 {
  margin: 0.25rem 0 0.8rem;
  color: var(--text);
  font-size: clamp(1.75rem, 3vw, 2.85rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

h3 {
  margin: 0.25rem 0 0.65rem;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.15;
}

p {
  margin: 0.55rem 0;
  color: var(--muted);
}

.hero-copy {
  max-width: 850px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

/* Buttons */

.hero-actions,
.link-grid,
.mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn,
.link-grid a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.78rem 1.08rem;
  color: #110905;
  font-weight: 950;
  border: 1px solid rgba(224, 120, 45, 0.44);
  background:
    linear-gradient(180deg, #d46d2c 0%, #a84f1f 58%, #6f321b 100%);
  clip-path: polygon(
    0 var(--cut-small),
    var(--cut-small) 0,
    100% 0,
    100% calc(100% - var(--cut-small)),
    calc(100% - var(--cut-small)) 100%,
    0 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -12px 18px rgba(0, 0, 0, 0.26),
    0 10px 28px rgba(0, 0, 0, 0.38);
}

.btn:hover,
.link-grid a:hover {
  color: #110905;
  filter: brightness(1.08);
  transform: translateY(-1px);
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

.btn.secondary,
.link-grid a {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.2)),
    rgba(168, 79, 31, 0.08);
  border-color: rgba(196, 99, 37, 0.42);
}

.btn.secondary:hover,
.link-grid a:hover {
  color: #fff0df;
  border-color: var(--line-strong);
}

.btn.inactive {
  color: var(--dim);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.22)),
    rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.09);
  cursor: not-allowed;
}

/* Forms and Dynamic Pages */

.toolbar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 0.75rem;
  margin: 1rem 0;
}

input,
select {
  width: 100%;
  min-height: 46px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.2)),
    var(--steel-850);
  border: 1px solid rgba(196, 99, 37, 0.32);
  padding: 0 1rem;
  clip-path: polygon(
    0 var(--cut-small),
    var(--cut-small) 0,
    100% 0,
    100% calc(100% - var(--cut-small)),
    calc(100% - var(--cut-small)) 100%,
    0 100%
  );
}

input::placeholder {
  color: var(--dim);
}

select option {
  color: var(--text);
  background: var(--steel-900);
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

/* Improved dynamic cards */

.mod-card,
.roadmap-card,
.version-card {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  min-height: 100%;
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.card-title-block h2 {
  margin-bottom: 0.45rem;
}

.card-summary {
  color: var(--muted);
  font-size: 1rem;
}

.card-meta {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.card-meta div {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line-soft);
}

.card-meta dt {
  margin-bottom: 0.25rem;
  color: var(--orange-3);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card-meta dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.card-section-title {
  margin: 0 0 0.45rem;
  color: var(--orange-3);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.card-list li {
  margin: 0.28rem 0;
}

.card-footer {
  margin-top: auto;
}

@media (max-width: 700px) {
  .card-header-row {
    flex-direction: column;
  }

  .pill-row {
    justify-content: flex-start;
  }
}

/* Definition Lists and Lists */

.meta {
  display: grid;
  gap: 0.6rem;
  margin: 0;
}

.meta div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line-soft);
}

dt {
  color: var(--dim);
  font-weight: 850;
}

dd {
  margin: 0;
  color: var(--muted);
}

ul.clean {
  margin: 0.65rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

ul.clean li {
  margin: 0.25rem 0;
}

/* FAQ */

details {
  margin-bottom: 0.8rem;
  padding: 0;
}

summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
  padding: 1rem 1.25rem;
}

details p {
  padding: 0 1.25rem 1rem;
  margin-top: 0;
  color: var(--muted);
}

/* Footer */

.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto 0;
  padding: 2rem 0;
  color: var(--dim);
  border-top: 1px solid rgba(196, 99, 37, 0.28);
}

.site-footer p {
  color: var(--dim);
}

/* Responsive */

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-head,
  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .section-grid,
  .grid.two,
  .grid.three,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2rem 1.25rem;
  }

  h1 {
    font-size: clamp(2.55rem, 14vw, 4.45rem);
  }

  .mod-topline {
    flex-direction: column;
  }

  .pill-row {
    justify-content: flex-start;
  }

  .meta div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  main,
  .site-footer {
    width: min(100% - 1rem, 1180px);
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .brand-logo,
  .brand-mark {
    width: 42px;
    height: 42px;
  }
}

@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;
  }
}
