/* ============================================================
   Paula & Kevin's Wedding — Info Site Stylesheet
   Matches the RSVP site (rsvp.paulakevin.xyz)
   Palette: Warm Ivory, Botanical Sage, Champagne Gold, Charcoal
   ============================================================ */

/* Fonts are loaded from index.html (faster than @import). */

:root {
  --color-bg: #fcfbf9;
  --color-surface: #ffffff;
  --color-surface-soft: #f7f5f0;
  --color-primary: #3b5344;       /* Botanical Sage Deep */
  --color-primary-light: #526e58; /* Muted Sage */
  --color-primary-soft: #eaf0eb;  /* Very soft sage tint */
  --color-accent: #c49e65;        /* Champagne Gold */
  --color-accent-hover: #b08950;
  --color-text: #2c322e;          /* Rich Charcoal */
  --color-text-muted: #6b726c;
  --color-text-light: #8e958f;
  --color-border: #e6e2d8;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 2px 6px rgba(44, 50, 46, 0.04);
  --shadow-md: 0 8px 24px rgba(44, 50, 46, 0.07);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);

  /* Botanical divider, matching the printed stationery */
  --sprig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 24'%3E%3Cg fill='none' stroke='%23c49e65' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12 H62 M78 12 H134'/%3E%3Ccircle cx='70' cy='12' r='5.5'/%3E%3Cpath d='M44 12 C46 7 50 5 55 5 C53 9 50 11 44 12 Z'/%3E%3Cpath d='M30 12 C32 17 36 19 41 19 C39 15 36 13 30 12 Z'/%3E%3Cpath d='M96 12 C94 7 90 5 85 5 C87 9 90 11 96 12 Z'/%3E%3Cpath d='M110 12 C108 17 104 19 99 19 C101 15 104 13 110 12 Z'/%3E%3C/g%3E%3Ccircle cx='70' cy='12' r='2.2' fill='%23c49e65'/%3E%3Ccircle cx='6' cy='12' r='1.6' fill='%23c49e65'/%3E%3Ccircle cx='134' cy='12' r='1.6' fill='%23c49e65'/%3E%3C/svg%3E");
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

[hidden] {
  display: none !important;
}

.bg-ornament {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--color-border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.35;
  z-index: -1;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-accent);
}

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
}

.hero-subtitle {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.hero-ampersand {
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent);
  padding: 0 4px;
}

.hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  box-shadow: var(--shadow-sm);
}

.hero-date-badge svg {
  color: var(--color-accent);
  flex-shrink: 0;
}

.countdown-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 16px 0 28px;
}

.countdown-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  min-width: 72px;
  box-shadow: var(--shadow-sm);
}

