@font-face {
  font-family: Archivo Black;
  src: url(./archivo-black.woff2) format("woff2");
  font-display: swap;
}

@font-face {
  font-family: DM Sans;
  src: url(./dm-sans.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: Space Mono;
  src: url(./space-mono.woff2) format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #121210;
  --ink-lift: #1d1c17;
  --paper: #f6f2e6;
  --yellow: #ffed00;
  --red: #ff5d4e;
  --muted: #cbc8ba;
  --border: #38362e;
  --display: "Archivo Black", Impact, "Arial Black", sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
  --mono: "Space Mono", Consolas, monospace;
  font-family: var(--body);
  background: var(--ink);
  color: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, textarea { font: inherit; }
strong { font-weight: 700; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #ff704e; outline-offset: 4px; }
::selection { color: var(--ink); background: var(--yellow); }

.wrap {
  width: min(calc(100% - 112px), 1296px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 3;
  transform: translateY(-150%);
  padding: .8rem 1rem;
  background: var(--yellow);
  color: var(--ink);
}

.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--border); }

.header-inner, .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 75px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  flex-shrink: 0;
  font: clamp(.84rem, 1.25vw, 1rem)/1 var(--display);
  text-decoration: none;
  letter-spacing: -.05em;
}

.brand img { border-radius: .55rem; flex-shrink: 0; }
.brand i { font-style: normal; color: var(--yellow); }
.brand-period { color: var(--red); }

nav, .footer-links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.75rem);
}

nav a, .footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-size: .94rem;
}

nav a:hover, .footer-links a:hover { color: var(--yellow); }

nav .nav-token {
  font: .9rem/1 var(--mono);
  border: 1px solid #66613a;
  border-radius: .35rem;
  color: var(--yellow);
  padding: 0 .9rem;
}

nav .nav-token:hover { background: var(--yellow); color: var(--ink); }

.hero {
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  gap: clamp(1.6rem, 4.4vw, 4.8rem);
  align-items: center;
  padding-block: clamp(3.6rem, 6vw, 6rem) clamp(2.8rem, 5.2vw, 5rem);
}

.hero-copy { min-width: 0; }

.kicker {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--yellow);
  margin: 0 0 1.25rem;
  font: .83rem/1.45 var(--mono);
  letter-spacing: .105em;
}

.red-dot {
  width: .52rem;
  height: .52rem;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  flex: 0 0 auto;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; }

.hero h1 {
  font-size: clamp(3.55rem, 8.12vw, 8rem);
  line-height: .88;
  letter-spacing: -.091em;
  margin: 0 0 1.8rem -.045em;
}

.hero h1 > span { display: block; white-space: nowrap; }
.hero-yellow { color: var(--yellow); }
.hero-period, .paper h2 span, .token-copy h2 span { color: var(--red); }

.hero-description {
  color: var(--muted);
  font-size: clamp(1.13rem, 1.72vw, 1.5rem);
  font-weight: 500;
  line-height: 1.47;
  margin: 0 0 2rem;
}

.actions { display: flex; flex-wrap: wrap; gap: .72rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.13rem;
  padding: .72rem 1.22rem;
  border: 1px solid transparent;
  border-radius: .38rem;
  text-align: center;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color .16s, border-color .16s, color .16s, transform .16s;
}

