/* PULLMINT base.css: tokens, type, chrome (nav, drawer, footer, toast, dialog), buttons, forms, certificate cards, stamps.
   Shared by every page including the landing (which reads it but does not change it). */

@font-face { font-family: 'Gloock'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/gloock-latin.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap; src: url(/assets/fonts/instrument-sans-latin-wght.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: italic; font-weight: 400 700; font-stretch: 100%; font-display: swap; src: url(/assets/fonts/instrument-sans-latin-wght-italic.woff2) format('woff2'); }

:root {
  --night: #120D0B; --night-2: #1C1512; --night-3: #2A201B;
  --ivory: #F1E8D6; --ivory-2: #D9CBB0;
  --oxblood: #7A1E24; --ox-l: #A3343B;
  --copper: #B8734A; --copper-l: #D99A6C;
  --lamp: #F2C879;
  --ink: #2B1612;            /* body text on paper: oxblood-black */
  --paper-line: rgba(122, 30, 36, .28);
  --muted: rgba(241, 232, 214, .62);
  --display: 'Gloock', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .12 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--night); color: var(--ivory);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; outline: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: rgba(184, 115, 74, .6); text-underline-offset: 3px; }
a:hover { color: var(--copper-l); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; letter-spacing: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.2vw, 58px); }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
code, kbd, samp { font-family: var(--sans); font-size: .94em; background: var(--night-3); padding: .08em .35em; border-radius: var(--radius); }
::selection { background: var(--oxblood); color: var(--ivory); }
hr { border: 0; border-top: 1px solid var(--night-3); margin: 32px 0; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }
.on-paper :focus-visible, .cert :focus-visible { outline-color: var(--oxblood); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.num, .tab { font-variant-numeric: tabular-nums lining-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.label {
  display: inline-block; font: 600 11.5px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--copper-l);
}
.label.plain { color: var(--ivory-2); }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ivory-2); max-width: 62ch; }
.break { word-break: break-all; overflow-wrap: anywhere; }

/* double rule: the printer's divider */
.rule2 { height: 5px; border-top: 1px solid var(--copper); border-bottom: 1px solid var(--copper); opacity: .7; margin: 28px 0; }

/* ── buttons ─────────────────────────────────────────── */
.btn {
  --b: var(--ivory-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border: 1px solid var(--b); border-radius: var(--radius);
  background: transparent; color: var(--ivory); font: 600 15px/1.2 var(--sans); letter-spacing: .01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { background: rgba(241, 232, 214, .08); color: var(--ivory); }
.btn-sm { min-height: 36px; padding: 7px 12px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 16px; }
.btn-ox { background: var(--oxblood); border-color: var(--oxblood); color: var(--ivory); }
.btn-ox:hover { background: var(--ox-l); border-color: var(--ox-l); color: var(--ivory); }
.btn-ivory { background: var(--ivory); border-color: var(--ivory); color: var(--oxblood); }
.btn-ivory:hover { background: #fff8ea; color: var(--oxblood); }
.btn-ghost { border-color: transparent; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid var(--ivory); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.on-paper .btn { --b: var(--oxblood); color: var(--oxblood); }
.on-paper .btn:hover { background: rgba(122, 30, 36, .07); }
.on-paper .btn-ox { color: var(--ivory); }
@keyframes spin { to { transform: rotate(1turn); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid transparent; border-radius: var(--radius);
  background: transparent; color: var(--ivory-2); cursor: pointer; padding: 0;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--ivory); border-color: var(--night-3); }

/* ── forms ───────────────────────────────────────────── */
.field { display: grid; gap: 6px; margin: 0 0 18px; }
.field > label, .field > .flabel { font: 600 11.5px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--ivory-2); }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--night-3); border-radius: var(--radius);
  background: var(--night); color: var(--ivory); font: 400 16px/1.4 var(--sans);
}
.input::placeholder { color: rgba(217, 203, 176, .45); }
.input:focus-visible { outline: 2px solid var(--lamp); outline-offset: 0; border-color: transparent; }
.input[aria-invalid="true"] { border-color: var(--ox-l); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ivory-2) 50%), linear-gradient(135deg, var(--ivory-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
textarea.input { min-height: 120px; resize: vertical; }
.hint { font-size: 13.5px; color: var(--muted); margin: 0; }
.err-text { color: #E7A3A0; font-size: 14px; margin: 0; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(var(--copper), var(--copper)) 0 / var(--fill, 13%) 100% no-repeat, var(--night-3); }
input[type="range"]::-moz-range-track { height: 3px; background: var(--night-3); }
input[type="range"]::-moz-range-progress { height: 3px; background: var(--copper); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7.5px; background: var(--ivory); border: 3px double var(--oxblood); transform: rotate(45deg); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; background: var(--ivory); border: 3px double var(--oxblood); border-radius: 0; transform: rotate(45deg); }
input[type="range"]:focus-visible { outline: 2px solid var(--lamp); outline-offset: 4px; }

/* ── panels ──────────────────────────────────────────── */
.panel { background: var(--night-2); border: 1px solid var(--night-3); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); }
.panel + .panel { margin-top: 16px; }
.panel-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.panel-h h2, .panel-h h3 { margin: 0; }

/* ── certificate (ivory paper, guilloche frame, double rule) ─────────── */
.cert {
  position: relative; color: var(--ink); background-color: var(--ivory);
  background-image: var(--noise), radial-gradient(120% 90% at 30% 20%, #F6EEDF 0%, var(--ivory) 55%, #E9DDC5 100%);
  border: 14px solid transparent; border-image: url(/assets/img/guilloche-frame.svg) 14 round;
  border-radius: 0; padding: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05), 0 18px 40px -18px rgba(0, 0, 0, .7);
}
.cert-in { position: relative; margin: 4px; padding: clamp(18px, 3.4vw, 32px); border: 3px double var(--paper-line); }
.cert a { color: var(--oxblood); text-decoration-color: rgba(122, 30, 36, .45); }
.cert a:hover { color: var(--ox-l); }
.cert .label { color: var(--oxblood); }
.cert .muted { color: rgba(43, 22, 18, .66); }
.cert h1, .cert h2, .cert h3 { color: var(--ink); }
.cert .rule2 { border-color: var(--paper-line); opacity: 1; margin: 18px 0; }
.cert-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font: 600 11.5px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--oxblood); }
.serial { font: 400 15px/1 var(--display); letter-spacing: .06em; color: var(--oxblood); white-space: nowrap; }
.cert-rosette { position: absolute; width: 150px; height: 150px; right: 4px; bottom: 4px; opacity: .4; pointer-events: none; background: url(/assets/img/rosette.svg) center/contain no-repeat; }
.cert > *:not(.cert-rosette) { position: relative; }

