/* Bonsai Kit, bonsaikit.dev. After v2 (sprout.store type and spacing). */

/* ABC Areal + ABC Areal Mono by Dinamo, free fonts license (web use included). Files are
   Dinamo's WOFF2s, unmodified and unrenamed, as the licence requires. */
@font-face {
  font-family: 'ABC Areal';
  src: url('/fonts/ABCAreal-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Areal';
  src: url('/fonts/ABCAreal-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Areal Mono';
  src: url('/fonts/ABCArealMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Areal Mono';
  src: url('/fonts/ABCArealMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000;
  --paper: #fff;
  --lime: rgb(207, 255, 85);
  /* Lowest opacity that keeps black-on-white text at 4.5:1 (0.55 = 4.74:1). */
  --dim: 0.55;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  /* Areal is an Arial revival, so Arial is a near-metric fallback while it loads. */
  --font-body: 'ABC Areal', Arial, Helvetica, sans-serif;
  --font-mono: 'ABC Areal Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

body {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

ol,
ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-size: inherit;
  font-weight: 500;
}

strong {
  font-weight: 500;
}

/* Headings and short centred lines balance; running copy wraps pretty (no one-word last lines). */
p,
li {
  text-wrap: pretty;
}

h1,
h2,
h3,
.hero p,
.callout p,
.card__foot,
.faq__q {
  text-wrap: balance;
}

a {
  color: inherit;
}

a,
button,
summary {
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px dotted var(--ink);
  outline-offset: 2px;
}

/* Mono is the system layer: wordmark, labels, price, controls, code. Body copy is Areal. */
.hero h1,
.label,
.card__label,
.card__price,
.buy,
.steps li::before,
.footer {
  font-family: var(--font-mono);
  font-size: 12px;
}

code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.u {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: text-decoration-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .u:hover {
    text-decoration-color: transparent;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 10px;
  top: -40px;
  padding: 6px 10px;
  background: var(--lime);
  font-weight: 500;
}

.skip:focus-visible {
  top: 10px;
}

/* ---- Layout ---- */

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
}

section {
  padding: 30px 0;
}

.label {
  font-weight: 500;
  margin-bottom: 10px;
}

.hero {
  padding: 60px 0 30px;
  text-align: center;
}

.hero h1 {
  font-weight: 500;
  margin-bottom: 20px;
}


/* ---- Buy card ---- */

.card {
  border: 1px solid var(--ink);
  padding: 10px;
}

.card__label {
  margin-bottom: 10px;
}

.card__price {
  font-weight: 500;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.card__was {
  font-weight: 400;
  opacity: var(--dim);
  margin-left: 4px;
}

.card__terms {
  margin-bottom: 10px;
}

.card__scarcity {
  margin-bottom: 10px;
}

.card__list {
  margin-bottom: 20px;
}

.buy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition:
    transform 160ms var(--ease-out),
    background-color 150ms ease,
    color 150ms ease;
}

a.buy:active {
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  a.buy:hover {
    background: var(--ink);
    color: var(--lime);
  }
}

.buy__arrow {
  transition: transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  a.buy:hover .buy__arrow {
    transform: translateX(3px);
  }
}

/* No checkout link yet: plain text that does not look pressable. */
.buy--soon {
  background: none;
  border: 1px dashed var(--ink);
  font-weight: 400;
  justify-content: center;
}

.card__foot {
  margin-top: 10px;
  text-align: center;
}

/* ---- Steps ---- */

.steps {
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  padding: 4px 0;
}

.steps li::before {
  content: counter(step) '.';
}

.cmd {
  display: block;
  margin-top: 4px;
  padding: 6px 8px;
  background: #f2f2f2;
  overflow-x: auto;
  white-space: pre;
  font-weight: 400;
}

/* ---- Tabs ---- */

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 20px;
}

.tabs__tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  padding: 8px 10px;
  min-height: 34px;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 12px;
  color: inherit;
  cursor: pointer;
  opacity: var(--dim);
  transition: opacity 150ms ease;
}

@media (pointer: coarse) {
  .tabs__tab {
    min-height: 44px;
  }
}

.tabs__tab:first-child {
  padding-left: 0;
}

@media (max-width: 479px) {
  .tabs__tab {
    padding-inline: 6px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .tabs__tab:hover {
    opacity: 0.75;
  }
}

.tabs__tab[aria-selected='true'] {
  opacity: 1;
  font-weight: 500;
  border-bottom-color: var(--ink);
}

.tabs__panel[hidden] {
  display: none;
}

.tabs__panel {
  animation: panel-in 150ms ease-out;
}

@keyframes panel-in {
  from {
    opacity: 0;
  }
}

.card__list li,
.dash li {
  padding: 4px 0 4px 12px;
  text-indent: -12px;
}

.card__list li::before,
.dash li::before {
  content: '- ';
}

/* Without JS every panel shows, each with its heading. */
.tabs__heading {
  font-weight: 500;
  margin: 20px 0 6px;
}

.js .tabs__heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.no-js-hide {
  display: none;
}

.js .no-js-hide {
  display: flex;
}

/* ---- Callout ---- */

.callout {
  background: var(--lime);
  padding: 40px 20px;
  text-align: center;
}

.callout p + p {
  margin-top: 10px;
}

/* ---- FAQ ---- */

.faq__item {
  border-bottom: 1px solid var(--ink);
}

.faq__item:first-of-type {
  border-top: 1px solid var(--ink);
}

.faq__q {
  appearance: none;
  background: none;
  border: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.faq__q::after {
  content: '+';
  flex-shrink: 0;
}

.faq__q[aria-expanded='true']::after {
  content: '\2212';
}

/* Keyboard opens skip the fade (JS sets data-instant): never animate keyboard actions. */
.tabs__panel[data-instant],
.faq__a[data-instant] {
  animation: none;
}

.faq__q {
  transition: opacity 150ms ease;
}

.faq__q:active {
  opacity: 0.6;
}

/* Opens in place (no height animation); the answer fades in. */
.faq__a {
  padding-bottom: 12px;
  animation: panel-in 150ms ease-out;
}

.faq__a p + p {
  margin-top: 10px;
}

/* ---- Footer ---- */

.footer {
  padding: 30px 0 max(60px, env(safe-area-inset-bottom));
  text-align: center;
}

.footer p + p {
  margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    animation: none !important;
  }
}
