:root {
  --page-bg: #f2f1ec;
  --page-bg-strong: #eae8e1;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --text: #171717;
  --muted: #6a6962;
  --line: rgba(23, 23, 23, 0.07);
  --line-strong: rgba(23, 23, 23, 0.13);
  --line-hover: rgba(23, 23, 23, 0.22);
  --shadow-sm: 0 2px 8px rgba(17, 17, 17, 0.04);
  --shadow-md: 0 10px 26px rgba(17, 17, 17, 0.055);
  --shadow-lg: 0 18px 40px rgba(17, 17, 17, 0.075);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --support-widget-clearance: 108px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(255, 255, 255, 0.9) 0%,
      transparent 55%
    ),
    linear-gradient(
      180deg,
      #f7f6f2 0%,
      var(--page-bg) 60%,
      var(--page-bg-strong) 100%
    );
  font-family: "Avenir Next", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body::before {
  inset: auto auto 10% 50%;
  width: min(58vw, 680px);
  height: min(58vw, 680px);
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  filter: blur(64px);
}

body::after {
  inset: 0;
  background-image: radial-gradient(
    rgba(23, 23, 23, 0.05) 0.55px,
    transparent 0.7px
  );
  background-size: 18px 18px;
  opacity: 0.06;
}

a {
  color: inherit;
  text-decoration: none;
}

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

main {
  min-width: 0;
}

body.home-page,
body.collection-page,
body.project-page {
  min-height: 100vh;
  padding: 24px 20px 40px;
  position: relative;
}

.shell,
.page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.shell {
  display: grid;
  gap: 0;
}

.page-shell {
  display: grid;
  gap: 24px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.site-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.site-brand-name {
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.site-brand-note {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.site-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav-link,
.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.62rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
  font-size: 0.88rem;
  color: var(--text);
  transition:
    transform 0.18s var(--ease-out),
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.site-nav-link:hover,
.pill-link:hover {
  transform: translateY(-1px);
  border-color: var(--line-hover);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.06);
}

.site-nav-link:active,
.pill-link:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.site-nav-link.is-current {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line-hover);
}

.site-audio {
  position: relative;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.site-audio-toggle,
.site-audio-mode,
.site-audio-option {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
  color: var(--text);
  font: inherit;
}

.site-audio-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease-out),
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.site-audio-toggle svg {
  width: 16px;
  height: 16px;
}

.site-audio-mode {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.18s var(--ease-out),
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.site-audio-toggle:hover:not(:disabled),
.site-audio-mode:hover:not(:disabled),
.site-audio-option:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--line-hover);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
}

.site-audio-toggle.is-active {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line-hover);
}

.site-audio-toggle:disabled,
.site-audio-mode:disabled,
.site-audio-option:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.site-audio-toggle:focus-visible,
.site-audio-mode:focus-visible,
.site-audio-option:focus-visible {
  outline: 2px solid rgba(95, 127, 255, 0.4);
  outline-offset: 2px;
}

.site-audio-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(220px, calc(100vw - 40px));
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  background: rgba(247, 246, 242, 0.96);
  box-shadow: var(--shadow-md);
  z-index: 12;
}

.site-audio-panel[hidden],
.site-audio-tracks[hidden] {
  display: none !important;
}

.site-audio-tracks {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.site-audio-option {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.62rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.18s var(--ease-out),
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.site-audio-option.is-selected {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line-hover);
}

.site-audio-mode.is-selected {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line-hover);
}

.site-audio-status {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.hero,
.collection-header,
.page-bar {
  max-width: 720px;
  margin-inline: auto;
}

.site-header + .hero,
.site-header + .collection-header,
.site-header + .page-bar {
  margin-top: 28px;
}

.hero,
.collection-header {
  display: grid;
  gap: 16px;
  text-align: center;
}

.hero {
  margin-bottom: 44px;
}

.collection-header {
  margin-bottom: 28px;
}

.logo-mark {
  width: 76px;
  height: 76px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.055);
  overflow: hidden;
  transition:
    box-shadow 0.2s var(--ease-out),
    transform 0.2s var(--ease-out);
}

.logo-mark:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.07);
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1,
.collection-header h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(2.45rem, 6.8vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
  font-weight: 600;
  color: var(--text);
}

.hero-copy,
.collection-copy {
  margin: 0 auto;
  max-width: 430px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.collection-section {
  margin-top: 8px;
}

.bmc-script-mount {
  position: absolute;
  inline-size: 0;
  block-size: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.support-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 32px;
  max-width: 720px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(23, 23, 23, 0.09);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.support-inline-copy {
  display: grid;
  gap: 8px;
}

.support-inline-eyebrow,
.project-support-note__eyebrow,
.support-popup__eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.support-inline-title,
.project-support-note__title,
.support-popup__title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.support-inline-text,
.support-popup__copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.support-inline-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.support-link,
.support-popup__dismiss,
.support-popup__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease-out),
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.support-link,
.support-popup__dismiss {
  padding: 0.68rem 1rem;
}

.support-popup__icon {
  width: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}

.support-link:hover,
.support-popup__dismiss:hover,
.support-popup__icon:hover {
  transform: translateY(-1px);
  border-color: var(--line-hover);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
}

.support-link:focus-visible,
.support-popup__dismiss:focus-visible,
.support-popup__icon:focus-visible {
  outline: 2px solid rgba(95, 127, 255, 0.4);
  outline-offset: 2px;
}

.support-link--compact {
  min-height: 36px;
  padding: 0.62rem 0.95rem;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.collection-card {
  display: flex;
  flex-direction: column;
  min-height: 172px;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid rgba(23, 23, 23, 0.08);
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.045);
  overflow: hidden;
  transition:
    transform 0.24s var(--ease-out),
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    background 0.24s ease;
}

.collection-card.has-preview {
  min-height: 264px;
}

.collection-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-hover);
  box-shadow: 0 12px 26px rgba(17, 17, 17, 0.07);
  background: var(--surface-strong);
}

