/* ============================================================
   just a chill ape — $CHILLAPE
   Palette pulled straight out of the artwork.
   ============================================================ */

:root {
  --sage:      #8a8e75;  /* the background he stands on */
  --sage-dk:   #767a62;
  --sage-dp:   #5f6350;
  --sage-lt:   #9aa085;

  --paper:     #efeddf;  /* his sneaker cream */
  --paper-2:   #e6e3d2;
  --ink:       #2f3229;
  --ink-soft:  #5c6053;

  --cream:     #f4f2e6;
  --cream-dim: rgba(244, 242, 230, .72);
  --cream-dim2:rgba(244, 242, 230, .5);

  --brick:     #a8544a;  /* his sneakers */
  --brick-lt:  #bd6357;
  --mint:      #9cc7c0;  /* his jeans */
  --wool:      #b9bcc3;  /* his sweater */

  --line-l:    rgba(47, 50, 41, .14);
  --line-d:    rgba(244, 242, 230, .22);

  --radius:    24px;
  --radius-sm: 16px;
  --max:       1180px;

  --font-d: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-b: 'Outfit', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--sage);
  color: var(--cream);
  font-family: var(--font-b);
  font-size: 17px;
  line-height: 1.68;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--brick); color: var(--cream); }

/* paper texture over everything */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
.wrap--narrow { max-width: 800px; }

.section { padding: 112px 0; position: relative; z-index: 2; }

/* cream "paper" sections sit on top of the sage */
.section--paper {
  background: var(--paper);
  color: var(--ink);
}
.section--paper .section__lead,
.section--paper .story__body p,
.section--paper .fineprint { color: var(--ink-soft); }

.section__head { max-width: 740px; margin-bottom: 58px; }
.section__lead { color: var(--cream-dim); margin-top: 16px; font-size: 1.06rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-b);
  font-weight: 500;
  font-size: .76rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 18px;
  padding: 6px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-d);
  background: rgba(244, 242, 230, .08);
}
.section--paper .eyebrow {
  color: var(--brick);
  border-color: rgba(168, 84, 74, .32);
  background: rgba(168, 84, 74, .07);
}

.h2 {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.14;
  letter-spacing: -.015em;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--font-b);
  font-weight: 500;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--brick);
  color: var(--cream);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .25s, background .25s;
  box-shadow: 0 10px 22px -12px rgba(47, 50, 41, .85);
}
.btn:hover { background: var(--brick-lt); transform: translateY(-2px); box-shadow: 0 16px 28px -14px rgba(47, 50, 41, .9); }
.btn:active { transform: translateY(0); }

.btn--sm { padding: 10px 21px; font-size: .92rem; }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }

.btn--ghost {
  background: transparent;
  border-color: var(--line-d);
  color: var(--cream);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(244,242,230,.1); border-color: var(--cream-dim2); }

.btn--cream { background: var(--cream); color: var(--brick); }
.btn--cream:hover { background: #fff; color: var(--brick); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 16px 28px;
  transition: background .35s, backdrop-filter .35s, box-shadow .35s, padding .35s;
}
.nav.is-stuck {
  background: rgba(138, 142, 117, .88);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  box-shadow: 0 1px 0 rgba(244,242,230,.16), 0 14px 30px -26px rgba(47,50,41,.9);
  padding: 10px 28px;
}
.nav__brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.nav__logo {
  border-radius: 50%; object-fit: cover;
  background: var(--sage-lt);
  box-shadow: 0 0 0 1px rgba(244,242,230,.3);
}
.nav__name {
  font-family: var(--font-d); font-weight: 600; font-size: 1.16rem;
  letter-spacing: -.01em; color: var(--cream);
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
}

