/* Coin launch page. Mobile-first, no build step.
   Re-theme by changing the 4 core variables, or switch <html data-theme="a|b|c">.
   --accent-fg / --accent-2-fg are the text colours used ON --accent / --accent-2. Every text pair is >= 4.5:1. */

/* Colours taken from the art builds (art/A-mascot/build.py P{}, art/B-meme/build.py PAL{}, art/C-clean/build.py PAL{}).
   Entries marked "derived" are tints added for surfaces/muted text and checked for contrast. */
:root,
[data-theme="a"] {               /* A — mascot (Puff the hamster): ink + cream, sun + teal */
  --bg: #2A1A1F;                 /* ink */
  --fg: #FFF3DF;                 /* cream */
  --accent: #FFD23F;             /* sun */
  --accent-2: #37C5B0;           /* teal */
  --accent-fg: #2A1A1F;          /* ink */
  --accent-2-fg: #2A1A1F;        /* ink, text on accent-2 */
  --surface: #3A2930;            /* derived */
  --muted: #E8D6BF;              /* derived */
  --border: #5A4249;             /* derived */
  --focus: #37C5B0;              /* teal */
}

[data-theme="b"] {               /* B — meme (Bean the jellybean): white + ink, hot pink + blue, lime */
  --bg: #FFFFFF;                 /* white */
  --fg: #0E0E10;                 /* ink */
  --accent: #FF3E8E;             /* pink */
  --accent-2: #3A5BFF;           /* blue */
  --accent-fg: #0E0E10;          /* ink */
  --accent-2-fg: #FFFFFF;        /* white, text on accent-2 */
  --surface: #F3FFD1;            /* derived lime tint (lime #C8FF2E) */
  --muted: #3D3D45;              /* derived */
  --border: #0E0E10;             /* ink */
  --focus: #3A5BFF;              /* blue */
}

[data-theme="c"] {               /* C — clean: paper + ink, volt highlight (art/C-clean/build.py PAL{}) */
  --bg: #F3F1EA;                 /* paper */
  --fg: #0F1115;                 /* ink */
  --accent: #C6F35A;             /* volt */
  --accent-2: #1E232B;           /* graphite */
  --accent-fg: #0F1115;          /* ink */
  --accent-2-fg: #F3F1EA;        /* paper */
  --surface: #FFFFFF;            /* derived */
  --muted: #474C55;              /* derived */
  --border: #D3D0C6;             /* derived */
  --rule: #0F1115;               /* ink: volt is too light for thin rules on paper */
  --focus: #1E232B;              /* graphite */
}

:root {
  --radius: 14px;
  --gap: 1rem;
  --maxw: 44rem;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* system stack: no third-party font request */
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-underline-offset: 0.18em; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.75rem; }
code { font-family: var(--mono); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }
.small { font-size: 0.9rem; color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Focus: always visible for keyboard users */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 10;
  background: var(--accent); color: var(--accent-fg);
  padding: 0.75rem 1rem; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 0.5rem; }

/* Hero */
.hero { text-align: center; padding-bottom: 1.5rem; }
.hero-banner { aspect-ratio: 3 / 1; max-height: 460px; overflow: hidden; background: var(--surface); }
.hero-banner img { width: 100%; height: 100%; object-fit: cover; }
.hero-inner { margin-top: -1.25rem; position: relative; }
.logo {
  width: 7rem; height: 7rem; margin: 0 auto 0.75rem;
  border-radius: 50%; object-fit: cover;
  border: 4px solid var(--bg); background: var(--surface);
}
.name { font-size: clamp(2rem, 8vw, 3.25rem); font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.ticker {
  display: inline-block; font-family: var(--mono); font-weight: 700;
  background: var(--surface); border: 1px solid var(--border);
  padding: 0.2rem 0.7rem; border-radius: 999px; margin-bottom: 0.75rem;
}
.tagline { color: var(--muted); font-size: 1.1rem; max-width: 32rem; margin: 0 auto 1.25rem; }

.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; max-width: 26rem; margin: 0 auto; }
.cta .btn-primary { grid-column: 1 / -1; }

/* Buttons: >= 44px tap target */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 44px; padding: 0.7rem 1.2rem;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform 0.08s ease, background-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn-ghost:hover { background: var(--surface); }

/* Cards */
main { display: grid; gap: 1.25rem; padding-bottom: 2rem; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}

/* Contract address */
.ca-row { display: flex; flex-direction: column; gap: 0.75rem; align-items: stretch; }
.ca-value {
  display: block; padding: 0.85rem 1rem; border-radius: 10px;
  background: var(--bg); color: var(--fg); border: 1px dashed var(--border);
  font-size: 0.95rem; word-break: break-all; user-select: all;
}
.copy-btn { min-width: 7.5rem; }
.copy-btn.is-copied { background: var(--accent-2); color: var(--accent-2-fg); }
.copy-btn[data-state="error"] { background: var(--fg); color: var(--bg); }
.copy-status { min-height: 1.5em; margin: 0.5rem 0 0.25rem; font-size: 0.9rem; color: var(--muted); }
.trust { border-left: 4px solid var(--rule, var(--accent)); padding-left: 0.75rem; }

/* Steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps > li { counter-increment: step; position: relative; padding-left: 3rem; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700;
  background: var(--accent); color: var(--accent-fg);
}
.steps p:last-child { margin-bottom: 0; }
.taxnote { border-left: 4px solid var(--rule, var(--accent)); padding-left: 0.75rem; font-size: 0.95rem; }
.netinfo { margin: 0.5rem 0 0; display: grid; gap: 0.35rem; font-size: 0.92rem; }
.netinfo div { display: grid; grid-template-columns: 5.25rem 1fr; gap: 0.5rem; }
.netinfo dt { color: var(--muted); }
.netinfo dd { margin: 0; overflow-wrap: anywhere; }
.netinfo dd code { font-size: 0.88rem; }

/* Safety */
.safety ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.6rem; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 1.5rem 0 2.5rem; text-align: center; }
.disclosure { color: var(--muted); font-size: 0.92rem; overflow-wrap: anywhere; }

/* Larger screens */
@media (min-width: 40rem) {
  .cta { grid-template-columns: 2fr 1fr 1fr; max-width: 34rem; }
  .cta .btn-primary { grid-column: auto; }
  .ca-row { flex-direction: row; align-items: center; }
  .ca-value { flex: 1; }
  .logo { width: 9rem; height: 9rem; }
  .hero-inner { margin-top: -2rem; }
}
@media (min-width: 64rem) {
  :root { --maxw: 60rem; }
  main { grid-template-columns: 3fr 2fr; grid-template-areas: "ca safety" "how how"; align-items: stretch; }
  .ca { grid-area: ca; }
  .safety { grid-area: safety; }
  .how { grid-area: how; }
  .steps { grid-template-columns: 1fr 1fr; column-gap: 2rem; row-gap: 1.25rem; }
  .ca-row { flex-direction: column; align-items: stretch; }
  .copy-btn { align-self: flex-start; }
}

/* How to buy (Oct 20) */
.cta .btn-howto { grid-column: 1 / -1; }
.card.buy { border: 2px solid var(--accent); }
.card.buy h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.btn-buy { display: block; width: 100%; max-width: 26rem; font-size: 1.25rem; padding: 1rem 1.5rem; margin-top: 0.5rem; text-align: center; }
.buy-ca { margin-top: 1.25rem; }
.buy-links { font-weight: 600; }
.card.buy, .card.buy * { overflow-wrap: anywhere; min-width: 0; }
.btn-buy { box-sizing: border-box; }
