/* Memorial site – calm, minimal, readable */

:root {
  --color-bg: #fafaf9;
  --color-text: #1c1917;
  --color-text-muted: #57534e;
  --color-border: #e7e5e4;
  --color-accent: #44403c;
  --font-sans: system-ui, -apple-system, Segoe UI, sans-serif;
  --max-width: 42rem;
  --space: 1.5rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

/* Background video (memorial page) */
.has-hero-video {
  background: #1c1917;
}
.hero-video-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.has-hero-video .layout-main {
  position: relative;
  z-index: 1;
  background: rgba(250, 250, 249, 0.94);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.has-hero-video .memorial-header,
.has-hero-video .memorial-section,
.has-hero-video .memorial-footer {
  border-color: var(--color-border);
}

.layout-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space);
}

.memorial-header {
  text-align: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
}

.memorial-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-accent);
}

.memorial-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
}

.memorial-section:last-of-type {
  border-bottom: 0;
}

.memorial-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--color-accent);
}

.memorial-section p {
  margin: 0 0 0.75rem;
  color: var(--color-text);
}

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

.memorial-footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font: inherit;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: #fff;
}

.form-group textarea {
  min-height: 6rem;
  resize: vertical;
}

.form-actions {
  margin-top: 1.25rem;
}

.success {
  color: #166534;
  margin-bottom: 1rem;
}

.error {
  color: #b91c1c;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font: inherit;
  font-size: 0.9375rem;
  color: #fff;
  background: var(--color-accent);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.btn:hover {
  opacity: 0.9;
}

/* Tribute cards */
.tribute-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tribute-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.tribute-item:last-child {
  border-bottom: 0;
}

.tribute-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.tribute-message {
  white-space: pre-wrap;
  word-break: break-word;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space);
  list-style: none;
  padding: 0;
  margin: 0;
}

.gallery-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.gallery-caption {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Practical info links */
.practical-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.practical-links a {
  color: var(--color-accent);
  text-decoration: underline;
}

.practical-links a:hover {
  opacity: 0.8;
}

@media (min-width: 640px) {
  .layout-main {
    padding: 2rem;
  }
}
