:root {
  --cream: #f6eee4;
  --cream-deep: #ead9c8;
  --wool: #fbf6ee;
  --blush: #e8b8b6;
  --rose: #c47d80;
  --rose-deep: #8a4d50;
  --ink: #4f342f;
  --mute: #7a5a54;
  --hat: #d9a3a6;
  --yarn: #e4c4be;
  --stitch: #c9a29a;
  --shadow: 0 22px 50px rgba(90, 48, 46, 0.12);
  --font-display: "Baloo 2", "Trebuchet MS", sans-serif;
  --font-body: "Quicksand", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--cream);
  overflow-x: hidden;
}

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

.parlor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(232, 184, 182, 0.38), transparent 60%),
    radial-gradient(800px 480px at 92% 8%, rgba(217, 163, 166, 0.28), transparent 58%),
    radial-gradient(700px 520px at 50% 110%, rgba(201, 162, 154, 0.22), transparent 55%),
    linear-gradient(180deg, #f8f1e8 0%, #f3e6d8 48%, #efe0d2 100%);
}

.knit-sheet {
  position: absolute;
  inset: -8%;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 10c4-6 8 6 12 0s8 6 12 0' fill='none' stroke='%23c47d80' stroke-width='1.1' stroke-linecap='round'/%3E%3Cpath d='M4 20c4-6 8 6 12 0s8 6 12 0' fill='none' stroke='%23d9a3a6' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
  animation: knit-drift 28s linear infinite;
}

.wool-haze {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(251, 246, 238, 0.2), transparent 55%);
  animation: haze-breathe 9s ease-in-out infinite;
}

.thread {
  position: absolute;
  left: 0;
  width: 100%;
  height: 220px;
  overflow: visible;
}

.thread path {
  fill: none;
  stroke: #d7a8a4;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 12 18;
  opacity: 0.45;
  animation: thread-flow 16s linear infinite;
}

.thread-a { top: 12%; }
.thread-b { bottom: 18%; transform: scaleY(-1); }
.thread-b path { animation-duration: 22s; animation-direction: reverse; opacity: 0.32; }