/* stamps */
.stamp {
  display: inline-block; padding: 5px 12px 4px; border: 3px double currentColor; color: var(--oxblood);
  font: 400 20px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; transform: rotate(-7deg);
  opacity: .86; mix-blend-mode: multiply; pointer-events: none; user-select: none;
}
.stamp.paid { color: var(--copper); }
.stamp.big { font-size: 34px; padding: 8px 18px 6px; border-width: 5px; }
.cert .stamp-pos { position: absolute; right: clamp(14px, 4vw, 34px); top: clamp(48px, 6vw, 64px); }

/* status chips */
.status { display: inline-flex; align-items: center; gap: 7px; font: 600 11.5px/1 var(--sans); text-transform: uppercase; letter-spacing: .14em; padding: 6px 9px; border: 1px solid currentColor; border-radius: var(--radius); white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; background: currentColor; transform: rotate(45deg); }
.status.open { color: var(--ivory); }
.status.proposed { color: var(--lamp); }
.status.paid { color: var(--copper-l); }
.status.closed, .status.expired, .status.withdrawn { color: rgba(217, 203, 176, .6); }
.cert .status.open, .strip .status.open { color: var(--ink); }
.cert .status.proposed, .strip .status.proposed { color: #8A5A0A; }
.cert .status.paid, .strip .status.paid { color: #8B4F2A; }
.cert .status.closed, .cert .status.withdrawn, .strip .status.closed { color: rgba(43, 22, 18, .55); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--night-3); border-radius: var(--radius); font: 600 12px/1.2 var(--sans); letter-spacing: .06em; color: var(--ivory-2); }
.cert .chip, .strip .chip { border-color: var(--paper-line); color: var(--oxblood); }

/* ── nav ─────────────────────────────────────────────── */
.pm-skiplink { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ivory); color: var(--oxblood); padding: 10px 14px; font-weight: 600; }
.pm-skiplink:focus { top: 10px; }
.pm-nav { position: sticky; top: 0; z-index: 50; background: rgba(18, 13, 11, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--night-3); }
.pm-nav.is-overlay { position: fixed; left: 0; right: 0; background: linear-gradient(rgba(18, 13, 11, .8), rgba(18, 13, 11, 0)); border-bottom-color: transparent; backdrop-filter: none; }
.pm-nav-in { display: flex; align-items: center; gap: 22px; height: 60px; }
.pm-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ivory); }
.pm-logo svg { width: 28px; height: 28px; }
.pm-logo span { font: 400 21px/1 var(--display); letter-spacing: .01em; }
.pm-links { display: flex; gap: 4px; }
.pm-links a { padding: 8px 10px; text-decoration: none; color: var(--ivory-2); font-size: 15px; font-weight: 500; border-bottom: 1px solid transparent; }
.pm-links a:hover { color: var(--ivory); }
.pm-links a[aria-current="page"] { color: var(--ivory); border-bottom-color: var(--copper); }
.pm-nav-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.pm-ca-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 10px; border: 1px solid var(--night-3); border-radius: var(--radius); background: transparent; color: var(--ivory-2); font: 500 13px/1 var(--sans); cursor: pointer; }
.pm-ca-chip:hover { border-color: var(--copper); color: var(--ivory); }
.pm-ca-chip svg { width: 14px; height: 14px; }
.pm-ca-k { font-weight: 700; color: var(--copper-l); letter-spacing: .04em; }
.pm-connect .dot { width: 7px; height: 7px; background: var(--copper-l); transform: rotate(45deg); }
.pm-burger { display: none; }
.pm-drawer { display: none; }
@media (max-width: 860px) {
  .pm-links, .pm-hide-sm { display: none !important; }
  .pm-burger { display: inline-grid; }
  .pm-nav-in { gap: 10px; height: 56px; }
  .pm-drawer { display: block; position: fixed; z-index: 49; top: 56px; left: 0; right: 0; background: var(--night-2); border-bottom: 1px solid var(--night-3); padding: 8px var(--gutter) 18px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility 0s .18s; }
  .pm-drawer.open { transform: none; opacity: 1; visibility: visible; transition: opacity .18s, transform .18s; }
  .pm-dl { display: block; padding: 12px 2px; border-bottom: 1px solid var(--night-3); text-decoration: none; font: 400 22px/1.2 var(--display); }
  .pm-dl[aria-current="page"] { color: var(--copper-l); }
  .pm-drawer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; }
}
@media (max-width: 400px) { .pm-logo span { font-size: 19px; } .pm-connect { padding: 7px 10px; font-size: 13px; } }

