/* ============================================================
   apewifape — ape season is now.
   plain css. no framework, no build step.
   ============================================================ */

:root {
  /* --- brand palette --- */
  --gold: #f4c96b;        /* sun gold */
  --sand: #e9d5b2;        /* cream sand */
  --cocoa: #3b251b;       /* deep cocoa */
  --fur: #74472e;         /* warm brown */
  --green: #35c978;       /* ape green */
  --ivory: #fff2d3;       /* soft highlight */
  --orange: #e9671a;      /* burnt orange */

  --cocoa-soft: rgba(59, 37, 27, 0.68);
  --cocoa-faint: rgba(59, 37, 27, 0.14);
  --green-deep: #1fa85e;

  --shell: 1160px;
  --shell-narrow: 780px;
  --radius: 22px;
  --radius-sm: 14px;

  --display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.2, .8, .3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--cocoa);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
  text-transform: lowercase;
}

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

::selection { background: var(--green); color: var(--cocoa); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.shell--narrow { max-width: var(--shell-narrow); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--cocoa);
  color: var(--ivory);
  border-radius: 0 0 12px 0;
}

.skip:focus { left: 0; }

/* ---------- shared section furniture ---------- */

.label {
  display: block;
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: lowercase;
  color: var(--fur);
}

.label--light { color: var(--gold); }
.label--print { color: var(--cocoa); opacity: 0.7; }

.h2 {
  font-size: clamp(34px, 6vw, 64px);
  margin-bottom: 26px;
}

.h2--light { color: var(--ivory); }
.h2--print { color: var(--cocoa); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
              background-color 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.btn__x { width: 16px; height: 16px; fill: currentColor; }

.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }

.btn--green {
  background: var(--green);
  color: var(--cocoa);
  box-shadow: 0 8px 24px rgba(53, 201, 120, 0.32);
}

.btn--green:hover {
  background: #45d886;
  box-shadow: 0 14px 34px rgba(53, 201, 120, 0.48), 0 0 0 6px rgba(53, 201, 120, 0.16);
}

.btn--cocoa {
  background: var(--cocoa);
  color: var(--ivory);
  box-shadow: 0 8px 24px rgba(59, 37, 27, 0.3);
}

.btn--cocoa:hover { background: #4b3024; box-shadow: 0 14px 32px rgba(59, 37, 27, 0.42); }

.btn--outline {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(255, 242, 211, 0.55);
}

.btn--outline:hover {
  background: rgba(255, 242, 211, 0.12);
  border-color: var(--ivory);
}

.btn--outline.btn--print {
  color: var(--cocoa);
  border-color: rgba(59, 37, 27, 0.45);
}

.btn--outline.btn--print:hover {
  background: rgba(59, 37, 27, 0.08);
  border-color: var(--cocoa);
}

.btn--sm { padding: 9px 20px; font-size: 14.5px; }
.btn--lg { padding: 16px 32px; font-size: 17px; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(233, 213, 178, 0.5);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.is-stuck {
  background: rgba(233, 213, 178, 0.94);
  border-bottom-color: rgba(59, 37, 27, 0.14);
  box-shadow: 0 8px 26px rgba(59, 37, 27, 0.1);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.035em;
  text-decoration: none;
  color: var(--cocoa);
}

.nav__brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 0 0 1.5px rgba(59, 37, 27, 0.18);
}

.nav__links {
  display: flex;
  gap: 28px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 15.5px;
}

.nav__links a {
  position: relative;
  text-decoration: none;
  color: var(--cocoa);
  opacity: 0.78;
  transition: opacity 0.2s ease;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1.5px solid rgba(59, 37, 27, 0.2);
  color: var(--cocoa);
  transition: transform 0.2s var(--ease), background-color 0.2s ease, border-color 0.2s ease;
}

.icon-btn svg { width: 16px; height: 16px; fill: currentColor; }

.icon-btn:hover {
  transform: translateY(-2px);
  background: rgba(59, 37, 27, 0.08);
  border-color: var(--cocoa);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1.5px solid rgba(59, 37, 27, 0.2);
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--cocoa);
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(92vh, 860px);
  margin-top: -66px;
  padding-top: 66px;
  overflow: hidden;
  background: var(--cocoa);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 50%;
}