.mote {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  background: radial-gradient(circle at 30% 30%, #fff7f2, var(--blush));
  box-shadow: 0 0 18px rgba(196, 125, 128, 0.28);
  animation: mote-float 14s ease-in-out infinite;
}

.m1 { width: 18px; height: 18px; left: 8%; top: 22%; }
.m2 { width: 12px; height: 12px; left: 78%; top: 18%; animation-delay: -3s; }
.m3 { width: 22px; height: 22px; left: 18%; bottom: 16%; animation-delay: -6s; }
.m4 { width: 10px; height: 10px; left: 88%; bottom: 28%; animation-delay: -8s; }
.m5 { width: 16px; height: 16px; left: 48%; top: 8%; animation-delay: -2s; }
.m6 { width: 14px; height: 14px; left: 62%; bottom: 12%; animation-delay: -10s; }

.yarn-ball {
  position: absolute;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 40% 35%, #f7e4dc 0 3px, #e8b8b6 3px 6px);
  box-shadow: inset -8px -10px 16px rgba(90, 48, 46, 0.12), 0 10px 20px rgba(90, 48, 46, 0.08);
  animation: yarn-roll 18s ease-in-out infinite;
}

.y1 { width: 54px; height: 54px; left: 4%; top: 58%; }
.y2 { width: 38px; height: 38px; right: 6%; top: 36%; animation-delay: -7s; }
.y3 { width: 46px; height: 46px; right: 12%; bottom: 10%; animation-delay: -12s; }

header, main, footer { position: relative; z-index: 1; }

.ribbon {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  background: rgba(251, 246, 238, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 2px dashed rgba(196, 125, 128, 0.28);
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #efd3cb;
  box-shadow: 0 0 0 3px rgba(196, 125, 128, 0.18);
  animation: mark-pulse 4.5s ease-in-out infinite;
}

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

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

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.brand-copy small {
  color: var(--rose-deep);
  letter-spacing: 0.16em;
  font-weight: 700;
}

.ribbon-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.ribbon-nav a {
  font-weight: 700;
  color: var(--mute);
  position: relative;
}

.ribbon-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: var(--rose);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}

.ribbon-nav a:hover::after { transform: scaleX(1); }

.ribbon-actions { display: flex; gap: 10px; }

.pill, .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pill { padding: 8px 14px; }
.pill img, .btn img { width: 18px; height: 18px; }

.pill-ghost {
  background: #fff9f3;
  border-color: #efd3cb;
  color: var(--rose-deep);
}

.pill-rose, .btn-rose {
  background: linear-gradient(180deg, #d89698, #c47d80);
  color: #fff8f4;
  box-shadow: 0 8px 18px rgba(196, 125, 128, 0.28);
}

.btn {
  padding: 13px 20px;
  font-size: 1rem;
}

.btn-cream {
  background: #fff8f2;
  border-color: #efd3cb;
  color: var(--rose-deep);
}

.pill:hover, .btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 24px rgba(90, 48, 46, 0.14);
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.menu-btn span {
  display: block;
  height: 3px;
  border-radius: 99px;
  background: var(--rose-deep);
}

.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  place-items: center;
  padding: 64px 24px 80px;
}

.hero-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 184, 182, 0.42), transparent 68%);
  animation: glow-shift 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-stage {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.halo {
  position: relative;
  width: min(460px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
}

.halo-ring {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  border: 3px dashed rgba(196, 125, 128, 0.45);
  animation: spin-slow 22s linear infinite;
}

.halo-ring.delay {
  inset: -16%;
  border-style: dotted;
  animation-duration: 34s;
  animation-direction: reverse;
  opacity: 0.7;
}

.portrait {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  overflow: hidden;
  border: 10px solid #f4e4d6;
  box-shadow: var(--shadow), inset 0 0 0 6px rgba(196, 125, 128, 0.18);
  animation: portrait-bob 5.5s ease-in-out infinite;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.kicker {
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose);
  font-size: 0.78rem;
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }

h1 {
  font-size: clamp(3.4rem, 8vw, 6.4rem);
  line-height: 0.92;
  color: var(--rose-deep);
  text-shadow: 0 8px 0 rgba(232, 184, 182, 0.35);
  animation: title-settle 1.1s ease both;
}

.ticker {
  display: inline-block;
  margin: 8px 0 10px;
  padding: 4px 14px;
  border-radius: 999px;
  background: #f3ddd6;
  color: var(--rose-deep);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.tagline {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  color: #6d403c;
}

.lede, .section-head p { color: var(--mute); line-height: 1.7; max-width: 56ch; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 18px;
}

.ca-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 248, 242, 0.7);
  border: 2px dashed rgba(196, 125, 128, 0.28);
}

.ca-row span { font-weight: 700; color: var(--rose-deep); }
.ca-row code { font-size: 0.92rem; color: var(--ink); }
.ca-row button {
  border: 0;
  background: var(--rose);
  color: #fff8f4;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
}

section { padding: 88px 24px; }

.section-head {
  width: min(860px, 100%);
  margin: 0 auto 42px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: var(--rose-deep);
  margin: 8px 0 12px;
}

.about-grid, .steps, .join-row {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.stitch-card, .step, .join-card, .chart-frame, .banner-frame {
  background: rgba(251, 246, 238, 0.82);
  border: 2px solid rgba(201, 162, 154, 0.38);
  box-shadow: var(--shadow);
}

.stitch-card {
  position: relative;
  padding: 28px 24px 24px;
  border-radius: 28px;
  overflow: hidden;
  animation: card-in 0.8s ease both;
}

.stitch-card:nth-child(2) { animation-delay: 0.12s; }
.stitch-card:nth-child(3) { animation-delay: 0.24s; }

.stitch-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px dashed rgba(196, 125, 128, 0.28);
  border-radius: 22px;
  pointer-events: none;
}

.knot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-bottom: 14px;
  background: radial-gradient(circle at 35% 35%, #fff, var(--hat));
  box-shadow: 0 0 0 5px rgba(232, 184, 182, 0.35);
  animation: knot-spin 7s linear infinite;
}

.stitch-card h3, .step h3 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: var(--rose-deep);
}

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

