/* ==========================================================================
   The letter column
   ========================================================================== */

main {
  max-width: clamp(42rem, 60vw, 62rem);
  margin: 0 auto;
  padding: 4rem 3rem 4.5rem;
}

.section { scroll-margin-top: 2.5rem; }
.section + .section { margin-top: 4rem; }

/* stamped divider above each section heading — the couple's own bootis,
   banana tree and pink flower alternating, running the full width to mark
   where a new section begins */
.section + .section::before {
  content: "";
  display: block;
  height: 24px;
  width: 100%;
  margin: 0 0 1.4rem;
  background: url('../images/booti-strip.png') repeat-x left center / 65px 24px;
}

.section h2 {
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.9rem;
}
.section-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--pink-deep);
  margin-bottom: 1.8rem;
}

.section h3 {
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--ink);
  margin: 2rem 0 0.4rem;
}

.section p { margin: 0.65rem 0; }
.section ul { padding-left: 1.1rem; margin: 0.5rem 0; }
.section li { margin: 0.4rem 0; }
.section li::marker { color: var(--pink); }

/* a note in the margin */
.aside {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.04rem;
  color: var(--pink-deep);
  border-left: 2px solid var(--sage);
  padding: 0.1rem 0 0.1rem 0.95rem;
  margin: 0.9rem 0;
}

/* museum-label caption */
.caption {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-variant-numeric: lining-nums; /* full-height digits beside the capitals */
}

/* ---------- The opening letter ---------- */

.letter .letter-place { margin-bottom: 1.5rem; color: var(--pink); }
.letter h2 {
  font-size: clamp(1.7rem, 4.5vw, 2.2rem);
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 1.2rem;
}
.letter p { font-family: var(--serif); font-size: 1.18rem; line-height: 1.62; margin: 0.9rem 0; }
.letter .personal-note {
  font-style: italic;
  color: var(--pink-deep);
  border-left: 2px solid var(--sage);
  padding-left: 1rem;
}
.letter .countdown {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--sage-deep);
  margin-top: 1.5rem;
}
.letter .signoff { font-size: 1.25rem; font-style: italic; margin-top: 1.8rem; }
.sig-names { font-family: var(--names); font-style: normal; font-size: 1.5rem; }
.signoff-swallow { width: 4.2rem; height: auto; display: block; margin: 1rem 0 0 0.2rem; }
.letter .ps {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--hairline);
}
.letter .ps + .ps { margin-top: 0.5rem; padding-top: 0; border-top: none; }

/* ---------- The gallery: two walls of miniature folios ---------- */

.wall { margin-top: 2.6rem; }
.day-name {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--pink-deep);
  margin-bottom: 1.4rem;
  padding-bottom: 0.5rem;
  background: var(--brush) no-repeat left bottom / 11rem 0.55rem;
}
.day-name span { color: var(--ink-soft); font-size: 1rem; font-style: italic; }

.wall-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 2.4rem 2rem;
  align-items: start;
}
/* works hang at slightly uneven heights, as on a real wall */
.wall-row .artwork:nth-child(even) { margin-top: 1.5rem; }

.artwork { margin: 0; }

.frame {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  transition: transform 0.18s ease;
  will-change: transform;
}
.frame .folio {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 1px 2px rgba(58, 53, 44, 0.28), 0 14px 28px rgba(58, 53, 44, 0.22);
  transition: box-shadow 0.2s ease;
}
.frame:hover .folio { box-shadow: 0 2px 4px rgba(58, 53, 44, 0.3), 0 22px 44px rgba(58, 53, 44, 0.3); }
.frame:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; }

.wall-label { margin-top: 0.9rem; }
.wall-label h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.wall-label .caption { margin: 0.2rem 0 0; }
.label-no {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid #c9a24b;
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--sage-deep);
}
.event-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sage-deep);
  margin-top: 0;
  min-height: 2.75rem;
  padding: 0.1rem 0 0.65rem;
  border: none;
  background: transparent;
  cursor: pointer;
  text-underline-offset: 0.25em;
}
.event-more:hover { color: var(--ink); text-decoration: underline; }
.event-more:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.event-more-icon { flex: none; width: 0.85rem; height: 0.85rem; }

/* ---------- The catalog (look-closer dialog) ---------- */

