:root {
  --paper: #f0e6d2;
  --paper-2: #e8ddc8;
  --paper-3: #dccfb4;
  --ink: #1a1612;
  --ink-soft: #3b332b;
  --ink-faint: rgba(26, 22, 18, 0.14);
  --blonde: #d4b37a;
  --blonde-deep: #b8924e;
  --blonde-wash: rgba(212, 179, 122, 0.22);
  --line: #2a241c;
  --shadow: 0 18px 40px rgba(26, 22, 18, 0.08);
  --display: "Bodoni Moda", "Times New Roman", serif;
  --hand: "Kalam", "Comic Sans MS", cursive;
  --note: "Caveat", "Segoe Script", cursive;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(212, 179, 122, 0.22), transparent 55%),
    radial-gradient(900px 600px at 110% 8%, rgba(184, 146, 78, 0.16), transparent 50%),
    linear-gradient(180deg, #f4ead6 0%, var(--paper) 28%, #eadfc8 100%);
  font-family: var(--hand);
  font-weight: 400;
  line-height: 1.55;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  cursor: pointer;
}

code {
  font-family: var(--hand);
}

.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
}

.paper-grain,
.ink-wash,
#ink-canvas,
.page-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.paper-grain {
  z-index: 2;
  opacity: 0.38;
  mix-blend-mode: multiply;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(26, 22, 18, 0.02) 3px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.stain {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: multiply;
  opacity: 0.18;
}

.stain-a {
  width: 220px;
  height: 180px;
  left: 4%;
  top: 38%;
  background: radial-gradient(circle, rgba(140, 92, 48, 0.35) 0%, transparent 70%);
  animation: blot-pulse 11s ease-in-out infinite;
}

.stain-b {
  width: 160px;
  height: 160px;
  right: 6%;
  top: 18%;
  background: radial-gradient(circle, rgba(26, 22, 18, 0.22) 0%, transparent 68%);
  animation: blot-pulse 13s ease-in-out infinite reverse;
}

.stain-c {
  width: 190px;
  height: 140px;
  right: 14%;
  bottom: 12%;
  background: radial-gradient(circle, rgba(184, 146, 78, 0.4) 0%, transparent 70%);
}

.ink-wash {
  z-index: 0;
  background:
    radial-gradient(circle at 8% 72%, rgba(26, 22, 18, 0.05), transparent 22%),
    radial-gradient(circle at 92% 30%, rgba(212, 179, 122, 0.16), transparent 24%),
    radial-gradient(circle at 70% 90%, rgba(26, 22, 18, 0.04), transparent 20%);
  animation: wash-drift 18s ease-in-out infinite alternate;
}

#ink-canvas {
  z-index: 1;
}

.page-frame {
  z-index: 8;
  width: 100%;
  height: 100%;
}

.page-frame-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.35;
  stroke-linejoin: round;
  opacity: 0.35;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: ink-draw 3.2s ease forwards 0.2s;
}

.cursor-ink {
  position: fixed;
  z-index: 20;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.4);
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

.cursor-ink.is-on {
  opacity: 0.55;
  transform: scale(1);
}

