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

.page {
  min-height: 100vh;
  background: radial-gradient(ellipse at top, #FDFBF7 0%, #FAF6EE 45%, #F3ECDF 100%);
  font-family: 'Nunito', sans-serif;
  color: #4A4438;
  line-height: 1.7;
}

h1, h2, h3 { font-family: 'Quicksand', sans-serif; font-weight: 600; color: #3E3928; letter-spacing: 0.01em; }

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 20px 10px;
}
.header-title {
  font-weight: 600;
  color: #6B6350;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 24px 10px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 8px; }
}

.hero-photo-wrap { position: relative; justify-self: center; }
.hero-photo-wrap::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: linear-gradient(160deg, #EFE7D4, #E3D9C4);
  z-index: 0;
}
.hero-photo {
  position: relative;
  width: 240px;
  height: 295px;
  border-radius: 46% 54% 52% 48% / 52% 48% 52% 48%;
  overflow: hidden;
  box-shadow: 0 18px 40px -14px rgba(78, 68, 48, 0.35);
  z-index: 1;
  border: 6px solid #FDFBF6;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-text .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8B9878;
  font-weight: 700;
  margin-bottom: 10px;
}
.hero-text h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 16px; line-height: 1.25; }
.hero-text p { color: #5C5646; font-size: 1.02rem; margin: 0 0 14px; }
.hero-text p:last-of-type { margin-bottom: 24px; }

.cta-btn {
  border: none;
  background: linear-gradient(135deg, #A8B693, #92A17C);
  color: #FDFBF6;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 28px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(120, 133, 96, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(120, 133, 96, 0.6); }
.cta-btn:focus-visible { outline: 3px solid #C9BFA8; outline-offset: 3px; }

.gallery-strip {
  max-width: 900px;
  margin: 8px auto 0;
  padding: 20px 24px 0;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #FDFBF6;
  box-shadow: 0 8px 18px -10px rgba(78, 68, 48, 0.4);
  opacity: 0.95;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.divider-wrap { max-width: 640px; margin: 30px auto; padding: 0 24px; }

.count-badge { display: flex; justify-content: center; margin: 0 auto 8px; }
.count-badge span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #F3EDE0;
  border: 1px solid #E4DAC5;
  color: #6B6350;
  font-size: 0.85rem;
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 600;
}

.section { max-width: 720px; margin: 0 auto; padding: 0 24px 60px; }
.section-title { text-align: center; font-size: 1.4rem; margin: 0 0 8px; }
.section-sub { text-align: center; color: #7A7361; font-size: 0.95rem; margin: 0 0 32px; }

.memory-form {
  background: #F8F3E8;
  border: 1px solid #E9E0CC;
  border-radius: 28px;
  padding: 30px 28px;
  box-shadow: 0 20px 44px -28px rgba(78, 68, 48, 0.4);
}
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; }
.form-row label {
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: #5C5646;
  margin-bottom: 7px;
}
.form-row label span { font-weight: 400; color: #9A927D; font-size: 0.82rem; }
.form-row input[type="text"],
.form-row textarea {
  font-family: 'Nunito', sans-serif;
  font-size: 0.98rem;
  border: 1.5px solid #E2D8C1;
  background: #FDFBF6;
  border-radius: 16px;
  padding: 12px 16px;
  color: #4A4438;
  resize: vertical;
}
.form-row input[type="text"]:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #AEBB99;
  box-shadow: 0 0 0 3px rgba(174, 187, 153, 0.25);
}
.form-row input[type="file"] { font-size: 0.85rem; color: #7A7361; }

.photo-preview { margin-top: 12px; display: flex; align-items: center; gap: 12px; }
.photo-preview img { width: 68px; height: 68px; object-fit: cover; border-radius: 14px; border: 1px solid #E2D8C1; }
.photo-preview button { border: none; background: none; color: #A17C5B; font-size: 0.82rem; text-decoration: underline; cursor: pointer; }

.form-status { font-size: 0.88rem; margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; }
.form-status.error { background: #F6E7DE; color: #9C5B3C; }
.form-status.success { background: #EAF0E1; color: #5E7548; }

.submit-btn {
  width: 100%;
  border: none;
  background: linear-gradient(135deg, #A8B693, #92A17C);
  color: #FDFBF6;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: opacity 0.18s ease;
}
.submit-btn:disabled { opacity: 0.6; cursor: default; }
.submit-btn:focus-visible { outline: 3px solid #C9BFA8; outline-offset: 3px; }

.memories-section { max-width: 860px; }
.memories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.memory-card {
  background: #FDFBF6;
  border: 1px solid #EDE5D2;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 14px 30px -22px rgba(78, 68, 48, 0.35);
  display: flex;
  flex-direction: column;
}
.memory-photo { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; }
.memory-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.memory-body { padding: 18px 20px 20px; }
.memory-text { font-size: 0.96rem; color: #4A4438; margin: 0 0 14px; white-space: pre-wrap; }

.memory-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.memory-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6E7D5B;
  background: #EEF0E5;
  border: 1px solid #DEE4D0;
  padding: 5px 11px;
  border-radius: 999px;
  text-decoration: none;
  font-family: 'Quicksand', sans-serif;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memory-link:hover { background: #E4E9D8; }

.memory-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: #9A927D; }
.memory-name { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: #6E7D5B; font-family: 'Quicksand', sans-serif; }

.empty-state, .loading-state, .error-state { text-align: center; color: #9A927D; padding: 40px 20px; font-size: 0.95rem; }

.footer { text-align: center; padding: 30px 20px 44px; color: #A9A18B; font-size: 0.82rem; }

@media (prefers-reduced-motion: reduce) {
  .cta-btn, .submit-btn { transition: none; }
}