/* keeps the headline readable without hiding the sunrise or the chart */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(96deg, rgba(46, 27, 18, 0.94) 0%, rgba(48, 29, 19, 0.7) 34%, rgba(50, 30, 20, 0.16) 62%, transparent 82%),
    linear-gradient(180deg, rgba(40, 24, 16, 0.55) 0%, transparent 26%, transparent 66%, rgba(40, 24, 16, 0.6) 100%);
}

/* slow golden pulse over the ape pair */
.hero__glow {
  position: absolute;
  z-index: -1;
  top: 42%;
  right: 22%;
  width: min(46vw, 560px);
  aspect-ratio: 1;
  transform: translate(50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 201, 107, 0.34) 0%, rgba(244, 201, 107, 0.1) 46%, transparent 70%);
  mix-blend-mode: screen;
  animation: sunpulse 7.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sunpulse {
  0%, 100% { opacity: 0.55; transform: translate(50%, -50%) scale(1); }
  50%      { opacity: 1;    transform: translate(50%, -50%) scale(1.14); }
}

/* green signal travelling from the lower left toward the sun */
.hero__signal {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(58deg, transparent 30%, rgba(53, 201, 120, 0.22) 45%, transparent 58%);
  background-size: 260% 260%;
  mix-blend-mode: screen;
  animation: signal 9s linear infinite;
}

@keyframes signal {
  from { background-position: 0% 100%; }
  to   { background-position: 100% 0%; }
}

.hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(60px, 10vw, 110px) clamp(20px, 5vw, 40px);
}

.hero__eyebrow {
  margin: 0 0 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.24em;
  color: var(--gold);
}

.hero__title {
  margin: 0 0 22px;
  font-size: clamp(56px, 12vw, 132px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  color: var(--ivory);
  text-shadow: 0 8px 44px rgba(30, 16, 9, 0.7);
}

.hero__lead {
  margin: 0 0 34px;
  max-width: 30ch;
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.45;
  color: rgba(255, 242, 211, 0.94);
  text-shadow: 0 3px 22px rgba(30, 16, 9, 0.8);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-bottom: 26px;
}

.cabar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 9px 18px 9px 12px;
  border: 1.5px dashed rgba(255, 242, 211, 0.4);
  border-radius: 999px;
  background: rgba(30, 17, 10, 0.5);
  backdrop-filter: blur(6px);
}

.cabar__label {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--green);
  color: var(--cocoa);
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.cabar__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  color: rgba(255, 242, 211, 0.9);
}

/* ---------- ticker ---------- */

.ticker {
  overflow: hidden;
  padding: 15px 0;
  background: var(--cocoa);
  border-block: 3px solid var(--fur);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: roll 42s linear infinite;
}

.ticker__set {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ticker b {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(15px, 2vw, 21px);
  letter-spacing: -0.01em;
  text-transform: lowercase;
  color: var(--ivory);
  white-space: nowrap;
}

/* small green arrow between phrases */
.ticker i {
  display: inline-block;
  flex-shrink: 0;
  width: 0;
  height: 0;
  margin: 0 26px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 11px solid var(--green);
}

@keyframes roll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- manifesto ---------- */

.season {
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 13vw, 160px) 0;
  background:
    radial-gradient(900px 520px at 50% 8%, rgba(244, 201, 107, 0.55), transparent 70%),
    var(--sand);
}

.season__dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(255, 242, 211, 0.9), transparent),
    radial-gradient(2px 2px at 68% 14%, rgba(255, 242, 211, 0.8), transparent),
    radial-gradient(1.6px 1.6px at 34% 62%, rgba(244, 201, 107, 0.95), transparent),
    radial-gradient(2.2px 2.2px at 84% 54%, rgba(255, 242, 211, 0.8), transparent),
    radial-gradient(1.6px 1.6px at 22% 84%, rgba(244, 201, 107, 0.9), transparent),
    radial-gradient(2px 2px at 56% 92%, rgba(255, 242, 211, 0.75), transparent);
  animation: dust 16s ease-in-out infinite alternate;
}

@keyframes dust {
  from { transform: translateY(10px); opacity: 0.35; }
  to   { transform: translateY(-16px); opacity: 0.65; }
}

.manifesto { position: relative; }

.manifesto__line {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 4.4vw, 46px);
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: var(--fur);
}

.manifesto__line:nth-child(1) { color: var(--cocoa); }
.manifesto__line:last-child { color: var(--cocoa); }

