/* Color Palette: Soft, Warm, Reverent Neutral Tones */
:root {
  --bg-color: #f8f6f2;
  --card-bg: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --accent-color: #7a6855;
  --accent-light: #efebe4;
  --border-color: #e2ddd5;
  --font-family: Georgia, 'Times New Roman', serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: 1.7;
}

/* Header & Nav */
header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.3rem;
  color: var(--accent-color);
  font-weight: normal;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: color 0.2s ease;
}

nav a:hover, nav a.active {
  color: var(--accent-color);
  font-weight: bold;
}

/* Container */
.container {
  max-width: 850px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Cards */
.card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.card h2 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.8rem;
  border-bottom: 1px solid var(--accent-light);
  padding-bottom: 0.5rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background-color: var(--accent-light);
  border-bottom: 1px solid var(--border-color);
}

.hero-portrait {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--card-bg);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

.hero h2 {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: normal;
}

.hero h1 {
  font-size: 2.4rem;
  color: var(--accent-color);
  margin: 0.3rem 0;
}

.hero .dates {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.hero .quote {
  font-style: italic;
  color: var(--accent-color);
  max-width: 600px;
  margin: 0 auto;
}

/* Service Info */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.service-item {
  background: var(--bg-color);
  padding: 1.2rem;
  border-radius: 6px;
}

.service-item:only-child {
  grid-column: 1 / -1;
}

.service-item h3 {
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

/* Wake timeline */
.timeline {
  list-style: none;
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border-color);
}

.timeline li {
  position: relative;
  background: var(--bg-color);
  padding: 1.2rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 7px);
  top: 1.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-color);
  border: 2px solid var(--card-bg);
}

.timeline-date {
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.timeline h3 {
  color: var(--accent-color);
  margin-bottom: 0.4rem;
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background-color: var(--accent-color);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.95rem;
}

.btn:hover {
  opacity: 0.9;
}

.note-box {
  background: var(--accent-light);
  padding: 1rem;
  border-left: 4px solid var(--accent-color);
  border-radius: 4px;
}

/* Tribute Video */
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Photo Gallery Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.photo-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.photo-card .caption {
  padding: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Collage (masonry: photos keep their shape and stack into columns) */
.container-wide {
  max-width: 1200px;
}

.subtitle {
  color: var(--text-secondary);
}

.collage {
  columns: 4 220px;
  column-gap: 10px;
  margin-top: 1.5rem;
}

.collage-item {
  display: block;
  margin-bottom: 10px;
  break-inside: avoid;
  border-radius: 6px;
  overflow: hidden;
  background: var(--accent-light);
}

.collage-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease, opacity 0.2s ease;
}

.collage-item:hover img {
  transform: scale(1.03);
}

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

/* Full-screen photo viewer */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 16, 12, 0.94);
}

.lightbox::backdrop {
  background: rgba(20, 16, 12, 0.94);
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }

.lightbox-count {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* Padlet memory wall */
.padlet-embed {
  margin-top: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  background: #f4f4f4;
}

.padlet-embed iframe {
  display: block;
  width: 100%;
  height: max(500px, 75vh);
  border: 0;
}

.embed-fallback {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.embed-fallback a {
  color: var(--accent-color);
}

/* Memory Wall & Recipe */
.wisdom-list {
  padding-left: 1.5rem;
}

.wisdom-list li {
  margin-bottom: 0.8rem;
  font-style: italic;
  font-size: 1.1rem;
}

.recipe-box {
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: 6px;
  margin-top: 1rem;
}

.recipe-box h4 {
  margin: 1rem 0 0.5rem;
  color: var(--accent-color);
}

.recipe-box ul, .recipe-box ol {
  padding-left: 1.5rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .header-container {
    flex-direction: column;
    gap: 0.8rem;
  }
  .service-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .card {
    padding: 1.5rem;
  }
  .container-wide .card {
    padding: 1.5rem 0.75rem;
  }
  .collage {
    columns: 2;
    column-gap: 6px;
  }
  .collage-item {
    margin-bottom: 6px;
  }
  .lightbox-prev, .lightbox-next {
    top: auto;
    bottom: 8px;
    transform: none;
  }
}