.countdown-number {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.countdown-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* Hero with a photo slideshow behind it */
.hero.has-photos {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: calc(100vh - 52px);
  min-height: calc(100svh - 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 64px;
  background: var(--color-primary);
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero.has-photos .hero-slides::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(28, 34, 30, 0.25) 0%, rgba(28, 34, 30, 0.15) 40%, rgba(28, 34, 30, 0.55) 100%),
    rgba(28, 34, 30, 0.2);
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.6s ease, transform 7s ease-out;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero.has-photos .hero-content {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero.has-photos .hero-subtitle {
  color: #f3e3c6;
}

.hero.has-photos .hero-title {
  color: #ffffff;
  font-size: 4.25rem;
}

.hero.has-photos .hero-ampersand {
  color: #e2c492;
}

/* Frosted glass, so the photos show through */
.hero.has-photos .hero-date-badge,
.hero.has-photos .countdown-box {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero.has-photos .hero-date-badge {
  color: #ffffff;
}

.hero.has-photos .hero-date-badge svg {
  color: #e2c492;
}

.hero.has-photos .countdown-number {
  color: #ffffff;
}

.hero.has-photos .countdown-label {
  color: rgba(255, 255, 255, 0.82);
}

/* Browsers without blur support get a slightly darker tint instead, for readability */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero.has-photos .hero-date-badge,
  .hero.has-photos .countdown-box {
    background: rgba(28, 34, 30, 0.35);
  }
}

.hero.has-photos .btn-primary {
  text-shadow: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; transform: none; }
}

@media (max-width: 600px) {
  .hero { padding: 44px 16px 32px; }
  .hero.has-photos { padding: 64px 16px 48px; }
  .hero.has-photos .hero-title { font-size: 3rem; }
  .hero-title { font-size: 2.6rem; }
  .hero-subtitle { font-size: 0.75rem; letter-spacing: 0.18em; }
  .countdown-container { gap: 8px; }
  .countdown-box { min-width: 0; flex: 1; max-width: 76px; padding: 10px 6px; }
  .countdown-number { font-size: 1.5rem; }
  .countdown-label { font-size: 0.62rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 83, 68, 0.25);
}

/* ---------- Section nav ---------- */
.section-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(252, 251, 249, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 32px;
}

.section-nav-inner {
  display: flex;
  gap: 6px;
  max-width: 860px;
  margin: 0 auto;
  padding: 10px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: safe center;
}

.section-nav-inner::-webkit-scrollbar {
  display: none;
}

.section-nav a {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.section-nav a:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.section-nav a[aria-current] {
  background: var(--color-primary);
  color: #ffffff;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px;
  margin-bottom: 32px;
}

.card-header {
  text-align: center;
  margin-bottom: 26px;
}

.card-title {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 4px;
}

@media (max-width: 600px) {
  .card-title { font-size: 1.75rem; }
}

.card-title::after {
  content: '';
  display: block;
  width: 112px;
  height: 20px;
  margin: 6px auto 2px;
  background: var(--sprig) center / contain no-repeat;
}

/* Spaced capitals, like the printed stationery */
.card-subtitle {
  color: var(--color-accent);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-top: 4px;
}

.card-subtitle a {
  color: inherit;
}

.intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 36px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.loading {
  text-align: center;
  color: var(--color-text-light);
  padding: 40px 0;
}

/* ---------- Text written in content.md ---------- */
.prose {
  color: var(--color-text);
  font-size: 0.98rem;
}

.prose > * + * {
  margin-top: 14px;
}

.card .prose > p,
.card .prose > ul:not(.timeline),
.card .prose > ol {
  text-align: center;
}

.prose ul:not(.timeline),
.prose ol {
  list-style-position: inside;
}

.prose a {
  font-weight: 600;
  border-bottom: 1px solid rgba(196, 158, 101, 0.4);
}

.prose strong {
  font-weight: 600;
  color: var(--color-primary);
}

.prose h3 {
  font-size: 1.4rem;
  color: var(--color-primary);
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 24px auto;
  width: 60%;
}

.prose blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 4px 0 4px 16px;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: left;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.prose th, .prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

/* Timeline: a list where every item starts with **bold** */
.timeline {
  list-style: none;
  /* One shared column for the dates so every dot and line segment lines up */
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 22px;
  width: fit-content;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.timeline li {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
}

/* Older browsers: fixed-width date column */
@supports not (grid-template-columns: subgrid) {
  .timeline li {
    grid-template-columns: 136px 1fr;
    column-gap: 22px;
  }
}

.timeline-time {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-accent);
  text-align: right;
  line-height: 1.3;
  padding: 12px 0;
  white-space: nowrap;
}

.timeline-desc {
  position: relative;
  color: var(--color-text);
  padding: 12px 0 12px 24px;
  border-left: 2px solid var(--color-primary-soft);
}

/* the dot on the line */
.timeline-desc::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
}

.timeline li:last-child .timeline-desc::before {
  background: var(--color-accent);
}

.timeline-desc img {
  margin: 10px 0 0;
  max-height: 260px;
  width: auto;
}

@media (max-width: 520px) {
  .timeline { display: block; width: auto; }
  .timeline li { display: grid; grid-template-columns: 1fr; }
  .timeline-time {
    text-align: left;
    padding: 12px 0 0 24px;
    border-left: 2px solid var(--color-primary-soft);
    white-space: normal;
  }
  .timeline-desc { padding-top: 2px; }
  .timeline-desc::before { top: -16px; }
}

/* Slideshow: two or more pictures in a row */
.carousel {
  position: relative;
  margin-left: auto;
  margin-right: auto;
  max-width: 680px;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  box-shadow: var(--shadow-sm);
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0;
}

.prose .carousel-slide img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.carousel-slide figcaption {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-primary);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.carousel-btn {
  position: absolute;
  top: calc(50% - 14px);
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.carousel-btn:hover {
  background: var(--color-surface);
  color: var(--color-accent);
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dot[aria-current="true"] {
  width: 22px;
  background: var(--color-accent);
}

@media (max-width: 520px) {
  .carousel-btn { width: 34px; height: 34px; }
  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }
}

/* Small cards: ### headings that aren't questions */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.detail-item {
  background: var(--color-surface-soft);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.detail-item h4 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.detail-item p,
.detail-item li {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.detail-item > * + * {
  margin-top: 8px;
}

.detail-item ul,
.detail-item ol {
  list-style-position: inside;
}

.prose .detail-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin: 4px 0 12px;
  background: var(--color-surface);
}

/* FAQ: ### headings ending with ? */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: var(--transition);
}

.faq-item[open] {
  background: var(--color-surface-soft);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 48px 16px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--color-text);
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-accent);
  transition: var(--transition);
}

.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-item summary:hover {
  color: var(--color-primary);
}

.faq-answer {
  padding: 0 20px 18px;
  color: var(--color-text-muted);
  font-size: 0.93rem;
}

.faq-answer > * + * {
  margin-top: 10px;
}

/* ---------- Footer ---------- */
footer {
  margin-top: auto;
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-light);
  font-size: 0.88rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer-sprig {
  width: 140px;
  height: 24px;
  margin: 0 auto 14px;
  background: var(--sprig) center / contain no-repeat;
  opacity: 0.85;
}

.footer-contact {
  margin-top: 4px;
  font-size: 0.78rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Scroll cue at the bottom of the header ---------- */
.scroll-cue {
  display: none;
}

.hero.has-photos .scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  animation: cueBob 2.4s ease-in-out infinite;
}

.hero.has-photos .scroll-cue:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

@keyframes cueBob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* ---------- Slideshow: click a photo to open the larger gallery ---------- */
.carousel-slide img {
  cursor: zoom-in;
}

.carousel-expand {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.carousel-expand:hover {
  color: var(--color-accent);
}

/* ---------- Gallery view ---------- */
.gallery-view {
  width: min(1100px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 20px 20px 16px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.gallery-view[open] {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: galleryIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-view::backdrop {
  background: rgba(28, 34, 30, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.gallery-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-close:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.gallery-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 0;
  flex: 1;
}

.gallery-figure {
  flex: 1;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.gallery-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 230px);
  max-height: calc(100dvh - 230px);
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
}

.gallery-figure figcaption {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
  text-align: center;
}

.gallery-nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-nav:hover {
  background: var(--color-primary-soft);
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  justify-content: safe center;
  padding: 2px;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 54px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  background: var(--color-surface-soft);
  transition: var(--transition);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb:hover {
  opacity: 1;
}

.gallery-thumb[aria-current="true"] {
  opacity: 1;
  border-color: var(--color-accent);
}

@keyframes galleryIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
  .gallery-view { padding: 52px 12px 12px; }
  .gallery-stage { position: relative; }
  .gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.9);
  }
  .gallery-prev { left: 6px; }
  .gallery-next { right: 6px; }
  .gallery-thumb { width: 56px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero.has-photos .scroll-cue { animation: none; }
  .gallery-view[open] { animation: none; }
}

/* ---------- Timeline with photos (alternating sides) ----------
   Used automatically when any timeline entry contains a photo. */
.timeline.timeline-photos {
  display: block;
  width: auto;
  max-width: 760px;
  position: relative;
  padding: 6px 0;
}

/* the centre line */
.timeline-photos::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--color-primary-soft);
}

.timeline-photos li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 48px 1fr;
  align-items: center;
  padding: 18px 0;
}

.timeline-photos .timeline-media {
  grid-column: 1;
  grid-row: 1;
}

.timeline-photos .timeline-dot {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
  box-shadow: 0 0 0 5px var(--color-surface);
}

.timeline-photos li:last-child .timeline-dot {
  background: var(--color-accent);
}

.timeline-photos .timeline-body {
  grid-column: 3;
  grid-row: 1;
  text-align: left;
}

/* every other entry swaps sides */
.timeline-photos li:nth-child(even) .timeline-media {
  grid-column: 3;
}

.timeline-photos li:nth-child(even) .timeline-body {
  grid-column: 1;
  text-align: right;
}

.timeline-photos .timeline-time {
  display: block;
  padding: 0;
  border-left: none;
  text-align: inherit;
  white-space: normal;
  font-size: 1.35rem;
  margin-bottom: 2px;
}

.timeline-photos .timeline-desc {
  display: block;
  padding: 0;
  border-left: none;
  color: var(--color-text-muted);
}

.timeline-photos .timeline-desc::before {
  content: none;
}

.prose .timeline-photos .timeline-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: none;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 40%;
  margin: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  cursor: zoom-in;
  transition: var(--transition);
}

