@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;650;750;850&family=Unbounded:wght@700;800&display=swap");

:root {
  --display-font: "Unbounded", "Arial Black", sans-serif;
  --body-font: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #111827;
  --muted: #526071;
  --canvas: #f7f9ff;
  --surface: rgba(255, 255, 255, .88);
  --surface-solid: #ffffff;
  --line: rgba(17, 24, 39, .12);
  --cobalt: #2557ff;
  --cobalt-dark: #1236c4;
  --lime: #c7ff45;
  --coral: #ff6f61;
  --sky: #7dd3fc;
  --violet: #8b5cf6;
  --success: #0f9f6e;
  --danger: #e11d48;
  --shadow: 0 24px 70px rgba(22, 31, 54, .14);
  font-family: var(--body-font);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(37, 87, 255, .12), transparent 24rem),
    linear-gradient(225deg, rgba(199, 255, 69, .18), transparent 22rem),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 48%, #f8fbff 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 16%, rgba(37, 87, 255, .08) 16% 24%, transparent 24% 100%),
    linear-gradient(68deg, transparent 0 58%, rgba(255, 111, 97, .10) 58% 65%, transparent 65% 100%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 86%);
}

button, a { font: inherit; }

.ambient {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: .55;
  filter: blur(1px);
}

.ambient-a {
  left: -10vw;
  top: 9rem;
  width: 42vw;
  height: 18rem;
  background: linear-gradient(100deg, rgba(125, 211, 252, .32), rgba(37, 87, 255, .08));
  clip-path: polygon(0 24%, 100% 0, 72% 72%, 8% 100%);
  animation: floaty 18s cubic-bezier(.16, 1, .3, 1) infinite alternate;
}

.ambient-b {
  right: -8vw;
  bottom: 2rem;
  width: 36vw;
  height: 16rem;
  background: linear-gradient(120deg, rgba(199, 255, 69, .28), rgba(255, 111, 97, .12));
  clip-path: polygon(18% 0, 100% 22%, 76% 100%, 0 70%);
  animation: floaty 20s cubic-bezier(.16, 1, .3, 1) infinite alternate-reverse;
}

.accent-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.accent {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: calc(var(--size) * .38);
  border-radius: 999px;
  opacity: .42;
  transform: rotate(var(--spin));
  animation: accent-drift var(--duration) cubic-bezier(.16, 1, .3, 1) infinite alternate;
  animation-delay: var(--delay);
}

.accent-cobalt { background: var(--cobalt); }
.accent-lime { background: var(--lime); }
.accent-coral { background: var(--coral); }
.accent-sky { background: var(--sky); }
.accent-square { height: var(--size); border-radius: .35rem; }
.accent-slash { height: calc(var(--size) * .25); border-radius: .2rem; }

.graffiti-backdrop {
  position: fixed;
  z-index: 0;
  top: clamp(.65rem, 2vw, 1.4rem);
  left: 50%;
  width: min(620px, 54vw);
  transform:
    translateX(-50%)
    scale(var(--graffiti-scale, 1))
    rotate(var(--graffiti-rotate, -1deg));
  transform-origin: top center;
  pointer-events: none;
  user-select: none;
}

.graffiti-wordmark {
  display: block;
  width: 100%;
  height: auto;
  opacity: var(--graffiti-opacity, .42);
  filter:
    hue-rotate(var(--graffiti-hue, 0deg))
    saturate(var(--graffiti-saturation, 1.02))
    drop-shadow(0 22px 44px rgba(37, 87, 255, .16));
}

.graffiti-backdrop::after {
  content: "";
  position: absolute;
  inset: 18% 6% 12%;
  z-index: -1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, .58), transparent 68%);
  filter: blur(18px);
}

.wishlist-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  width: min(1180px, calc(100% - 2rem));
  margin: clamp(8.5rem, 16vw, 11rem) auto 4rem;
}

.wish-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 31rem;
  border: 1px solid rgba(17, 24, 39, .10);
  border-radius: .5rem;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transform: translateY(0);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.wish-card:hover {
  border-color: rgba(37, 87, 255, .22);
  transform: translateY(-.35rem);
  box-shadow: 0 30px 86px rgba(22, 31, 54, .18);
}

.photo-stage, .detail-photos {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(37, 87, 255, .08), transparent 44%),
    linear-gradient(225deg, rgba(199, 255, 69, .14), transparent 42%),
    #ffffff;
  overflow: hidden;
}

.photo-stage img, .detail-photos img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  transform: scale(1);
  transition: opacity .45s ease, transform .9s ease;
}

.photo-stage img.is-hidden, .detail-photos img.is-hidden {
  opacity: 0;
  transform: scale(1.03);
}

