/* m8k site: a cousin of the Tape Smear plugin, not a copy.
   A teal harbor night with a low moon over water. Cream and ink come from the wordmark,
   and windows have title bars like an old desktop or a cassette label. */
:root {
  --night: #061722;
  --panel: rgba(7, 27, 39, 0.92);
  --cream: #fcefc0;
  --cream-dim: #d9cd9f;
  --ink: #11011d;
  --amber: #ffb547;
  --teal: #4fd1c5;
  --coral: #ff7a6b;
  --text: #f4ecd2;
  --muted: #94bcbd;
  --line: rgba(252, 239, 192, 0.16);
}

* { box-sizing: border-box; }
html { background: var(--night); scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: "VT323", ui-monospace, monospace;
  font-size: 23px;
  line-height: 1.35;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

#sky { position: fixed; inset: 0; width: 100vw; height: 100vh; image-rendering: pixelated; z-index: -1; display: block; }

h1, h2, h3, .btn, .nav a, .price, th, .amount, .sub { font-family: "Pixelify Sans", system-ui, sans-serif; }
h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; line-height: 1.05; margin: 0 0 14px; color: var(--cream);
     text-shadow: 3px 3px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }
h2 { font-size: 19px; font-weight: 700; margin: 0; line-height: 1; }
h3 { font-size: 19px; font-weight: 700; margin: 0 0 2px; color: var(--cream); }
p { margin: 0 0 14px; max-width: 60ch; }
a { color: var(--teal); text-underline-offset: 4px; }
.muted { color: var(--muted); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--amber); color: var(--ink); padding: 8px 12px; }

/* ---------- windows: ink outline, cream title bar, hard shadow ---------- */
.win {
  background: var(--panel);
  border: 4px solid var(--ink);
  box-shadow: inset 0 0 0 3px var(--cream-dim), 8px 8px 0 var(--ink);
}
.bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--cream); color: var(--ink);
  padding: 9px 14px 8px; border-bottom: 4px solid var(--ink);
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(17, 1, 29, 0.07) 3px 4px);
}
.bar .sub { font-size: 14px; font-weight: 500; color: #5b4a3a; }
.lights { margin-left: auto; display: flex; gap: 5px; }
.lights i { width: 10px; height: 10px; background: var(--coral); border: 2px solid var(--ink); }
.lights i:nth-child(2) { background: var(--amber); }
.lights i:nth-child(3) { background: var(--teal); }
.win.hot .bar { background-color: var(--amber); }
.win.hot .bar .sub { color: #5a3500; }
.body { padding: 18px 22px 22px; }

/* ---------- buttons: chunky keys ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 18px 10px; font-size: 17px; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer;
  background: var(--amber); color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
}
.btn:hover { background: #ffc66e; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost { background: var(--cream); }
.btn.ghost:hover { background: #fff7d8; }
.btn.soon { background: transparent; color: var(--muted); border-color: rgba(148, 188, 189, 0.45); border-style: dashed; box-shadow: none; cursor: default; font-weight: 500; }
.btn.soon:active { transform: none; }
.btn:focus-visible, .nav a:focus-visible, .brand:focus-visible, input:focus-visible, .more:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }

/* ---------- header ---------- */
.top { padding: 18px 0 6px; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: block; line-height: 0; }
.brand img { width: 120px; height: auto; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-size: 17px; font-weight: 500; padding: 8px 12px; border: 3px solid transparent; }
.nav a:hover { color: var(--cream); border-color: var(--line); }
.nav a[aria-current="page"] { background: var(--cream); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }

/* ---------- layout ---------- */
main { padding: 20px 0 40px; }
.stack { display: grid; gap: 30px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.hero { text-align: center; padding: 64px 0 70px; }
.wordmark { margin: 0 auto 6px; max-width: 640px; text-shadow: none; }
.wordmark img { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 0 rgba(17, 1, 29, 0.6)); }
.lede { font-size: 30px; color: var(--cream); margin: 0 auto 26px; max-width: none; text-shadow: 2px 2px 0 var(--ink); }
.hero .btns { justify-content: center; }

ul.list { list-style: none; margin: 0 0 12px; padding: 0; }
ul.list li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 2px dashed var(--line); }
ul.list li:last-child { border-bottom: 0; }
ul.list .cov svg { width: 48px; height: 48px; display: block; border: 3px solid var(--ink); }
ul.list b { display: block; font-weight: 400; color: var(--cream); }
ul.list small { color: var(--muted); font-size: 19px; }
.more { font-size: 20px; }

ul.pix { list-style: none; padding: 0; margin: 0 0 14px; }
ul.pix li { padding-left: 22px; position: relative; margin: 0 0 4px; }
ul.pix li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 8px; height: 8px; background: var(--amber); box-shadow: 2px 2px 0 var(--ink); }