.prose .timeline-photos .timeline-media img:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(44, 50, 46, 0.14);
}

/* Phones: line on the left, photo under the caption */
@media (max-width: 640px) {
  .timeline-photos::before {
    left: 8px;
  }

  .timeline-photos li,
  .timeline-photos li:nth-child(even) {
    grid-template-columns: 16px 1fr;
    column-gap: 16px;
    align-items: start;
    padding: 14px 0;
  }

  .timeline-photos .timeline-dot {
    grid-column: 1;
    grid-row: 1;
    margin-top: 6px;
  }

  .timeline-photos .timeline-body,
  .timeline-photos li:nth-child(even) .timeline-body {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
  }

  .timeline-photos .timeline-media,
  .timeline-photos li:nth-child(even) .timeline-media {
    grid-column: 2;
    grid-row: 2;
    margin-top: 12px;
  }

  .timeline-photos .timeline-media.is-empty {
    display: none;
  }
}

/* ---------- Pages ---------- */

/* Home page: a tile for each section */
.home-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.home-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 24px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  transition: var(--transition);
}

.home-tile:hover {
  color: var(--color-text);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.home-tile:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.home-tile-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary);
}

.home-tile-title::after {
  content: '';
  display: block;
  width: 96px;
  height: 18px;
  margin: 8px auto 4px;
  background: var(--sprig) center / contain no-repeat;
}