.cursor-ink.is-press {
  background: var(--blonde-wash);
  transform: scale(1.45);
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 32px;
  background: rgba(243, 236, 222, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

.masthead.is-scrolled {
  border-bottom-color: rgba(26, 22, 18, 0.12);
  box-shadow: 0 10px 24px rgba(26, 22, 18, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-ring {
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  overflow: hidden;
  background: #fffaf0;
  animation: ring-breathe 5s ease-in-out infinite;
}

.brand-mark,
.colophon-mark,
.chart-placeholder img {
  mix-blend-mode: multiply;
}

.brand-mark {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-ticker {
  font-family: var(--note);
  font-size: 0.95rem;
  color: var(--blonde-deep);
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  position: relative;
  font-family: var(--note);
  font-size: 1.25rem;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5 C 16 1, 28 7, 40 4 S 64 1, 79 5' fill='none' stroke='%231a1612' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.mast-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ink-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.7);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.ink-icon img {
  width: 16px;
  height: 16px;
}

.ink-icon:hover {
  background: var(--blonde);
  transform: translateY(-2px) rotate(-6deg);
  box-shadow: 3px 4px 0 var(--ink);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--ink);
  background: transparent;
  padding: 0;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: var(--ink);
  transition: 0.25s ease;
}

.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 27px; }

.nav-toggle.is-open span:nth-child(1) { top: 20px; transform: rotate(38deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 20px; transform: rotate(-38deg); }

.hero {
  position: relative;
  min-height: calc(100vh - 78px);
  padding: 48px 32px 180px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background:
    repeating-linear-gradient(90deg, rgba(26, 22, 18, 0.045) 0 14px, transparent 14px 28px),
    linear-gradient(180deg, transparent, rgba(26, 22, 18, 0.05));
  pointer-events: none;
}

.skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 240px;
  opacity: 0.82;
  filter: url(#ink-wobble);
}

.draw-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: ink-draw 4s ease forwards;
}

.delay-sky { animation-delay: 0.8s; }
.delay-2 { animation-delay: 0.45s; }
.delay-3 { animation-delay: 0.75s; }
.delay-4 { animation-delay: 1s; }

.hero-ornament {
  position: absolute;
  top: 70px;
  width: 78px;
  opacity: 0.72;
}

.hero-ornament--left { left: 24px; }
.hero-ornament--right { right: 28px; top: 90px; }

.hero-grid {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.portrait-stage {
  position: relative;
}

.margin-note {
  margin: 0 0 10px;
  font-family: var(--note);
  font-size: 1.2rem;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}

.portrait-plate {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 500px;
}

.portrait-halo {
  position: absolute;
  width: min(420px, 92%);
  height: min(460px, 92%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 250, 240, 0.95) 0%, rgba(243, 236, 222, 0.3) 58%, transparent 72%),
    radial-gradient(circle at 48% 40%, rgba(212, 179, 122, 0.28), transparent 60%);
  animation: ring-breathe 6s ease-in-out infinite;
}

.portrait-oval {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portrait-oval .draw-line {
  stroke-width: 2.2;
}

.portrait-clip {
  position: relative;
  z-index: 1;
  width: min(340px, 78%);
  aspect-ratio: 5 / 6;
  overflow: hidden;
  clip-path: ellipse(50% 50% at 50% 50%);
  background: #f4ebda;
  animation: portrait-float 7s ease-in-out infinite;
}

.hero-portrait {
  width: 118%;
  max-width: none;
  height: 118%;
  margin: -6% 0 0 -9%;
  object-fit: cover;
  object-position: center 8%;
  mix-blend-mode: multiply;
}

.dollar {
  font-family: var(--note);
  font-weight: 700;
  margin-right: 2px;
}

.ink-blot {
  position: absolute;
  z-index: 0;
  border-radius: 60% 40% 55% 45%;
  background: rgba(26, 22, 18, 0.1);
  animation: blot-pulse 8s ease-in-out infinite;
}

.blot-a {
  width: 90px;
  height: 70px;
  left: 8%;
  bottom: 18%;
}

.blot-b {
  width: 60px;
  height: 50px;
  right: 10%;
  top: 16%;
  animation-delay: -3s;
}

.mustache-badge {
  width: 120px;
  margin: -10px auto 0;
  animation: wiggle 5.5s ease-in-out infinite;
}

.mustache-badge .draw-line {
  stroke-width: 2;
}

.hero-copy h1 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(3.4rem, 8vw, 6.4rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 0.92;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 6px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-family: var(--note);
  font-size: 1.15rem;
  background: rgba(255, 250, 240, 0.7);
}

.eyebrow img {
  width: 16px;
  height: 16px;
}

.symbol-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
}

.symbol {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.16em;
}

.fleur {
  width: 18px;
  height: 18px;
  background: var(--ink);
  clip-path: polygon(50% 0, 62% 28%, 100% 32%, 70% 54%, 80% 100%, 50% 74%, 20% 100%, 30% 54%, 0 32%, 38% 28%);
  animation: fleur-turn 10s linear infinite;
}

.lead {
  max-width: 36rem;
  margin: 0 0 26px;
  font-size: 1.15rem;
}

.cta-row,
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border: 1.6px solid var(--ink);
  background: transparent;
  color: var(--ink);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn img {
  width: 16px;
  height: 16px;
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  letter-spacing: 0.04em;
}

.btn-ink:hover {
  background: var(--blonde-deep);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-ghost:hover,
.btn-copy:hover {
  background: var(--blonde);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.ca-plate {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 22px 0 16px;
  padding: 12px 14px;
  background: rgba(255, 250, 240, 0.72);
  border: 1.5px solid var(--ink);
  box-shadow: 6px 7px 0 rgba(26, 22, 18, 0.08);
}

.ca-label {
  font-family: var(--note);
  font-size: 1.15rem;
}

.ca-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.98rem;
}

.btn-copy {
  min-height: 38px;
  padding: 6px 12px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--note);
  font-size: 1.15rem;
}

.hero-links img {
  width: 18px;
  height: 18px;
}

.hero-links a:hover {
  color: var(--blonde-deep);
}

.section {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 32px;
}

.section-head {
  max-width: 680px;
  margin: 0 0 42px;
}

.section-head h2,
.story-sheet h3,
.trait-card h3,
.step-card h3,
.join-card h3,
.colophon-title {
  font-family: var(--display);
  letter-spacing: 0.03em;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 0.95;
}

.section-kicker {
  margin: 0;
  font-size: 1.12rem;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.scribble {
  display: block;
  width: 220px;
  height: 16px;
  margin: 0 0 16px;
}

.scribble path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  animation: ink-draw 1.4s ease forwards 0.2s;
}

.story-sheet,
.trait-card,
.step-card,
.chart-frame,
.join-card,
.banner-stage {
  background: rgba(255, 250, 240, 0.78);
  border: 1.8px solid var(--ink);
  box-shadow: 4px 5px 0 rgba(26, 22, 18, 0.08);
}

.story-sheet {
  padding: 32px;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 27px,
    rgba(26, 22, 18, 0.05) 28px
  );
}

.story-sheet h3 {
  margin-top: 0;
  font-size: 2rem;
}

.trait-stack {
  display: grid;
  gap: 16px;
}

.trait-card,
.step-card,
.join-card {
  padding: 22px;
  border-radius: 3px 10px 4px 8px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.trait-card:nth-child(2),
.step-card:nth-child(2),
.join-card:nth-child(2) { transform: rotate(-0.5deg); }

.trait-card:nth-child(3),
.step-card:nth-child(3),
.join-card:nth-child(3) { transform: rotate(0.6deg); }

.step-card:nth-child(4),
.join-card:nth-child(4) { transform: rotate(-0.35deg); }

.trait-card:hover,
.step-card:hover,
.join-card:hover {
  transform: translate(-3px, -4px) rotate(-0.4deg);
  box-shadow: 6px 8px 0 rgba(26, 22, 18, 0.12);
}

.trait-index,
.step-num {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--blonde-deep);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  top: 38px;
  left: 8%;
  right: 8%;
  border-top: 1.5px dashed rgba(26, 22, 18, 0.28);
  pointer-events: none;
}

.step-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 10px 0 12px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: #fffaf0;
}

.step-icon img {
  width: 24px;
  height: 24px;
}

.step-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-family: var(--note);
  font-size: 1.15rem;
}

