:root {
  --ink: #17120c;
  --paper: #f3e6c8;
  --paper-2: #ead6a8;
  --cream: #fff6e4;
  --caption: #ffe566;
  --sunset: #ef7a2f;
  --gold: #f0b429;
  --teal: #1aa6c1;
  --navy: #142033;
  --grass: #d7ead0;
  --night: #0e1726;
  --white: #fffdf7;
  --shadow: 8px 8px 0 var(--ink);
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Comic Neue", "Trebuchet MS", sans-serif;
  font-size: 1.08rem;
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 500px at 50% -80px, rgba(240, 180, 41, 0.28), transparent 58%),
    radial-gradient(900px 420px at 100% 20%, rgba(26, 166, 193, 0.12), transparent 50%),
    linear-gradient(180deg, #f7ead0 0%, #efe0b8 38%, #dce8d4 68%, #1a2436 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image: radial-gradient(circle, #17120c 0.7px, transparent 0.8px);
  background-size: 7px 7px;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
.brand-type {
  font-family: Bangers, "Comic Sans MS", cursive;
  letter-spacing: 0.04em;
  line-height: 0.95;
  margin: 0;
}

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

.mast {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 230, 200, 0.94);
  border-bottom: 4px solid var(--ink);
  backdrop-filter: blur(8px);
}

.mast-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #2a2a2a;
  border: 3px solid var(--ink);
  border-radius: 10px;
}

.brand-type {
  font-size: 1.7rem;
}

.brand-type span {
  display: block;
  font-family: "Comic Neue", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  opacity: 0.7;
}

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

.nav-links a {
  text-decoration: none;
  font-weight: 700;
  padding: 8px 12px;
  border: 3px solid transparent;
}

.nav-links a:hover {
  border-color: var(--ink);
  background: var(--caption);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 3px solid var(--ink);
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
}

.nav-drawer {
  display: none;
}

.icon-btn,
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.icon-btn:hover,
.cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.icon-btn {
  width: 44px;
  height: 44px;
  background: var(--white);
  font-size: 1.2rem;
}

.cta {
  padding: 12px 18px;
  background: var(--caption);
}

.cta.buy {
  background: var(--sunset);
  color: var(--white);
}

.cta.chart {
  background: var(--teal);
  color: var(--white);
}

.cta.ghost {
  background: var(--white);
}

button.cta {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.hero {
  position: relative;
  padding: 36px 0 48px;
}

.horizon {
  position: absolute;
  inset: auto 0 -8px;
  height: 140px;
  pointer-events: none;
  overflow: hidden;
}

.horizon-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(239, 122, 47, 0.18) 40%, rgba(20, 32, 51, 0.35));
}

.horizon-road {
  position: absolute;
  left: 50%;
  bottom: -20px;
  width: 140%;
  height: 90px;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, transparent 0 18px, rgba(23, 18, 12, 0.18) 18px),
    repeating-linear-gradient(90deg, #f3e6c8 0 26px, #17120c 26px 30px);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.issue-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.issue-stamp {
  background: var(--ink);
  color: var(--caption);
  border: 3px solid var(--ink);
  padding: 10px 14px;
  font-family: Bangers, cursive;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
}