.dots {
  position: absolute;
  left: 1rem;
  bottom: .85rem;
  display: flex;
  gap: .42rem;
  padding: .32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 10px 28px rgba(22, 31, 54, .14);
  backdrop-filter: blur(10px);
}

.dots span {
  width: .58rem;
  height: .58rem;
  border-radius: 50%;
  background: rgba(17, 24, 39, .24);
}

.dots span.is-active { background: var(--cobalt); }

.card-body {
  display: grid;
  align-content: start;
  gap: .9rem;
  padding: 1.05rem;
}

.card-body h2, .detail-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.32rem, 2.6vw, 1.7rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 850;
}

.card-body p, .detail-copy p {
  margin: 0;
  color: #2d3748;
  line-height: 1.5;
  font-weight: 650;
}

.money-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.money-row strong { font-size: 1.18rem; font-weight: 850; }
.money-row span { font-size: .9rem; font-weight: 800; color: var(--cobalt-dark); }

.progress {
  position: relative;
  height: .8rem;
  padding: .12rem;
  border: 1px solid rgba(17, 24, 39, .10);
  border-radius: 999px;
  background: rgba(17, 24, 39, .08);
  overflow: hidden;
}

.progress span {
  position: relative;
  isolation: isolate;
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cobalt), var(--sky), var(--lime));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .28) inset;
  overflow: hidden;
}

.progress span::after {
  content: "";
  position: absolute;
  inset: -.2rem auto -.2rem 0;
  width: 32%;
  min-width: 2rem;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .78), transparent);
  transform: translateX(-130%) skewX(-18deg);
  opacity: 0;
  animation: progress-sheen 5.8s cubic-bezier(.16, 1, .3, 1) infinite;
}

.progress.big { height: 1rem; }

.chip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .82rem 1.1rem;
  border: 0;
  border-radius: .5rem;
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-dark));
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(37, 87, 255, .26);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.chip-button:hover, .chip-button:focus-visible {
  transform: translateY(-.12rem);
  filter: saturate(1.08);
  box-shadow: 0 20px 44px rgba(37, 87, 255, .33);
}

.gift-stamp {
  position: absolute;
  z-index: 4;
  top: 1rem;
  right: 1rem;
  padding: .42rem .8rem;
  border: 1px solid rgba(225, 29, 72, .34);
  border-radius: 999px;
  color: #9f1239;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 16px 36px rgba(159, 18, 57, .14);
  font-size: .88rem;
  font-weight: 850;
  letter-spacing: .04em;
  backdrop-filter: blur(10px);
}

.wish-dialog {
  width: min(980px, calc(100% - 1rem));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: .5rem;
  background: var(--surface-solid);
  box-shadow: 0 42px 130px rgba(15, 23, 42, .34);
}

.wish-dialog::backdrop {
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(10px);
}

.dialog-close {
  position: absolute;
  z-index: 5;
  top: .75rem;
  right: .75rem;
  width: 2.55rem;
  height: 2.55rem;
  border: 0;
  border-radius: .5rem;
  background: rgba(255, 255, 255, .88);
  color: var(--ink);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .18);
  font-size: 1.35rem;
  font-weight: 850;
  cursor: pointer;
}

.detail-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
}

.detail-photos { min-height: 100%; aspect-ratio: auto; }

.detail-copy {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.detail-copy .lead { font-size: 1.08rem; color: var(--cobalt-dark); }
.donate-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.empty-state { grid-column: 1 / -1; padding: 4rem 1rem; text-align: center; }

@keyframes floaty {
  from { transform: translate3d(0, 0, 0) rotate(-2deg); }
  to { transform: translate3d(4vw, -3vh, 0) rotate(3deg); }
}

@keyframes accent-drift {
  from { transform: translate3d(0, 0, 0) rotate(var(--spin)); }
  to { transform: translate3d(var(--drift-x), var(--drift-y), 0) rotate(calc(var(--spin) + 70deg)); }
}

@keyframes meter {
  from { transform: scaleY(.78); opacity: .82; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes progress-sheen {
  0%, 58% { transform: translateX(-130%) skewX(-18deg); opacity: 0; }
  64% { opacity: .88; }
  80% { transform: translateX(330%) skewX(-18deg); opacity: 0; }
  100% { transform: translateX(330%) skewX(-18deg); opacity: 0; }
}

@media (max-width: 760px) {
  .hero {
    display: none;
  }
  .graffiti-backdrop {
    top: .65rem;
    width: min(310px, 78vw);
  }
  .graffiti-wordmark {
    opacity: var(--graffiti-opacity, .5);
  }
  .wishlist-grid { margin-top: 6.2rem; }
  .detail-card { grid-template-columns: 1fr; }
  .detail-photos { aspect-ratio: 4 / 3; }
  .money-row { align-items: flex-start; flex-direction: column; gap: .25rem; }
}

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