/*
  Founder Treasury / isolated section
  This stylesheet is scoped to .founder-treasury for a local visual test.
*/
.founder-treasury {
  --treasury-ink: #08120f;
  --treasury-surface: #101b19;
  --treasury-paper: #f5efe1;
  --treasury-muted: #adc0b7;
  --treasury-gold: #e4c274;
  --treasury-green: #74f0bb;
  --treasury-line: rgba(219, 236, 220, .16);
  position: relative;
  isolation: isolate;
  overflow: clip;
  color: var(--treasury-paper);
  background: #0c1412;
  border-top: 1px solid rgba(228, 194, 116, .2);
  border-bottom: 1px solid rgba(228, 194, 116, .16);
}

.founder-treasury::before,
.founder-treasury::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.founder-treasury::before {
  inset: 0;
  opacity: .14;
  background:
    linear-gradient(90deg, rgba(4, 11, 9, .95) 4%, rgba(4, 11, 9, .42) 54%, rgba(4, 11, 9, .94)),
    url('assets/world.webp') center 44% / cover no-repeat;
  filter: saturate(.72) contrast(1.12);
}

.founder-treasury::after {
  inset: -18% 31% -22% -9%;
  background: radial-gradient(ellipse at 42% 48%, rgba(54, 228, 155, .25), transparent 62%);
  filter: blur(12px);
}

.treasury-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .46;
  background-image:
    linear-gradient(112deg, transparent 0 47%, rgba(236, 211, 142, .11) 47.08%, transparent 47.18%),
    linear-gradient(72deg, transparent 0 67%, rgba(118, 242, 188, .08) 67.08%, transparent 67.18%);
  background-size: 128px 100%, 178px 100%;
  mask-image: linear-gradient(90deg, #000, transparent 86%);
}

.treasury-frame {
  width: min(1280px, calc(100% - 64px));
  min-height: 420px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(200px, .67fr) minmax(300px, 1.25fr) minmax(238px, .7fr);
  align-items: center;
  gap: clamp(22px, 4vw, 68px);
  padding: clamp(42px, 6vw, 78px) 0;
}

.treasury-relic {
  position: relative;
  min-height: 258px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.treasury-relic::before {
  content: '';
  position: absolute;
  width: min(24vw, 285px);
  aspect-ratio: 1;
  border: 1px solid rgba(116, 240, 187, .18);
  background: radial-gradient(circle, rgba(91, 246, 182, .13), transparent 62%);
  transform: rotate(45deg);
  box-shadow: inset 0 0 44px rgba(65, 224, 151, .1), 0 0 80px rgba(43, 204, 129, .1);
}

.treasury-relic::after {
  content: '';
  position: absolute;
  width: min(17vw, 188px);
  aspect-ratio: 1;
  border: 1px solid rgba(228, 194, 116, .34);
  transform: rotate(45deg);
  box-shadow: 0 0 0 10px rgba(10, 24, 20, .28), inset 0 0 26px rgba(228, 194, 116, .08);
}

.treasury-relic > img {
  position: relative;
  z-index: 3;
  width: min(17vw, 164px);
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 9px rgba(116, 240, 187, .48)) drop-shadow(0 16px 25px rgba(0, 0, 0, .48));
  animation: treasury-gem-float 5.6s cubic-bezier(.45, 0, .55, 1) infinite;
}

.treasury-light {
  position: absolute;
  z-index: 1;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(132, 255, 201, .32), rgba(58, 206, 133, .08) 38%, transparent 68%);
  filter: blur(3px);
  animation: treasury-breathe 5.6s ease-in-out infinite;
}

.treasury-orbit {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(219, 236, 220, .2);
  border-radius: 50%;
  pointer-events: none;
}

.treasury-orbit-one {
  width: 90%;
  height: 28%;
  transform: rotate(-18deg);
}

.treasury-orbit-two {
  width: 66%;
  height: 44%;
  border-color: rgba(228, 194, 116, .2);
  transform: rotate(41deg);
}