.issue-stamp small {
  display: block;
  font-family: "Comic Neue", sans-serif;
  color: var(--white);
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.kicker {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

.splash {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: stretch;
}

.panel {
  background: var(--white);
  border: 5px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 10px;
}

.panel img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #0d1a28;
}

.caption {
  margin-top: 10px;
  background: var(--caption);
  border: 3px solid var(--ink);
  padding: 8px 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-copy h1 {
  font-size: clamp(3.4rem, 8vw, 6.4rem);
  margin: 8px 0 14px;
}

.hero-copy h1 em {
  font-style: normal;
  color: var(--sunset);
}

.speech {
  position: relative;
  background: var(--white);
  border: 4px solid var(--ink);
  border-radius: 28px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin: 0 0 22px;
}

.speech::after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: -16px;
  width: 22px;
  height: 22px;
  background: var(--white);
  border-right: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  transform: rotate(45deg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.ca-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--cream);
  border: 4px solid var(--ink);
  padding: 10px 12px;
  box-shadow: var(--shadow);
}

.ca-strip code {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.ca-strip button {
  border: 0;
  background: var(--caption);
  color: var(--ink);
  font-weight: 800;
  padding: 8px 12px;
  cursor: pointer;
}

.chapter {
  padding: 72px 0;
}

.chapter-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}

.chapter-head h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.badge {
  background: var(--white);
  border: 4px solid var(--ink);
  padding: 8px 12px;
  font-family: Bangers, cursive;
  font-size: 1.4rem;
  box-shadow: 4px 4px 0 var(--ink);
}

.rule {
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 18px,
    transparent 18px 28px
  );
}

.about-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 24px;
  margin-bottom: 24px;
}

.story-stack {
  display: grid;
  gap: 16px;
}

.file-card {
  background: var(--cream);
  border: 5px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 22px;
}

.file-card h3 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.chip {
  background: var(--white);
  border: 3px solid var(--ink);
  padding: 6px 10px;
  font-weight: 800;
}

.timeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  font-weight: 800;
}

.year {
  background: var(--navy);
  color: var(--caption);
  text-align: center;
  padding: 10px;
  border: 3px solid var(--ink);
}

.arrow {
  font-family: Bangers, cursive;
  font-size: 1.6rem;
}

.banner-spread {
  margin-top: 8px;
}

.banner-spread img {
  width: 100%;
  background: #081018;
}

.howto {
  background: transparent;
}

.howto-shell {
  background: var(--grass);
  border: 5px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 28px;
}

.howto-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.steps {
  display: grid;
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  background: var(--white);
  border: 4px solid var(--ink);
  padding: 12px;
}

.step b {
  display: grid;
  place-items: center;
  background: var(--caption);
  border: 3px solid var(--ink);
  font-family: Bangers, cursive;
  font-size: 1.8rem;
}

.art-pair {
  display: grid;
  gap: 16px;
}

.community {
  padding-bottom: 40px;
}

.night {
  background: var(--night);
  color: var(--cream);
  border: 5px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 32px;
}

.night .chapter-head h2,
.night .badge {
  color: var(--ink);
}

.night .badge {
  background: var(--caption);
}

.night .rule {
  background: repeating-linear-gradient(
    90deg,
    var(--caption) 0 18px,
    transparent 18px 28px
  );
}

.community-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: center;
}

.social-stack {
  display: grid;
  gap: 14px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--cream);
  color: var(--ink);
  text-decoration: none;
  border: 4px solid var(--ink);
  padding: 14px;
  box-shadow: 4px 4px 0 #05080f;
}

.social-card i {
  font-size: 1.8rem;
}

.social-card strong {
  display: block;
  font-family: Bangers, cursive;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

.site-foot {
  border-top: 4px solid var(--ink);
  background: var(--paper-2);
  padding: 22px 0 28px;
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.foot-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: 3px solid var(--ink);
  background: #2a2a2a;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--caption);
  border: 3px solid var(--caption);
  padding: 10px 16px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 80;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
  .splash,
  .about-grid,
  .howto-layout,
  .community-grid,
  .chapter-head {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-drawer {
    display: none;
    border-top: 3px solid var(--ink);
    padding: 12px 16px 16px;
  }

  .nav-drawer.is-open {
    display: grid;
    gap: 8px;
  }

  .nav-drawer a {
    text-decoration: none;
    font-weight: 800;
    padding: 10px 8px;
    background: var(--white);
    border: 3px solid var(--ink);
  }

  .hero-copy h1 {
    font-size: 3.4rem;
  }

  .howto-shell,
  .night {
    padding: 18px;
  }

  .foot-inner {
    flex-direction: column;
    text-align: center;
  }
}