/* plugins page */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; align-items: start; }
.shot { width: 100%; height: auto; display: block; border: 4px solid var(--ink); }
.shot-frame { line-height: 0; }
.modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.modules .win { height: 100%; }
.modules p { margin: 0; }

/* shop */
.items { display: grid; }
.item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 2px dashed var(--line); }
.item:last-child { border-bottom: 0; }
.item svg { width: 72px; height: 72px; display: block; border: 3px solid var(--ink); }
.item p { margin: 0; }
.item .buy { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.price { color: var(--amber); font-size: 18px; font-weight: 700; }
table.beats { width: 100%; border-collapse: collapse; }
.beats th { text-align: left; color: var(--muted); font-size: 14px; font-weight: 500; padding: 0 10px 8px 0; }
.beats td { padding: 10px 10px 10px 0; border-top: 2px dashed var(--line); vertical-align: middle; }
.beats td.name { display: flex; align-items: center; gap: 12px; color: var(--cream); }
.beats td.name svg { width: 40px; height: 40px; flex: none; border: 3px solid var(--ink); }
.beats .btn { padding: 8px 10px 7px; font-size: 14px; }

/* patreon */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; align-items: stretch; }
.tiers .win { display: flex; flex-direction: column; }
.tiers .body { flex: 1; display: flex; flex-direction: column; }
.tiers .amount { font-size: 44px; font-weight: 700; color: var(--amber); line-height: 1; margin: 2px 0 2px; text-shadow: 3px 3px 0 var(--ink); }
.tiers .amount small { font-size: 17px; font-weight: 500; color: var(--muted); text-shadow: none; }
.tiers ul.pix { flex: 1; }
.intro { padding: 30px 0 10px; }

