:root {
  --ink: #12100d;
  --surface: #1b1813;
  --cream: #f1ece0;
  --muted: #a99f8c;
  --brass: #bd9a52;
  --wine: #d16d80;
  --muted-strong: #d5cbbb;
  --rule: rgba(189, 154, 82, .30);
  --rule-soft: rgba(189, 154, 82, .16);
  --scrim-60: rgba(12, 11, 9, .28);
  --scrim-50: rgba(12, 11, 9, .22);
  --scrim-32: rgba(12, 11, 9, .1);
  --card-42: rgba(12, 11, 9, .42);
  --measure: 34rem;
  --wide: 53rem;
  --grid-wide: 68rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--ink);
  background-image: url("../assets/art/gilded/bg.jpg?v=3");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--cream);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(72% 72% at 26% 40%, var(--scrim-60), transparent 62%), linear-gradient(180deg, var(--scrim-50), var(--scrim-32) 45%, var(--scrim-50));
}

a {
  color: var(--brass);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

a:hover {
  border-bottom-color: var(--brass);
}

a:focus-visible,
.payment-button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.pill-bar {
  position: fixed;
  top: calc(.6rem + env(safe-area-inset-top));
  left: 50%;
  z-index: 60;
  transform: translateX(-50%);
  display: flex;
  max-width: calc(100vw - 1.4rem);
  justify-content: center;
}

.maps-pill {
  padding: .5rem .95rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(8, 7, 6, .9);
  color: var(--cream);
  font-family: "Space Mono", monospace;
  font-size: .62rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.maps-pill:hover,
.maps-pill:focus-visible {
  border-color: var(--brass);
  color: var(--brass);
  outline: none;
}

.label {
  margin: 0;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

.registry-intro {
  display: flex;
  padding: calc(4.5rem + env(safe-area-inset-top)) 1.5rem 2.75rem;
  justify-content: center;
  text-align: center;
}

.registry-hero {
  display: flex;
  min-height: 72vh;
  padding: calc(6.5rem + env(safe-area-inset-top)) 1.5rem 4.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.seal-img {
  display: block;
  width: 4.25rem;
  height: auto;
  margin: 0 auto 1.2rem;
}

.registry-hero h1 {
  margin: .45rem 0 .9rem;
  font-family: "Bodoni Moda", Georgia, serif;
  font-size: clamp(3.6rem, 10vw, 6.4rem);
  font-variation-settings: "opsz" 16, "wght" 700;
  font-weight: 700;
  letter-spacing: .005em;
  line-height: 1;
}

.hero-lede {
  max-width: 42rem;
  margin: 0;
  color: var(--muted-strong);
  font-size: 1.1rem;
}

.hero-lede strong {
  color: var(--cream);
  font-weight: 700;
}

.hero-divider {
  display: block;
  width: 15rem;
  max-width: 70vw;
  height: auto;
  margin: 1.9rem auto .6rem;
  mix-blend-mode: screen;
}

.registry-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem 1.3rem;
}

.registry-nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .35rem;
  border: 0;
  color: var(--cream);
  font-family: "Space Mono", monospace;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.registry-nav a::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--cream);
  transform: rotate(45deg);
}

.registry-nav a:hover,
.registry-nav a:focus-visible {
  border: 0;
  color: var(--brass);
  outline: none;
}

.registry-nav a:hover::before,
.registry-nav a:focus-visible::before {
  background: var(--brass);
}

main {
  counter-reset: registry-section;
}

.registry-section {
  display: flex;
  padding: clamp(3rem, 6vw, 4.75rem) 1.5rem;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid var(--rule);
  background: var(--card-42);
  scroll-margin-top: 1rem;
}

.registry-section > * {
  width: 100%;
  max-width: var(--wide);
}

.section-heading {
  margin-bottom: 2rem;
}

h2 {
  margin: .25rem 0 .7rem;
  font-family: "Bodoni Moda", Georgia, serif;
  font-size: 1.9rem;
  font-variation-settings: "opsz" 14, "wght" 600;
  font-weight: 600;
  letter-spacing: .005em;
  line-height: 1.15;
  scroll-margin-top: 4.75rem;
}

h2 {
  counter-increment: registry-section;
}

h2::before {
  content: counter(registry-section, decimal-leading-zero);
  margin-right: .7em;
  color: var(--wine);
  font-family: "Space Mono", monospace;
  font-size: .58em;
  font-weight: 700;
  letter-spacing: .05em;
  vertical-align: .35em;
}

.section-lede {
  max-width: 40rem;
  margin: 0;
  color: var(--muted);
}

.fund-grid {
  display: grid;
  width: 100%;
  max-width: var(--grid-wide);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.fund-grid h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.cash-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
  align-content: start;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--brass);
  outline: 1px solid var(--rule);
  outline-offset: 6px;
  background: rgba(12, 11, 9, .58);
}

.cash-copy p:last-child {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
}

