:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --muted: #6b6b6b;
  --line: #0a0a0a;
  --soft: #f4f4f4;
  --accent: #00d36b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, "Cascadia Mono", Consolas, monospace;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::selection { background: var(--ink); color: var(--paper); }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 2px solid var(--ink);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 50;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  transform: translateY(-1px);
}

.topnav { display: flex; gap: 22px; }
.topnav a {
  font-size: 14px;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}
.topnav a:hover { opacity: 1; text-decoration: underline; }

.topactions { display: flex; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  background: var(--paper);
  color: var(--ink);
  transition: transform 0.08s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(0, 0); box-shadow: 0 0 0 var(--ink); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn.big { padding: 14px 22px; font-size: 16px; }
.btn.small { padding: 6px 10px; font-size: 12px; }

/* ---------- marquee ---------- */
.marquee {
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}
.marquee-track {
  display: inline-flex;
  gap: 24px;
  white-space: nowrap;
  padding: 12px 0;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  animation: marquee 40s linear infinite;
}
.marquee-track .dot { opacity: 0.5; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- walk strip (between marquee and hero) ---------- */
.walk-strip {
  position: relative;
  height: 90px;
  background: var(--paper);
  overflow: hidden;
}
.strip-walker {
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 70px;
  height: 70px;
  will-change: transform;
}
.strip-walker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: bob 0.4s ease-in-out infinite;
  transform-origin: bottom center;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 24px 180px;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}
.hero-text { min-width: 0; }
.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-troll {
  width: 100%;
  max-width: 460px;
  height: auto;
  object-fit: contain;
  animation: hero-bob 2.4s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes hero-bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-10px) rotate(1.5deg); }
}
.title {
  font-size: clamp(80px, 18vw, 240px);
  line-height: 0.85;
  letter-spacing: -4px;
  margin: 0 0 24px;
  font-weight: 800;
}
.title .line { display: block; }
.tagline {
  max-width: 620px;
  font-size: clamp(16px, 2vw, 22px);
  margin: 0 0 32px;
  opacity: 0.85;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* the walking troll */
.walker {
  position: absolute;
  bottom: 18px;
  left: 0;
  pointer-events: none;
  width: 110px;
  height: 110px;
  will-change: transform;
}
.walker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: bob 0.45s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-6px) rotate(1deg); }
}

/* ---------- generic section ---------- */
.section {
  padding: 90px 24px;
  border-bottom: 2px solid var(--ink);
}
.section.alt { background: var(--soft); }
.section h2 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -1.5px;
  margin: 0 0 18px;
}
.section p {
  font-size: 17px;
  max-width: 60ch;
  margin: 0 0 14px;
}
.section-title {
  text-align: center;
  font-size: clamp(36px, 5vw, 64px);
  margin: 0 0 48px;
  letter-spacing: -1.5px;
}

.section-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.frame {
  margin: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 14px;
  text-align: center;
}
.frame img {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
}
.frame figcaption {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
}
.frame.dark { background: var(--ink); }

/* ---------- mischief cards ---------- */
.cards {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--ink);
}
.card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--soft);
  border: 2px solid var(--ink);
}
.card.alt img { background: var(--ink); }
.card h3 {
  margin: 6px 0 0;
  font-size: 22px;
  letter-spacing: -0.5px;
}
.card p {
  margin: 0;
  font-size: 15px;
  opacity: 0.8;
}

/* ---------- ascend ---------- */
.ascend-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.ascend .quiet {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
}

/* ---------- buy ---------- */
.buy { text-align: center; }
.steps {
  list-style: none;
  padding: 0;
  margin: 0 auto 36px;
  max-width: 700px;
  text-align: left;
  display: grid;
  gap: 12px;
}
.steps li {
  border: 2px solid var(--ink);
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: 16px;
}
.steps .num {
  font-weight: 800;
  font-size: 18px;
  background: var(--ink);
  color: var(--paper);
  padding: 2px 10px;
  min-width: 30px;
  text-align: center;
}

.ca {
  max-width: 760px;
  margin: 0 auto 28px;
  border: 2px dashed var(--ink);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.ca-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.6;
}
.ca code {
  font-size: 14px;
  word-break: break-all;
  background: var(--soft);
  padding: 6px 8px;
  border: 1px solid var(--ink);
}
.ca code.copied { background: var(--ink); color: var(--paper); }

.buy-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- footer ---------- */
.foot {
  padding: 28px 24px;
  background: var(--paper);
}
.foot-row {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  opacity: 0.7;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .topnav { display: none; }
  .section-grid, .ascend-grid { grid-template-columns: 1fr; gap: 28px; }
  .cards { grid-template-columns: 1fr; }
  .hero { padding-bottom: 160px; min-height: 70vh; }
  .hero-inner { grid-template-columns: 1fr; gap: 20px; }
  .hero-art { order: -1; }
  .hero-troll { max-width: 240px; }
  .walker { width: 90px; height: 90px; }
}

@media (max-width: 540px) {
  .topbar { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .logo span { font-size: 16px; }
  .topactions .btn { padding: 6px 10px; font-size: 13px; }
  .section { padding: 60px 18px; }
  .title { letter-spacing: -2px; }
}
