:root {
  --bg: #0f0f0f;
  --bg-2: #141414;
  --surface: #171717;
  --surface-2: #1d1d1d;
  --line: #2c2c2c;
  --text: #cfcfcf;
  --strong: #f4f4f4;
  --muted: #8d8d8d;
  --accent: #ff3a2e;
  --accent-2: #ff6a45;
  --gold: #ffcc33;
  --focus: #ffcc33;
  --radius: 12px;
  --wrap: 1120px;
  --header: 80px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --display: "Trebuchet MS", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 var(--font);
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

a {
  color: var(--strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-2);
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 1000;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(calc(100% - 32px), var(--wrap));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header);
  background: #0f0f0f;
  border-bottom: 2px solid var(--accent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header);
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--strong);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.site-header .logo {
  filter:
    drop-shadow(5px 4px 4px rgba(0, 0, 0, 0.78))
    drop-shadow(12px 7px 10px rgba(0, 0, 0, 0.42));
}

.logo img {
  width: 54px;
  height: 54px;
  border-radius: 12px;
}

.site-footer .logo img {
  width: 48px;
  height: 48px;
}

.logo:hover {
  color: var(--gold);
}

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--strong);
  border: 1px solid var(--gold);
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  font-size: 0.92rem;
  border-radius: 8px;
}

.nav a:hover {
  color: var(--gold);
  background: var(--surface-2);
}

.nav a[aria-current="page"] {
  color: #fff;
  background: #2a1210;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.nav .has-sub {
  position: relative;
}

.nav .sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  box-shadow: var(--shadow);
}

.nav .has-sub:hover .sub,
.nav .has-sub:focus-within .sub {
  display: grid;
}

.nav .sub a {
  display: block;
}

.hero {
  position: relative;
  min-height: 0;
  display: grid;
  align-items: center;
  margin-bottom: 28px;
  overflow: hidden;
  background: #101010;
  border-bottom: 2px solid var(--accent);
}

.hero img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-copy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 24px 0;
  background: linear-gradient(90deg, rgba(15, 15, 15, 0.92) 0%, rgba(15, 15, 15, 0.55) 52%, rgba(15, 15, 15, 0.18) 100%);
}

.kicker {
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0 0 10px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  color: var(--strong);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.02em;
  margin: 0 0 12px;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 16px;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 8px;
}

.lede {
  max-width: 42rem;
  font-size: 1.12rem;
  color: #d7d7d7;
  margin: 0;
}

.section {
  padding: 12px 0 56px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -2px 0 var(--accent);
  padding-bottom: 12px;
}

.section-head a {
  color: var(--gold);
  text-decoration: none;
  font-size: 0.92rem;
}

.grid-3,
.grid-2 {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: 1.2fr 0.8fr;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--accent);
  color: inherit;
  transform: translateY(-2px);
}

.card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 35%;
  background: var(--bg-2);
}

.card-body {
  padding: 18px 18px 20px;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.meta {
  color: var(--accent-2);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.panel p:first-child {
  margin-top: 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  margin: 22px 0 18px;
}

.crumbs a {
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 6px 2px;
}

.crumbs a:hover {
  color: var(--gold);
}

.crumbs span[aria-hidden] {
  color: var(--gold);
  font-weight: 700;
}

.crumbs [aria-current="page"] {
  color: var(--accent-2);
}

.article {
  max-width: 46rem;
}

.article p,
.article li {
  max-width: 46rem;
}

.article ul,
.prose ul {
  padding-left: 1.2rem;
}

.prose p {
  margin: 0 0 1em;
}

.prose h2 {
  margin-top: 1.6em;
}

figure.hero-figure {
  margin: 0 0 28px;
}

figure.hero-figure img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  color: var(--strong);
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  background: var(--accent);
  transform: rotate(45deg);
  vertical-align: 1px;
}

.faq details p {
  margin: 10px 0 0;
  color: var(--text);
}

.split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  align-items: start;
}

.rail {
  position: sticky;
  top: calc(var(--header) + 16px);
}

.rail .panel + .panel {
  margin-top: 16px;
}

.rail a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.rail a:hover {
  color: var(--gold);
}

.rail a:last-child {
  border-bottom: 0;
}

.list-links a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.list-links a:hover h3 {
  color: var(--accent-2);
}

.site-footer {
  border-top: 2px solid var(--accent);
  background: var(--bg-2);
  padding: 48px 0 28px;
  margin-top: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.site-footer h2 {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}

.site-footer a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 4px 0;
  font-size: 0.95rem;
}

.site-footer a:hover {
  color: var(--gold);
}

.legal {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 2px solid var(--gold);
  color: var(--muted);
  font-size: 0.85rem;
}

.platform-marks {
  margin-top: 36px;
}

.platform-marks-title {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px;
}

.platform-marks-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.platform-marks-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e8e8e8;
  font-size: 0.95rem;
}

.platform-marks-list img {
  width: 28px;
  height: 28px;
  display: block;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  box-sizing: border-box;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.to-top:hover {
  border-color: #fff;
  background: #ff1e12;
  color: var(--gold);
}

.to-top svg {
  margin: 0;
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  max-width: none;
}

.note {
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-form {
  margin: 8px 0 28px;
  max-width: 36rem;
}

.contact-form .field {
  margin: 0 0 18px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  color: var(--strong);
  margin: 0 0 6px;
}

.contact-form .req,
.contact-form .opt {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--strong);
  font: inherit;
  padding: 12px 14px;
  min-height: 48px;
}

.contact-form textarea {
  min-height: 168px;
  resize: vertical;
  line-height: 1.5;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #7a7a7a;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--gold);
}

.contact-form button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--gold);
  border-radius: 10px;
  min-height: 48px;
  padding: 10px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.contact-form button[type="submit"]:hover {
  background: #ff1e12;
  color: var(--gold);
}

.contact-form .actions {
  margin-bottom: 0;
}

.callout {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin: 20px 0;
}

.glossary {
  margin: 0;
}

.glossary dt {
  color: var(--strong);
  font-family: var(--display);
  font-size: 1.05rem;
  margin-top: 1.25em;
}

.glossary dt:first-child {
  margin-top: 0;
}

.glossary dd {
  margin: 0.35em 0 0;
  color: var(--text);
}

.library-grid {
  margin-top: 20px;
}

@media (max-width: 960px) {
  .grid-3,
  .grid-2,
  .split,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rail {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    background: #121212;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px 20px;
    flex-direction: column;
    align-items: stretch;
  }

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

  .nav .sub {
    position: static;
    display: grid;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 0 0 12px;
  }

  .hero img {
    height: 196px;
  }

  .hero-copy {
    padding: 16px 0;
    align-items: flex-end;
    background: linear-gradient(to top, rgba(15, 15, 15, 0.94), rgba(15, 15, 15, 0.4));
  }

  figure.hero-figure img {
    height: 180px;
  }

  .nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .grid-3,
  .grid-2,
  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2rem;
  }
}

@media (max-width: 420px) {
  .logo {
    gap: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
  }

  .logo img {
    width: 46px;
    height: 46px;
  }

  .header-inner {
    gap: 8px;
  }

  .nav-toggle,
  .to-top,
  .contact-form button[type="submit"] {
    min-width: 44px;
    min-height: 44px;
  }
}

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

  .card,
  .to-top {
    transition: none;
  }
}