.manifesto__final {
  margin: clamp(36px, 6vw, 64px) 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 7.4vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: var(--cocoa);
}

.manifesto__final span {
  color: var(--green);
  text-shadow: 0 4px 30px rgba(53, 201, 120, 0.28);
}

/* ---------- two-ape story ---------- */

.story {
  padding: clamp(72px, 11vw, 130px) 0;
  background: var(--ivory);
}

.story__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.panel {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 4vw, 46px);
  border-radius: var(--radius);
  border: 2px solid var(--cocoa-faint);
  background: var(--sand);
  transition: transform 0.35s var(--ease), border-color 0.35s ease, box-shadow 0.35s ease;
}

.panel:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 37, 27, 0.32);
  box-shadow: 0 22px 50px rgba(59, 37, 27, 0.14);
}

/* soft phone-screen glow on the scrolling ape */
.panel--phone::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -18%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 201, 120, 0.4), transparent 66%);
  opacity: 0.5;
  transition: opacity 0.4s ease, transform 0.5s var(--ease);
  pointer-events: none;
}

.panel--phone:hover::after { opacity: 1; transform: scale(1.12); }

.panel--under::after {
  content: "";
  position: absolute;
  bottom: -34%;
  left: -14%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 201, 107, 0.55), transparent 68%);
  opacity: 0.55;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.panel--under:hover::after { opacity: 1; }

.panel__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--cocoa);
  color: var(--ivory);
}

.panel__icon svg { width: 24px; height: 24px; }

.panel h3 {
  position: relative;
  margin-bottom: 12px;
  font-size: clamp(23px, 3.2vw, 32px);
}

.panel p {
  position: relative;
  margin: 0;
  max-width: 34ch;
  color: var(--cocoa-soft);
  font-size: 16.5px;
}

.story__close {
  margin: clamp(32px, 5vw, 52px) 0 0;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 3.2vw, 32px);
  letter-spacing: -0.03em;
  color: var(--fur);
}

/* ---------- pumping chart ---------- */

.pump {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(380px, 56vw, 560px);
  overflow: hidden;
  background:
    radial-gradient(700px 420px at 82% 18%, rgba(244, 201, 107, 0.22), transparent 70%),
    var(--cocoa);
}

.pump__chart {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.pump__chart .candle {
  opacity: 0;
  transform: translateY(26px);
  transform-origin: center bottom;
  transition: opacity 0.5s ease, transform 0.5s var(--ease);
}

.pump.is-in .pump__chart .candle {
  opacity: 1;
  transform: translateY(0);
}

.pump__chart .arrow {
  fill: none;
  stroke: var(--gold);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  filter: drop-shadow(0 0 14px rgba(244, 201, 107, 0.7));
  transition: stroke-dashoffset 1.4s ease 1.5s;
}

.pump.is-in .pump__chart .arrow { stroke-dashoffset: 0; }

.pump__copy { position: relative; }

.pump__copy .h2 {
  margin: 0;
  max-width: 18ch;
  color: var(--ivory);
  text-shadow: 0 6px 34px rgba(20, 11, 6, 0.75);
}

/* ---------- how to join ---------- */

.join {
  padding: clamp(72px, 11vw, 130px) 0;
  background: var(--sand);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: clamp(26px, 3.4vw, 36px) clamp(22px, 3vw, 30px);
  border-radius: var(--radius);
  border: 2px solid var(--cocoa-faint);
  background: var(--ivory);
  transition: transform 0.32s var(--ease), border-color 0.32s ease, box-shadow 0.32s ease;
}

.step:hover {
  transform: translateY(-6px);
  border-color: var(--green);
  box-shadow: 0 20px 44px rgba(59, 37, 27, 0.14);
}

.step__num {
  display: block;
  margin-bottom: 16px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 44px);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--gold);
}

.step h3 { margin-bottom: 9px; font-size: 21px; }

.step p { margin: 0; color: var(--cocoa-soft); font-size: 15.5px; }

.warn {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 0;
  padding: 16px 22px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(233, 103, 26, 0.4);
  background: rgba(233, 103, 26, 0.1);
  color: #a8430e;
  font-weight: 500;
  font-size: 15.5px;
}

.warn svg { flex-shrink: 0; width: 22px; height: 22px; }

.join__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 30px;
}

