/* Sats Jar landing page. Black on white, a few pops of crayon colour. */
:root {
  --ink: #141414;
  --paper: #ffffff;
  --muted: #55524d;
  --orange: #f59a1f;
  --yellow: #f7c32a;
  --red: #e8412f;
  --pink: #f27aa8;
  --blue: #2f6fd8;
  --green: #3a9d4f;
  --lilac: #b79bdc;
  --hand: "Caveat Brush", "Segoe Print", "Bradley Hand", "Chalkboard SE", cursive;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* Waxy lettering: a speckle mask lets the paper show through the letters, like crayon on tooth. */
.grainy {
  -webkit-mask-image: url("assets/grain.png"); mask-image: url("assets/grain.png");
  -webkit-mask-size: 256px 256px; mask-size: 256px 256px;
}

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* ───────── nav ───────── */
.nav { max-width: var(--wrap); margin: 0 auto; padding: 1.1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-family: var(--hand); font-size: 1.9rem; line-height: 1; }
.logo img { width: 44px; height: 44px; transform: rotate(-8deg); }
.nav nav { display: flex; gap: 1.4rem; font-weight: 500; font-size: .98rem; }
.nav nav a { text-decoration: none; padding: .25rem 0; background: linear-gradient(var(--yellow), var(--yellow)) 0 100% / 0 .4em no-repeat; transition: background-size .2s; }
.nav nav a:hover { background-size: 100% .4em; }

/* ───────── hero ───────── */
.hero { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 1.5rem 1.25rem 3.5rem; display: grid; grid-template-columns: 1.05fr .95fr; gap: 1rem 2rem; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.kicker { font-family: var(--hand); font-size: 1.45rem; margin: 0 0 .3rem; color: var(--blue); transform: rotate(-1.5deg); transform-origin: left; display: inline-block; }

h1 { margin: 0 0 1.2rem; font-family: var(--hand); font-weight: 400; line-height: .98; letter-spacing: .005em; font-size: clamp(3.3rem, 8.4vw, 6.9rem); }
h1 .line { display: block; }
h1 .role { display: inline-block; position: relative; padding: .04em .02em .22em; margin: .02em 0; min-width: 2ch; }
h1 .role-word { display: inline-block; font-size: 1.12em; transition: opacity .2s ease, transform .2s ease; will-change: transform, opacity; }
h1 .role-word.is-out { opacity: 0; transform: translateY(-.18em) rotate(-3deg); }
h1 .role-word.is-in { opacity: 0; transform: translateY(.22em) rotate(2deg); transition: none; }
.role-underline { position: absolute; left: -2%; bottom: .02em; width: 104%; height: .26em; pointer-events: none; object-fit: fill; }

.lede { font-size: 1.2rem; max-width: 33rem; margin: 0 0 1.5rem; }
.cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 1.1rem; }
.btn { display: inline-block; font: 700 1.05rem/1 var(--body); text-decoration: none; padding: 1rem 1.5rem; border: 3px solid var(--ink); border-radius: 16px 20px 14px 22px / 20px 14px 22px 16px; transition: transform .12s ease, box-shadow .12s ease; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 5px 5px 0 var(--orange); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: 5px 5px 0 var(--lilac); }
.btn:hover { transform: translate(-2px, -2px); }
.btn-primary:hover { box-shadow: 8px 8px 0 var(--orange); }
.btn-ghost:hover { box-shadow: 8px 8px 0 var(--lilac); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--orange); }

.testnet { display: inline-flex; align-items: center; gap: .55rem; margin: 0; font-size: .95rem; color: var(--muted); }
.testnet-dot { width: .8rem; height: .8rem; border-radius: 50% 45% 55% 50%; background: var(--yellow); border: 2px solid var(--ink); flex: none; }

