:root {
  --bg: #faf7f2;
  --panel: #ffffff;
  --ink: #2f2a24;
  --muted: #6f665a;
  --accent: #8a7a5c;
  --line: #e7dfd2;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

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

.hero {
  text-align: center;
  padding: 3rem 1.25rem 2rem;
  background: linear-gradient(180deg, #f3ede3, var(--bg));
}
.hero__photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.hero__name { font-size: 2.6rem; margin: 0; letter-spacing: 0.02em; }
.hero__dates { color: var(--muted); margin: 0.25rem 0 0.75rem; font-size: 1.1rem; }
.hero__tagline { color: var(--accent); font-style: italic; margin: 0; }

main { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }

.section { padding: 2.5rem 0; border-top: 1px solid var(--line); }
.section h2 { font-size: 1.6rem; margin: 0 0 1rem; }

.story { margin-bottom: 1.5rem; }
.story h3 { margin: 0 0 0.25rem; color: var(--accent); }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.photo { margin: 0; }
.photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.photo img:hover { transform: scale(1.02); }
.photo figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; text-align: center; }

.lightbox {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1.5rem; cursor: zoom-out; z-index: 50;
}
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 8px; }
.lightbox p { color: #f3ede3; margin-top: 0.75rem; }

.guestbook__intro { color: var(--muted); margin-top: 0; }
.guestbook__form {
  display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.guestbook__form label { font-size: 0.9rem; color: var(--muted); }
.guestbook__form input,
.guestbook__form textarea {
  font: inherit; padding: 0.6rem 0.7rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fffdf9; color: var(--ink); resize: vertical;
}
.guestbook__form button {
  align-self: flex-start;
  font: inherit; cursor: pointer;
  background: var(--accent); color: #fff;
  border: none; border-radius: 8px;
  padding: 0.6rem 1.2rem;
}
.guestbook__form button:disabled { opacity: 0.6; cursor: default; }
.form-status, .guestbook__status { color: var(--muted); min-height: 1.2em; margin: 0.25rem 0 0; }

.entries { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.entry {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.entry__header { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.entry__name { font-weight: bold; }
.entry__date { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.entry__message { margin: 0.4rem 0 0; white-space: pre-wrap; }

.footer { text-align: center; color: var(--muted); padding: 2.5rem 1.25rem; font-style: italic; }

@media (max-width: 480px) {
  .hero__name { font-size: 2.1rem; }
  .hero__photo { width: 170px; height: 170px; }
}