.step {
  padding: 22px 18px 20px;
  border-radius: 26px;
  transition: transform 0.28s ease;
}

.step:hover { transform: translateY(-8px); }

.step-num {
  display: block;
  font-family: var(--font-display);
  color: var(--blush);
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.step-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #fff8f2;
  margin-bottom: 14px;
  overflow: hidden;
}

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

.chart-frame {
  width: min(1120px, 100%);
  margin: 0 auto;
  height: 640px;
  border-radius: 28px;
  overflow: hidden;
}

.chart-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.banner-frame {
  width: min(1120px, 100%);
  margin: 0 auto 28px;
  aspect-ratio: 3 / 1;
  border-radius: 28px;
  overflow: hidden;
  animation: banner-lift 1.2s ease both;
}

.banner-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.join-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  border-radius: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.join-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 30px rgba(90, 48, 46, 0.14);
}

.join-card img { width: 36px; height: 36px; }
.join-card strong { display: block; font-family: var(--font-display); font-size: 1.25rem; }
.join-card span { color: var(--mute); }

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 28px;
  border-top: 2px dashed rgba(196, 125, 128, 0.28);
  background: rgba(251, 246, 238, 0.7);
}

.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}
.foot-brand strong { display: block; font-family: var(--font-display); }
.foot-note { color: var(--mute); max-width: 42ch; }

.icon-x { filter: invert(34%) sepia(22%) saturate(720%) hue-rotate(325deg) brightness(82%); }
.icon-dex { filter: sepia(0.55) hue-rotate(-18deg) saturate(0.72) brightness(0.78); }
.icon-pump { filter: sepia(0.42) hue-rotate(-8deg) saturate(0.78) brightness(0.96); }
.icon-sol { filter: sepia(0.45) hue-rotate(-22deg) saturate(0.7) brightness(0.95); }
.icon-phantom { filter: sepia(0.48) hue-rotate(-12deg) saturate(0.68) brightness(1.02); }

.reveal { opacity: 0; transform: translateY(28px); animation: rise 0.8s ease forwards; }

@keyframes knit-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-28px, -28px, 0); }
}

@keyframes haze-breathe {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes thread-flow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -420; }
}

@keyframes mote-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(16px, -28px, 0); }
}

@keyframes mark-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(196, 125, 128, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(196, 125, 128, 0.08); }
}

@keyframes spin-slow { to { transform: rotate(360deg); } }

@keyframes portrait-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes glow-shift {
  0%, 100% { transform: translate(-8%, -6%) scale(1); }
  50% { transform: translate(8%, 4%) scale(1.08); }
}

@keyframes title-settle {
  from { opacity: 0; transform: translateY(24px) rotate(-1deg); }
  to { opacity: 1; transform: none; }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

@keyframes knot-spin { to { transform: rotate(360deg); } }

@keyframes banner-lift {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

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

@keyframes yarn-roll {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(18px, -22px, 0) rotate(28deg); }
}

@media (max-width: 980px) {
  .hero-stage, .about-grid, .steps, .join-row { grid-template-columns: 1fr 1fr; }
  .ribbon-nav { display: none; }
  .ribbon.open .ribbon-nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 16px 24px 20px;
    background: #fbf6ee;
    border-bottom: 2px dashed rgba(196, 125, 128, 0.28);
  }
  .menu-btn { display: flex; }
  .hero-stage { grid-template-columns: 1fr; text-align: center; }
  .hero-cta, .ca-row { justify-content: center; }
  .lede { margin-inline: auto; }
}

@media (max-width: 700px) {
  .about-grid, .steps, .join-row, .foot { grid-template-columns: 1fr; }
  .foot { flex-direction: column; text-align: center; }
  .chart-frame { height: 460px; }
  .ribbon-actions .pill span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