/* stage: the figure card and the jar */
.stage { position: relative; z-index: 1; width: 100%; max-width: 540px; aspect-ratio: 1 / 1.02; margin-inline: auto; }
.jar-wrap { position: absolute; right: 0; bottom: 0; width: 66%; aspect-ratio: 340 / 470; }
.jar, .pile { position: absolute; inset: 0; }
.jar { z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.pile { z-index: 1; }
.coin { position: absolute; left: var(--x); top: var(--y); width: 30.72%; height: auto; margin: -15.36% 0 0 -15.36%; rotate: var(--r); }
.coin.is-hidden { visibility: hidden; }

.card { position: absolute; z-index: 3; left: 0; top: 2%; width: 48%; aspect-ratio: 320 / 400; transform: rotate(-5deg); transform-origin: 50% 80%; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-figure { inset: 8% 6% 4% 6% !important; width: 88% !important; height: 88% !important; object-fit: contain; }
.card.is-popping { animation: pop .55s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes pop { 0% { transform: rotate(-12deg) scale(.7); opacity: .2; } 60% { transform: rotate(-3deg) scale(1.05); opacity: 1; } 100% { transform: rotate(-5deg) scale(1); } }
.card-tag { position: absolute; left: 50%; bottom: -7%; transform: translateX(-50%) rotate(2deg); margin: 0; white-space: nowrap; font-family: var(--hand); font-size: clamp(1.15rem, 2.6vw, 1.6rem); padding: .15em .7em .05em; background: url("assets/swatch-yellow.png") center / 100% 100% no-repeat; }

/* little role picker (also the way to drive it with reduced motion) */
.roles { grid-column: 1 / -1; list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem .6rem; position: relative; z-index: 2; }
.roles button { font: 500 .95rem/1 var(--body); background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: .5rem .9rem; cursor: pointer; transition: background .15s, transform .12s; }
.roles button:hover { transform: translateY(-2px); }
.roles button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* confetti doodles */
.doodle { position: absolute; z-index: 0; pointer-events: none; }
.d-star { left: 47%; top: 3%; transform: rotate(12deg); }
.d-heart { right: 3%; top: 4%; transform: rotate(-10deg); }
.stage .d-spiral { left: 6%; bottom: 8%; transform: rotate(20deg); }
.d-dots { left: 44%; bottom: 14%; }

/* ───────── sections ───────── */
.section { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 3.5rem 1.25rem; }
.section h2 { font-family: var(--hand); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; margin: 0 0 1.4rem; }
.section-lede { font-size: 1.15rem; max-width: 40rem; margin: -.4rem 0 2rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; counter-reset: s; }
.step { position: relative; padding: 2.8rem 3rem 3rem; background: transparent; }
.step::before { content: ""; position: absolute; inset: 0; background-size: 100% 100%; background-repeat: no-repeat; z-index: 0; }
.step-1::before { background-image: url("assets/frame-4.png"); transform: rotate(-1.5deg); }
.step-2::before { background-image: url("assets/frame-3.png"); transform: rotate(1deg); }
.step-3::before { background-image: url("assets/frame-2.png"); transform: rotate(-.8deg); }
.step > * { position: relative; z-index: 1; }
.step-art { width: 70%; margin: 0 auto .6rem; }
.step h3 { font-family: var(--hand); font-weight: 400; font-size: 1.75rem; line-height: 1.1; margin: 0 0 .5rem; }
.step .num { display: inline-block; min-width: 1.5em; text-align: center; margin-right: .2em; background: url("assets/swatch-yellow.png") center / 100% 100% no-repeat; }
.step p { margin: 0; }

.trust-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 2.5rem; align-items: start; }
.trust-col h3 { font-family: var(--hand); font-weight: 400; font-size: 1.9rem; margin: 0 0 .7rem; }
.trust-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .9rem; }
.trust-col li { position: relative; padding-left: 1.9rem; }
.trust-col li::before { content: ""; position: absolute; left: 0; top: .5em; width: .9rem; height: .9rem; border-radius: 50% 40% 55% 45%; background: var(--green); border: 2px solid var(--ink); }
.trust-col-2 li::before { background: var(--yellow); }

.proof { text-align: left; }
.swatch-lilac { position: absolute; right: 2%; top: 2.5rem; width: min(300px, 38%); opacity: .95; z-index: 0; }
.proof > *:not(.swatch) { position: relative; z-index: 1; }

.footer { max-width: var(--wrap); margin: 2rem auto 0; padding: 2rem 1.25rem 3rem; border-top: 3px solid var(--ink); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .95rem; }
.footer p { margin: 0; }
.testnet-note { max-width: 40rem; }
.footer a { font-weight: 500; }

/* ───────── small screens ───────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: .5rem; }
  /* headline, then the figure and jar, then the pitch and buttons */
  .hero-copy { display: contents; }
  .kicker { order: 1; justify-self: start; }
  h1 { order: 2; margin-bottom: .4rem; }
  .stage { order: 3; }
  .lede { order: 4; margin-top: 1rem; }
  .cta { order: 5; }
  .testnet { order: 6; justify-self: start; }
  .roles { order: 7; }
  .stage { max-width: 440px; margin-top: 1.8rem; }
  .nav nav { display: none; }
  .steps { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .trust-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .d-star, .d-dots { display: none; }
  .swatch-lilac { display: none; }
}
@media (max-width: 480px) {
  .btn { width: 100%; text-align: center; }
  .doodle.d-spiral { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  h1 .role-word, .btn, .roles button { transition: none; }
  .card.is-popping { animation: none; }
}
