@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

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

:root {
  --gold: #c8a96e;
  --gold-light: #e8d5b0;
  --gold-dark: #a8893e;
  --text: #2a2a2a;
  --text-muted: #6b6b6b;
  --border: #e8e8e8;
  --bg: #ffffff;
  --bg-subtle: #faf9f7;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.25;
}

.serif { font-family: 'Playfair Display', serif; }
.gold  { color: var(--gold); }

/* ── Site Header ── */

.site-header {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  border-bottom: 1px solid var(--border);
}

.site-header .family-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

.site-header .family-name a {
  color: inherit;
  text-decoration: none;
}

.site-header .family-name span {
  color: var(--gold);
}

.site-header .tagline {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Nav ── */

.site-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--gold);
}

/* ── Dividers ── */

.gold-divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 1.25rem auto;
  border: none;
}

/* ── Footer ── */

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════
   HUB / HOME PAGE
══════════════════════════════════════ */

/* ── Mary hero (landing page) ── */

.mary-hero {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  padding: 4.5rem 1.5rem;
}

.mary-hero-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.mary-hero-portrait {
  flex-shrink: 0;
  margin-bottom: 0; /* override .portrait-wrap default */
}

/* the portrait links to /mary/ — echo the memorial-card hover cue */
a.mary-hero-portrait img {
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}

a.mary-hero-portrait:hover img {
  border-color: var(--gold);
  box-shadow: 0 8px 40px rgba(200, 169, 110, 0.35);
  transform: translateY(-3px);
}

.mary-hero-portrait img {
  display: block;
  width: 400px;
  height: 533px;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--gold-light);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
}

.mary-hero-text h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 0.5rem;
}

.mary-hero-text .memorial-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

/* left-aligned variant of the gold divider for the hero text column */
.gold-divider--left {
  margin-left: 0;
  margin-right: 0;
}

.mary-hero-tribute {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 480px;
  margin-bottom: 1.75rem;
}

.gold-button {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
  text-decoration: none;
  border: 1px solid var(--gold);
  padding: 0.8rem 1.6rem;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}

.gold-button:hover {
  background: var(--gold);
  color: #fff;
}

@media (max-width: 820px) {
  .mary-hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 2.5rem;
  }

  .mary-hero-portrait img {
    width: 220px;
    height: 290px;
  }

  .gold-divider--left {
    margin-left: auto;
    margin-right: auto;
  }

  .mary-hero-tribute {
    max-width: 100%;
  }
}

.hub-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.hub-intro {
  text-align: center;
  margin-bottom: 3.5rem;
}

.hub-intro h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

.hub-intro p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

.memorial-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* auto-fill row variant for the family section — new cards flow in as added */
.memorial-cards--row {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  max-width: 760px;
  margin: 0 auto;
}

/* ── Memorial Card ── */

.memorial-card {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 3/4;
  min-height: 420px;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.15s;
}

.memorial-card:hover {
  box-shadow: 0 8px 40px rgba(200, 169, 110, 0.25);
  transform: translateY(-3px);
}

.memorial-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transition: transform 0.4s ease;
}

.memorial-card:hover .memorial-card-bg {
  transform: scale(1.03);
}

/* compact card for the family row */
.memorial-card--small {
  min-height: 260px;
  aspect-ratio: 3/4;
}

.memorial-card--small .memorial-card-text {
  padding: 1.5rem 1.25rem;
}

.memorial-card--small .memorial-card-name {
  font-size: 1.05rem;
}

.memorial-card--small .memorial-card-dates {
  font-size: 0.72rem;
  margin-bottom: 0.5rem;
}

.memorial-card--small .memorial-card-sub {
  font-size: 0.72rem;
}

.memorial-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.05) 30%,
    rgba(0,0,0,0.72) 75%,
    rgba(0,0,0,0.88) 100%
  );
}

.memorial-card-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.75rem;
  color: #fff;
  text-align: center;
}