.treasury-plinth {
  position: absolute;
  z-index: 1;
  bottom: 20px;
  width: 58%;
  height: 22px;
  background: radial-gradient(ellipse, rgba(48, 229, 144, .38), rgba(10, 20, 16, 0) 68%);
  filter: blur(3px);
}

.treasury-copy {
  position: relative;
  max-width: 610px;
}

.treasury-kicker,
.treasury-date-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--treasury-gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
}

.treasury-kicker-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #0a1914;
  background: linear-gradient(145deg, #f4d88f, #c69c47);
  clip-path: polygon(50% 0, 94% 18%, 94% 70%, 50% 100%, 6% 70%, 6% 18%);
  font: 700 14px/1 Georgia, serif;
  letter-spacing: 0;
  box-shadow: 0 0 18px rgba(228, 194, 116, .24);
}

.treasury-copy h2 {
  max-width: 580px;
  margin: 0;
  color: var(--treasury-paper);
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(2.35rem, 4vw, 4.65rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.02;
  text-wrap: balance;
}

.treasury-copy h2 em {
  color: var(--treasury-gold);
  font-style: normal;
  text-shadow: 0 0 30px rgba(228, 194, 116, .16);
}

.treasury-intro {
  max-width: 510px;
  margin: 23px 0 29px;
  color: var(--treasury-muted);
  font-size: 15px;
  line-height: 1.8;
}

.treasury-ledger {
  display: flex;
  align-items: stretch;
  gap: 28px;
  margin: 0;
  padding: 20px 0 18px;
  border-top: 1px solid var(--treasury-line);
  border-bottom: 1px solid var(--treasury-line);
}

.treasury-ledger > div { min-width: 0; }

.treasury-ledger > div + div {
  padding-left: 28px;
  border-left: 1px solid var(--treasury-line);
}

.treasury-ledger dt {
  margin-bottom: 6px;
  color: #9caf9f;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.treasury-ledger dd {
  margin: 0;
  color: var(--treasury-green);
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.8rem, 2.9vw, 3.15rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.06em;
  line-height: 1;
  text-shadow: 0 0 22px rgba(116, 240, 187, .2);
}

.treasury-ledger-detail dd {
  color: #ece5d3;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-shadow: none;
}

.treasury-status {
  display: block;
  margin-top: 13px;
  color: #8ca696;
  font-size: 10px;
  letter-spacing: .02em;
}

.treasury-status::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--treasury-green);
  box-shadow: 0 0 12px rgba(116, 240, 187, .9);
}

.founder-treasury[data-state='unavailable'] .treasury-status::before {
  background: #9b9b8e;
  box-shadow: none;
}

.treasury-invitation {
  position: relative;
  align-self: stretch;
  min-height: 284px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 33px clamp(24px, 3vw, 39px);
  overflow: hidden;
  border: 1px solid rgba(228, 194, 116, .27);
  color: var(--treasury-paper);
  background:
    linear-gradient(145deg, rgba(37, 58, 51, .78), rgba(11, 24, 21, .89)),
    linear-gradient(115deg, rgba(255, 255, 255, .08), transparent 42%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 36px rgba(102, 244, 178, .05), 0 24px 54px rgba(0, 0, 0, .2);
  backdrop-filter: blur(14px) saturate(118%);
  -webkit-backdrop-filter: blur(14px) saturate(118%);
}

.treasury-invitation::before {
  content: '';
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgba(219, 236, 220, .09);
}

.treasury-invitation::after {
  content: '';
  position: absolute;
  top: -90px;
  right: -82px;
  width: 210px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 194, 116, .16), transparent 67%);
}

.treasury-invitation > * {
  position: relative;
  z-index: 1;
}

.treasury-invitation .treasury-date-label {
  margin-bottom: 10px;
  color: #b9cfc2;
  font-size: 8px;
}

.treasury-date {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--treasury-gold);
}

.treasury-date > span {
  font-family: Cinzel, Georgia, serif;
  font-size: 59px;
  font-weight: 500;
  letter-spacing: -.09em;
  line-height: .8;
}

.treasury-date small {
  color: #d9e4dc;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.5;
}

