:root {
  --ink: #26352f;
  --ink-soft: #5d6b65;
  --cream: #f9f7f0;
  --paper: #fffdf8;
  --blush: #e4aaa0;
  --blush-deep: #a55555;
  --gold: #c99c52;
  --sage: #6f8976;
  --dust: #567b70;
  --line: rgba(38, 53, 47, 0.12);
  --shadow: 0 22px 55px rgba(52, 74, 65, 0.11);
  --serif: "Fraunces", "Palatino Linotype", Palatino, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --max: 1080px;
  --bar: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 540px at 6% -8%, rgba(228, 170, 160, 0.26), transparent 58%),
    radial-gradient(820px 520px at 104% 8%, rgba(139, 170, 145, 0.22), transparent 55%),
    var(--cream);
  font-family: var(--sans);
  line-height: 1.6;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(249, 247, 240, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  text-decoration: none;
}
.nav { display: flex; gap: 18px; }
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.nav a[aria-current="page"],
.nav a:hover { color: var(--ink); }

.wrap { width: min(var(--max), calc(100% - 36px)); margin: 0 auto; }
.hero, .section { padding: 72px 0; }
.hero { text-align: center; padding-top: 80px; }
.hero-monogram {
  width: 108px;
  height: 108px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(165, 85, 85, 0.35);
  border-radius: 50%;
  color: var(--blush-deep);
  background: rgba(255, 253, 248, 0.72);
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: .1em;
  box-shadow: 0 0 0 9px rgba(255, 253, 248, 0.5);
}
.hero-monogram span { color: var(--gold); font-size: .9em; }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--blush-deep);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 520; line-height: 1.15; margin: 0 0 14px; }
h1 { font-size: clamp(2.6rem, 8vw, 5.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.lede {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--ink-soft);
}
.sub { margin: 0 auto 28px; max-width: 38rem; color: var(--ink-soft); }
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  background: var(--dust);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(86, 123, 112, .22); }
.btn { transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn.secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn:disabled { opacity: 0.6; cursor: wait; }

.grid-3, .grid-2 {
  display: grid;
  gap: 22px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--blush), var(--gold)); }
.card p { margin: 0; color: var(--ink-soft); }
.card .card-link { margin-top: 15px; }
.card-link a { color: var(--blush-deep); font-weight: 600; text-decoration: none; }

.form {
  display: grid;
  gap: 14px;
  text-align: left;
  max-width: 420px;
  margin: 0 auto;
}
.form label { display: grid; gap: 6px; font-size: 0.92rem; }
.form input, .form select {
  width: 100%;
  border: 1px solid rgb(184, 192, 204);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  color: #0d141a;
}
.form-status { min-height: 1.4em; margin: 0; }
.form-status.ok { color: var(--sage); font-family: var(--serif); font-size: 1.25rem; }
.form-status.err { color: var(--blush-deep); }

.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 48px 12px;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.photo-stage {
  position: relative;
  width: 100%;
}
.page-intro { max-width: 700px; margin-bottom: 32px; }
.page-intro .sub { margin-left: 0; }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 22px; }
.gallery-toolbar[hidden] { display: none; }
.photo-gallery {
  columns: 4 220px;
  column-gap: 14px;
}
.gallery-photo {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #e9e5dc;
  box-shadow: 0 8px 24px rgba(38, 53, 47, .1);
  cursor: zoom-in;
  break-inside: avoid;
  transform: translateZ(0);
  content-visibility: auto;
  contain-intrinsic-size: 220px 280px;
}
.gallery-photo img { width: 100%; height: auto; transition: transform .35s ease, opacity .25s ease; }
.gallery-photo:hover img { transform: scale(1.025); }
.gallery-sentinel { height: 2px; }
.photo-stage--teaser { margin-bottom: 16px; }
.photo-wheel {
  position: relative;
  height: min(68vh, 620px);
  perspective: 1400px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}
