:root {
  --cream: #faf6f0;
  --warm-white: #fffdf9;
  --rose: #c9a089;
  --rose-deep: #a67c5b;
  --ink: #2c2419;
  --ink-soft: #5c4f42;
  --shadow: rgba(44, 36, 25, 0.12);
  --hero-overlay: rgba(26, 21, 16, 0.55);
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

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

a {
  color: inherit;
}

/* Hero */
.hero {
  position: relative;
  min-height: 72vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1.5rem;
  background:
    linear-gradient(var(--hero-overlay), var(--hero-overlay)),
  url("Assets/Images/IMG_6512.jpeg") center / cover no-repeat;
  color: var(--warm-white);
}

.hero-inner {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.9;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 500;
  line-height: 1.1;
}

.hero h1 span {
  font-style: italic;
  color: #f0dcc8;
}

.subtitle {
  margin: 0 0 2rem;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-style: italic;
  opacity: 0.92;
}

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero-nav a {
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255, 253, 249, 0.55);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: background 0.25s, border-color 0.25s;
}

.hero-nav a:hover {
  background: rgba(255, 253, 249, 0.12);
  border-color: rgba(255, 253, 249, 0.85);
}

/* Sections */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  color: var(--ink);
}

.section-header p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* Video */
.slideshow-section {
  padding-top: 3rem;
}

.video-wrap {
  background: var(--warm-white);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 20px 50px var(--shadow);
  margin-bottom: 3rem;
}

#slideshow-video {
  width: 100%;
  border-radius: 10px;
  background: #1a1510;
  aspect-ratio: 16 / 9;
}

.video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  transition: transform 0.2s, background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--rose-deep);
  color: var(--warm-white);
  border: none;
}

.btn-primary:hover {
  background: #8f6849;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rose);
}

.btn-secondary:hover {
  background: rgba(201, 160, 137, 0.15);
}

/* Live slideshow */
.live-slideshow {
  max-width: 900px;
  margin: 0 auto;
}

.live-slideshow-frame {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #1a1510;
  box-shadow: 0 16px 40px var(--shadow);
  aspect-ratio: 16 / 10;
}

#live-slide {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: kenburns 8s ease-in-out infinite alternate;
}

@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.live-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  color: white;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.live-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.live-controls button {
  background: var(--warm-white);
  border: 1px solid var(--rose);
  color: var(--ink);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.live-controls button:hover {
  background: rgba(201, 160, 137, 0.2);
}

.live-controls .btn-primary {
  width: auto;
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: none;
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
  background: #e8dfd4;
  box-shadow: 0 4px 16px var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Memorial */
.memorial-section {
  padding-top: 2rem;
}

.memorial-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  background: var(--warm-white);
  border-radius: 16px;
  box-shadow: 0 16px 40px var(--shadow);
  border: 1px solid rgba(201, 160, 137, 0.25);
}

.memorial-lead {
  margin: 0 0 1.5rem;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
  text-align: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(201, 160, 137, 0.3);
}

.memorial-card p {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.memorial-card p:last-child {
  margin-bottom: 0;
}

.memorial-closing {
  margin-top: 1.5rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(201, 160, 137, 0.3);
  font-family: var(--font-serif);
  font-size: 1.2rem !important;
  font-style: italic;
  text-align: center;
  color: var(--ink) !important;
}

/* Tribute */
.tribute-section {
  text-align: center;
  padding-bottom: 2rem;
}

.tribute-section blockquote {
  margin: 0;
  padding: 2rem 1.5rem;
  border-top: 1px solid rgba(201, 160, 137, 0.35);
  border-bottom: 1px solid rgba(201, 160, 137, 0.35);
}

.tribute-section p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-style: italic;
  color: var(--ink-soft);
}

.footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 12, 10, 0.92);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.lightbox.hidden {
  display: none;
}

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

@media (max-width: 640px) {
  .hero {
    min-height: 62vh;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .memorial-card {
    padding: 1.75rem 1.25rem;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
  }
}