.nav__links { display: flex; gap: 30px; }
.nav__links a {
  font-size: .95rem; color: var(--cream-dim); position: relative; padding: 4px 0;
  transition: color .2s;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--cream); border-radius: 2px; transition: width .3s ease;
}
.nav__links a:hover { color: var(--cream); }
.nav__links a:hover::after { width: 100%; }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__burger span { width: 24px; height: 2px; background: var(--cream); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; top: 0; left: 0; right: 0; z-index: 45;
  display: none; flex-direction: column;
  padding: 84px 24px 28px;
  background: var(--sage-dk);
  transform: translateY(-105%);
  transition: transform .4s cubic-bezier(.3,.9,.3,1);
  box-shadow: 0 20px 40px -30px rgba(0,0,0,.9);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu a {
  padding: 14px 0; font-size: 1.1rem; font-family: var(--font-d); font-weight: 500;
  border-bottom: 1px solid var(--line-d); color: var(--cream);
}
.mobile-menu .btn { margin-top: 20px; border-bottom: 0; justify-content: center; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 128px 24px 0;
  background: var(--sage);
}
/* soft light from above, like the artwork */
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 50% 0%, rgba(244, 242, 230, .16), transparent 65%);
  pointer-events: none;
}

.hero__inner {
  width: 100%; max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.08fr .92fr; gap: 40px;
  align-items: end;
  position: relative; z-index: 2;
}

.hero__copy { padding-bottom: 96px; }

.chip {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .85rem; font-weight: 400; letter-spacing: .02em;
  color: var(--cream);
  padding: 7px 17px; border-radius: 999px;
  background: rgba(244, 242, 230, .1);
  border: 1px solid var(--line-d);
  margin-bottom: 26px;
}
.chip::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brick-lt);
  animation: breathe 3.4s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }

.hero__title {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: clamp(3.1rem, 7.4vw, 5.6rem);
  line-height: .96;
  letter-spacing: -.035em;
  color: var(--cream);
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
}

.hero__sub {
  color: var(--cream-dim);
  font-size: 1.14rem;
  max-width: 520px;
  margin: 26px 0 34px;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* contract address — copyable, sits under the buttons */
.ca {
  display: inline-flex; align-items: center; gap: 12px;
  max-width: 100%;
  margin-top: 22px;
  padding: 9px 9px 9px 16px;
  border-radius: 999px;
  background: rgba(244, 242, 230, .08);
  border: 1px solid var(--line-d);
  color: var(--cream);
  font-family: var(--font-b);
  cursor: pointer;
  text-align: left;
  transition: background .25s, border-color .25s, transform .25s;
}
.ca:hover { background: rgba(244, 242, 230, .15); border-color: var(--cream-dim2); transform: translateY(-1px); }
.ca:active { transform: translateY(0); }
.ca__k {
  flex: none;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--cream-dim2);
}
.ca__v {
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: .82rem; letter-spacing: -.01em;
  color: var(--cream);
}
.ca__do {
  flex: none;
  padding: 6px 15px; border-radius: 999px;
  background: var(--brick); color: var(--cream);
  font-size: .8rem; font-weight: 500; letter-spacing: .02em;
  transition: background .25s;
}
.ca.is-copied .ca__do { background: var(--sage-dp); }

.hero__ticker { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tk {
  display: flex; flex-direction: column; gap: 1px;
  padding: 11px 19px;
  border-radius: var(--radius-sm);
  background: rgba(244, 242, 230, .08);
  border: 1px solid var(--line-d);
}
.tk__k { font-size: .7rem; text-transform: uppercase; letter-spacing: .15em; color: var(--cream-dim2); }
.tk__v { font-family: var(--font-d); font-weight: 600; font-size: 1rem; color: var(--cream); }

/* the ape himself — his artwork background is the same sage as the page,
   so he simply stands on it. edges are feathered as insurance. */
.hero__art { position: relative; justify-self: center; align-self: end; width: fit-content; max-width: 100%; }
.hero__ape { position: relative; }
.hero__ape img {
  height: min(74svh, 730px); width: auto; max-width: 100%;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 7.5%, #000 92.5%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 4.4%, #000 100%);
  mask-image:
    linear-gradient(to right, transparent 0, #000 7.5%, #000 92.5%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 4.4%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  animation: sway 9s ease-in-out infinite;
}
@keyframes sway {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-9px) rotate(-.6deg); }
}
.hero__shadow {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
  width: 52%; height: 26px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(47, 50, 41, .3), transparent 75%);
  animation: shrink 9s ease-in-out infinite;
}
@keyframes shrink { 0%,100% { opacity: .9; } 50% { opacity: .6; } }

