/* twentyeight dsp. The look is the plugins' own: Gaegu lettering, the maker's hand up the left edge, dark paper with
   grain, sewn dividers, a pencil line under the word in use. Gold is kept for what does something when clicked. */

@font-face { font-family: "Gaegu"; src: url("fonts/Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Gaegu"; src: url("fonts/Normal.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gaegu"; src: url("fonts/Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Maker"; src: url("fonts/Maker.ttf") format("truetype"); font-display: swap; }

:root {
  color-scheme: dark;
  --paper: #191E24;
  --ink: #E4E9EA;
  --dim: #A3AEB5;
  --chalk: #CBD3D6;
  --gold: #C2A66A;
  --gold-up: #E0CB98;
  --hair: rgba(203, 211, 214, .17);
  --text: "Gaegu", "Comic Neue", "Chalkboard SE", "Comic Sans MS", cursive;
  --hand: "Maker", "Cedarville Cursive", "Snell Roundhand", cursive;
  --spine: 68px;
}
.paper-charcoal { --paper: #191E24; }
.paper-navy { --paper: #151C38; }
.paper-purple { --paper: #261D38; }
.paper-wine { --paper: #301825; }
.paper-moss { --paper: #1B2921; }
.paper-umber { --paper: #2B241C; }
.paper-turquoise { --paper: #112E2E; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper) url("paper.png") 0 0 / 320px 320px;
  color: var(--ink);
  font: 400 21px/1.5 var(--text);
}
img { max-width: 100%; display: block; height: auto; }
p, h1, h2, h3, dl, dd, figure { margin: 0; }
a { color: var(--gold); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-up); }
:focus-visible { outline: 1.5px dashed var(--gold); outline-offset: 4px; border-radius: 2px; }
::selection { background: rgba(194, 166, 106, .35); }
svg.pencil { position: absolute; overflow: visible; pointer-events: none; }
svg.pencil path { vector-effect: non-scaling-stroke; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; z-index: 5; }
.skip:focus { left: 8px; }

/* the frame: the maker's hand up a sewn spine, as in every plugin window */
.frame { display: flex; min-height: 100vh; }
.spine { width: var(--spine); flex: none; background: url("stitch-v.svg") right 4px top / 8px auto repeat-y; }
.maker {
  position: sticky; top: calc(50vh - 120px);
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 240px; margin-left: 4px;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 24px/1 var(--hand); color: var(--ink); text-decoration: none; white-space: nowrap;
}
.maker:hover { color: var(--gold-up); }
.page { flex: 1 1 0; min-width: 0; max-width: 1260px; padding: 0 56px 48px 36px; display: flex; flex-direction: column; }
.stitch { height: 8px; background: url("stitch-h.svg") 0 0 / auto 8px repeat-x; }

/* the words along the top; a pencil line under the one in use */
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 36px; min-height: 76px; font-size: 22px; }
.tabs a { position: relative; padding: 10px 0; color: var(--dim); text-decoration: none; }
.tabs a:hover, .tabs a[aria-current] { color: var(--ink); }
.tabs a.last { margin-left: auto; }
/* from the word's first letter to just past its last, a little under the baseline, as in the plugins */
.tabs a > svg.pencil, .util a > svg.pencil { left: -1px; top: calc(50% + .36em); width: calc(100% + 5px); height: 10px; color: var(--ink); }
.util { display: flex; align-items: center; gap: 36px; }
.util.narrow { display: none; }
.util a { position: relative; padding: 10px 0; color: var(--dim); text-decoration: none; white-space: nowrap; }
.home .util a { color: var(--ink); }
.home .util a:hover { color: var(--gold-up); }
.util a:hover, .util a[aria-current] { color: var(--ink); }
.count { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-left: 7px; font-size: 17px; line-height: 1; color: var(--ink); vertical-align: 2px; }
.count svg.pencil { inset: 0; width: 100%; height: 100%; }
.count b { position: relative; font-weight: 400; }
.home .tabs a { color: var(--ink); }
.home .tabs a:hover { color: var(--gold-up); }

.label { font-size: 15px; line-height: 1.3; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 400; }
.dim { color: var(--dim); }
.todo { color: var(--dim); border-bottom: 1px dashed var(--hair); }

/* the holding page */
.opening.holding { padding: 64px 0 52px; }
.opening.holding .pay { margin-top: 10px; }
.waitlist { margin-top: 10px; display: flex; flex-direction: column; gap: 12px; }
.waitlist .fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; }
.waitlist label { display: flex; flex-direction: column; gap: 6px; flex: 1 1 260px; max-width: 380px; }
.waitlist input[type=email] { font: inherit; font-size: 24px; color: var(--ink); background: none; border: 0; border-bottom: 1.5px solid var(--chalk); border-radius: 0; padding: 6px 2px 8px; min-height: 48px; width: 100%; }
.waitlist input[type=email]:focus-visible { outline: none; border-bottom-color: var(--gold); }
.waitlist .btn[disabled] { opacity: .5; cursor: default; }
.waitlist .said { display: none; font-size: 24px; line-height: 1.35; color: var(--ink); }
.waitlist[data-moonbase-state="subscribed"] .fields, .waitlist[data-moonbase-state="confirmation_sent"] .fields { display: none; }
.waitlist[data-moonbase-state="subscribed"] .joined, .waitlist[data-moonbase-state="confirmation_sent"] .confirm { display: block; }
.waitlist[data-moonbase-state="error"] .failed { display: block; font-size: 19px; color: #E9A7B6; }
.opening.holding .note { font-size: 19px; line-height: 1.4; color: var(--dim); max-width: 30em; }
span.maker:hover { color: var(--ink); }
.card.still:hover .name { text-decoration: none; }
.card.still:hover .shot { outline-color: var(--hair); }
.after-stitch { height: 44px; }

/* home */
.unseen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.unseen + .group { padding-top: 44px; }
.opening { padding: 72px 0 60px; display: flex; flex-direction: column; gap: 18px; max-width: 900px; }
.opening h1 { font-weight: 300; font-size: clamp(46px, 6.4vw, 78px); line-height: 1.02; text-wrap: balance; }
.opening p { font-size: 24px; line-height: 1.4; color: var(--dim); max-width: 34em; }
.group { display: flex; flex-direction: column; gap: 22px; padding-bottom: 60px; scroll-margin-top: 24px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.card { display: flex; flex-direction: column; gap: 12px; color: var(--ink); text-decoration: none; }
.card:hover { color: var(--ink); }
.shot { position: relative; aspect-ratio: 16 / 10; background: var(--paper) url("paper.png") 0 0 / 320px 320px; outline: 1px solid var(--hair); }
.shot img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); max-width: none; object-fit: contain; }
.card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.card .name { font-size: 33px; line-height: 1.12; font-weight: 300; }
.card .price { font-size: 22px; color: var(--gold); white-space: nowrap; }
.card .price.soon { color: var(--dim); }
.card .line { font-size: 20px; line-height: 1.35; color: var(--dim); }
.card:hover .name, .card:focus-visible .name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; text-decoration-color: var(--chalk); }
.card:hover .shot { outline-color: rgba(203, 211, 214, .42); }
.cards.small { gap: 28px; }
.cards.small .name { font-size: 26px; }
.cards.small .price { font-size: 20px; }
.made { display: flex; flex-direction: column; gap: 16px; padding: 44px 0 56px; max-width: 30em; }

/* a plugin's page */
.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 56px; padding: 52px 0 36px; }
.top .words { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.top h1 { font-weight: 300; font-size: clamp(60px, 8.4vw, 104px); line-height: .98; text-wrap: balance; }
.top .lede { font-size: 26px; line-height: 1.35; max-width: 24em; margin-top: 6px; }
.best { font-size: 21px; line-height: 1.4; color: var(--ink); max-width: 30em; margin-top: 8px; }
.best .label { margin-right: 10px; }
.get { flex: none; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; max-width: 260px; }
.get .note { font-size: 18px; line-height: 1.35; color: var(--dim); }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 56px; padding: 0 30px; font-size: 24px; line-height: 1; color: var(--gold); text-decoration: none; white-space: nowrap;
}
.btn svg.pencil { inset: 0; width: 100%; height: 100%; }
.btn:hover { color: var(--gold-up); background: rgba(194, 166, 106, .09); }
.btn:active { background: rgba(194, 166, 106, .16); }
.soon-note { font-size: 24px; line-height: 1.3; }
figure.window { display: flex; flex-direction: column; gap: 10px; }
figure.window a { display: block; }
figure.window img { width: 100%; outline: 1px solid var(--hair); }
figure.window figcaption { font-size: 18px; color: var(--dim); }
.more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; margin-top: 36px; }
.about { display: flex; flex-wrap: wrap; gap: 48px 72px; padding: 64px 0 60px; }
.does { flex: 1 1 520px; min-width: 0; max-width: 31em; display: flex; flex-direction: column; gap: 20px; }
.details { flex: 1 1 320px; min-width: 0; max-width: 420px; display: flex; flex-direction: column; gap: 18px; font-size: 20px; line-height: 1.4; }
.details dl { display: flex; flex-direction: column; gap: 16px; }
.details dt { color: var(--dim); font-size: 16px; letter-spacing: .02em; }
.parts { display: flex; flex-direction: column; gap: 22px; padding: 0 0 56px; }
.parts dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 48px; }
.parts dt { font-size: 30px; line-height: 1.15; font-weight: 300; margin-bottom: 4px; }
.parts dd { font-size: 20px; line-height: 1.42; color: var(--dim); max-width: 24em; }
.again { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; padding: 36px 0; }
.again p { font-size: 30px; line-height: 1.25; font-weight: 300; flex: 1 1 320px; min-width: 0; }
.others { display: flex; flex-direction: column; gap: 22px; padding: 44px 0 56px; }

/* support */
.plain { display: flex; flex-direction: column; gap: 44px; padding: 52px 0 60px; max-width: 31em; }
.plain h1 { font-weight: 300; font-size: clamp(54px, 7vw, 84px); line-height: 1; }
.plain .lede { font-size: 24px; color: var(--dim); margin-top: 10px; }
.plain section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 24px; }
.plain section:target .label { color: var(--ink); }

/* cart and account */
.plain.cart { max-width: 760px; }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lines li { display: flex; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px dashed var(--hair); }
.lines li:first-child { border-top: 1px dashed var(--hair); }
.lines .shot { width: 128px; flex: none; }
.lines .shot img { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
.lines .name { flex: 1 1 0; min-width: 0; font-size: 30px; line-height: 1.15; font-weight: 300; color: var(--ink); text-decoration: none; }
.lines .name:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
.lines .price { font-size: 24px; white-space: nowrap; }
button.link { font: inherit; font-size: 19px; color: var(--gold); background: none; border: 0; padding: 12px 0 12px 8px; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
button.link:hover { color: var(--gold-up); }
#cart-full { display: flex; flex-direction: column; gap: 22px; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 30px; font-weight: 300; }
.pay { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
button.btn { font: inherit; font-size: 24px; background: none; border: 0; cursor: pointer; }
.signin { display: flex; flex-direction: column; gap: 26px; max-width: 420px; }
.signin label { display: flex; flex-direction: column; gap: 6px; }
.signin input { font: inherit; font-size: 24px; color: var(--ink); background: none; border: 0; border-bottom: 1.5px solid var(--chalk); border-radius: 0; padding: 6px 2px 8px; min-height: 48px; }
.signin input:focus-visible { outline: none; border-bottom-color: var(--gold); }

.foot { display: flex; flex-wrap: wrap; gap: 4px 28px; align-items: baseline; padding-top: 18px; font-size: 19px; color: var(--dim); }
.foot a { padding: 8px 0; }
.foot .end { margin-left: auto; }

@media (max-width: 1020px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page { padding-right: 32px; padding-left: 28px; }
}
@media (max-width: 720px) {
  body { font-size: 20px; line-height: 1.42; }
  .frame { flex-direction: column; }
  .spine { width: auto; background: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(18px, env(safe-area-inset-right, 0px)) 0 max(18px, env(safe-area-inset-left, 0px)); }
  .util.wide { display: none; }
  .util.narrow { display: flex; gap: 22px; font-size: 20px; }
  .lines li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 0 14px; }
  .lines .shot { width: 92px; grid-row: 1 / span 2; }
  .lines .name { font-size: 26px; }
  .lines button.link { grid-column: 2; justify-self: start; padding: 8px 0 4px; }
  .pay .btn { width: 100%; }
  .maker { position: static; writing-mode: horizontal-tb; transform: none; width: auto; height: 44px; margin: 0; justify-content: flex-start; }
  .page { padding: 0 max(18px, env(safe-area-inset-right, 0px)) 36px max(18px, env(safe-area-inset-left, 0px)); }
  .tabs { justify-content: space-between; gap: 0 10px; min-height: 52px; font-size: 20px; }
  .tabs a { padding: 12px 0; }
  .tabs a.last { margin-left: 0; }
  .opening { padding: 40px 0 44px; }
  .opening p { font-size: 22px; }
  .cards, .cards.small { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .cards.small { gap: 14px; }
  .cards.small .card { flex-direction: row; align-items: center; gap: 14px; min-height: 64px; }
  .cards.small .shot { width: 104px; flex: none; }
  .cards.small .shot img { inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); }
  .cards.small .row { flex: 1 1 0; min-width: 0; }
  .top { padding: 30px 0 26px; gap: 22px; }
  .top .lede { font-size: 22px; }
  .get { max-width: none; width: 100%; align-items: stretch; }
  figure.window { margin: 0 calc(-1 * max(18px, env(safe-area-inset-right, 0px))) 0 calc(-1 * max(18px, env(safe-area-inset-left, 0px))); }
  figure.window figcaption { padding: 0 18px; }
  .more { grid-template-columns: minmax(0, 1fr); margin-top: 28px; }
  .about { padding: 40px 0 44px; gap: 36px; }
  .parts { padding-bottom: 44px; }
  .parts dl { gap: 22px; }
  .parts dt { font-size: 27px; }
  .again p { font-size: 26px; }
  .again .btn { width: 100%; }
  .foot { flex-direction: column; gap: 0; }
  .foot a, .foot span { padding: 10px 0; }
  .foot .end { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
