/* Hand-written replacement for the Tailwind + Nuxt UI styles the site used.
   Values are Tailwind's (sizes, `gray` and `purple` palettes). */

:root {
  --gray-50: #f9fafb;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --primary-400: #c084fc;
  --primary-500: #a855f7;
  --primary-600: #9333ea;

  --serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
  --sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';

  /* per-theme values */
  --border: var(--gray-200);
  --nav-text: var(--gray-500);
  --nav-text-strong: var(--gray-900);
  --nav-hover-bg: var(--gray-50);
  --primary: var(--primary-500);
  --primary-hover: var(--primary-600);
  --on-primary: #fff;
  --ghost-text: var(--gray-700);
  --ghost-hover-bg: var(--gray-50);
  --page-btn-bg: #fff;
  --page-btn-ring: var(--gray-300);
}

:root.dark {
  color-scheme: dark;
  --border: var(--gray-800);
  --nav-text: var(--gray-400);
  --nav-text-strong: #fff;
  --nav-hover-bg: rgb(31 41 55 / 0.5);
  --primary: var(--primary-400);
  --primary-hover: var(--primary-500);
  --on-primary: var(--gray-900);
  --ghost-text: var(--gray-200);
  --ghost-hover-bg: var(--gray-800);
  --page-btn-bg: var(--gray-900);
  --page-btn-ring: var(--gray-700);
}

/* ---- reset (the parts of Tailwind's preflight the pages rely on) ---- */

*, ::before, ::after { box-sizing: border-box; border: 0 solid var(--gray-200); }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; font-family: var(--sans); -webkit-tap-highlight-color: transparent; }
body { margin: 0; line-height: inherit; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
h1, h2, h3, h4, h5, h6, p, hr, ol, ul { margin: 0; }
ol, ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: inherit; }
b, strong { font-weight: bolder; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; font-size: 1em; }
table { border-collapse: collapse; }
button { font: inherit; color: inherit; margin: 0; padding: 0; background: transparent; cursor: pointer; }
img, svg, canvas { display: block; vertical-align: middle; }
img { max-width: 100%; height: auto; }
::selection { background-color: color-mix(in srgb, var(--primary) 40%, transparent); }
a:focus-visible { outline-color: var(--primary); }

.icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
:root.dark .only-light, :root:not(.dark) .only-dark { display: none; }
.italic { font-style: italic; }
.underline { text-decoration: underline; }

