/* ============ Loader ============ */
.loader {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--ink-2);
  font-style: italic;
}
.loader p { margin: 6px 0; }
.loader-orb {
  width: 44px; height: 44px;
  border-radius: 50%;
  margin: 0 auto 18px;
  background:
    radial-gradient(circle at 30% 30%, var(--candle), transparent 60%),
    radial-gradient(circle at 70% 70%, var(--magenta), transparent 60%),
    var(--lilac);
  box-shadow: 0 0 32px rgba(247, 214, 122, 0.45), 0 0 64px rgba(231, 84, 174, 0.25);
  animation: orb 2.4s ease-in-out infinite;
}
@keyframes orb {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.15); opacity: 1; }
}
.loader-err { color: var(--magenta-2); font-style: normal; font-size: 13px; }
.loader-hint { font-size: 13px; color: var(--ink-3); font-style: normal; }
.loader-hint code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  background: var(--paper);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--lilac-2);
}

/* ============ Tokens (dark) ============
   Contrast (WCAG) vs --bg #15091F:
   --ink     #F5E8F5  15.6:1  AAA
   --ink-2   #C5A8D8   8.4:1  AAA
   --ink-3   #9A82AD   5.0:1  AA
   --candle  #F7D67A  13.7:1  AAA
   --magenta #E754AE   4.9:1  AA
   --purple  #A77DD6   6.1:1  AA
*/
:root {
  --bg:        #15091F;   /* deepest aubergine */
  --bg-2:      #1F1230;   /* slightly lifted */
  --paper:     #261636;   /* card surface */
  --paper-2:   #311B45;   /* hovered surface */
  --line:      rgba(220, 196, 232, 0.12);
  --line-2:    rgba(220, 196, 232, 0.22);
  --ink:       #F5E8F5;   /* primary text */
  --ink-2:     #C5A8D8;   /* secondary text */
  --ink-3:     #9A82AD;   /* muted text */
  --lilac:     #B891CC;
  --lilac-2:   #D4B5E4;
  --purple:    #A77DD6;
  --purple-2:  #8B5FBF;
  --magenta:   #E754AE;
  --magenta-2: #FF6FB8;
  --gold:      #E8B547;
  --candle:    #F7D67A;
  --shadow-soft: 0 10px 28px -12px rgba(0, 0, 0, 0.55);
  --shadow-lift: 0 28px 60px -18px rgba(0, 0, 0, 0.75);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Quicksand', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.serif {
  font-family: 'DM Serif Display', 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-style: italic;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 80px 24px 100px;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(1.05) brightness(0.85);
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(247, 214, 122, 0.18) 0%, transparent 55%),
    linear-gradient(180deg, rgba(21, 9, 31, 0.45) 0%, rgba(21, 9, 31, 0.70) 55%, rgba(21, 9, 31, 0.98) 100%);
}

.hero-confetti { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-confetti .dot {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  opacity: 0;
  animation: drift 9s ease-in-out infinite;
  filter: blur(0.3px);
}
.hero-confetti .d0 { background: var(--candle); width: 6px; height: 6px; box-shadow: 0 0 14px var(--candle); }
.hero-confetti .d1 { background: #fff; width: 4px; height: 4px; box-shadow: 0 0 10px #fff; }
.hero-confetti .d2 { background: var(--magenta); width: 7px; height: 7px; }
.hero-confetti .d3 { background: var(--lilac); width: 9px; height: 9px; }
.hero-confetti .d4 { background: #fff5cc; width: 5px; height: 5px; box-shadow: 0 0 18px #f5d36c; }
.hero-confetti .d5 { background: #E2C9F0; width: 6px; height: 6px; }
@keyframes drift {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.6); }
  20%      { opacity: 0.95; }
  50%      { transform: translateY(-30px) scale(1); opacity: 0.7; }
  80%      { opacity: 0.4; }
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 680px;
  color: #fff;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 600;
  color: #F5E8FB;
  margin-bottom: 36px;
  opacity: 0.9;
}
.hero-eyebrow .line { width: 36px; height: 1px; background: rgba(255,255,255,0.55); }

.hero-kicker {
  margin: 0;
  font-family: 'Caveat', 'Quicksand', cursive;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 500;
  color: var(--candle);
  text-shadow: 0 0 24px rgba(247, 214, 122, 0.5);
  margin-bottom: -6px;
}
.hero-name {
  margin: 0;
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(80px, 16vw, 180px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 6px 40px rgba(46, 26, 61, 0.5);
}
.hero-meta {
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 24px 0 28px;
  color: #F5E8FB;
}
.hero-welcome {
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 40px;
  color: rgba(255, 255, 255, 0.92);
  text-wrap: pretty;
}

.hero-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.hero-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.4);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -8px rgba(0,0,0,0.5); }
.hero-btn svg { transition: transform 300ms ease; }
.hero-btn:hover svg { transform: translateY(3px); }
.hero-count {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
}

/* ============ Filters (sticky) ============ */
.filters {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 9, 31, 0.78);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.filters-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
}
.filters-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 180ms ease;
  white-space: nowrap;
}
.chip:hover { background: rgba(184, 145, 204, 0.12); border-color: var(--lilac); color: var(--ink); }
.chip.on {
  background: var(--lilac-2);
  border-color: var(--lilac-2);
  color: #1A0D26;
  box-shadow: 0 8px 22px -6px rgba(212, 181, 228, 0.40);
}
.chip-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(184, 145, 204, 0.18);
  color: var(--ink-2);
}
.chip.on .chip-count {
  background: rgba(26, 13, 38, 0.18);
  color: #1A0D26;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--magenta) 0%, var(--purple) 100%);
  color: #fff;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(214, 58, 153, 0.55);
  transition: transform 200ms ease, box-shadow 200ms ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.download-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -10px rgba(214, 58, 153, 0.7); }