/* forms */
form.signup { display: flex; gap: 14px; flex-wrap: wrap; }
form.signup input[type="email"] {
  flex: 1 1 240px; min-width: 0; font: inherit; color: var(--ink); background: var(--cream); padding: 8px 12px;
  border: 3px solid var(--ink); box-shadow: inset 3px 3px 0 var(--cream-dim);
}
form.signup input::placeholder { color: #8a7d5e; }
.hp { position: absolute; left: -9999px; }

footer { padding: 26px 0 40px; color: var(--muted); font-size: 20px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (max-width: 860px) {
  .two, .split, .modules, .tiers { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 48px; }
  .item { grid-template-columns: 56px minmax(0, 1fr); }
  .item svg { width: 56px; height: 56px; }
  .item .buy { grid-column: 1 / -1; justify-content: flex-start; }
  .beats th:nth-child(4), .beats td:nth-child(4) { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 21px; }
  .lede { font-size: 24px; }
  .body { padding: 14px 14px 18px; }
  .beats th:nth-child(3), .beats td:nth-child(3) { display: none; }
  .lights { display: none; }
}

/* ---------- sample kit previews ---------- */
.kit-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; margin-bottom: 6px; }
.kit-head .buy { display: flex; align-items: center; gap: 14px; }
.price.big { font-size: 30px; text-shadow: 3px 3px 0 var(--ink); }
ul.tracks li { grid-template-columns: 44px minmax(0, 1fr) auto; position: relative; padding: 10px 0 14px; }
ul.tracks small { display: block; }
.time { color: var(--muted); font-size: 20px; min-width: 3ch; text-align: right; }
.playing .time, .playing b { color: var(--amber) !important; }
.prog { position: absolute; left: 58px; right: 0; bottom: 4px; height: 4px; background: rgba(252, 239, 192, 0.1); }
.prog i { display: block; height: 100%; width: 0; background: var(--amber); }
.play {
  width: 44px; height: 44px; padding: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--cream); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.play:hover { background: var(--amber); }
.play:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.play:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
/* pixel play triangle, drawn with stacked shadows */
.play span { width: 0; height: 0; border-left: 14px solid var(--ink); border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.play.on { background: var(--amber); }
.play.on span { width: 14px; height: 16px; border: 0; margin: 0; background: linear-gradient(90deg, var(--ink) 0 5px, transparent 5px 9px, var(--ink) 9px 14px); }
.note { font-size: 19px; margin: 10px 0 0; }
@media (max-width: 560px) {
  .kit-head { grid-template-columns: 1fr; }
}

/* ---------- cover art + interaction ---------- */
.cover { padding: 0; border: 4px solid var(--ink); background: var(--ink); box-shadow: 6px 6px 0 var(--ink); cursor: pointer; line-height: 0;
  transition: transform 0.15s ease-out; transform-style: preserve-3d; will-change: transform; }
.cover img { width: 100%; height: auto; display: block; }
.cover:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.kit-feature { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.kit-head { grid-template-columns: 240px minmax(0, 1fr); }
.kit-head .buy { margin-top: 4px; }
.wordmark { transition: transform 0.2s ease-out; }
.music .wordmark img { animation: bob 0.5s steps(2) infinite alternate; }
@keyframes bob { to { transform: translateY(-4px); } }
.prog { height: 6px; cursor: pointer; }
.prog:hover { background: rgba(252, 239, 192, 0.22); }
#sky { transform-origin: 50% 50%; }
@media (prefers-reduced-motion: reduce) { .music .wordmark img { animation: none; } .cover, .wordmark { transition: none; } }
@media (max-width: 760px) {
  .kit-feature, .kit-head { grid-template-columns: 1fr; }
  .cover { max-width: 320px; }
}
.kit-buy { align-items: center; gap: 20px; margin-top: 10px; }
.hero .btns { margin-top: 22px; }

/* ---------- home: plugin and kit side by side ---------- */
.hero { padding-bottom: 46px; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; align-items: start; }
.duo .shot-frame { display: block; margin-bottom: 16px; }
.duo .pitch { margin-top: 0; }
.kit-top { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 8px; }
.kit-top p { font-size: 20px; margin-bottom: 10px; }
.kit-top .buy { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.more-tracks[data-open="false"] li:nth-child(n + 5) { display: none; }
.more-tracks small { font-size: 17px; }
.show-all { margin-top: 10px; font-size: 15px; padding: 9px 14px 8px; }
@media (max-width: 900px) { .duo { grid-template-columns: 1fr; } }
.small-print { font-size: 18px; margin: 12px 0 0; }

/* ---------- header: m8k centred, menu on the right ---------- */
.top { padding: 26px 0 10px; }
.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand img { width: 170px; }
.top .nav { justify-self: end; }
main { padding-top: 34px; }
@media (max-width: 560px) {
  .top .wrap { grid-template-columns: 1fr; justify-items: center; }
  .top .wrap > span { display: none; }
  .top .nav { justify-self: center; }
}

/* ---------- social icons + email ---------- */
.socials { display: flex; gap: 8px; align-items: center; }
.ico { display: grid; place-items: center; width: 42px; height: 42px; color: var(--cream); border: 3px solid transparent; }
.ico:hover { color: var(--ink); background: var(--amber); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.ico:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.ico svg { display: block; }
.foot-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.foot-links .ico { width: 36px; height: 36px; color: var(--muted); }
.foot-links .ico:hover { color: var(--ink); }
@media (max-width: 560px) { .top .socials { order: 3; } }