/* ---- header ---- */

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}
.mainnav { flex: 1; font-family: var(--serif); }
.mainnav ul { display: flex; align-items: center; min-width: 0; }
.mainnav li { min-width: 0; }
.mainnav a {
  position: relative; display: flex; align-items: center;
  padding: 0.875rem 0.625rem; border-radius: 0.375rem;
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  color: var(--nav-text);
}
.mainnav a:hover, .mainnav a.active { color: var(--nav-text-strong); }
.mainnav a span { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mainnav a::before { content: ''; position: absolute; inset: 0.5rem 0; border-radius: 0.375rem; }
.mainnav a:hover::before { background-color: var(--nav-hover-bg); }
.mainnav a.active::after {
  content: ''; position: absolute; bottom: 0; left: 0.625rem; right: 0.625rem;
  height: 2px; border-radius: 9999px; background-color: var(--primary);
}
.mainnav a:focus-visible, 
.x-link img { height: 1rem; width: auto; }
.icon-button {
  display: inline-flex; align-items: center; margin-left: 1rem; padding: 0.375rem;
  border-radius: 0.375rem; color: var(--ghost-text);
}
.icon-button:hover { color: var(--nav-text-strong); background-color: var(--ghost-hover-bg); }

.page { padding: 0 1.5rem; }

/* ---- home ---- */

.container { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }
.home { height: calc(100vh - 4rem); }
.scene { width: 100%; height: 100%; }
.scene canvas { width: 100%; height: 100%; touch-action: none; }

/* ---- blog ---- */

@font-face {
  font-family: 'JethroCaps';
  src: url('/fonts/jethrocaps.woff2') format('woff2');
  font-display: block;
}

.content { max-width: 56rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .content { padding: 0 2rem; } }
@media (min-width: 1024px) { .content { padding: 0 4rem; } }

.separator, .post hr {
  border: 0; height: 1px; margin: 1rem 0;
  background-image: linear-gradient(to right, transparent, var(--gray-400), transparent);
}
.post hr, .separator.wide { margin: 2rem 0; }

/* Type scale, stepped up at each breakpoint. Below 640px prose gets a looser
   line height than its font size implies (as the Tailwind version did). */
.content { --h1: 3rem; --h2: 1.125rem; --h2-leading: 1.75rem; --text: 0.75rem; --leading: 1rem; --prose-leading: 1.625; }
@media (min-width: 640px) { .content { --h1: 4.5rem; --h2: 1.25rem; --text: 0.875rem; --leading: 1.25rem; --prose-leading: var(--leading); } }
@media (min-width: 768px) { .content { --h1: 6rem; --h2: 1.5rem; --h2-leading: 2rem; --text: 1rem; --leading: 1.5rem; } }
@media (min-width: 1024px) { .content { --h1: 8rem; --h2: 1.875rem; --h2-leading: 2.25rem; --text: 1.125rem; --leading: 1.75rem; } }

.post h1 { font-family: JethroCaps, sans-serif; font-weight: 400; font-size: var(--h1); line-height: 1; }
.post h2 { font-family: var(--serif); font-weight: 600; margin: 1.5rem 0 0.5rem; font-size: var(--h2); line-height: var(--h2-leading); }
.post time { display: block; margin-bottom: 1rem; color: var(--gray-500); }
.post p, .post ul, .post ol, .post time, .post-nav .button { font-family: var(--serif); font-size: var(--text); line-height: var(--leading); }
.post p, .post ul, .post ol { line-height: var(--prose-leading); }
.post ul { list-style: disc inside; }
.post ol { list-style: decimal inside; }

.post-nav { display: flex; align-items: center; justify-content: space-between; margin: 2rem 0; }
.post-nav > div { display: flex; align-items: center; flex: 1; }
.post-nav > .next { justify-content: flex-end; }
.fleuron { margin: 0 2rem; font-size: 1.5rem; line-height: 2rem; }

.button {
  display: inline-flex; align-items: center; padding: 0.375rem 0.625rem;
  border-radius: 0.375rem; font-weight: 500;
  color: var(--on-primary); background-color: var(--primary);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.button:hover { background-color: var(--primary-hover); }
.button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.post-nav > div:first-child .button { margin-right: 1rem; }
.post-nav > .next .button { margin-left: 1rem; }

.pagination { display: flex; justify-content: center; align-items: center; margin-top: 1rem; }
.page-btn {
  position: relative; display: inline-flex; align-items: center; flex-shrink: 0;
  padding: 0.375rem 0.625rem; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  color: var(--nav-text-strong); background-color: var(--page-btn-bg);
  box-shadow: inset 0 0 0 1px var(--page-btn-ring), 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.page-btn + .page-btn { margin-left: -1px; }
.page-btn:first-child { border-radius: 0.375rem 0 0 0.375rem; }
.page-btn:last-child { border-radius: 0 0.375rem 0.375rem 0; }
.page-btn.page-edge { padding: 0.375rem; }
a.page-btn:hover { background-color: var(--nav-hover-bg); }
.page-btn.current { z-index: 1; color: var(--on-primary); background-color: var(--primary); box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.page-btn.current:hover { background-color: var(--primary-hover); }
.page-btn[aria-disabled='true'] { opacity: 0.75; cursor: not-allowed; }

.not-found { font-size: 1.875rem; line-height: 2.25rem; font-weight: 700; margin: 1.5rem 0 1rem; }

/* ---- support ---- */

.support-intro { margin: 1.5rem 0; font-family: var(--serif); }
.wallets { min-width: 100%; }
.wallets td { padding: 0.5rem 1rem; }
.qr { margin: 0 auto 1rem; }
.wallet { font-family: var(--serif); text-align: center; overflow-wrap: break-word; word-break: break-all; }
.copy { display: inline-flex; vertical-align: middle; margin-left: 0.5rem; color: var(--gray-500); }
.copy:hover { color: var(--gray-700); }
.copy .icon { width: 1rem; height: 1rem; }
.copy.copied .when-idle, .copy:not(.copied) .when-copied { display: none; }
