:root {
  --bg: #f3eadf;
  --paper: #fbf6ef;
  --paper-shadow: rgba(84, 63, 46, 0.18);
  --ink: #1e1712;
  --muted: #64584e;
  --line: rgba(48, 34, 23, 0.12);
  --accent: #ad6a2c;
  --accent-soft: #e0b27f;
  --vault: #0f0d0d;
  --vault-soft: #201715;
  --vault-glow: #f3c27c;
  --white: #fffdfa;
  --shadow-lg: 0 24px 80px rgba(53, 35, 23, 0.18);
  --shadow-md: 0 14px 32px rgba(53, 35, 23, 0.14);
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --site-max: 1320px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "URW Palladio L",
    Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 34%),
    linear-gradient(180deg, #efe4d7 0%, var(--bg) 24%, #f6efe6 100%);
}

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

button,
a {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

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

.page-grain {
  position: fixed;
  inset: 0;
  background: url("./assets/film-grain.png") center/620px 620px repeat;
  opacity: 0.045;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 0;
}

.topbar,
.section,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  width: min(calc(100% - 32px), var(--site-max));
  margin: 16px auto 0;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(64, 46, 33, 0.1);
  border-radius: 999px;
  background: rgba(251, 246, 239, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 48px rgba(83, 57, 33, 0.08);
  position: sticky;
  top: 14px;
}

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

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #f5d3a0);
  box-shadow: 0 0 0 6px rgba(173, 106, 44, 0.12);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 0.96rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy span {
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topnav {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--ink);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.wallet-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(32, 23, 21, 0.07);
  color: var(--muted);
  font-size: 0.88rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible,
.chip:hover,
.chip:focus-visible,
.shot-card:hover,
.shot-card:focus-within,
.vault-card:hover {
  transform: translateY(-2px);
}

.button-solid {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(30, 23, 18, 0.2);
}

.button-dark {
  background: var(--vault);
  color: var(--white);
}

.button-ghost {
  border: 1px solid rgba(30, 23, 18, 0.14);
  background: rgba(255, 255, 255, 0.56);
}

.section {
  width: min(calc(100% - 32px), var(--site-max));
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  padding-top: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.97fr);
  gap: 42px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.82rem;
}

.hero h1,
.section-heading h2,
.vault-copy h2,
.unlock-panel h2,
.modal-copy h2 {
  margin: 0;
  font-family: var(--serif);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(3rem, 8vw, 7rem);
}

.hero-text,
.section-heading p,
.vault-copy p,
.unlock-status,
.modal-copy p,
.shot-meta p,
.vault-card p,
.stat-card p,
.hero-note p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 32px 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stat-card,
.hero-note {
  padding: 18px;
  border: 1px solid rgba(30, 23, 18, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(251, 246, 239, 0.88);
  box-shadow: var(--shadow-md);
}

.rotate-left {
  transform: rotate(-1.5deg);
}

.rotate-right {
  transform: rotate(1.5deg);
}

.stat-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 1.85rem;
  font-family: var(--serif);
}

.stat-label,
.tag,
.vault-index {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
}

.hero-media {
  position: relative;
  padding-top: 24px;
}

.hero-frame {
  overflow: hidden;
  border-radius: 40px;
  box-shadow: var(--shadow-lg);
}

.hero-frame img {
  width: 100%;
  aspect-ratio: 1.07;
  object-fit: cover;
}

.hero-note {
  width: min(260px, 68%);
  position: absolute;
  left: -28px;
  bottom: 24px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-heading h2,
.vault-copy h2,
.unlock-panel h2,
.modal-copy h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.chip {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(30, 23, 18, 0.1);
  background: rgba(255, 255, 255, 0.5);
}

.chip.is-active {
  background: var(--ink);
  color: var(--white);
}

.wall-grid {
  columns: 4 220px;
  column-gap: 18px;
}

.shot-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid rgba(48, 34, 23, 0.1);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
  position: relative;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.shot-card.is-hidden {
  display: none;
}

.shot-media {
  min-height: 280px;
  background-image: linear-gradient(rgba(17, 13, 10, 0.06), rgba(17, 13, 10, 0.04)),
    url("./assets/hero-collage.png");
  background-size: 240%;
  background-repeat: no-repeat;
}

.shot-wide .shot-media {
  min-height: 220px;
}

.shot-tall .shot-media {
  min-height: 420px;
}

.crop-a {
  background-position: 6% 36%;
}

.crop-b {
  background-position: 40% 28%;
}

.crop-c {
  background-position: 18% 96%;
}

.crop-d {
  background-position: 61% 40%;
}

.crop-e {
  background-position: 57% 92%;
}

.crop-f {
  background-position: 86% 95%;
}

.crop-g {
  background-position: 97% 50%;
}

.crop-h {
  background-position: 76% 76%;
}

.shot-meta {
  padding: 16px 16px 18px;
}

.shot-meta h3 {
  margin: 12px 0 6px;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
}

.tag-free {
  background: rgba(173, 106, 44, 0.12);
  color: var(--accent);
}

.tag-paid {
  background: rgba(243, 194, 124, 0.14);
  color: var(--vault-glow);
}

.shot-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(13, 11, 10, 0.08), rgba(13, 11, 10, 0.72)),
    url("./assets/premium-curtain.png") center/cover;
}