.scroll-hint {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  width: 25px; height: 40px; border: 1.5px solid var(--line-d); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 8px; z-index: 3;
}
.scroll-hint span {
  width: 3px; height: 8px; border-radius: 2px; background: var(--cream);
  animation: wheel 1.9s ease-in-out infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  background: var(--brick);
  color: var(--cream);
  padding: 13px 0;
  position: relative; z-index: 2;
}
.marquee__track {
  display: flex; align-items: center; gap: 22px;
  width: max-content;
  animation: slide 44s linear infinite;
  font-family: var(--font-d); font-weight: 500;
  font-size: 1rem; letter-spacing: .1em;
  text-transform: lowercase;
}
.marquee__track i { color: rgba(244,242,230,.55); font-style: normal; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- story ---------- */
.story { list-style: none; }
.story__item {
  display: grid; grid-template-columns: 96px 1fr; gap: 30px;
  padding: 34px 0;
  border-top: 1px solid var(--line-l);
  transition: background .35s;
}
.story__item:last-child { border-bottom: 1px solid var(--line-l); }
.story__item:hover { background: rgba(47, 50, 41, .025); }
.story__num {
  font-family: var(--font-d); font-weight: 600;
  font-size: 2.4rem; line-height: 1;
  color: var(--brick); opacity: .5;
  font-variation-settings: 'WONK' 1;
}
.story__body h3 {
  font-family: var(--font-d); font-weight: 600;
  font-size: 1.5rem; margin-bottom: 11px; letter-spacing: -.01em; color: var(--ink);
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
}
.story__body p { max-width: 720px; }
.story__body em { color: var(--brick); font-style: italic; }

.quote {
  margin-top: 62px;
  text-align: center;
  padding: 48px 28px;
  border-radius: var(--radius);
  background: var(--paper-2);
  border: 1px solid var(--line-l);
}
.quote p {
  font-family: var(--font-d); font-weight: 500;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  color: var(--ink); line-height: 1.3;
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
}
.quote cite { display: block; margin-top: 14px; font-size: .92rem; color: var(--ink-soft); font-style: normal; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.card {
  padding: 32px 28px;
  border-radius: var(--radius);
  background: rgba(244, 242, 230, .09);
  border: 1px solid var(--line-d);
  transition: transform .35s cubic-bezier(.2,.8,.3,1), background .35s, border-color .35s;
}
.card:hover { transform: translateY(-6px); background: rgba(244, 242, 230, .15); border-color: var(--cream-dim2); }
.card__icon {
  font-size: 1.7rem; margin-bottom: 18px;
  width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center;
  background: rgba(244, 242, 230, .14);
  border: 1px solid var(--line-d);
}
.card h3 {
  font-family: var(--font-d); font-weight: 600; font-size: 1.2rem; margin-bottom: 9px;
  color: var(--cream); font-variation-settings: 'SOFT' 40, 'WONK' 1;
}
.card p { color: var(--cream-dim); font-size: .98rem; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 14px; }
.stat {
  padding: 26px 20px;
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  border: 1px solid var(--line-l);
  text-align: center;
  transition: transform .3s, border-color .3s;
}
.stat:hover { transform: translateY(-4px); border-color: rgba(168, 84, 74, .4); }
.stat__v {
  display: block;
  font-family: var(--font-d); font-weight: 600;
  font-size: clamp(1.2rem, 2.3vw, 1.5rem);
  color: var(--brick); line-height: 1.2;
  font-variation-settings: 'WONK' 1;
}
.stat__k { display: block; margin-top: 6px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

.fineprint { margin-top: 34px; font-size: .95rem; max-width: 760px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.step {
  padding: 30px 26px;
  border-radius: var(--radius);
  background: rgba(244, 242, 230, .09);
  border: 1px solid var(--line-d);
  transition: transform .35s, background .35s;
}
.step:hover { transform: translateY(-6px); background: rgba(244, 242, 230, .15); }
.step__n {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-d); font-weight: 600; font-size: 1.1rem;
  color: var(--cream); background: var(--brick);
  margin-bottom: 18px;
}
.step h3 {
  font-family: var(--font-d); font-weight: 600; font-size: 1.14rem; margin-bottom: 9px;
  color: var(--cream); font-variation-settings: 'SOFT' 40;
}
.step p { color: var(--cream-dim); font-size: .96rem; }

.cta-band {
  margin-top: 54px;
  padding: 42px 46px;
  border-radius: var(--radius);
  display: flex; flex-wrap: wrap; gap: 26px;
  align-items: center; justify-content: space-between;
  background: var(--brick);
  color: var(--cream);
}
.cta-band h3 {
  font-family: var(--font-d); font-weight: 600; font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
}
.cta-band p { color: rgba(244,242,230,.8); margin-top: 6px; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 11px; }
.faq details {
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  border: 1px solid var(--line-l);
  overflow: hidden;
  transition: border-color .3s, background .3s;
}
.faq details[open] { border-color: rgba(168, 84, 74, .35); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 20px 56px 20px 24px;
  font-family: var(--font-d); font-weight: 500; font-size: 1.06rem;
  color: var(--ink);
  position: relative;
  font-variation-settings: 'SOFT' 40;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--brick); line-height: 1;
  transition: transform .3s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 24px 22px; color: var(--ink-soft); font-size: .99rem; }

/* ---------- footer ---------- */
.footer {
  padding: 64px 0 46px;
  background: var(--sage-dp);
  color: var(--cream);
  position: relative; z-index: 2;
}
.footer__inner { display: grid; gap: 24px; justify-items: center; text-align: center; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { border-radius: 50%; background: var(--sage-lt); box-shadow: 0 0 0 1px rgba(244,242,230,.25); }
.footer__brand div { display: flex; flex-direction: column; text-align: left; }
.footer__brand strong {
  font-family: var(--font-d); font-weight: 600; font-size: 1.18rem;
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
}
.footer__brand span { font-size: .85rem; color: var(--cream-dim2); }
.footer__note { max-width: 760px; font-size: .88rem; color: var(--cream-dim2); line-height: 1.7; }
.footer__copy { font-size: .85rem; color: var(--cream-dim2); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { align-items: center; padding-top: 116px; padding-bottom: 40px; }
  .hero__inner { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .hero__copy { display: flex; flex-direction: column; align-items: center; padding-bottom: 0; order: 2; }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .hero__cta, .hero__ticker { justify-content: center; }
  .hero__art { order: 1; }
  .hero__ape img { height: min(40svh, 360px); }
  .section__head { margin-left: auto; margin-right: auto; text-align: center; }
}

@media (max-width: 820px) {
  .nav__links { display: none; }
  .nav > .btn--sm { display: none; }
  .nav__burger { display: flex; }
  .mobile-menu { display: flex; }
  .section { padding: 84px 0; }
  .story__item { grid-template-columns: 1fr; gap: 8px; padding: 28px 0; }
  .story__num { font-size: 1.9rem; }
  .cta-band { padding: 32px 26px; flex-direction: column; text-align: center; }
  .scroll-hint { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .hero__ape img { height: min(33svh, 270px); }
  .tk { flex: 1 1 42%; }
  .ca { width: 100%; gap: 9px; padding-left: 14px; }
  .ca__v { font-size: .74rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