.photo-wheel--compact { height: min(42vh, 360px); perspective: 1000px; }
.photo-wheel.is-dragging { cursor: grabbing; }
.photo-wheel-ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.photo-wheel-slot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(260px, 58vw);
  height: min(340px, 74vw);
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #eadfd2;
  box-shadow: var(--shadow);
  appearance: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.photo-wheel--compact .photo-wheel-slot {
  width: min(170px, 42vw);
  height: min(220px, 54vw);
}
.photo-wheel-slot[data-front="true"] { cursor: zoom-in; }
.photo-wheel-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.wheel-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 8px;
}
.wheel-controls[hidden],
#photo-more[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(24, 14, 12, 0.88);
  display: grid;
  place-items: center;
  padding: 24px;
}
.lightbox[hidden],
.now-playing[hidden] { display: none; }
.lightbox img {
  max-width: min(96vw, 1100px);
  max-height: 86vh;
  object-fit: contain;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

.music-page { padding-bottom: calc(var(--bar) + 60px); }
.music-main { max-width: 920px; }
.music-intro { display: grid; grid-template-columns: auto 1fr; gap: 42px; align-items: center; margin-bottom: 56px; }
.music-intro .sub { margin-left: 0; }
.record-mark {
  position: relative;
  width: clamp(130px, 20vw, 190px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #30453e 0 3px, #263832 4px 7px);
  box-shadow: 0 24px 50px rgba(38, 56, 50, .24);
}
.record-mark::before { content: ""; position: absolute; width: 34%; aspect-ratio: 1; border-radius: 50%; background: var(--blush); border: 6px solid var(--paper); }
.record-mark span { z-index: 1; color: var(--paper); font-size: 1.2rem; }
.music-library { background: rgba(255, 253, 248, .78); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 5vw, 38px); box-shadow: var(--shadow); }
.library-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 18px; }
.library-heading h2 { margin: 0; }
.track-count { color: var(--ink-soft); margin: 0; white-space: nowrap; }
.playlist { list-style: none; margin: 0; padding: 0; counter-reset: tracks; }
.playlist li { border-bottom: 1px solid var(--line); }
.playlist li:last-child { border-bottom: 0; }
.playlist button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 16px 8px;
  cursor: pointer;
  color: var(--ink);
}
.playlist button { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; border-radius: 10px; }
.playlist button:hover { background: rgba(111, 137, 118, .08); }
.playlist button[aria-current="true"] { color: var(--blush-deep); font-weight: 600; background: rgba(228, 170, 160, .12); }
.track-number { color: var(--gold); font-size: .78rem; letter-spacing: .08em; }
.track-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-play { color: var(--ink-soft); font-size: .8rem; opacity: 0; transform: translateX(5px); transition: .18s ease; }
.playlist button:hover .track-play, .playlist button[aria-current="true"] .track-play { opacity: 1; transform: none; }

.now-playing {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 18px 16px;
  background: rgba(38, 53, 47, .97);
  color: #fffdf8;
  box-shadow: 0 -12px 40px rgba(38, 53, 47, .18);
}
.now-meta { min-width: 0; }
.now-title { margin: 0 0 6px; font-family: var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-controls { display: flex; gap: 8px; align-items: center; }
.now-controls button {
  background: rgba(255,255,255,0.1);
  color: inherit;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}
.now-controls button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.now-controls .play-main { min-width: 72px; background: var(--paper); color: var(--ink); font-weight: 600; }
.progress {
  grid-column: 1 / -1;
  appearance: none;
  width: 100%;
  height: 6px;
  accent-color: var(--gold);
}

.admin-gate, .uploader { max-width: 640px; margin: 0 auto; }
.drop {
  border: 2px dashed var(--gold);
  border-radius: 18px;
  padding: 36px 18px;
  text-align: center;
  background: rgba(255,248,240,0.7);
}
.drop.over { background: #f3e2cf; }
.file-list { list-style: none; padding: 0; margin: 18px 0 0; }
.file-list li { display: grid; gap: 6px; margin: 0 0 12px; font-size: 0.92rem; }
.bar {
  height: 8px;
  background: #eadfd2;
  border-radius: 99px;
  overflow: hidden;
}
.bar > span { display: block; height: 100%; width: 0; background: var(--sage); }
.note { color: var(--ink-soft); font-size: 0.92rem; }

.site-footer {
  padding: 28px 22px 40px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .teaser-reel { grid-auto-columns: 62vw; }
  .now-playing { grid-template-columns: 1fr; }
  .music-intro { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .music-intro .sub { margin-left: auto; }
  .record-mark { margin: 0 auto; }
  .site-header { padding-inline: 16px; }
  .nav { gap: 12px; }
  .nav a { font-size: .86rem; }
}

@media (max-width: 520px) {
  .brand { font-size: 1rem; }
  .hero, .section { padding: 52px 0; }
  .library-heading { align-items: start; flex-direction: column; gap: 6px; }
  .track-play { display: none; }
  .playlist button { grid-template-columns: 34px 1fr; }
  .now-controls { justify-content: center; }
  .gallery-toolbar { align-items: flex-start; flex-direction: column; }
  .photo-gallery { columns: 2 145px; column-gap: 9px; }
  .gallery-photo { margin-bottom: 9px; border-radius: 11px; }
}
