/* Layout concept: a sticker-sheet world on the logo's own mint ground — chunky ink outlines, cream panels, glossy green buttons. */
:root {
  --mint: #02F8A6;        /* logo background — page ground */
  --green: #02F885;       /* letter, lower half */
  --green-deep: #03D253;  /* letter shadow */
  --white: #F9F7F7;       /* letter, upper half */
  --cream: #FEF6ED;       /* smiley face */
  --ink: #030302;         /* outlines + type */
  --ink-70: rgba(3, 3, 2, .70);
  --ink-50: rgba(3, 3, 2, .52);
  --ink-12: rgba(3, 3, 2, .12);
  --mint-soft: #B9FCE0;
  --danger: #030302;      /* errors use ink + a hatched sticker, never a new hue */

  --font-display: "Bagel Fat One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --line: 3px;
  --line-thick: 4px;
  --r-sm: 14px; --r-md: 22px; --r-lg: 34px; --r-pill: 999px;
  --pop: 0 5px 0 0 var(--ink);
  --pop-sm: 0 3px 0 0 var(--ink);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--mint); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.55;
  font-optical-sizing: auto; overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--mint); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--mint); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

/* Bubble-dot texture: the logo's gloss highlights repeated very faintly */
.ground { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle at 1.5px 1.5px, rgba(3,3,2,.07) 1.5px, transparent 2px);
  background-size: 26px 26px; animation: ground-in .9s ease both; }
@keyframes ground-in { from { opacity: 0 } to { opacity: 1 } }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- Type ---------- */
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; line-height: .98; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 6.6vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.1; }
p { margin: 0; }
.lede { font-size: clamp(1.08rem, 1.5vw, 1.28rem); max-width: 34ch; color: var(--ink-70); font-weight: 500; }
.eyebrow { font-family: var(--font-mono); font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-70); }
.small { font-size: .86rem; }
.tnum { font-variant-numeric: tabular-nums; }
.sticker { justify-self: start; display: inline-flex; align-items: center; gap: .4em; padding: .28em .8em .3em; border: var(--line) solid var(--ink); border-radius: var(--r-pill); background: var(--cream); box-shadow: var(--pop-sm); font-family: var(--font-mono); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sticker.green { background: var(--green); }
.sticker.ink { background: var(--ink); color: var(--mint); box-shadow: none; }

/* ---------- Buttons ---------- */
.btn { --bg: var(--green); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 52px; padding: .7em 1.35em .78em; border: var(--line) solid var(--ink); border-radius: var(--r-pill); background: var(--bg); color: var(--ink); text-decoration: none; cursor: pointer; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .01em; line-height: 1; box-shadow: var(--pop); transition: transform .18s var(--ease-bounce), box-shadow .18s var(--ease-bounce), background .15s; -webkit-tap-highlight-color: transparent; }
.btn::after { content: ""; position: absolute; left: 18px; top: 7px; width: 26px; height: 7px; border-radius: 9px; background: rgba(255,255,255,.75); pointer-events: none; }
.btn:hover { transform: translateY(-3px) rotate(-.6deg); box-shadow: 0 8px 0 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 0 var(--ink); }
.btn .arrow { display: inline-block; transition: transform .2s var(--ease-bounce); }
.btn:hover .arrow { transform: translateX(4px); }
.btn.big { min-height: 64px; font-size: clamp(1.15rem, 2vw, 1.4rem); padding-inline: 1.6em; width: 100%; }
.btn.secondary { --bg: var(--cream); }
.btn.secondary:hover { --bg: var(--green); }
.btn.secondary::after, .btn.ghost::after, .btn.small::after { display: none; }
.btn.ghost { --bg: transparent; box-shadow: none; }
.btn.ghost:hover { --bg: var(--cream); box-shadow: var(--pop-sm); }
.btn.small { min-height: 38px; padding: .45em .95em .5em; font-size: .9rem; box-shadow: var(--pop-sm); }
.btn.ink { --bg: var(--ink); color: var(--mint); }
.btn.ink:hover { --bg: var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: var(--pop-sm) !important; }
.btn img { width: 20px; height: 20px; border-radius: 5px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; padding-block: 12px; }
.nav { display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 10px; border: var(--line) solid var(--ink); border-radius: var(--r-pill); background: var(--cream); box-shadow: var(--pop); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 46px; height: 46px; border-radius: 13px; border: var(--line) solid var(--ink); transition: transform .3s var(--ease-bounce); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand b { font-family: var(--font-display); font-size: 1.7rem; font-weight: 400; line-height: 1; letter-spacing: -.01em; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { padding: .5em .85em; border-radius: var(--r-pill); text-decoration: none; font-weight: 700; font-size: .98rem; border: 2px solid transparent; transition: background .15s, border-color .15s; }
.nav-links a:hover { background: var(--mint-soft); }
.nav-links a[aria-current="page"] { background: var(--green); border-color: var(--ink); }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); top: calc(100% + 4px); flex-direction: column; align-items: stretch; padding: 10px; border: var(--line) solid var(--ink); border-radius: var(--r-md); background: var(--cream); box-shadow: var(--pop); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8em 1em; }
  .menu-btn { display: inline-flex; }
  .nav .wallet-btn .label-long { display: none; }
}
@media (max-width: 480px) { .brand b { font-size: 1.35rem; } .brand img { width: 40px; height: 40px; } }