/* ── footer ──────────────────────────────────────────── */
.pm-foot { margin-top: 72px; border-top: 1px solid var(--night-3); background: linear-gradient(var(--night), #0D0907); padding: 44px 0 30px; font-size: 14.5px; }
.pm-foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.pm-foot-blurb { color: var(--ivory-2); max-width: 44ch; margin: 14px 0 12px; }
.pm-foot-social { display: flex; gap: 4px; margin-left: -8px; }
.pm-foot-h { font: 600 11.5px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--copper-l); margin: 6px 0 12px; }
.pm-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pm-foot ul a { color: var(--ivory-2); text-decoration: none; }
.pm-foot ul a:hover { color: var(--ivory); text-decoration: underline; }
.pm-foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; padding: 16px 0; border-top: 3px double var(--night-3); border-bottom: 1px solid var(--night-3); }
.pm-foot-launch { display: inline-flex; align-items: center; gap: 12px; }
.pm-foot-legal { margin: 18px 0 0; color: rgba(217, 203, 176, .62); font-size: 12.5px; line-height: 1.6; max-width: 110ch; }
@media (max-width: 860px) { .pm-foot-grid { grid-template-columns: 1fr 1fr; } .pm-foot-grid > :first-child { grid-column: 1 / -1; } }

/* CA strip + countdown */
.pm-ca { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.pm-ca-tag { font: 600 11.5px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--copper-l); }
.pm-ca-addr { font-variant-numeric: tabular-nums; font-size: 14px; word-break: break-all; }
.pm-ca-addr.pending { color: var(--muted); }
.pm-countdown { display: inline-flex; gap: 10px; font-variant-numeric: tabular-nums; }
.pm-countdown .c { display: inline-flex; align-items: baseline; gap: 2px; }
.pm-countdown b { font: 400 22px/1 var(--display); color: var(--ivory); }
.pm-countdown small { font-size: 12px; color: var(--ivory-2); }
.pm-countdown .soon { color: var(--ivory-2); }
.pm-countdown .live { color: var(--lamp); font-weight: 600; }

/* ── toast + dialog ──────────────────────────────────── */
.pm-toast { position: fixed; left: 50%; bottom: 22px; z-index: 200; transform: translate(-50%, 20px); opacity: 0; max-width: min(520px, calc(100vw - 32px)); padding: 12px 16px; background: var(--ivory); color: var(--ink); border-left: 4px solid var(--copper); font-size: 14.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: opacity .2s, transform .2s; pointer-events: none; }
.pm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.pm-toast.err { border-left-color: var(--oxblood); }
.pm-toast.ok { border-left-color: #6E7B3A; }
.pm-dialog { border: 1px solid var(--night-3); border-radius: var(--radius); background: var(--night-2); color: var(--ivory); padding: 0; width: min(440px, calc(100vw - 32px)); }
.pm-dialog::backdrop { background: rgba(10, 7, 6, .72); }
.pm-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px 20px; border-bottom: 1px solid var(--night-3); }
.pm-dialog h3 { margin: 0; font-size: 22px; }
.pm-dialog .body { padding: 18px 20px; }
.pm-dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 20px; }
.pm-wallets { display: grid; gap: 8px; }
.pm-wallets button { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--night-3); background: var(--night); color: var(--ivory); font: 600 15px var(--sans); cursor: pointer; border-radius: var(--radius); text-align: left; }
.pm-wallets button:hover { border-color: var(--copper); }
.pm-wallets img { width: 26px; height: 26px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