.memorial-card-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.memorial-card-dates {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.memorial-card-sub {
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════
   MEMORIAL PAGES — PORTRAIT HERO
══════════════════════════════════════ */

.portrait-hero {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  padding: 5rem 1.5rem 4.5rem;
  text-align: center;
}

.portrait-wrap {
  display: inline-block;
  margin-bottom: 2.5rem;
}

.portrait-wrap img {
  display: block;
  width: 240px;
  height: 320px;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--gold-light);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
}

.portrait-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 0.5rem;
}

.memorial-dates {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--gold-dark);
  margin-top: 0.4rem;
  margin-bottom: 0.25rem;
}

.portrait-hero .memorial-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

/* ── Plain memorial header (no photo) ── */

.memorial-header {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.memorial-header h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 0.5rem;
}

.memorial-header .memorial-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

/* ── Section heading ── */

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-heading h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 0.75rem;
}

.section-heading p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* ── Tribute text ── */

.tribute {
  max-width: 680px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3rem;
}

.tribute p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.5rem;
}

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

.tribute-verse {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold-dark);
  text-align: center;
  border-left: 3px solid var(--gold-light);
  padding: 0.75rem 1.5rem;
  margin: 2rem 0 !important;
}

/* ══════════════════════════════════════
   ORDER OF SERVICE
══════════════════════════════════════ */

.order-of-service {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4.5rem 1.5rem;
}

.order-of-service-inner {
  max-width: 620px;
  margin: 0 auto;
}

.service-list {
  list-style: none;
  counter-reset: service-counter;
  margin-top: 2.5rem;
}

.service-list li {
  counter-increment: service-counter;
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.service-list li:last-child {
  border-bottom: none;
}

.service-item-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  min-width: 130px;
  flex-shrink: 0;
}

.service-item-name {
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.5;
}

.service-item-note {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.15rem;
}

.service-credit {
  margin-top: 1.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* ══════════════════════════════════════
   VIDEO SECTION
══════════════════════════════════════ */

.video-section {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4.5rem 1.5rem;
}

.video-section-inner {
  max-width: 800px;
  margin: 0 auto;
}

.video-item {
  margin-bottom: 4rem;
}

.video-item:last-child {
  margin-bottom: 0;
}

.video-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.video-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ── Plyr overrides ── */

.plyr--video {
  border-radius: 4px;
  overflow: hidden;
}

.plyr__control--overlaid {
  background: var(--gold) !important;
}

.plyr--full-ui input[type=range] {
  color: var(--gold) !important;
}

/* ══════════════════════════════════════
   PHOTO GALLERY
══════════════════════════════════════ */

.gallery-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
  transition: opacity 0.2s;
  cursor: zoom-in;
}

.gallery-grid img:hover {
  opacity: 0.88;
}

/* ── Lightbox ── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ══════════════════════════════════════
   TRAVEL PAGE
══════════════════════════════════════ */

.travel-header {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.travel-header h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 0.5rem;
}

.travel-header .travel-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.travel-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem;
}

.travel-section > .section-heading {
  margin-bottom: 2.5rem;
}

.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.trip-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  cursor: default;
}

.trip-card.trip-card--linked {
  cursor: pointer;
}

.trip-card.trip-card--linked:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 24px rgba(200, 169, 110, 0.15);
  transform: translateY(-2px);
}

.trip-card-flag {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5.5rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.trip-card-body {
  padding: 1.75rem 1.5rem;
}

.trip-year {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.trip-card-body h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.trip-card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.trip-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 2px;
}

/* ══════════════════════════════════════
   COMING SOON / FAMILY PAGE
══════════════════════════════════════ */

.coming-soon-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 7rem 1.5rem 9rem;
  text-align: center;
}

.coming-soon-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 2rem;
}

.coming-soon-wrap h2 {
  font-size: 1.65rem;
  margin-bottom: 1rem;
}

.coming-soon-wrap p {
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 1rem;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portrait-wrap img {
    width: 190px;
    height: 250px;
  }

  .trip-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .memorial-cards {
    grid-template-columns: 1fr;
  }

  .memorial-card {
    aspect-ratio: 4/3;
  }
}

@media (max-width: 480px) {
  .site-nav {
    gap: 1.25rem;
  }
}