.home-tile-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
}

.home-tile-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-light);
  transition: var(--transition);
}

.home-tile:hover .home-tile-more {
  color: var(--color-primary);
  gap: 10px;
}

/* Previous / next links at the bottom of each page */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  max-width: 48%;
  transition: var(--transition);
}

.pager-link:hover {
  background: var(--color-surface-soft);
}

.pager-next {
  text-align: right;
  margin-left: auto;
}

.pager-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-light);
}

.pager-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* Fade in when switching pages */
.page-enter {
  animation: fadeIn 0.45s ease;
}

@media (max-width: 600px) {
  .home-tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .home-tile { padding: 22px 12px 16px; }
  .home-tile-title { font-size: 1.35rem; }
  .home-tile-title::after { width: 72px; height: 14px; }
  .home-tile-subtitle { font-size: 0.62rem; letter-spacing: 0.14em; }
  .home-tile-more { padding-top: 12px; font-size: 0.78rem; }
  .pager-link { padding: 8px 10px; }
  .pager-title { font-size: 1.1rem; }
}

@media (max-width: 360px) {
  .home-tiles { grid-template-columns: 1fr; }
}

/* ---------- Roster boxes (e.g. Wedding Party) ----------
   A "### Name" box containing "#### Group" headings and lists of names. */
.details-grid.roster-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-item.is-roster {
  padding: 28px 22px;
}

.detail-item.is-roster .detail-title {
  font-size: 1.9rem;
  margin-bottom: 0;
}

.detail-item.is-roster .detail-title::after {
  content: '';
  display: block;
  width: 96px;
  height: 18px;
  margin: 6px auto 0;
  background: var(--sprig) center / contain no-repeat;
}

.prose .detail-item.is-roster h4:not(.detail-title) {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  margin: 22px 0 6px;
}

.detail-item.is-roster ul {
  list-style: none;
  margin-top: 0;
}

.detail-item.is-roster li {
  font-size: 0.98rem;
  color: var(--color-text);
  padding: 3px 0;
}

.detail-item.is-roster li em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

@media (max-width: 600px) {
  .details-grid.roster-grid { gap: 10px; }
  .detail-item.is-roster { padding: 20px 10px; }
  .detail-item.is-roster .detail-title { font-size: 1.5rem; }
  .detail-item.is-roster .detail-title::after { width: 72px; height: 14px; }
  .detail-item.is-roster li { font-size: 0.88rem; }
}