.collection-card:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.collection-card h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  font-weight: 600;
  line-height: 1.2;
}

.card-preview {
  margin: -4px -4px 16px;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(234, 232, 225, 0.9)),
    rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 23, 23, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.card-preview-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-card > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.card-link {
  margin-top: auto;
  padding-top: 18px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0.85;
  transition: opacity 0.18s ease;
}

.card-link:hover {
  opacity: 1;
}

.stagger-in {
  opacity: 0;
  transform: translateY(14px);
  animation: stagger-appear 0.55s var(--ease-out) forwards;
  animation-delay: calc(0.08s + var(--stagger-index, 0) * 0.08s);
}

@keyframes stagger-appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s var(--ease-out),
    transform 0.5s var(--ease-out);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

body.project-page {
  padding-bottom: 32px;
}

body.home-page.has-bmc-widget,
body.collection-page.has-bmc-widget,
body.project-page.has-bmc-widget {
  padding-bottom: calc(var(--support-widget-clearance) + 22px);
}

.page-bar {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.page-bar-copy {
  display: grid;
  gap: 8px;
  max-width: 620px;
}

.page-bar-copy p,
.page-bar-copy h1 {
  margin: 0;
}

.page-bar-copy p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.page-bar-copy h1 {
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  letter-spacing: -0.04em;
  font-weight: 600;
}

.project-stage {
  display: grid;
  place-items: center;
  min-width: 0;
}

.page-shell.has-project-support {
  align-items: start;
}

.page-shell.has-project-support > [data-site-header],
.page-shell.has-project-support > .page-bar {
  grid-column: 1 / -1;
}

.page-shell.has-project-support--right {
  grid-template-columns: minmax(0, 1fr) minmax(200px, 220px);
}

.page-shell.has-project-support--right > main {
  grid-column: 1;
}

.page-shell.has-project-support--right > .project-support-note {
  grid-column: 2;
}

.page-shell.has-project-support--left {
  grid-template-columns: minmax(200px, 220px) minmax(0, 1fr);
}

.page-shell.has-project-support--left > main {
  grid-column: 2;
}

.page-shell.has-project-support--left > .project-support-note {
  grid-column: 1;
}

.project-support-note {
  position: sticky;
  top: 108px;
  align-self: start;
}

.project-support-note__inner {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.support-popup {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 25;
  pointer-events: none;
}

.support-popup__panel {
  width: min(340px, calc(100vw - 36px));
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(23, 23, 23, 0.09);
  background: rgba(247, 246, 242, 0.96);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.18s ease,
    transform 0.18s var(--ease-out);
  pointer-events: auto;
}

.support-popup.is-visible .support-popup__panel {
  opacity: 1;
  transform: translateY(0);
}

.support-popup__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.support-popup__button-mount {
  min-height: 40px;
}

.support-popup__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 860px) {
  .site-header {
    gap: 14px;
  }

  .site-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  body.home-page,
  body.collection-page,
  body.project-page {
    padding: 18px 16px 28px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-brand {
    width: 100%;
  }

  .site-nav {
    width: 100%;
  }

  .site-header-actions {
    align-items: stretch;
  }

  .site-audio {
    width: 100%;
    justify-items: stretch;
  }

  .site-audio-panel {
    position: static;
    width: 100%;
  }

  .site-nav-link,
  .pill-link,
  .site-audio-mode,
  .site-audio-option {
    min-height: 36px;
    padding-inline: 0.85rem;
  }

  .site-header + .hero,
  .site-header + .collection-header,
  .site-header + .page-bar {
    margin-top: 22px;
  }

  .hero,
  .collection-header {
    gap: 16px;
  }

  .hero {
    margin-bottom: 40px;
  }

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

  .support-inline {
    align-items: flex-start;
    flex-direction: column;
  }

  .support-inline-actions {
    width: 100%;
  }
}

@media (max-width: 1024px) {
  .page-shell.has-project-support,
  .page-shell.has-project-support--left,
  .page-shell.has-project-support--right {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-shell.has-project-support > main,
  .page-shell.has-project-support > .project-support-note {
    grid-column: 1;
  }

  .project-support-note {
    position: static;
    top: auto;
  }
}

@media (max-width: 640px) {
  body.home-page.has-bmc-widget,
  body.collection-page.has-bmc-widget,
  body.project-page.has-bmc-widget {
    padding-bottom: calc(var(--support-widget-clearance) + 44px);
  }

  .support-popup {
    left: 16px;
    right: 16px;
    bottom: calc(var(--support-widget-clearance) + 12px);
  }

  .support-popup__panel {
    width: 100%;
  }

  .support-popup__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .support-popup__button-mount {
    width: 100%;
  }
}

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

  .stagger-in {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .fade-up,
  .collection-card,
  .site-nav-link,
  .pill-link,
  .logo-mark,
  .support-link,
  .support-popup__dismiss,
  .support-popup__icon,
  .support-popup__panel {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
