:root {
  --bg: #f6f1ea;
  --bg-2: #efe7db;
  --paper: #fffdf8;
  --ink: #171412;
  --muted: #6a6158;
  --line: rgba(23, 20, 18, 0.1);
  --accent: #b4532a;
  --accent-2: #2c4663;
  --gold: #c4a574;
  --shadow: 0 20px 50px rgba(23, 20, 18, 0.1);
  --radius: 22px;
  --max: 1140px;
}

body.theme-riana { --accent: #b85c5c; --accent-2: #7a3e4a; }
body.theme-izaan { --accent: #3d6b7a; --accent-2: #1f3f4d; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Outfit", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(246, 241, 234, 0.88);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.2rem;
}
.brand span { color: var(--accent); }

nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  opacity: 0.78;
}
nav a:hover, nav a.active { color: var(--accent); opacity: 1; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.hero {
  padding: 72px 0 28px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.page-intro {
  padding: 64px 0 12px;
  max-width: 42rem;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 12px;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.12; margin: 0 0 14px; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 650; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -0.02em; }
.lede { font-size: 1.18rem; color: var(--muted); max-width: 38rem; margin: 0; }

.hero-photo { position: relative; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 32px;
  box-shadow: var(--shadow);
}
.hero-photo figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  background: rgba(23, 20, 18, 0.72);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 20px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }

.band { padding: 56px 0; }
.band + .band { padding-top: 8px; }
.band-soft {
  background: linear-gradient(180deg, transparent, rgba(255, 253, 248, 0.7) 12%, rgba(255, 253, 248, 0.7) 88%, transparent);
}
.section-head { margin-bottom: 28px; max-width: 40rem; }
.section-head p { color: var(--muted); margin: 0; }

.card-grid, .album-grid, .video-grid, .family-grid, .event-grid {
  display: grid;
  gap: 18px;
}
.card-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.album-grid, .video-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.family-grid, .event-grid { grid-template-columns: repeat(3, 1fr); }

.card, .album-card, .video-card, .family-card, .event-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card { padding: 24px; }
.card h3, .family-card h3 { margin-bottom: 8px; }
.card p, .family-card p { color: var(--muted); margin: 0; }

.track-list { display: grid; gap: 14px; }
.track {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 6px 18px;
  align-items: center;
  padding: 20px 22px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.track-num {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  color: var(--accent);
  line-height: 1;
}
.track-meta h3 { margin: 0 0 4px; font-size: 1.28rem; }
.track-meta p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.track-play {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin-top: 8px;
}
.track-play audio {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 42px;
}
.track-dl {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}
.track-dl:hover { border-color: var(--accent); color: var(--accent); }

@media (min-width: 960px) {
  .track {
    grid-template-columns: 56px minmax(240px, 0.85fr) minmax(320px, 1.25fr) auto;
    padding: 18px 24px;
  }
  .track-play {
    display: contents;
    margin: 0;
  }
  .track-play audio { min-width: 280px; }
}

.album-card, .video-card, .family-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.album-card:hover, .video-card:hover, .family-card:hover {
  transform: translateY(-5px);
  color: inherit;
}
.album-card img, .family-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.family-card img { height: 300px; object-position: center top; }
.album-card .meta, .video-card .meta, .family-card .meta { padding: 16px 18px 18px; }
.album-card h3, .video-card h3 { font-size: 1.12rem; margin: 0 0 4px; }
.count { font-size: 0.82rem; color: var(--muted); }

.mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mosaic img {
  height: 200px;
  width: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 14px;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.prose { max-width: 46rem; }
.prose p { font-size: 1.06rem; }

.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.socials a {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.socials a:hover { border-color: var(--accent); color: var(--accent); }

.tabs, .month-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 22px; }
.tab, .month-pill {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.tab.active, .month-pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.event-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 132px;
  box-shadow: none;
}
.event-card.featured { box-shadow: var(--shadow); }
.event-card.is-today { border-color: var(--accent); }
.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f3ebe0;
  padding: 16px 8px;
}
.event-mon { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.event-day { font-family: "Fraunces", Georgia, serif; font-size: 1.8rem; line-height: 1; }
.event-body { padding: 16px 18px; }
.event-type { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.event-body h3 { font-size: 1.15rem; margin: 0 0 4px; }
.event-body p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.event-list { display: grid; gap: 12px; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.photo-grid button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
}
.photo-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.photo-grid button:hover img { transform: scale(1.04); }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox .lb-ui {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 0;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
}
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; }
.lightbox .lb-next { right: 16px; }
.lightbox .lb-count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.9rem;
}

.player-wrap {
  background: #111;
  border-radius: 18px;
  overflow: hidden;
  min-height: 240px;
}
.player-wrap video { width: 100%; max-height: 72vh; background: #000; }
.note { color: var(--muted); font-size: 0.92rem; }

.site-footer {
  margin-top: 24px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-inner, .footer-links { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

.crumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 10px; }
.crumb a { color: inherit; }

@media (max-width: 900px) {
  .hero, .family-grid, .event-grid, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; gap: 28px; }
  .nav-toggle { display: inline-flex; }
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 14px 20px 18px;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
  }
  nav.open { display: flex; }
  .family-card img { height: 220px; }
  .band { padding: 40px 0; }
}