/* ---------- token information ---------- */

.token {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(72px, 11vw, 130px) 0;
  background: var(--cocoa);
}

.token__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(53, 201, 120, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 201, 120, 0.5) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 78%);
  mask-image: radial-gradient(circle at 50% 40%, #000, transparent 78%);
}

.token__sub {
  margin: -12px 0 34px;
  color: rgba(255, 242, 211, 0.72);
  font-size: 17px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2px;
  margin: 0;
  padding: 2px;
  border-radius: var(--radius);
  background: rgba(53, 201, 120, 0.24);
  overflow: hidden;
}

.fact {
  padding: 22px 24px;
  background: #332017;
}

.fact--wide { grid-column: 1 / -1; }

.fact dt {
  margin-bottom: 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.2em;
  color: var(--green);
}

.fact dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: var(--ivory);
  overflow-wrap: anywhere;
}

.fact dd code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--gold);
}

/* values that must be checked on-chain before launch */
.fact dd.pending {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 242, 211, 0.6);
}

.fact dd.pending::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(233, 103, 26, 0.2);
}

.token__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 30px;
}

/* ---------- meme gallery ---------- */

.memes {
  padding: clamp(72px, 11vw, 130px) 0 0;
  background: var(--ivory);
}

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

.tile {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 2px solid var(--cocoa-faint);
  background: var(--sand);
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.tile:hover img { transform: scale(1.05); }

.tile figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 42px 22px 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ivory);
  background: linear-gradient(transparent, rgba(30, 17, 10, 0.88));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s var(--ease);
}

.tile:hover figcaption,
.tile:focus-within figcaption {
  opacity: 1;
  transform: translateY(0);
}

.tile--wide   { grid-column: span 2; aspect-ratio: 16 / 10; }
.tile--square { grid-column: span 2; aspect-ratio: 16 / 10; }
.tile--start  { grid-column: span 1; aspect-ratio: 1; }
.tile--tall   { grid-column: span 3; aspect-ratio: 24 / 7; }

.banner {
  position: relative;
  margin: clamp(40px, 6vw, 70px) 0 0;
  overflow: hidden;
  border-block: 3px solid var(--cocoa);
}

.banner img { width: 100%; }

.banner figcaption {
  position: absolute;
  right: clamp(16px, 4vw, 34px);
  bottom: clamp(12px, 3vw, 22px);
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(30, 17, 10, 0.72);
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ivory);
}

/* ---------- community ---------- */

.community {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(72px, 11vw, 130px) 0;
  background: var(--orange);
  color: var(--cocoa);
  border-block: 4px solid var(--cocoa);
}

/* retro screen-print sunburst */
.rays {
  position: absolute;
  inset: -30%;
  z-index: -1;
  opacity: 0.5;
  background: repeating-conic-gradient(
    from 0deg at 50% 62%,
    rgba(244, 201, 107, 0.85) 0deg 6deg,
    transparent 6deg 14deg
  );
  animation: turn 90s linear infinite;
}

@keyframes turn {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.community__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}

.community__lead {
  margin: 0 0 30px;
  max-width: 40ch;
  font-size: 18px;
  color: rgba(59, 37, 27, 0.86);
}

.community__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.community__art {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 4px solid var(--cocoa);
  box-shadow: 14px 14px 0 rgba(59, 37, 27, 0.35);
  transition: transform 0.4s var(--ease);
}

.community__art:hover { transform: translate(-4px, -4px) rotate(-1deg); }

.community__art img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ---------- faq ---------- */

.faq {
  padding: clamp(72px, 11vw, 130px) 0;
  background: var(--sand);
}

.faq__list {
  display: grid;
  gap: 12px;
}

.qa {
  border-radius: var(--radius-sm);
  border: 2px solid var(--cocoa-faint);
  background: var(--ivory);
  transition: border-color 0.25s ease;
}

.qa[open] { border-color: rgba(59, 37, 27, 0.34); }

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(17px, 2.4vw, 21px);
  letter-spacing: -0.02em;
  list-style: none;
}

.qa summary::-webkit-details-marker { display: none; }

.qa summary::after {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-right: 2.5px solid var(--fur);
  border-bottom: 2.5px solid var(--fur);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.3s var(--ease);
}

.qa[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }

.qa p {
  margin: 0;
  padding: 0 24px 22px;
  max-width: 62ch;
  color: var(--cocoa-soft);
}