.step-link img {
  width: 16px;
  height: 16px;
}

.chart-frame {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  padding: 12px;
}

.chart-frame iframe {
  width: 100%;
  height: 540px;
  border: 0;
  background: #fffaf0;
}

.chart-placeholder {
  min-height: 520px;
  display: none;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
  padding: 32px;
}

.chart-placeholder img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  background: #f4ebda;
  animation: portrait-float 6s ease-in-out infinite;
}

.tape {
  position: absolute;
  top: 10px;
  width: 86px;
  height: 22px;
  background: rgba(212, 179, 122, 0.38);
  border: 1px solid rgba(26, 22, 18, 0.2);
  transform: rotate(-7deg);
  z-index: 2;
}

.tape-left { left: 18px; }
.tape-right { right: 18px; transform: rotate(8deg); }

.banner-stage {
  margin: 0 0 28px;
  border: 1.6px solid var(--ink);
  background: #fffaf0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.join-banner {
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  object-position: center;
  animation: banner-drift 18s ease-in-out infinite alternate;
}

.join-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.join-card {
  text-align: center;
}

.join-card img {
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
}

.join-card h3 {
  margin: 0;
}

.join-card p {
  margin: 6px 0 0;
  font-family: var(--note);
  font-size: 1.2rem;
}

.colophon {
  position: relative;
  z-index: 2;
  padding: 64px 24px 80px;
  text-align: center;
}

.colophon-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  object-fit: cover;
  background: #fffaf0;
}

.colophon-title {
  margin: 0;
  font-size: 2rem;
}

.colophon-sub,
.colophon-note {
  margin: 6px 0 0;
}

.colophon-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 16px 0;
  font-family: var(--note);
  font-size: 1.25rem;
}

.colophon-links a:hover {
  color: var(--blonde-deep);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  transform: translate(-50%, 16px);
  padding: 10px 16px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: 0.28s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: rise-in 0.9s ease forwards;
}

.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; }
.delay-3 { animation-delay: 0.36s; }

@keyframes ink-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes portrait-float {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-12px) rotate(0.6deg); }
}

@keyframes ring-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes blot-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.55; }
  50% { transform: scale(1.15) rotate(8deg); opacity: 0.85; }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(3deg); }
}

@keyframes fleur-turn {
  to { transform: rotate(360deg); }
}

@keyframes wash-drift {
  to { transform: translate3d(-2%, 1%, 0) scale(1.04); }
}

@keyframes banner-drift {
  from { transform: scale(1.02) translateY(0); }
  to { transform: scale(1.06) translateY(-2%); }
}

@keyframes rise-in {
  to { opacity: 1; transform: none; }
}

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

  .hero-ornament {
    display: none;
  }
}

@media (max-width: 760px) {
  .masthead {
    padding: 12px 16px;
  }

  .brand-ticker {
    display: none;
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .ink-icon {
    width: 34px;
    height: 34px;
  }

  .mast-actions .ink-icon:nth-child(3) {
    display: none;
  }

  .steps::before {
    display: none;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(243, 236, 222, 0.96);
    border-bottom: 1.5px solid var(--ink);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 14px 20px;
    border-top: 1px solid rgba(26, 22, 18, 0.08);
  }

  .nav-toggle {
    display: block;
  }

  .hero,
  .section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-grid,
  .about-layout,
  .steps,
  .join-grid,
  .ca-plate {
    grid-template-columns: 1fr;
  }

  .portrait-plate {
    min-height: 380px;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
