@font-face {
  font-family: "Slackey";
  src: url("assets/fonts/Slackey-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Bree Serif";
  src: url("assets/fonts/BreeSerif-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("assets/fonts/Caveat-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --yellow: #ffb000;
  --yellow-light: #fff2c7;
  --ink: #171717;
  --paper: #fffdf8;
  --paper-deep: #f4efe4;
  --red: #8f2929;
  --muted: #625e56;
  --line: 3px solid var(--ink);
  --shadow: 8px 8px 0 var(--ink);
  --radius: 0.4rem;
  --site-width: 1180px;
  --space-section: clamp(4.5rem, 9vw, 8rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 23, 23, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 31px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 4px solid var(--yellow);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(10px);
}

.nav-shell {
  display: flex;
  width: min(var(--site-width), calc(100% - 2rem));
  min-height: 76px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: "Bree Serif", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.header-actions {
  display: flex;
  margin-left: 0.7rem;
  align-items: center;
  gap: 0.65rem;
}

.music-toggle {
  width: 96px;
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.music-toggle:hover,
.music-toggle:focus-visible {
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(-1px, -1px);
}

.music-toggle.is-playing {
  background: var(--yellow);
}

.site-nav {
  margin-left: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.8rem, 2vw, 1.5rem);
}

.site-nav a {
  position: relative;
  padding: 0.45rem 0;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--yellow);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.site-nav small {
  display: block;
  color: var(--red);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.hero {
  display: grid;
  width: min(var(--site-width), calc(100% - 2rem));
  min-height: min(43rem, calc(100svh - 112px));
  margin: -76px auto 0;
  padding: clamp(2rem, 4.5vw, 4.5rem) 0 1.75rem;
  align-items: center;
  grid-template-columns: minmax(0, 1.28fr) minmax(390px, 0.72fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}

.hero-copy {
  position: relative;
  z-index: 3;
  transform: translateY(-30px);
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--red);
  font-family: "Bree Serif", Georgia, serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 9ch;
  margin-bottom: 0.5rem;
  color: var(--yellow);
  font-family: "Slackey", Impact, sans-serif;
  font-size: clamp(3.25rem, 6.6vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-shadow:
    -2px -2px 0 var(--ink),
    2px -2px 0 var(--ink),
    -2px 2px 0 var(--ink),
    2px 2px 0 var(--ink),
    5px 5px 0 var(--ink);
  text-transform: uppercase;
}

.hero-subtitle {
  margin-bottom: 1.1rem;
  font-family: "Bree Serif", Georgia, serif;
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  line-height: 1.25;
}

.hero-lead {
  max-width: 34rem;
  margin-bottom: 1.75rem;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 800;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0.72rem 1.15rem;
  border: 2px solid var(--ink);
  align-items: center;
  justify-content: center;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.button:hover,
.button:focus-visible {
  box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-2px, -2px);
}

.button-primary {
  background: var(--yellow);
}

.button-secondary {
  background: #fff;
}

.button-dark {
  color: #fff;
  background: var(--ink);
}

.button-dark:hover,
.button-dark:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--yellow-light);
  transform: translate(-2px, -2px);
}

.button-dark:active {
  box-shadow: 2px 2px 0 var(--yellow-light);
  transform: translate(0, 0);
}

.button-disabled {
  color: #5b574f;
  border-color: #9c9588;
  background: #e7e0d3;
  cursor: default;
}

.button-disabled:hover {
  box-shadow: none;
  transform: none;
}

.scribble {
  margin: 2.2rem 0 0 0.4rem;
  color: var(--red);
  font-family: "Caveat", cursive;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  transform: rotate(-2deg);
}

.hero-art {
  position: relative;
  z-index: 4;
  min-height: 640px;
  margin-top: 60px;
  align-self: end;
  overflow: visible;
  transform: translate(-140px, 20px);
}

.hero-art img {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 7px;
  width: min(98%, 430px);
  max-height: 640px;
  object-fit: contain;
  object-position: right bottom;
}

.section {
  width: min(var(--site-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: var(--space-section) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

h2 {
  margin-bottom: 0.8rem;
  font-family: "Bree Serif", Georgia, serif;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1.05;
}

h3 {
  margin-bottom: 0.65rem;
  font-family: "Bree Serif", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.15;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(2rem, 6vw, 5rem);
}

.intro {
  font-family: "Bree Serif", Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.4;
}

.feature-strip {
  display: grid;
  margin: 2rem 0 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.5rem;
  list-style: none;
}

.feature-strip li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
}

.feature-strip li::before {
  position: absolute;
  top: 0.15em;
  bottom: 0.15em;
  left: 0;
  width: 4px;
  background: var(--yellow);
  content: "";
}

.about-actions {
  display: flex;
  margin-top: 2rem;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.about-actions .button {
  min-width: 13rem;
}

.settings-card {
  position: relative;
  padding: 1.75rem;
  border: var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.settings-card::before {
  position: absolute;
  top: -13px;
  left: 1.4rem;
  width: 110px;
  height: 22px;
  background: rgba(255, 176, 0, 0.78);
  content: "";
  transform: rotate(-2deg);
}

.setting-list {
  display: grid;
  margin: 1.25rem 0 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  list-style: none;
}

.setting-list li {
  padding-bottom: 0.35rem;
  border-bottom: 3px solid var(--yellow);
  font-weight: 800;
}

.section-downloads {
  width: 100%;
  max-width: none;
  padding-right: max(1rem, calc((100vw - var(--site-width)) / 2));
  padding-left: max(1rem, calc((100vw - var(--site-width)) / 2));
  border-block: 3px solid var(--ink);
  background: var(--paper-deep);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.download-card {
  position: relative;
  display: flex;
  min-height: 235px;
  padding: 1.45rem;
  border: 2px solid var(--ink);
  background: #fff;
  flex-direction: column;
}

.download-card-featured {
  background: var(--yellow-light);
}

.download-card p {
  color: var(--muted);
}

.download-tag {
  align-self: flex-start;
  margin-bottom: 1.15rem;
  padding: 0.2rem 0.5rem;
  color: #fff;
  background: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-link {
  display: inline-block;
  margin-top: auto;
  font-weight: 900;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 4px;
  text-underline-offset: 4px;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--red);
}

.card-links {
  display: flex;
  margin-top: auto;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.card-links .text-link {
  margin-top: 0;
}

.builder-section {
  display: grid;
  margin-top: var(--space-section);
  margin-bottom: clamp(3rem, 6vw, 5rem);
  padding: clamp(2rem, 5vw, 4rem);
  color: #fff;
  border: 5px solid var(--yellow);
  background: var(--ink);
  grid-template-columns: minmax(0, 1.3fr) minmax(250px, 0.7fr);
  gap: 3rem;
  align-items: center;
}

.builder-copy {
  max-width: 680px;
}

.builder-copy h2 {
  color: var(--yellow);
}

.builder-copy .eyebrow {
  color: #d85b5b;
}

.builder-copy .button {
  margin-top: 0.75rem;
  border-color: var(--yellow);
}

.builder-copy .button-dark {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--yellow);
}

.builder-copy .button-dark:hover,
.builder-copy .button-dark:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--yellow-light);
  transform: translate(-2px, -2px);
}

.builder-copy .button-dark:active {
  box-shadow: 2px 2px 0 var(--yellow-light);
}

.builder-note {
  padding: 2.2rem 1.6rem;
  color: var(--red);
  background: #fff8e6;
  font-family: "Caveat", cursive;
  font-size: 1.5rem;
  line-height: 1.2;
  text-align: center;
  transform: rotate(2deg);
}

.builder-note span,
.builder-note strong {
  display: block;
}

.builder-note strong {
  margin-top: 0.6rem;
  font-size: 1.9rem;
}

.online-section {
  display: grid;
  min-height: 560px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
}

.online-art {
  height: 520px;
  overflow: hidden;
}

.online-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
}

.online-copy {
  max-width: 660px;
}

.site-footer {
  display: flex;
  padding: 2.5rem max(1rem, calc((100vw - var(--site-width)) / 2));
  color: #fff;
  border-top: 7px solid var(--yellow);
  background: var(--ink);
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.legal-page-main {
  width: min(var(--site-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.legal-page-main h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.75rem, 3.5vw, 2.65rem);
}

.legal-title {
  display: block;
  margin-bottom: 1.5rem;
}

.legal-title::after {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 0.55rem;
  background: var(--yellow);
  content: "";
}

.legal-page-main h2 {
  margin: 2.5rem 0 0.8rem;
  padding-bottom: 0.35rem;
  border-bottom: 4px solid var(--yellow);
  font-family: "Bree Serif", Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
}

.legal-page-main p,
.legal-page-main li {
  overflow-wrap: anywhere;
}

.legal-page-main ul {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

.legal-status,
.legal-placeholder {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--yellow);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.legal-status {
  display: block;
  margin: 1.25rem 0 2rem;
  padding: 0.8rem 1rem;
}

.legal-page-main .legal-stand {
  color: var(--muted);
  font-family: "Bree Serif", Georgia, serif;
}

body.not-found-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: var(--ink);
}

body.not-found-page .site-header,
body.not-found-page .site-footer {
  flex-shrink: 0;
}

.not-found-main {
  display: flex;
  width: 100%;
  flex: 1;
  padding: clamp(2rem, 4vw, 3.5rem) max(1rem, calc((100vw - var(--site-width)) / 2)) clamp(4.5rem, 8vw, 7rem);
  background:
    linear-gradient(rgba(23, 23, 23, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 31px;
  align-items: flex-start;
}

.not-found {
  display: grid;
  width: 100%;
  min-height: 460px;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.not-found-art {
  height: clamp(420px, 48vw, 570px);
}

.not-found-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
}

.not-found-content {
  max-width: none;
}

.not-found h1 {
  max-width: none;
  font-size: clamp(1.95rem, 4.2vw, 3.8rem);
}

.not-found-title-prefix {
  display: block;
  margin-bottom: clamp(0.3rem, 0.6vw, 0.45rem);
  white-space: nowrap;
}

.not-found-title-words {
  display: block;
  font-size: 0.78em;
  white-space: nowrap;
}

.not-found-copy {
  max-width: 38rem;
  margin-bottom: 1.75rem;
  font-family: "Bree Serif", Georgia, serif;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.45;
}

.footer-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-main img {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.footer-main p {
  margin-bottom: 0.25rem;
}

.footer-legal {
  display: flex;
  color: #bbb5aa;
  flex-wrap: wrap;
  gap: 0.8rem 1.25rem;
  font-size: 0.88rem;
}

.footer-legal a,
.footer-legal a:visited,
.footer-legal a:hover,
.footer-legal a:active {
  min-height: 2rem;
  padding: 0.2rem 0;
  color: inherit;
  text-decoration: none;
}

.footer-legal a {
  cursor: pointer;
}

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

@media (min-width: 681px) and (max-width: 1100px) {
  .hero {
    min-height: min(38rem, calc(100svh - 96px));
    margin-top: -48px;
    padding: clamp(1.75rem, 3.5vw, 3rem) 0 1.75rem;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 0.64fr);
    gap: clamp(0.75rem, 2vw, 1.5rem);
  }

  .hero-copy {
    transform: translateY(-10px);
  }

  .hero-art {
    min-height: clamp(480px, 59vw, 580px);
    margin-top: 25px;
    transform: translate(0, 8px);
  }

  .hero-art img {
    bottom: 4px;
    width: min(100%, 365px);
    max-height: 560px;
  }

  .download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .nav-toggle {
    display: inline-flex;
    min-height: 44px;
    padding: 0.4rem 0;
    align-items: center;
    gap: 0.65rem;
  }

  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--ink);
    content: "";
    transition: transform 160ms ease;
  }

  .nav-toggle-icon {
    position: relative;
  }

  .nav-toggle-icon::before {
    position: absolute;
    top: -7px;
  }

  .nav-toggle-icon::after {
    position: absolute;
    top: 7px;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-icon {
    background: transparent;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 1rem max(1rem, calc((100vw - var(--site-width)) / 2));
    border-bottom: 4px solid var(--yellow);
    background: var(--paper);
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }

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

  .site-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid #d8d1c5;
  }

  .no-js .nav-toggle {
    display: none;
  }

  .no-js .site-nav {
    position: static;
    display: flex;
    padding: 0;
    border: 0;
    flex-wrap: wrap;
    flex-direction: row;
  }

  .hero {
    min-height: auto;
    margin-top: -32px;
    padding: 2.5rem 0 1.75rem;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    position: relative;
    z-index: 3;
    transform: none;
  }

  .hero-art {
    min-height: 560px;
    transform: none;
  }

  .hero-art img {
    right: 50%;
    bottom: 20px;
    width: min(82%, 420px);
    max-height: 520px;
    transform: translateX(50%);
  }

  .download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .nav-shell {
    min-height: 66px;
    gap: 0.65rem;
  }

  .header-actions {
    margin-left: auto;
    gap: 0.45rem;
  }

  .music-toggle {
    padding: 0.45rem 0.55rem;
    font-size: 0.8rem;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand span {
    font-size: 1rem;
  }

  .hero {
    width: min(100% - 1.25rem, var(--site-width));
    margin-top: -24px;
    padding-top: 2.25rem;
  }

  h1 {
    font-size: clamp(2.15rem, 9.2vw, 4.3rem);
    text-shadow:
      -1px -1px 0 var(--ink),
      1px -1px 0 var(--ink),
      -1px 1px 0 var(--ink),
      1px 1px 0 var(--ink),
      3px 3px 0 var(--ink);
  }

  .button-row,
  .button {
    width: 100%;
  }

  .hero-art {
    min-height: 440px;
  }

  .hero-art img {
    bottom: 12px;
    width: min(84%, 350px);
    max-height: 420px;
  }

  .about-grid,
  .builder-section,
  .online-section,
  .not-found {
    grid-template-columns: 1fr;
  }

  .setting-list {
    grid-template-columns: 1fr;
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .download-card {
    min-height: 0;
  }

  .builder-section {
    width: calc(100% - 1.25rem);
    margin-top: 4.5rem;
    padding: 2rem 1.25rem;
  }

  .online-section {
    min-height: 0;
  }

  .online-art {
    height: 390px;
    order: 2;
  }

  .not-found {
    min-height: 0;
  }

  .not-found-art {
    height: 390px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .footer-main img {
    width: 58px;
    height: 58px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