/* ---------- footer ---------- */

.footer {
  padding: clamp(48px, 7vw, 76px) 0 46px;
  background: var(--cocoa);
  color: rgba(255, 242, 211, 0.82);
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 242, 211, 0.16);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer__brand img { border-radius: 12px; }

.footer__brand strong {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.035em;
  color: var(--ivory);
}

.footer__brand span { font-size: 14.5px; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 15.5px;
}

.footer__links a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__links a:hover { color: var(--green); }

.footer__disclaimer {
  margin: 26px 0 22px;
  max-width: 88ch;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255, 242, 211, 0.52);
}

.footer__close {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(16px, 2.4vw, 21px);
  letter-spacing: -0.02em;
  color: var(--gold);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 150;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--cocoa);
  color: var(--ivory);
  border: 2px solid var(--green);
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}

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

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in { opacity: 1; transform: none; }

/* manifesto lines rise one after another */
.manifesto__line:nth-child(2) { transition-delay: 0.06s; }
.manifesto__line:nth-child(3) { transition-delay: 0.12s; }
.manifesto__line:nth-child(4) { transition-delay: 0.18s; }
.manifesto__line:nth-child(5) { transition-delay: 0.24s; }
.manifesto__line:nth-child(6) { transition-delay: 0.3s; }
.manifesto__line:nth-child(7) { transition-delay: 0.36s; }

.steps .reveal:nth-child(2),
.grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.steps .reveal:nth-child(3),
.grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.steps .reveal:nth-child(4),
.grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.faq__list .reveal:nth-child(2) { transition-delay: 0.05s; }
.faq__list .reveal:nth-child(3) { transition-delay: 0.1s; }
.faq__list .reveal:nth-child(4) { transition-delay: 0.15s; }
.faq__list .reveal:nth-child(5) { transition-delay: 0.2s; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--wide,
  .tile--square,
  .tile--tall { grid-column: span 2; aspect-ratio: 16 / 10; }
  .tile--start { grid-column: span 2; aspect-ratio: 16 / 10; }
}

@media (max-width: 900px) {
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px clamp(16px, 4vw, 40px) 18px;
    background: rgba(233, 213, 178, 0.98);
    border-bottom: 1px solid rgba(59, 37, 27, 0.16);
    box-shadow: 0 14px 30px rgba(59, 37, 27, 0.14);
    display: none;
  }

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

  .nav__links a {
    padding: 13px 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(59, 37, 27, 0.1);
  }

  .nav__links a::after { display: none; }

  .nav__toggle { display: flex; }

  .story__grid { grid-template-columns: 1fr; }

  .community__inner { grid-template-columns: 1fr; }
  .community__art { order: -1; max-width: 420px; }

  .hero { min-height: auto; }
  .hero__bg { object-position: 72% 46%; }

  /* keep the stacked pair in frame instead of cropping it out */
  .hero__scrim {
    background:
      linear-gradient(180deg, rgba(40, 24, 16, 0.72) 0%, rgba(44, 26, 17, 0.5) 46%, rgba(40, 24, 16, 0.88) 100%);
  }
}

@media (max-width: 640px) {
  .btn { min-height: 46px; }
  .icon-btn { width: 44px; height: 44px; }
  .nav__toggle { width: 46px; height: 46px; }
  .hero__glow { display: none; }
  .cabar { width: 100%; }
  .hero__cta .btn { flex: 1 1 100%; }
  .grid { grid-template-columns: 1fr; }
  .tile { grid-column: span 1 !important; }
  .footer__top { flex-direction: column; align-items: flex-start; }
  .community__art { box-shadow: 8px 8px 0 rgba(59, 37, 27, 0.35); }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  .reveal { opacity: 1; transform: none; }
  .hero__signal,
  .season__dust,
  .rays { display: none; }
  .ticker__track { animation: none; transform: none; }
  .pump__chart .candle { opacity: 1; transform: none; }
  .pump__chart .arrow { stroke-dashoffset: 0; }
}

/* ---------- focus ---------- */

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 8px;
}

.hero a:focus-visible,
.hero button:focus-visible,
.token a:focus-visible,
.token button:focus-visible,
.footer a:focus-visible {
  outline-color: var(--gold);
}

[hidden] { display: none !important; }