/* Mobile category dropdown — hidden on desktop */
.filter-select-wrap { display: none; }
.filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color-scheme: dark;
  width: 100%;
  padding: 11px 38px 11px 16px;
  border-radius: 999px;
  background: rgba(184, 145, 204, 0.10);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}
.filter-select:focus {
  outline: none;
  border-color: var(--lilac);
  background: rgba(184, 145, 204, 0.18);
}
.filter-select option {
  background: var(--bg-2);
  color: var(--ink);
}
.filter-select-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-2);
  pointer-events: none;
}

@media (max-width: 640px) {
  .filters-row { flex-wrap: wrap; }
  .filter-chips { display: none; }
  .filter-select-wrap {
    display: block;
    position: relative;
    flex: 1;
    min-width: 0;
  }
  .download-btn { width: 100%; justify-content: center; padding: 12px; }
  .download-btn span { font-size: 13px; }
}

/* ============ Gallery (masonry via CSS columns) ============ */
.gallery {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}
.masonry {
  column-count: 3;
  column-gap: 18px;
}
@media (max-width: 960px) { .masonry { column-count: 2; column-gap: 14px; } }
@media (max-width: 560px) { .masonry { column-count: 1; } }

.tile {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  padding: 0;
  margin: 0 0 18px;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  break-inside: avoid;
  box-shadow: var(--shadow-soft);
  transition: transform 320ms cubic-bezier(.2,.7,.2,1), box-shadow 320ms ease, border-color 320ms ease;
  opacity: 0;
  animation: tile-in 600ms ease forwards;
}
@keyframes tile-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tile img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 700ms cubic-bezier(.2,.7,.2,1);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--line-2); }
.tile:hover img { transform: scale(1.04); }
.tile-glow {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, transparent 55%, rgba(21, 9, 31, 0.65) 100%);
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}
.tile:hover .tile-glow { opacity: 1; }
.tile-zoom {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 36px; height: 36px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 280ms ease, transform 280ms ease;
  box-shadow: 0 6px 14px -4px rgba(0,0,0,0.3);
}
.tile:hover .tile-zoom { opacity: 1; transform: translateY(0); }

.empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--ink-3);
  font-style: italic;
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: lb-in 260ms ease;
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(26, 12, 36, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lb-close, .lb-arrow {
  position: absolute;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: #fff;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 10;
  transition: background 180ms ease, transform 180ms ease;
}
.lb-close:hover, .lb-arrow:hover { background: rgba(255,255,255,0.20); transform: scale(1.05); }
.lb-close { top: 22px; right: 22px; }
.lb-arrow { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }
.lb-arrow:hover { transform: translateY(-50%) scale(1.05); }

.lb-stage {
  position: relative;
  margin: 0;
  max-width: min(92vw, 1400px);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: lb-img 320ms cubic-bezier(.2,.7,.2,1);
  z-index: 2;
}
@keyframes lb-img {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}
.lb-stage img {
  max-width: 100%;
  max-height: 76vh;
  border-radius: 8px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  object-fit: contain;
}
.lb-stage figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 18px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}
.lb-caption { font-style: italic; }
.lb-count {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 18px;
  color: #fff;
}
.lb-count span { opacity: 0.5; margin: 0 4px; }

.lb-download {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--magenta), var(--purple));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  z-index: 10;
  box-shadow: 0 10px 30px -10px rgba(214, 58, 153, 0.6);
  transition: transform 200ms ease;
}
.lb-download:hover { transform: translateX(-50%) translateY(-2px); }

@media (max-width: 640px) {
  .lb-close, .lb-arrow { width: 40px; height: 40px; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
  .lb-close { top: 14px; right: 14px; }
  .lb-stage img { max-height: 68vh; }
  .lb-stage figcaption { font-size: 12px; }
  .lb-download { bottom: 14px; font-size: 12px; padding: 9px 14px; }
}

/* ============ Closing CTA ============ */
.closing {
  max-width: 720px;
  margin: 40px auto 0;
  padding: 72px 24px 80px;
  text-align: center;
}
.closing-rule {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--purple);
  margin-bottom: 24px;
}
.closing-rule span {
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lilac), transparent);
}
.closing h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(32px, 5vw, 48px);
  margin: 0 0 16px;
  color: var(--ink);
  line-height: 1.1;
}
.closing p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 auto 28px;
  max-width: 480px;
  text-wrap: pretty;
}
.closing-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--magenta), var(--purple));
  color: #fff;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 16px 36px -12px rgba(214, 58, 153, 0.55);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.closing-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px -12px rgba(214, 58, 153, 0.7);
}
.closing-btn-secondary {
  margin-left: 12px;
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: none;
}
.closing-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}
@media (max-width: 520px) {
  .closing-btn-secondary { margin-left: 0; margin-top: 12px; }
}
.closing-note {
  font-size: 13px !important;
  color: var(--ink-3) !important;
  margin-top: 20px !important;
  font-style: italic;
}

/* ============ Footer ============ */
.page-footer {
  text-align: center;
  padding: 24px 24px 64px;
  color: var(--ink-3);
  font-size: 13px;
  font-style: italic;
}
.page-footer p { margin: 4px 0; }
.pf-small {
  font-size: 11px !important;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-style: normal !important;
  margin-top: 12px !important;
  color: var(--ink-3);
  opacity: 0.7;
}

/* ============ Back to top ============ */
.back-top {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 60;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.6);
  animation: bt-in 260ms ease;
}
@keyframes bt-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.back-top:hover { background: var(--paper-2); border-color: var(--lilac); }

@media (max-width: 640px) {
  .back-top { bottom: 14px; right: 14px; }
}