.cash-action {
  min-width: 13rem;
}

.gift-grid {
  display: grid;
  max-width: var(--grid-wide);
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 1rem;
}

.gift-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: rgba(12, 11, 9, .64);
}

.gift-image {
  position: relative;
  width: 7.5rem;
  aspect-ratio: 1 / 1;
  margin: .9rem auto 0;
  padding: .55rem;
  overflow: hidden;
  background: #fff;
}

.gift-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .45s ease;
}

.gift-card:hover .gift-image img {
  transform: scale(1.018);
}

.gift-body {
  display: flex;
  padding: .8rem .85rem .95rem;
  flex: 1;
  flex-direction: column;
}

.gift-meta {
  display: flex;
  min-height: 1.55rem;
  margin-bottom: .55rem;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .7rem;
}

.gift-category,
.group-badge,
.price-note {
  font-family: "Space Mono", monospace;
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.gift-category {
  color: var(--muted);
}

.group-badge {
  padding: .13rem .45rem;
  border: 1px solid var(--rule);
  color: var(--brass);
}

.gift-card h3 {
  margin: 0 0 .35rem;
  color: var(--cream);
  font-family: "Space Grotesk", sans-serif;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.25;
}

.gift-description {
  margin: 0 0 .7rem;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.45;
}

.gift-price {
  margin: auto 0 0;
  color: var(--cream);
  font-family: "Bodoni Moda", Georgia, serif;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.2;
}

.price-note {
  margin: .45rem 0 0;
  color: var(--muted-strong);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.55;
  text-transform: none;
}

.gift-actions {
  display: grid;
  gap: .5rem;
  margin-top: .7rem;
}

.payment-button {
  display: flex;
  width: 100%;
  min-height: 2.3rem;
  padding: .45rem .6rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brass);
  border-radius: 1px;
  color: var(--cream);
  font-family: "Space Mono", monospace;
  font-size: .62rem;
  letter-spacing: .11em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  transition: background .15s ease, color .15s ease;
}

.payment-button:hover,
.payment-button:focus-visible {
  border-color: var(--brass);
  background: var(--brass);
  color: var(--ink);
}

.payment-button.is-disabled {
  border-color: var(--rule);
  color: var(--muted);
  cursor: not-allowed;
  opacity: .72;
}

.payment-button.is-disabled:hover {
  border-color: var(--rule);
  background: transparent;
  color: var(--muted);
}

.cash-action .payment-button {
  min-width: 13rem;
}

.product-source {
  width: max-content;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.product-source:hover,
.product-source:focus-visible {
  color: var(--brass);
}

.research-note {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.25rem 1.5rem 0;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: .61rem;
  letter-spacing: .07em;
  line-height: 1.6;
  text-align: center;
  text-transform: uppercase;
}

footer {
  padding: 3.5rem 1.5rem 4.5rem;
  text-align: center;
}

footer .seal-img {
  width: 3.6rem;
  margin-bottom: 1rem;
}

footer .label {
  opacity: .7;
}

footer p:last-child {
  margin: .85rem 0 0;
  font-size: .85rem;
}

.noscript-message {
  margin: 0;
  padding: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--cream);
  text-align: center;
}

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

  .gift-image img {
    transition: none;
  }

  .gift-card:hover .gift-image img {
    transform: none;
  }
}

@media (max-width: 980px) {
  .gift-grid {
    max-width: var(--wide);
  }
}

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  .registry-hero {
    min-height: auto;
    padding-top: calc(7.5rem + env(safe-area-inset-top));
  }

  .registry-nav {
    flex-direction: column;
    align-items: center;
  }

  .registry-nav a {
    padding: .5rem;
  }

  .maps-pill {
    padding: .6rem 1rem;
  }

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

  .cash-action,
  .cash-action .payment-button {
    width: 100%;
    min-width: 0;
  }

  .gift-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
  }

  .gift-body {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .registry-section {
    padding: 3.25rem 1.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .gift-body {
    padding: 1.2rem;
  }
}

/* Product photo / store photo slides. Every slide keeps the same white
   frame as single-image cards: the .8rem padding lives on the slide. */
.gift-image.has-slides {
  padding: 0;
}

.gift-slides {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.gift-slides::-webkit-scrollbar {
  display: none;
}

.gift-slide {
  flex: 0 0 100%;
  height: 100%;
  padding: .8rem;
  box-sizing: border-box;
  scroll-snap-align: center;
}

.gift-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-arrow {
  position: absolute;
  top: 50%;
  right: .35rem;
  transform: translateY(-50%);
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, .88);
  color: #4a4132;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.slide-arrow:hover {
  background: #fff;
}

.slide-dots {
  position: absolute;
  bottom: .4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .4rem;
  z-index: 2;
}

.slide-dot {
  width: .45rem;
  height: .45rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #9a8f7f;
  background: transparent;
  cursor: pointer;
}

.slide-dot.is-active {
  background: #9a8f7f;
}