/* ---------- Panels ---------- */
.panel { position: relative; background: var(--cream); border: var(--line-thick) solid var(--ink); border-radius: var(--r-lg); box-shadow: 0 8px 0 0 var(--ink); }
.panel-pad { padding: clamp(18px, 3vw, 32px); }
.card { background: var(--cream); border: var(--line) solid var(--ink); border-radius: var(--r-md); box-shadow: var(--pop); }
.section { padding-block: clamp(56px, 9vw, 110px); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(26px, 4vw, 44px); max-width: 760px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .label { font-weight: 800; font-size: .95rem; }
.hint { font-size: .82rem; color: var(--ink-70); }
.input, .textarea, .select { width: 100%; min-height: 54px; padding: .6em .9em; border: var(--line) solid var(--ink); border-radius: var(--r-sm); background: #fff; font-weight: 700; font-size: 1.12rem; transition: box-shadow .15s, background .15s; }
.input::placeholder, .textarea::placeholder { color: var(--ink-50); font-weight: 500; }
.input:focus, .textarea:focus, .select:focus { outline: none; background: #fff; box-shadow: 0 0 0 4px var(--green), 0 0 0 7px var(--ink); }
.input.mono { font-family: var(--font-mono); letter-spacing: .02em; }
.input[aria-invalid="true"] { background: repeating-linear-gradient(-45deg, #fff 0 10px, #F2F2EE 10px 20px); }
.textarea { min-height: 110px; resize: vertical; font-size: 1rem; font-weight: 500; line-height: 1.45; }
.select { appearance: none; font-size: 1rem; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.problem { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border: 2px dashed var(--ink); border-radius: var(--r-sm); background: var(--white); font-size: .86rem; font-weight: 600; }
.problem kbd { font-family: var(--font-mono); background: var(--ink); color: var(--mint); border-radius: 6px; padding: 0 .4em; }

.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 800; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 58px; height: 34px; flex: none; border: var(--line) solid var(--ink); border-radius: var(--r-pill); background: var(--white); position: relative; transition: background .2s; }
.toggle .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--cream); transition: transform .25s var(--ease-bounce); }
.toggle input:checked + .track { background: var(--green); }
.toggle input:checked + .track::after { transform: translateX(24px); }
.toggle input:focus-visible + .track { box-shadow: 0 0 0 3px var(--mint), 0 0 0 6px var(--ink); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 700; }
.check input { appearance: none; flex: none; width: 28px; height: 28px; margin: 0; border: var(--line) solid var(--ink); border-radius: 9px; background: #fff; cursor: pointer; display: grid; place-items: center; }
.check input:checked { background: var(--green); }
.check input:checked::after { content: ""; width: 12px; height: 7px; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(-45deg) translate(1px, -1px); }

.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; gap: 5px; border: var(--line) solid var(--ink); border-radius: var(--r-pill); background: var(--white); }
.tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 0; border-radius: var(--r-pill); background: transparent; cursor: pointer; font-family: var(--font-display); font-size: 1.05rem; transition: background .2s, transform .2s var(--ease-bounce); }
.tabs button[aria-selected="true"] { background: var(--green); box-shadow: inset 0 0 0 var(--line) var(--ink); }
.tabs button:not([aria-selected="true"]):hover { background: var(--mint-soft); }

/* ---------- Address display ---------- */
.addr { font-family: var(--font-mono); font-weight: 700; word-break: break-all; line-height: 1.5; }
.addr mark { background: var(--green); color: var(--ink); border-radius: 6px; padding: 0 .12em; box-shadow: inset 0 0 0 2px var(--ink); }
.addr .dots { letter-spacing: .25em; color: var(--ink-50); }
.pattern-preview { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 14px 16px; border: var(--line) solid var(--ink); border-radius: var(--r-sm); background: #fff; font-family: var(--font-mono); font-weight: 800; font-size: clamp(1.05rem, 2.2vw, 1.5rem); min-height: 64px; }
.pattern-preview .mid { color: var(--ink-50); letter-spacing: .14em; flex: 1; text-align: center; min-width: 4ch; }

/* ---------- Smiley ---------- */
.smiley { --s: 40px; width: var(--s); height: calc(var(--s) * .86); border: calc(var(--s) * .07) solid var(--ink); border-radius: 50% 50% 46% 52% / 52% 50% 50% 48%; background: var(--cream); display: inline-block; position: relative; flex: none; }
.smiley::before, .smiley::after { content: ""; position: absolute; top: 30%; width: 11%; height: 22%; border-radius: 50%; background: var(--ink); animation: blink 5s infinite; }
.smiley::before { left: 32%; } .smiley::after { left: 56%; }
.smiley i { position: absolute; left: 28%; top: 50%; width: 46%; height: 26%; border: calc(var(--s) * .06) solid var(--ink); border-top: 0; border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.smiley.grin i { height: 32%; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1) } 96% { transform: scaleY(.1) } }

/* ---------- Reveal on scroll (content is visible at rest; motion only enhances) ---------- */
.reveal { transition: transform .7s var(--ease-bounce), opacity .7s ease; }
.js .reveal.pre { transform: translateY(22px) scale(.985); }
.float { animation: float 5.5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg) } 50% { transform: translateY(-10px) rotate(2deg) } }

