/* Reset and base */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
  color: #333;
  background: #e8e4df;
}

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  min-height: 400px;
  background: #2c70b7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  scroll-snap-align: start;
}

.hero__logo {
  position: relative;
  z-index: 1;
  max-width: 280px;
  width: 60%;
  height: auto;
}

.hero__cloud {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  transition: none;
}

.hero__cloud--1 {
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  /* Placeholder: replace with actual cloud-big.png */
  width: min(90vw, 600px);
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}

.hero__cloud--2 {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
  /* Placeholder: replace with actual cloud-wide.png */
}

/* Form section: same bg as hero, static clouds, form in a card */
.form-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #2c70b7;
  padding: 3rem 1.5rem;
  overflow: hidden;
}

.form-section__cloud {
  position: absolute;
  pointer-events: none;
  opacity: 0.85;
}

.form-section__cloud--1 {
  top: 15%;
  right: 5%;
  width: min(50vw, 320px);
  height: auto;
  max-height: 40vh;
  object-fit: contain;
}

.form-section__cloud--2 {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 50%;
  object-fit: cover;
  object-position: bottom;
}

.form-section__card {
  position: relative;
  z-index: 1;
}

/* Paper cards */
.paper-card {
  max-width: 640px;
  margin: 2rem auto;
  padding: 2rem;
  background: #faf8f5;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.paper-card__title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: #5a524a;
}

.paper-card p {
  margin: 0.5rem 0;
}

.paper-card a {
  color: #2c70b7;
  text-decoration: none;
}

.paper-card a:hover {
  text-decoration: underline;
}

/* Obituary section: full viewport, white (same height as hero) */
.obituary-section {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  scroll-snap-align: start;
}

.obituary-section__inner {
  max-width: 560px;
  width: 100%;
  text-align: center;
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Prayer / symbol line */
.obituary-section__prayer {
  font-size: 0.9375rem;
  color: #5c5c5c;
  margin: 0 0 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

.obituary-section__prayer[hidden] {
  display: none;
}

/* Full name – main heading */
.obituary-section__name {
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.5rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Dates under name */
.obituary-section__dates {
  font-size: 1rem;
  color: #6b6b6b;
  margin: 0 0 1.75rem;
  font-weight: 400;
}

.obituary-section__dates[hidden] {
  display: none;
}

/* Photo box: placeholder or image */
.obituary-section__photo-box {
  margin: 0 auto 1.75rem;
  position: relative;
}

.obituary-section__photo-placeholder {
  width: 160px;
  height: 200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #f2f0ed;
  border: 2px dashed #c9c4bd;
  border-radius: 10px;
  color: #9a958e;
}

.obituary-section__photo-placeholder[hidden] {
  display: none;
}

.obituary-section__photo-placeholder-icon {
  font-size: 2rem;
  line-height: 1;
  opacity: 0.7;
}

.obituary-section__photo-placeholder-text {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.obituary-section__photo {
  max-width: 200px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.obituary-section__photo[hidden] {
  display: none;
}

/* Main paragraph – body text */
.obituary-section__message {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #2d2d2d;
  text-align: left;
  white-space: pre-wrap;
  margin: 0;
}

.obituary-section__message p {
  margin: 0 0 1em;
}

.obituary-section__message p:last-child {
  margin-bottom: 0;
}

/* Ceremony section: full viewport, beige (same height as hero & obituary) */
.ceremony-section {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  background: #e8e4df;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  scroll-snap-align: start;
}

.ceremony-section__inner {
  max-width: 560px;
  width: 100%;
  text-align: center;
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ceremony-section__heading {
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  font-weight: 600;
  color: #3d3935;
  margin: 0 0 2.25rem;
  line-height: 1.35;
}

.ceremony-section__block {
  margin-bottom: 2rem;
  text-align: left;
}

.ceremony-section__block:last-of-type {
  margin-bottom: 1.75rem;
}

.ceremony-section__block-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
}

.ceremony-section__block-subtitle {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #2d2d2d;
  margin: 0 0 0.75rem;
}

.ceremony-section__block-subtitle[hidden] {
  display: none;
}

.ceremony-section__block-line {
  font-size: 1rem;
  color: #444;
  margin: 0 0 0.25rem;
  line-height: 1.5;
}

.ceremony-section__block-address {
  font-size: 1rem;
  color: #444;
  margin: 0 0 0.5rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ceremony-section__map-link {
  font-size: 0.9375rem;
  color: #2c70b7;
  text-decoration: none;
}

.ceremony-section__map-link:hover {
  text-decoration: underline;
}

.ceremony-section__map-link[hidden] {
  display: none;
}

.ceremony-section__closing {
  font-size: 1rem;
  color: #5a554e;
  font-style: italic;
  margin: 1.5rem 0 0;
  text-align: center;
  line-height: 1.5;
}

.ceremony-section__closing[hidden] {
  display: none;
}

/* Form */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  color: #444;
}

.form-group label .optional {
  font-weight: normal;
  color: #777;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="url"],
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2c70b7;
  box-shadow: 0 0 0 2px rgba(44, 112, 183, 0.2);
}

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

.form-actions button {
  padding: 0.75rem 1.5rem;
  font: inherit;
  font-size: 1rem;
  background: #2c70b7;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.form-actions button:hover {
  background: #236099;
}

.form-error {
  color: #b33;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.form-error[hidden] {
  display: none;
}

.form-success {
  margin-top: 1rem;
  padding: 1rem;
  background: #e8f5e9;
  border-radius: 8px;
  color: #2e7d32;
}

.form-success[hidden] {
  display: none;
}

.form-success .generated-link-row,
.generated-link-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
}

.form-success input.readonly-link {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

/* Announcement page error */
.announcement-error {
  max-width: 640px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff8f8;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  color: #b33;
}

.announcement-error[hidden] {
  display: none;
}

#announcement-content[hidden] {
  display: none;
}

/* Section spacing */
section {
  padding: 1rem;
}

@media (min-width: 640px) {
  .paper-card {
    padding: 2.5rem;
    margin: 3rem auto;
  }
}