.button:active { transform: translateY(1px); }
.button-yellow { background: var(--yellow); color: var(--ink); }
.button-yellow:hover { background: #fff67e; }
.button-ghost { background: transparent; color: var(--paper); border-color: #706b5c; }
.button-ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.button-dark { background: var(--ink); color: var(--paper); }
.button-dark:hover { background: #3c3829; }
.button-ink-outline { color: var(--ink); border-color: #827966; background: transparent; }
.button-ink-outline:hover { border-color: var(--ink); background: #ece6d1; }
.button:disabled { cursor: wait; opacity: .65; }

.hero-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid #5c5224;
  border-radius: .7rem;
  background: var(--yellow);
  align-self: center;
  aspect-ratio: 1;
}

.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.token-strip {
  margin-block: 0 clamp(2.5rem, 4vw, 4.1rem);
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: var(--ink-lift);
}

.token-strip > div {
  display: flex;
  align-items: baseline;
  gap: .8rem 1rem;
  flex-wrap: wrap;
  padding: 1.2rem clamp(.8rem, 2.2vw, 1.7rem);
}

.token-strip > div + div { border-left: 1px solid var(--border); }
.token-strip dt { font: .76rem/1.25 var(--mono); letter-spacing: .07em; color: var(--muted); text-transform: uppercase; }
.token-strip dd { margin: 0; color: var(--paper); font-weight: 700; }
.token-strip a { text-decoration-color: #99937f; text-underline-offset: .22em; }
.token-strip a:hover { color: var(--yellow); }

.paper { color-scheme: light; background: var(--paper); color: var(--ink); }
.story-layout {
  display: grid;
  grid-template-columns: 1fr .83fr;
  align-items: start;
  gap: clamp(1.5rem, 5vw, 5rem);
  padding-block: clamp(3.3rem, 6vw, 5.7rem);
  border-bottom: 1px solid #c9c1ac;
}

.paper h2 {
  font-size: clamp(2.35rem, 4.45vw, 4.7rem);
  margin: 0 0 1rem;
  letter-spacing: -.083em;
  line-height: .99;
}

.story-copy, .lab-copy > p {
  color: #403b30;
  font-size: clamp(1rem, 1.35vw, 1.19rem);
  line-height: 1.63;
}

.story-copy p { margin-bottom: .85rem; max-width: 48ch; }
.story-source { font-size: 1rem; color: var(--ink); font-weight: 700; text-underline-offset: .22em; }
.story-source:hover { text-decoration-thickness: 2px; }

.lab-layout {
  display: grid;
  grid-template-columns: 1fr minmax(17rem, .86fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6.5rem);
  padding-block: clamp(3.3rem, 6vw, 6.25rem);
}

.lab-kicker { color: #615900; margin-bottom: .9rem; }
.lab-copy > p { margin-bottom: 1.55rem; max-width: 40ch; }
.lab-controls { max-width: 33rem; }
.lab-controls label { display: block; font-weight: 700; margin-bottom: .5rem; }
.lab-controls textarea {
  width: 100%;
  padding: .85rem .9rem;
  border: 1px solid #827966;
  border-radius: .45rem;
  background: #fffdf4;
  color: var(--ink);
  line-height: 1.5;
  resize: vertical;
  min-height: 5rem;
}

.caption-hints {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: .7rem;
  margin: .65rem 0 1.1rem;
}

.presets { display: flex; flex-wrap: wrap; gap: .4rem; }
.presets button {
  border-radius: .38rem;
  color: var(--ink);
  border: 1px solid #c1b9a4;
  background: transparent;
  padding: .42rem .6rem;
  min-height: 38px;
  cursor: pointer;
  font-size: .85rem;
}
.presets button:hover, .presets button[aria-pressed="true"] { background: var(--yellow); border-color: var(--ink); }
#caption-limit { white-space: nowrap; color: #655d4b; font: .74rem/2 var(--mono); }
.lab-status, .copy-status { min-height: 1.2rem; margin: .6rem 0 0; font-size: .88rem; }
.lab-status { color: #4d4738; }
.copy-status { color: var(--yellow); }

.meme-card {
  border: 1px solid var(--ink);
  border-radius: .72rem;
  overflow: hidden;
  box-shadow: 7px 7px 0 var(--ink);
  max-width: 31rem;
  background: var(--yellow);
  aspect-ratio: 1;
}
.meme-card img, .meme-card canvas { width: 100%; height: auto; }

.token-section {
  display: grid;
  grid-template-columns: .75fr 1fr;
  align-items: center;
  gap: clamp(1.7rem, 6vw, 6rem);
  padding-block: clamp(3.6rem, 6vw, 6.2rem);
}

.token-copy h2 {
  font-size: clamp(3.2rem, 7vw, 6.3rem);
  line-height: .9;
  letter-spacing: -.09em;
  margin: 0 0 1.15rem -.055em;
}
.token-copy > p:not(.kicker) { max-width: 38ch; font-size: 1.08rem; line-height: 1.63; color: var(--muted); margin: 0; }
.token-links { margin-top: 1.3rem; }
.contract-panel { border: 1px solid var(--border); border-radius: .65rem; padding: clamp(1rem, 3vw, 2rem); background: var(--ink-lift); min-width: 0; }
.contract-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.contract-head h3 { margin: 0; font-size: 1.12rem; }
.status-label { color: var(--yellow); font: .74rem/1.4 var(--mono); border: 1px solid #70682b; border-radius: .27rem; padding: .32rem .52rem; }
.contract-instruction { margin: .85rem 0 0; color: var(--muted); line-height: 1.55; }
.contract-value { display: flex; align-items: center; gap: .65rem; margin-top: 1.1rem; }
.contract-value code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: var(--ink); border: 1px solid var(--border); border-radius: .35rem; color: var(--paper); padding: .75rem; font: .9rem/1.5 var(--mono); }
.copy-button { min-height: 44px; padding: .58rem .9rem; }
.copy-status:empty { display: none; }

.site-footer { border-top: 1px solid var(--border); }
.footer-inner { min-height: 83px; }
.footer-links { color: var(--muted); }

@media (max-width: 1000px) {
  .wrap { width: calc(100% - 72px); }
  .hero { grid-template-columns: 1.2fr 1fr; gap: 1.5rem; }
  .hero h1 { font-size: clamp(3.1rem, 8.8vw, 6rem); }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 44px); }
  .header-inner { min-height: 64px; }
  .brand img { width: 34px; height: 34px; }
  .hero { grid-template-columns: 1fr; padding-block: 2.8rem 1.8rem; gap: 2rem; }
  .hero h1 { font-size: clamp(3rem, 13.7vw, 6.3rem); }
  .hero-description { margin-bottom: 1.45rem; }
  .hero-figure { width: min(100%, 35rem); }
  .story-layout, .lab-layout, .token-section { grid-template-columns: 1fr; }
  .story-layout, .lab-layout { gap: 1.5rem; }
  .story-break, .lab-break { display: none; }
  .lab-copy > p { margin-bottom: 1.2rem; }
  .meme-card { width: min(100% - 7px, 31rem); }
  .token-section { gap: 1.45rem; }
  .token-strip > div { flex-direction: column; gap: .35rem; }
}

@media (max-width: 435px) {
  .wrap { width: calc(100% - 32px); }
  .brand { gap: .44rem; }
  nav, .footer-links { gap: .72rem; }
  nav a, .footer-links a { font-size: .84rem; }
  nav .nav-token { font-size: .78rem; min-height: 44px; padding: 0 .55rem; }
  nav .nav-story { display: none; }
  .token-strip { grid-template-columns: .85fr .9fr 1.4fr; }
  .token-strip > div { padding: .8rem .55rem; }
  .token-strip dt { font-size: .66rem; }
  .token-strip dd { font-size: .84rem; }
  .footer-inner { padding-block: .6rem; flex-wrap: wrap; }
}

@media (max-width: 350px) {
  .header-inner { gap: .5rem; }
  .header-inner .brand { font-size: .75rem; }
  nav a { white-space: nowrap; }
  .hero .actions { gap: .5rem; }
  .button { padding-inline: .72rem; font-size: .92rem; }
  .hero h1 { font-size: 12.65vw; }
  .contract-value { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