.treasury-invitation > p:not(.treasury-date-label) {
  max-width: 220px;
  margin: 0 0 21px;
  color: #c9d6ce;
  font-size: 13px;
  line-height: 1.55;
}

.treasury-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 58px;
  padding: 14px 17px 14px 20px;
  color: #082619;
  background: linear-gradient(116deg, #d8ffea, #72efb8 62%, #43c98e);
  box-shadow: 0 8px 27px rgba(51, 235, 151, .18), inset 0 1px 0 rgba(255, 255, 255, .8);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .01em;
  text-decoration: none;
  transition: transform .26s cubic-bezier(.16, 1, .3, 1), box-shadow .26s cubic-bezier(.16, 1, .3, 1), filter .26s ease;
}

.treasury-cta:hover {
  filter: brightness(1.07);
  box-shadow: 0 12px 34px rgba(51, 235, 151, .31), inset 0 1px 0 rgba(255, 255, 255, .9);
  transform: translateY(-3px);
}

.treasury-cta:active { transform: translateY(1px) scale(.99); }

.treasury-cta:focus-visible {
  outline: 3px solid #d9ffeb;
  outline-offset: 4px;
}

.treasury-cta-arrow {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(8, 38, 25, .24);
  font-size: 20px;
  line-height: 1;
  transition: transform .26s cubic-bezier(.16, 1, .3, 1);
}

.treasury-cta:hover .treasury-cta-arrow { transform: translate(2px, 2px); }

.treasury-invitation > small {
  margin-top: 14px;
  color: #99ada2;
  font-size: 9px;
  line-height: 1.55;
}

@keyframes treasury-gem-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-9px) rotate(2deg); }
}

@keyframes treasury-breathe {
  0%, 100% { opacity: .52; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 980px) {
  .treasury-frame { grid-template-columns: minmax(150px, .55fr) minmax(270px, 1.15fr); }
  .treasury-invitation {
    grid-column: 1 / -1;
    min-height: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(190px, .72fr);
    align-items: center;
    column-gap: 28px;
    padding: 25px 30px;
  }
  .treasury-invitation .treasury-date-label,
  .treasury-invitation > small { display: none; }
  .treasury-date,
  .treasury-invitation > p:not(.treasury-date-label) { margin: 0; }
  .treasury-cta { grid-column: 3; grid-row: 1; }
}

@media (max-width: 680px) {
  .treasury-frame {
    width: min(100% - 40px, 470px);
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 46px 0 28px;
  }
  .treasury-relic { min-height: 188px; margin-bottom: 4px; }
  .treasury-relic::before { width: 188px; }
  .treasury-relic::after { width: 124px; }
  .treasury-relic > img { width: 112px; }
  .treasury-copy { text-align: center; }
  .treasury-kicker { justify-content: center; margin-bottom: 17px; }
  .treasury-copy h2 { font-size: clamp(2.3rem, 11vw, 3.2rem); }
  .treasury-intro { margin: 19px auto 25px; font-size: 14px; }
  .treasury-ledger { justify-content: center; gap: 19px; text-align: left; }
  .treasury-ledger > div + div { padding-left: 19px; }
  .treasury-ledger dd { font-size: 2.05rem; }
  .treasury-ledger-detail dd { font-size: 12px; }
  .treasury-status { font-size: 9px; }
  .treasury-invitation { display: block; margin-top: 27px; padding: 28px 25px 25px; }
  .treasury-invitation .treasury-date-label { display: flex; }
  .treasury-date { margin-bottom: 13px; }
  .treasury-invitation > p:not(.treasury-date-label) { margin: 0 0 19px; }
  .treasury-invitation > small { display: block; }
}

.reduce-motion .treasury-relic > img,
.reduce-motion .treasury-light,
.reduce-motion .treasury-cta,
.reduce-motion .treasury-cta-arrow { animation: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  .treasury-relic > img,
  .treasury-light,
  .treasury-cta,
  .treasury-cta-arrow { animation: none; transition: none; }
}

@supports not (backdrop-filter: blur(1px)) {
  .treasury-invitation { background: #173028; }
}