.shot-cover strong {
  font-family: var(--serif);
  font-size: 1.8rem;
}

.shot-cover span:last-child {
  max-width: 22ch;
  color: rgba(255, 253, 250, 0.82);
  line-height: 1.5;
}

[data-tier="premium"] .shot-media {
  filter: blur(12px) saturate(0.74);
  transform: scale(1.08);
}

body.is-unlocked [data-tier="premium"] .shot-media {
  filter: none;
  transform: none;
}

body.is-unlocked .shot-cover {
  opacity: 0;
  pointer-events: none;
}

.vault {
  margin-top: 20px;
  border-radius: 40px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 13, 13, 0.94), rgba(25, 15, 12, 0.98));
  color: var(--white);
  position: relative;
}

.vault-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 8, 8, 0.8), rgba(8, 8, 8, 0.28)),
    url("./assets/premium-curtain.png") center 28% / cover;
  opacity: 0.82;
}

.vault-copy,
.vault-grid {
  position: relative;
  z-index: 1;
}

.vault-copy {
  max-width: 760px;
  padding: 72px 48px 28px;
}

.vault-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0 48px 64px;
}

.vault-card {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.vault-card:hover {
  border-color: rgba(243, 194, 124, 0.42);
}

.vault-card strong,
.unlock-price strong {
  display: block;
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 1.6rem;
}

.vault-index {
  color: var(--vault-glow);
}

.unlock-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  padding: 30px;
  border-radius: 32px;
  background: rgba(251, 246, 239, 0.84);
  border: 1px solid rgba(48, 34, 23, 0.09);
  box-shadow: var(--shadow-md);
}

.unlock-price {
  padding: 20px 26px;
  border-radius: 24px;
  background: rgba(30, 23, 18, 0.04);
}

.unlock-price span {
  color: var(--muted);
}

.unlock-actions {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.footer {
  width: min(calc(100% - 32px), var(--site-max));
  margin: 0 auto;
  padding: 0 0 48px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 20;
}

.modal.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 9, 7, 0.62);
  backdrop-filter: blur(12px);
}

.modal-panel {
  width: min(calc(100% - 24px), 980px);
  position: relative;
  z-index: 1;
  margin: 6vh auto 0;
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  overflow: hidden;
  border-radius: 32px;
  background: var(--paper);
  box-shadow: 0 34px 90px rgba(17, 12, 9, 0.32);
}

.modal-visual {
  background: var(--vault);
}

.modal-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-copy {
  padding: 40px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 14px;
}

.modal-status {
  min-height: 48px;
}

.modal-close {
  width: 40px;
  height: 40px;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(251, 246, 239, 0.86);
  font-size: 1.6rem;
}

.motion-ready .reveal {
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.motion-ready .reveal:not(.is-visible) {
  opacity: 0.36;
  transform: translateY(24px);
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

body.is-wallet-ready .wallet-pill {
  background: rgba(173, 106, 44, 0.14);
  color: var(--accent);
}

body.is-unlocked .wallet-pill {
  background: rgba(173, 106, 44, 0.18);
  color: var(--ink);
}

@media (max-width: 1080px) {
  .topbar {
    border-radius: 30px;
    padding: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero,
  .unlock-panel {
    grid-template-columns: 1fr;
  }

  .hero-note {
    left: 16px;
    bottom: 16px;
  }

  .hero-stats,
  .vault-grid {
    grid-template-columns: 1fr;
  }

  .modal-panel {
    grid-template-columns: 1fr;
  }

  .modal-visual {
    max-height: 240px;
  }
}

@media (max-width: 780px) {
  .section {
    padding: 34px 0;
  }

  .topnav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .topbar-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero {
    padding-top: 30px;
    gap: 28px;
  }

  .hero-note {
    position: static;
    width: 100%;
    margin-top: 16px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .wall-grid {
    columns: 2 180px;
  }

  .vault-copy,
  .vault-grid {
    padding-left: 22px;
    padding-right: 22px;
  }

  .unlock-panel {
    padding: 22px;
  }

  .footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .topbar {
    width: min(calc(100% - 20px), var(--site-max));
  }

  .section,
  .footer {
    width: min(calc(100% - 20px), var(--site-max));
  }

  .hero h1 {
    max-width: 12ch;
  }

  .wall-grid {
    columns: 1;
  }

  .shot-media,
  .shot-wide .shot-media,
  .shot-tall .shot-media {
    min-height: 260px;
  }
}