/* ---------- Toast ---------- */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: var(--line) solid var(--ink); border-radius: var(--r-md); background: var(--cream); box-shadow: var(--pop); font-weight: 700; animation: toast-in .35s var(--ease-bounce) both; }
@keyframes toast-in { from { transform: translateY(20px) scale(.95); opacity: 0 } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(3,3,2,.45); }
.modal[hidden] { display: none !important; }
.modal .panel { width: min(100%, 460px); max-height: calc(100vh - 32px); overflow: auto; animation: toast-in .3s var(--ease-bounce) both; }
.wallet-list { display: grid; gap: 10px; margin-top: 16px; }
.wallet-list button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: var(--line) solid var(--ink); border-radius: var(--r-md); background: #fff; cursor: pointer; font-weight: 800; font-size: 1.05rem; transition: transform .15s var(--ease-bounce), background .15s; }
.wallet-list button:hover { background: var(--green); transform: translateY(-2px); }
.wallet-list img { width: 32px; height: 32px; border-radius: 8px; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 40px 32px; }
.footer-card { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 22px 24px; border: var(--line) solid var(--ink); border-radius: var(--r-lg); background: var(--ink); color: var(--cream); }
.footer-card img.logo { width: 76px; height: 76px; border-radius: 20px; border: 3px solid var(--cream); }
.footer-card .foot-tag { font-family: var(--font-display); font-size: clamp(1.2rem, 2.4vw, 1.7rem); line-height: 1.1; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 700; }
.footer-links a { text-decoration: none; color: var(--mint); }
.footer-links a:hover { text-decoration: underline; }
.powered { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.powered a, .powered span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 2px solid var(--cream); border-radius: var(--r-pill); color: var(--cream); text-decoration: none; font-size: .85rem; font-weight: 700; }
.powered img, .brand-ico { width: 18px; height: 18px; object-fit: contain; }
.powered svg { width: 16px; height: 16px; fill: currentColor; }
.fine { margin-top: 14px; font-size: .8rem; color: var(--ink-70); text-align: center; }
@media (max-width: 760px) { .footer-card { grid-template-columns: 1fr; justify-items: start; } .powered { justify-content: flex-start; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal.pre { transform: none; }
}
[tabindex="-1"]:focus { outline: none; }
.powered img[src$="solana.svg"], .powered img[src$="x.svg"] { filter: invert(1); }

/* X (Twitter) link */
.x-btn { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border: var(--line) solid var(--ink); border-radius: 50%; background: var(--ink); color: var(--cream); box-shadow: 0 3px 0 var(--ink); transition: transform .15s, background .15s, color .15s; }
.x-btn:hover { transform: translateY(-2px) rotate(-6deg); background: var(--green); color: var(--ink); }
.x-btn:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.nav .x-btn { margin-left: auto; }
.nav .x-btn + .wallet-btn { margin-left: 0; }
.x-foot { display: inline-flex; align-items: center; gap: 6px; }
.x-foot svg { width: 15px; height: 15px; }
