:root {
  --paper: #f6f0df;
  --paper-shadow: #e1d4b6;
  --ink: #1f1b19;
  --red: #d74438;
  --blue: #2c62d6;
  --yellow: #f0cf59;
  --white: #fffdf6;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Patrick Hand", "Comic Sans MS", cursive, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 32%),
    linear-gradient(180deg, #fbf7eb 0%, #f4ebd2 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
  background-size: 100% 36px, 36px 100%;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.site-header {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 1.2rem 0 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.brand {
  font-family: "Permanent Marker", "Comic Sans MS", cursive, sans-serif;
  font-size: clamp(1.1rem, 1rem + 1vw, 1.75rem);
  letter-spacing: 0.04em;
  transform: rotate(-2deg);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.site-nav a {
  padding: 0.45rem 0.9rem;
  border: 2px solid rgba(31, 27, 25, 0.85);
  border-radius: 17px 13px 20px 11px;
  background: rgba(255, 253, 246, 0.78);
  box-shadow: 2px 3px 0 rgba(31, 27, 25, 0.2);
  transform: rotate(calc(var(--turn, 0) * 1deg));
}

.site-nav a:nth-child(odd) {
  --turn: -1.5;
}

.site-nav a:nth-child(even) {
  --turn: 1.4;
}

.section-card {
  position: relative;
  margin-top: 1.5rem;
  padding: clamp(1.2rem, 2vw, 2rem);
  background: linear-gradient(180deg, rgba(255, 253, 246, 0.97), rgba(247, 241, 224, 0.98));
  border: 3px solid rgba(31, 27, 25, 0.88);
  border-radius: 34px 28px 38px 24px;
  box-shadow:
    8px 10px 0 rgba(31, 27, 25, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.section-card::before {
  content: "";
  position: absolute;
  inset: 10px -8px -10px 8px;
  background: rgba(225, 212, 182, 0.55);
  border-radius: 36px 25px 31px 29px;
  z-index: -1;
  transform: rotate(-1.2deg);
}

.section-heading {
  margin-bottom: 1.2rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.25rem;
  padding: 0.15rem 0.65rem;
  font-family: "Permanent Marker", "Comic Sans MS", cursive, sans-serif;
  font-size: 0.95rem;
  color: var(--red);
  background: rgba(240, 207, 89, 0.75);
  border-radius: 999px;
  transform: rotate(-2deg);
}

.section-heading h2,
.hero h1,
.step-card h3 {
  margin: 0;
  line-height: 0.95;
  font-family: "Permanent Marker", "Comic Sans MS", cursive, sans-serif;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  min-height: calc(100vh - 8rem);
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 5rem);
  letter-spacing: 0.02em;
  max-width: 9ch;
}

.hero h1 span {
  display: block;
  color: var(--blue);
  font-size: 0.72em;
  margin-top: 0.35rem;
}

.hero-bio,
.hero-description,
.about-copy p,
.step-card p,
.join-copy p,
.site-footer p {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.45rem);
  line-height: 1.3;
}

.hero-bio {
  max-width: 28rem;
  margin: 1rem 0 0.6rem;
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.7rem);
}

.hero-description {
  max-width: 36rem;
  margin: 0 0 1.3rem;
}

.cta-row,
.how-to-buy-actions,
.join-actions,
.hero-notes,
.about-stats,
.steps-grid,
.join-grid,
.about-grid {
  display: grid;
}

.cta-row {
  grid-template-columns: repeat(3, max-content);
  gap: 0.8rem;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.2rem;
  border: 3px solid rgba(31, 27, 25, 0.9);
  border-radius: 20px 13px 24px 12px;
  font-family: "Permanent Marker", "Comic Sans MS", cursive, sans-serif;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  box-shadow: 4px 5px 0 rgba(31, 27, 25, 0.2);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.button:hover {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 6px 8px 0 rgba(31, 27, 25, 0.18);
}

.button-primary {
  background: var(--red);
  color: var(--white);
}

.button-secondary {
  background: var(--white);
}

.button-copy {
  min-height: 46px;
  padding-inline: 1rem;
  white-space: nowrap;
}

.ca-card {
  max-width: 44rem;
  margin: 0 0 1.2rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.74);
  border: 2px solid rgba(31, 27, 25, 0.85);
  border-radius: 20px 14px 24px 12px;
  box-shadow: 4px 5px 0 rgba(31, 27, 25, 0.1);
  transform: rotate(-0.9deg);
}

.ca-label {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-family: "Permanent Marker", "Comic Sans MS", cursive, sans-serif;
  color: var(--red);
  font-size: 0.95rem;
}

.ca-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.ca-value {
  display: block;
  width: 100%;
  padding: 0.75rem 0.9rem;
  overflow-x: auto;
  font-family: "Courier New", monospace;
  font-size: 0.96rem;
  line-height: 1.35;
  color: var(--ink);
  background: rgba(246, 240, 223, 0.92);
  border: 2px dashed rgba(31, 27, 25, 0.7);
  border-radius: 15px 12px 16px 11px;
}

.hero-notes {
  grid-template-columns: repeat(3, max-content);
  gap: 0.85rem;
  margin-top: 1.1rem;
}

.hero-notes p {
  margin: 0;
  padding: 0.35rem 0.8rem;
  font-size: 1rem;
  border: 2px dashed rgba(31, 27, 25, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transform: rotate(var(--rotate, 0deg));
}

.hero-notes p:nth-child(1) {
  --rotate: -3deg;
}

.hero-notes p:nth-child(2) {
  --rotate: 2deg;
}

.hero-notes p:nth-child(3) {
  --rotate: -2deg;
}

.hero-art {
  display: grid;
  gap: 0.9rem;
  justify-items: center;
}

.art-frame,
.banner-frame {
  position: relative;
  width: 100%;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.82);
  border: 3px solid rgba(31, 27, 25, 0.88);
  border-radius: 28px 18px 31px 19px;
  box-shadow: 7px 9px 0 rgba(31, 27, 25, 0.14);
}

.art-frame {
  max-width: 520px;
  transform: rotate(1.2deg);
}

.banner-frame {
  transform: rotate(-1deg);
}

.logo-art,
.banner-art {
  width: 100%;
  height: auto;
  border-radius: 18px 14px 20px 12px;
}

.art-caption {
  margin: 0;
  font-family: "Permanent Marker", "Comic Sans MS", cursive, sans-serif;
  text-align: center;
  color: var(--blue);
  transform: rotate(-1deg);
}

.about-grid {
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1.3rem;
  align-items: start;
}

.about-copy p:first-child {
  margin-top: 0;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.note-card,
.step-card {
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(31, 27, 25, 0.85);
  border-radius: 21px 14px 26px 16px;
  padding: 1rem;
  box-shadow: 4px 5px 0 rgba(31, 27, 25, 0.1);
}

.note-card:nth-child(odd),
.step-card:nth-child(odd) {
  transform: rotate(-1deg);
}

.note-card:nth-child(even),
.step-card:nth-child(even) {
  transform: rotate(1deg);
}

.note-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--red);
  font-family: "Permanent Marker", "Comic Sans MS", cursive, sans-serif;
  font-size: 0.9rem;
}

.note-card strong {
  font-size: 1.25rem;
}

.steps-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 0.9rem;
  border-radius: 50% 43% 49% 41%;
  background: var(--yellow);
  border: 2px solid rgba(31, 27, 25, 0.85);
  font-family: "Permanent Marker", "Comic Sans MS", cursive, sans-serif;
}

.step-card h3 {
  margin-bottom: 0.7rem;
  font-size: 1.35rem;
}

.step-card p {
  margin: 0;
}

.how-to-buy-actions,
.join-actions {
  grid-auto-flow: column;
  justify-content: start;
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.chart-shell {
  width: 100%;
  min-height: 640px;
  padding: 0.7rem;
  background: rgba(24, 24, 24, 0.98);
  border: 3px solid rgba(31, 27, 25, 0.88);
  border-radius: 28px 20px 34px 16px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.chart-shell iframe {
  width: 100%;
  min-height: 620px;
  border: 0;
  border-radius: 20px 14px 26px 12px;
  background: #111;
}

.join-grid {
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.2rem;
  align-items: center;
}

.site-footer {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 0 0 2.5rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-family: "Permanent Marker", "Comic Sans MS", cursive, sans-serif;
  color: rgba(31, 27, 25, 0.78);
  transform: rotate(-1deg);
}

.page-doodles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.doodle {
  position: absolute;
  opacity: 0.55;
}

.doodle-star {
  width: 58px;
  height: 58px;
  border: 3px solid transparent;
}

.doodle-star::before,
.doodle-star::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid currentColor;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 95%, 50% 72%, 21% 95%, 32% 57%, 2% 35%, 39% 35%);
}

.star-a {
  top: 10%;
  right: 4%;
  color: var(--red);
  transform: rotate(12deg);
}

.star-b {
  top: 63%;
  left: 3%;
  color: var(--blue);
  transform: rotate(-14deg);
}

.doodle-swoosh {
  height: 9px;
  width: 120px;
  border-radius: 999px;
  background: currentColor;
  filter: blur(0.5px);
}

.swoosh-a {
  top: 28%;
  left: 7%;
  color: rgba(215, 68, 56, 0.4);
  transform: rotate(-18deg);
}

.swoosh-b {
  bottom: 12%;
  right: 8%;
  color: rgba(44, 98, 214, 0.35);
  transform: rotate(8deg);
}

@media (max-width: 980px) {
  .hero,
  .about-grid,
  .join-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-row,
  .hero-notes,
  .how-to-buy-actions,
  .join-actions {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
  }

  .button {
    width: 100%;
  }

  .ca-row {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  main,
  .site-header,
  .site-footer {
    width: min(calc(100% - 1rem), var(--max-width));
  }

  .site-header {
    position: static;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .about-stats,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .chart-shell,
  .chart-shell iframe {
    min-height: 480px;
  }
}