.catalog {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadein 0.25s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.catalog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 38, 30, 0.62);
  backdrop-filter: blur(3px);
}
.catalog-panel {
  position: relative;
  width: min(38rem, 100%);
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--paper-deep);
  background-image: var(--grain);
  border-radius: 1.5rem;
  box-shadow: 0 24px 80px rgba(20, 18, 12, 0.35);
}
.catalog-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3.5rem 2rem 1.5rem;
}
.catalog-art { width: min(18rem, 72vw); margin: 0 auto; }
.catalog-art .folio { display: block; width: 100%; height: auto; box-shadow: 0 10px 24px rgba(58, 53, 44, 0.2); }
/* A quiet credit underneath the painting, aligned to its right edge. */
.art-plaque {
  margin: 0.5rem 0 0;
  text-align: right;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-soft);
}
.catalog-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.7rem;
  line-height: 1;
  background: var(--paper-deep);
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.catalog-close:hover { color: var(--pink-deep); }
.catalog-info {
  max-width: 30rem;
  margin: 1.5rem auto 0;
  text-align: center;
}
.catalog-info h3 { margin: 0 0 0.6rem; font-size: 1.7rem; line-height: 1.3; }
.catalog-info .desc { margin: 0.9rem 0 1.1rem; font-size: 1.02rem; color: var(--ink); }
.catalog-info .quote { margin-top: 1rem; }
.catalog-info .aside { margin-top: 0.3rem; border: none; padding: 0; }
.catalog-nav {
  flex: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  padding: 0.8rem 1rem max(0.8rem, env(safe-area-inset-bottom));
  background-color: var(--paper-deep);
  background-image: var(--grain);
  border-top: 1px solid var(--hairline);
}
.catalog-nav button {
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: var(--paper);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.catalog-nav button:hover { color: var(--pink-deep); background: var(--paper-deep); }
.catalog-close:focus-visible, .catalog-nav button:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

/* Desktop: two facing pages, separated by a quiet central rule. */
@media (min-width: 841px) {
  .catalog-panel { width: min(68rem, 100%); }
  .catalog-scroll {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    padding: 3.5rem 2.5rem 2rem;
  }
  .catalog-art {
    width: min(23rem, 100%);
    padding-right: 2rem;
  }
  .catalog-info {
    align-self: stretch;
    max-width: none;
    margin: 0;
    padding: 0.5rem 0 0.5rem 2rem;
    border-left: 1px solid var(--hairline);
    text-align: left;
  }
}

/* a line from the shelf */
.quote { margin: 0.9rem 0 0.2rem; }
.quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}
.quote .caption { margin-top: 0.25rem; }

/* ---------- The fort plan ---------- */

.venue-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin-top: 0.6rem;
}
.venue-map-wrap { position: relative; }
.venue-map-img {
  display: block;
  width: 100%;
  height: auto;
  filter: contrast(0.82) saturate(0.9) drop-shadow(0 1px 2px rgba(58, 53, 44, 0.28)) drop-shadow(0 14px 28px rgba(58, 53, 44, 0.2));
}
.venue-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  color: #fbf6e9;
  transition: transform 0.15s ease;
  outline: none;
}
.venue-pin.lit { transform: translate(-50%, -50%) scale(1.35); z-index: 5; box-shadow: 0 0 0 3px #3a352c; }
.pin-event {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #e23a5e;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(20, 18, 12, 0.45);
}
.pin-room {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #5b9bd5;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(20, 18, 12, 0.45);
}
.pin-service {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 3px;
  background: #fff;
  border: 2px solid #1a1a1a;
  box-shadow: 0 2px 5px rgba(20, 18, 12, 0.45);
}
.pin-service svg { width: 68%; height: 68%; }

.venue-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem 2rem;
}
.legend-group { min-width: 0; }
.venue-legend h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.venue-legend ul { list-style: none; padding: 0; margin: 0; }
.venue-legend li {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  padding: 0.32rem 0.5rem;
  margin: 0;
  border-radius: 2px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.venue-legend li.lit { background: rgba(209, 92, 114, 0.10); }
.legend-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  transform: translateY(0.2rem);
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  color: #fbf6e9;
}
.chip-event { background: #e23a5e; border-radius: 50%; }
.chip-room { background: #5b9bd5; border-radius: 50%; }
.chip-service { background: #fff; border: 1.5px solid #1a1a1a; border-radius: 3px; }

/* ---------- Weather ---------- */

.weather-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.4rem, 1fr));
  gap: 0.7rem;
  margin-top: 1.1rem;
}
.weather-day {
  text-align: center;
  background: var(--card);
  border: 1px solid rgba(138, 90, 68, 0.55);
  box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 3px rgba(201, 162, 75, 0.55);
  border-radius: 2px;
  padding: 0.9rem 0.3rem 0.75rem;
  font-size: 0.76rem;
  color: var(--ink-soft);
}
.weather-day .wicon { font-size: 1.45rem; margin: 0.15rem 0; }
.weather-day .temps { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--sage-deep); }
.weather-note { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.8rem; }

/* ---------- The packing list ---------- */

.pack-list { list-style: none; padding: 0; margin-top: 1.2rem; }
.pack-list label {
  display: flex;
  gap: 0.85rem;
  align-items: baseline;
  padding: 0.5rem 0.2rem;
  border-bottom: 1px dashed var(--hairline);
  cursor: pointer;
}
.pack-list input[type="checkbox"] {
  appearance: none;
  flex: none;
  width: 1rem;
  height: 1rem;
  transform: translateY(0.12rem);
  border: 1.5px solid var(--sage-deep);
  border-radius: 1px;
  cursor: pointer;
  position: relative;
}
.pack-list input[type="checkbox"]:checked { background: var(--pink); border-color: var(--pink); }
.pack-list input[type="checkbox"]:checked::after {
  content: "✕";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--paper);
}
.pack-list input[type="checkbox"]:checked + span {
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 1px;
}
.pack-note { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.8rem; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: 2rem;
  padding: 2.6rem 3rem 3rem;
  background: #ad4666;
  color: rgba(246, 240, 225, 0.92);
}
.foot-swallow { width: 6rem; height: auto; margin: 0 auto 0.8rem; display: block; }
.site-footer p { font-family: var(--serif); font-size: 1.02rem; }

/* The bookmarkable venue page shares the invitation's map and palette. */
.venue-page-actions { display: flex; justify-content: flex-end; }
.venue-page-link { margin: 1rem 0 0; }
.fort-page { max-width: 70rem; padding: calc(4rem + env(safe-area-inset-top)) clamp(1rem, 4vw, 3rem) 4rem; }
.fort-page h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 1.5rem 0 0.9rem; }

.venue-link-mobile { display: none; }
