/* ==========================================================================
   Wedding site styles
   Look: white, gold, green and black (most used to least), laid out like
   planning/design-reference-IMG_4713.jpeg. Full-width photo with a split menu
   around a script monogram, script names, a big italic date, and photo/text
   sections with offset gold blocks.
   Fonts: Luxurious Script (script), Gilda Display (spaced capitals),
   Bodoni Moda Italic (date), Montserrat (menu, small capitals, body).
   ========================================================================== */

:root {
  /* Colors: white, gold, green and black, from most used to least */
  --white: #ffffff;
  --gold: #c2a063;          /* blocks and lines */
  --gold-deep: #a6834a;     /* gold lettering on white */
  --gold-light: #dcc28c;    /* gold lettering on green or over a photo */
  --green: #324b35;
  --black: #1c1b19;
  /* What each color is used for */
  --bg: var(--white);
  --ink: var(--black);
  --muted: #625d53;         /* small print */
  --line: #eadfc8;          /* pale gold hairlines */
  --on-dark: var(--white);  /* text on green or over a photo */
  --placeholder: #f5f0e6;   /* empty photo frames */
  /* the gap between sections: 32px on phones, growing to 48px on computers */
  --space: clamp(2rem, 4vw, 3rem);
  /* Travel & Stay map: soft green water, pale gold roads */
  --map-water: #e2eae3;
  --map-shore: #c3d2c6;
  --map-river: #bccdc0;
  --map-park: #edf2ec;
  --map-street: #eee6d6;
  --map-road: #dcc596;
  --map-water-label: #6c8873;
  --font-script: "Luxurious Script", "Snell Roundhand", cursive;
  --font-serif: "Gilda Display", Georgia, serif;
  --font-italic: "Bodoni Moda", Didot, Georgia, serif;
  --font-sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  /* distance from the screen edge to the content column */
  --edge: max(1rem, calc((100vw - 1100px) / 2));
}

/* Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main {
  overflow-x: clip;
}

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

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--green);
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Layout helpers
   ========================================================================== */

.wrap {
  width: min(100% - 2rem, 1100px);
  margin-inline: auto;
}

.wrap-narrow {
  width: min(100% - 2rem, 640px);
  margin-inline: auto;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--green);
  color: var(--on-dark);
}

.skip-link:focus {
  top: 1rem;
}

/* Placeholders: content we still need. Search the HTML for "tbd" to find them all. */
.tbd {
  padding: 0 0.15em;
  border-radius: 3px;
  background: #fff0b3;
  color: #3a3320;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.tbd-block {
  padding: 1rem 1.25rem;
  border: 1px dashed #d9bf5c;
  border-radius: 8px;
  background: #fff8d6;
  color: #3a3320;
}

/* Home: opening screen
   The gold crest on white blooms in from the middle, a glint of light passes over it, and the
   white slowly fades away to reveal the page. The script in index.html's <head> decides whether
   it plays (html.intro-on); main.js runs it (.intro-play, then .intro-leaving).
   ========================================================================== */

.intro {
  display: none;
}

.intro-on .intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg);
  /* safety net: if main.js never runs, the screen still clears itself */
  animation: intro-failsafe 0.8s ease 7s forwards;
}

.intro-crest {
  position: relative;
  width: min(76vw, 52vh);
  width: min(76vw, 52svh);
  opacity: 0;
}

.intro-crest img {
  width: 100%;
  height: auto;
}

/* The glint: light that shows only on the crest's gold lines */
.intro-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(222, 184, 96, 0.9) 43%, rgba(250, 226, 150, 1) 50%, rgba(222, 184, 96, 0.9) 57%, transparent 70%) 125% 0 / 300% 100% no-repeat;
  -webkit-mask: url("../images/crest-gold-large.png") center / 100% 100% no-repeat;
  mask: url("../images/crest-gold-large.png") center / 100% 100% no-repeat;
}

.intro-play .intro-crest {
  animation: intro-crest-in 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

/* The crest appears from the middle outwards: the OH first, then the frame */
.intro-play .intro-crest img {
  -webkit-mask: radial-gradient(closest-side, #000 72%, transparent) center / 0% 0% no-repeat;
  mask: radial-gradient(closest-side, #000 72%, transparent) center / 0% 0% no-repeat;
  animation: intro-bloom 2s cubic-bezier(0.5, 0, 0.3, 1) forwards;
}

.intro-play .intro-shine {
  animation: intro-shine 1.4s ease-in-out 1.2s forwards;
}

/* main.js adds .intro-leaving 2.8 seconds in */
.intro-leaving .intro {
  animation: intro-fade 1.4s ease-in-out forwards;
  pointer-events: none;
}

.intro-leaving .intro-crest img {
  animation: intro-bloom 2s cubic-bezier(0.5, 0, 0.3, 1) forwards, intro-grow 1.4s ease-in-out forwards;
}

/* Skipped with a tap or key press: clear the screen quickly */
.intro-skip .intro {
  animation-duration: 0.6s;
}

@keyframes intro-crest-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes intro-bloom {
  to {
    -webkit-mask-size: 260% 260%;
    mask-size: 260% 260%;
  }
}

@keyframes intro-shine {
  to {
    background-position: -25% 0;
  }
}

@keyframes intro-grow {
  to {
    transform: scale(1.06);
  }
}

@keyframes intro-fade {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes intro-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes intro-appear {
  to {
    opacity: 1;
  }
}

/* For people who turn off motion on their phone or computer: the crest simply appears, then fades */
@media (prefers-reduced-motion: reduce) {
  .intro-play .intro-crest {
    animation: intro-appear 0.5s ease forwards;
  }

  .intro-play .intro-crest img,
  .intro-leaving .intro-crest img {
    -webkit-mask: none;
    mask: none;
    animation: none;
  }

  .intro-shine {
    display: none;
  }

  .intro-leaving .intro {
    animation-duration: 0.8s;
  }
}

/* Header and navigation
   Phones: monogram in the middle, Menu button on the right.
   Wide screens: links split left and right around the monogram.
   ========================================================================== */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* Full-screen phone views (e.g. inside an app): paint the strip above the sticky menu.
   In a normal browser the strip has no height. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
}

.header-inner {
  display: grid;
  grid-template-areas:
    ". mono toggle"
    "nav nav nav";
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-block: 0.75rem;
}

.monogram {
  grid-area: mono;
  color: var(--gold-deep);
  font-family: var(--font-script);
  font-size: 2.5rem;
  line-height: 1;
  text-decoration: none;
}

.nav-toggle {
  grid-area: toggle;
  justify-self: end;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: 500 0.75rem/1 var(--font-sans);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
}

html:not(.js) .nav-toggle {
  display: none;
}

.site-nav {
  grid-area: nav;
}

/* Phones: the menu unrolls downwards when Menu is tapped, then rolls back up.
   main.js animates its height between 0 and the full height of the links. */
.js .site-nav {
  height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.4s;
}

.js .site-nav.is-open {
  visibility: visible;
  transition: height 0.55s cubic-bezier(0.45, 0, 0.25, 1), visibility 0s;
}

.nav-panel {
  margin-top: 0.75rem;
  padding: 0 1.25rem;
  border: 1px solid var(--line);
  background: var(--bg);
}

/* The links fade in one after another as the menu unrolls (main.js numbers them with --i) */
.js .site-nav li {
  opacity: 0;
  transform: translateY(-0.5rem);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.js .site-nav.is-open li {
  opacity: 1;
  transform: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transition-delay: calc(0.06s + var(--i, 0) * 0.055s);
}

.nav-group {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.875rem;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-group:first-child li:first-child a {
  border-top: 0;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.6em;
}

/* Home: the header stays pinned to the top of the screen. At the very top it is see-through
   over the photo; main.js adds .is-solid once the page scrolls (or the phone menu opens)
   and it turns white like on the other pages. Without JavaScript it stays white. */
.site-header--overlay {
  position: fixed;
  right: 0;
  left: 0;
}

.js .site-header--overlay:not(.is-solid) {
  background: transparent;
  border-bottom-color: transparent;
  color: var(--on-dark);
}

.js .site-header--overlay:not(.is-solid) .monogram {
  color: var(--gold-light);
}

/* Wider screens: the monogram sits where the white half meets the photo */
@media (min-width: 860px) {
  .js .site-header--overlay:not(.is-solid) .monogram {
    color: var(--gold);
  }
}

.monogram,
.site-nav a {
  transition: color 0.25s ease;
}

@media (min-width: 1024px) {
  .header-inner {
    position: relative;
    display: block;
    padding-block: 1.75rem;
  }

  .nav-toggle {
    display: none;
  }

  /* Wide screens: the links are always shown, split left and right of the monogram */
  .site-nav,
  .js .site-nav {
    height: auto;
    overflow: visible;
    visibility: visible;
    transition: none;
  }

  .nav-panel {
    display: grid;
    grid-template-columns: 1fr 13rem 1fr;
    align-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
  }

  .js .site-nav li {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .nav-group {
    display: flex;
    justify-content: space-around;
  }

  .nav-group:last-child {
    grid-column: 3;
  }

  .site-nav a {
    padding: 0.25rem 0;
    border: 0;
    font-size: 0.8125rem;
    letter-spacing: 0.25em;
  }

  /* Over the home photo: dark links on the white half, white links on the photo half */
  .js .site-header--overlay:not(.is-solid) .site-nav a {
    color: var(--ink);
  }

  .js .site-header--overlay:not(.is-solid) .nav-group:last-child a {
    color: var(--on-dark);
  }

  .monogram {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    font-size: 3.25rem;
    transform: translate(-50%, -50%);
  }
}

/* Shared text styles
   ========================================================================== */

/* Script line under a heading, like "The Journey" */
.script-sub {
  margin-bottom: 1.5rem;
  color: var(--gold-deep);
  font-family: var(--font-script);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.1;
}

/* Italic spaced capitals used for body text in this design */
.caps-text {
  color: var(--muted);
  font-size: 1rem;
  font-style: italic;
  letter-spacing: 0.14em;
  line-height: 1.6;
  text-transform: uppercase;
}

.text-link {
  display: inline-block;
  margin-top: 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid currentColor;
  color: var(--green);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-decoration: none;
  text-transform: uppercase;
}

/* The gold OH crest (images/crest-gold.png, made from images/Ornate OH Baroque Monogram Crest.png).
   Home: in the white half of the top section on computers, above the date on phones. Every page: the footer. */
.crest {
  height: auto;
  margin-inline: auto;
}

.hero-crest {
  display: none;
}

.date-crest {
  width: 120px;
  margin-bottom: 1rem;
}

.footer-crest {
  width: 84px;
  margin-bottom: 0.75rem;
}

@media (min-width: 860px) {
  .hero-crest {
    display: block;
    width: clamp(120px, 10vw, 150px);
    margin-bottom: 1.75rem;
  }

  .date-crest {
    display: none;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 2.75rem;
  border: 1px solid currentColor;
  color: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.2s, color 0.2s;
}

/* Home: hero photo
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Phones: the photo fills the whole screen */
  min-height: max(540px, 100vh);
  min-height: max(540px, 100svh);
  /* Owen and Hana's heads sit about 42% of the way down the screen;
     this keeps the text block ending just above them on short and tall phones alike */
  padding: max(5.5rem, calc(42vh - 9.5rem)) 1rem 3rem;
  padding: max(5.5rem, calc(42svh - 9.5rem)) 1rem 3rem;
  overflow: hidden;
  background: #1f1e1b;
  color: var(--on-dark);
  text-align: center;
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: grayscale(1) contrast(1.05); /* black and white; delete this line for color */
}

.hero-text {
  width: 100%;
}

/* Upright tablets: nudge the photo down a little so the names clear Owen and Hana */
@media (min-width: 600px) and (max-width: 859px) {
  .hero {
    padding-top: 12rem;
  }

  .hero-img {
    object-position: 50% 15%;
  }
}

/* Shade over the photo so the lettering stays readable */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(20, 18, 14, 0.5), rgba(20, 18, 14, 0.2) 55%, rgba(20, 18, 14, 0.3));
}

.hero-kicker {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero-names {
  margin: 0;
  color: var(--gold-light);
  font-family: var(--font-script);
  font-size: clamp(3.25rem, 10vw, 7rem);
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
  text-wrap: balance;
}

.hero-rule {
  display: block;
  width: min(270px, 50%);
  height: 1px;
  margin: 1.75rem auto 0;
  background: var(--gold-light);
}

/* Wider screens: split in two, gold names on white at left, the photo filling the right half.
   The photo is anchored low so Owen and Hana show head to toe. */
@media (min-width: 860px) {
  .hero {
    align-items: flex-start;
    justify-content: center;
    min-height: min(100vh, 1000px);
    min-height: min(100svh, 1000px);
    padding: 7rem 0 4rem;
    background: var(--bg);
    color: var(--ink);
  }

  .hero-photo {
    left: 50%;
  }

  .hero-img {
    object-position: 50% 92%;
  }

  /* Only a soft shade along the top of the photo, so the menu links stay readable */
  .hero::after {
    left: 50%;
    background: linear-gradient(rgba(20, 18, 14, 0.45), rgba(20, 18, 14, 0) 30%);
  }

  .hero-text {
    width: 50%;
    padding-inline: 2rem;
  }

  .hero-names {
    color: var(--gold-deep);
    font-size: clamp(3.25rem, 6.5vw, 6.5rem);
  }

  .hero-rule {
    background: var(--gold);
  }
}

/* Home: date and place
   ========================================================================== */

.date-block {
  padding-block: clamp(2.5rem, 6vw, 4rem) 0;
  text-align: center;
}

/* The first photo section follows the countdown closely */
.date-block + .split {
  padding-top: 0.75rem;
}

.big-date {
  margin-bottom: 1.25rem;
  color: var(--gold-deep);
  font-family: var(--font-italic);
  font-size: clamp(2.5rem, 8vw, 4.75rem);
  font-style: italic;
  line-height: 1.1;
  text-transform: uppercase;
}

/* The date opens the calendar file, so it looks like the date until hovered */
.big-date a {
  color: inherit;
  text-decoration: none;
}

.big-date a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.calendar-add {
  margin: 0.5rem 0 0;
}

.location {
  margin-bottom: 0.75rem;
  color: var(--ink);
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  font-style: italic;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.countdown {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.countdown strong {
  color: var(--green);
  font-family: var(--font-italic);
  font-size: 1.6em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

/* Home: photo + text sections with an offset gold block behind the photo
   ========================================================================== */

.split {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding-block: var(--space);
}

/* A section that follows another one only needs the gap once */
.split + .split,
.split + .moments,
.moments + .split,
.split + .album-section {
  padding-top: 0;
}

/* ...but a photo whose gold block peeks out above it needs room for the block */
.split + .split--right,
.moments + .split--right {
  padding-top: 2.5rem;
}

.split-media {
  position: relative;
  width: min(100%, 420px);
  margin-inline: auto;
}

.split-media::before {
  content: "";
  position: absolute;
  background: var(--gold);
}

/* Block runs in from the left edge of the screen, peeking out beside the photo */
.split--left .split-media::before {
  top: 14%;
  right: 40%;
  bottom: 18%;
  left: calc(-1 * var(--edge));
}

/* Block runs in from the right edge, peeking out above and beside the photo */
.split--right .split-media::before {
  top: -7%;
  right: calc(-1 * var(--edge));
  bottom: 25%;
  left: 22%;
}

/* A green block instead of gold (behind the wildflower photo on Home) */
.split--green .split-media::before {
  background: var(--green);
}

.photo-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  padding: 1.5rem;
  background-color: var(--placeholder);
  background-image: repeating-linear-gradient(135deg, transparent 0 12px, rgba(0, 0, 0, 0.035) 12px 13px);
  text-align: center;
}

.photo-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Landscape frame for wide shots, like the Butterfield clubhouse */
.photo-frame--wide {
  aspect-ratio: 1600 / 870;
}

.split-text {
  max-width: 34rem;
  margin-inline: auto;
  text-align: center;
}

.split-text > :last-child {
  margin-bottom: 0;
}

.split-heading {
  margin-bottom: 0.2em;
  color: var(--green);
  font-size: clamp(1.25rem, 3vw, 2rem);
  letter-spacing: 0.22em;
}

/* Venue street address, links to Google Maps */
.venue-address {
  margin-bottom: 1.75rem;
  font-size: 0.9375rem;
  letter-spacing: 0.18em;
  line-height: 1.8;
  text-transform: uppercase;
}

.venue-address a {
  color: var(--ink);
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}

.venue-address a:hover {
  text-decoration-color: currentColor;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2.5rem, 6vw, 5rem);
  }

  .split--right {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .split--right .split-media {
    order: 2;
  }

  .split-media {
    width: 100%;
    max-width: 380px;
    margin-inline: 0;
  }

  .split--right .split-media {
    justify-self: end;
  }
}

/* Home: favorite moments
   Phones: a strip you swipe sideways. Wider screens: three columns, middle one set lower.
   ========================================================================== */

.moments {
  padding-block: var(--space);
}

.moments-head {
  text-align: center;
}

.moments-strip {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0 1rem;
  overflow-x: auto;
  list-style: none;
  scroll-padding-inline: 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.moments-strip::-webkit-scrollbar {
  display: none;
}

.moments-strip li {
  flex: 0 0 72%;
  scroll-snap-align: start;
}

.moments-strip img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.moments-hint {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-align: center;
  text-transform: uppercase;
}

.moments-more {
  margin: 1.5rem 0 0;
  text-align: center;
}

@media (min-width: 860px) {
  .moments-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    width: min(100% - 2rem, 1100px);
    margin-inline: auto;
    padding: 0 0 3rem;
    overflow: visible;
  }

  .moments-strip li:nth-child(3n + 2) {
    transform: translateY(3rem);
  }

  .moments-hint {
    display: none;
  }
}

/* Our Story: photo album. Columns keep each photo's own shape (tall or wide).
   ========================================================================== */

.album-section {
  padding-block: var(--space);
  scroll-margin-top: 7rem; /* "See all photos" lands here; keep the heading clear of the sticky menu */
}

.album-head {
  text-align: center;
}

.album {
  columns: 2;
  column-gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.album li {
  margin-bottom: 0.75rem;
  break-inside: avoid;
}

.album img {
  width: 100%;
}

@media (min-width: 860px) {
  .album {
    columns: 3;
    column-gap: 1.25rem;
  }

  .album li {
    margin-bottom: 1.25rem;
  }
}

/* Home: RSVP band
   ========================================================================== */

.rsvp-band {
  padding-block: clamp(3rem, 6vw, 4rem);
  background: var(--green);
  color: var(--on-dark);
  text-align: center;
}

.rsvp-band h2 {
  margin-bottom: 0.2em;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

.rsvp-band .script-sub {
  color: var(--gold-light);
}

.rsvp-band .caps-text {
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.85);
}

.rsvp-band .button {
  border-color: var(--gold-light);
}

.rsvp-band .button:hover {
  background: var(--gold-light);
  color: var(--green);
}

/* Travel & Stay: the map
   A simplified map in the site's colors. Its shapes are drawn in travel.html; js/map.js adds a
   button for each place in the list under the map, and fills the framed inset over downtown
   Chicago with the same drawing, larger, and the downtown places.
   ========================================================================== */

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.map-section {
  padding-bottom: var(--space);
}

/* Without JavaScript the map is just the drawing; the list below has every place */
html:not(.js) .map-hint,
html:not(.js) .map-labels,
html:not(.js) .map-inset,
html:not(.js) .map-inset-title {
  display: none;
}

.map {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

/* A second, inner frame line, like a printed map */
.map::after {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 5;
  border: 1px solid var(--line);
  pointer-events: none;
}

@media (min-width: 600px) {
  .map {
    aspect-ratio: 3 / 2;
  }
}

@media (min-width: 1024px) {
  .map {
    aspect-ratio: 16 / 9;
  }
}

.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Lines keep the same thickness at any size */
.map-svg path,
.map-inset-svg path {
  vector-effect: non-scaling-stroke;
}

.map-lake {
  fill: var(--map-water);
  stroke: var(--map-shore);
  stroke-width: 1;
}

.map-park {
  fill: var(--map-park);
}

.map-pier {
  fill: var(--bg);
  stroke: var(--map-shore);
  stroke-width: 1;
}

.map-streets {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.map-streets path {
  fill: none;
  stroke: var(--map-street);
  stroke-width: 1;
}

.map-rivers path,
.map-roads path,
.map-route {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-rivers path {
  stroke: var(--map-river);
  stroke-width: 2;
  transition: stroke-width 0.6s ease;
}

.map-roads path {
  stroke: var(--map-road);
  stroke-width: 1.5;
}

/* The way from downtown to the wedding, as a gold dotted line */
.map-route {
  stroke: var(--gold-deep);
  stroke-width: 2.5;
  stroke-dasharray: 0.1 6;
}

/* The framed inset over downtown: a card-like panel with a hairline second frame, like the main
   map's own border, so it reads as "a map within the map" rather than a separate gadget */
.map-inset {
  position: absolute;
  z-index: 2;
  overflow: hidden;
  border: 2px solid var(--gold);
  background: var(--bg);
  box-shadow: 0 12px 30px rgba(28, 27, 25, 0.2);
}

.map-inset::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--gold-light);
  pointer-events: none;
}

.map-inset-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.map-inset .map-streets {
  opacity: 1;
}

.map-inset .map-rivers path {
  stroke-width: 6;
}

.map-inset .map-roads path {
  stroke-width: 2.5;
}

/* The inset is a crop of the same drawing the route is part of, so without this its tail end
   (deep inside the square, by design) would show as a few stray dashes near the bottom */
.map-inset .map-route {
  display: none;
}

.map-inset-title {
  position: absolute;
  z-index: 4;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--gold);
  background: var(--bg);
  color: var(--green);
  font-family: var(--font-serif);
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

/* Names on the map */
.map-labels,
.map-pins {
  position: absolute;
  inset: 0;
}

.map-labels {
  z-index: 3;
  pointer-events: none;
}

.map-pins {
  z-index: 4;
}

.map-label {
  position: absolute;
  transform: translate(-50%, -50%);
  color: var(--muted);
  font-size: 0.625rem;
  letter-spacing: 0.25em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 2px var(--bg), 0 0 4px var(--bg), 0 0 6px var(--bg);
  transition: opacity 0.3s ease;
}

.map-label--water {
  color: var(--map-water-label);
  font-family: var(--font-italic);
  font-size: 1rem;
  font-style: italic;
  letter-spacing: 0.06em;
  text-transform: none;
  text-shadow: none;
}

.map-label--city,
.map-label--town,
.map-label--district {
  color: var(--green);
  font-family: var(--font-serif);
}

.map-label--city {
  font-size: 0.9375rem;
  letter-spacing: 0.45em;
}

.map-label--town {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
}

.map-label--district {
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
}

.map-label--river,
.map-label--park {
  color: var(--map-water-label);
  font-style: italic;
  letter-spacing: 0.12em;
  text-transform: none;
}

.map-label--river {
  font-size: 0.6875rem;
}

.map-label--park {
  font-size: 0.75rem;
}

/* Expressway numbers */
.map-label--road {
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--bg);
  color: var(--gold-deep);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-shadow: none;
}

.map-label--route {
  color: var(--gold-deep);
  font-family: var(--font-italic);
  font-size: 0.8125rem;
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* The places: round buttons with an icon */
.map-pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: -1.125rem 0 0 -1.125rem;
  padding: 0;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  background: var(--bg);
  color: var(--gold-deep);
  box-shadow: 0 2px 8px rgba(28, 27, 25, 0.16);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, opacity 0.35s ease calc(var(--i, 0) * 0.03s);
}

.map-pin svg {
  width: 1.25rem;
  height: 1.25rem;
}

.map-pin:hover,
.map-pin.is-active {
  z-index: 1;
  background: var(--gold);
  color: var(--white);
  transform: scale(1.12);
}

.map-pin--hotel {
  background: var(--gold);
  color: var(--white);
}

.map-pin--hotel:hover,
.map-pin--hotel.is-active {
  background: var(--green);
  border-color: var(--gold-light);
}

/* Airports: solid black fill so they read at a glance against the gold/green pins, the way a
   transit point should stand apart from places to visit */
.map-pin--airport {
  background: var(--black);
  color: var(--white);
}

.map-pin--airport:hover,
.map-pin--airport.is-active {
  background: var(--green);
  border-color: var(--gold-light);
}

/* The wedding: green, with a soft gold ring that pulses outwards -- just a touch bigger than the
   other pins, since the pulse ring is what should carry the emphasis, not sheer size */
.map-pin--wedding {
  width: 2.4rem;
  height: 2.4rem;
  margin: -1.2rem 0 0 -1.2rem;
  border-color: var(--gold-light);
  background: var(--green);
  color: var(--gold-light);
}

.map-pin--wedding svg {
  width: 1.3rem;
  height: 1.3rem;
}

.map-pin--wedding:hover,
.map-pin--wedding.is-active {
  background: var(--green);
  color: var(--white);
}

.map-pin--wedding::before {
  content: "";
  position: absolute;
  inset: -2px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  animation: map-pulse 2.6s ease-out infinite;
  pointer-events: none;
}

@keyframes map-pulse {
  from {
    opacity: 0.8;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(1.9);
  }
}

/* The places inside the inset are a little smaller */
.map-pin--inset {
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
}

.map-pin--inset svg {
  width: 1.125rem;
  height: 1.125rem;
}

.map-pin[hidden],
.map-label[hidden] {
  display: none;
}

/* On computers, the name shows when the pointer rests on a place */
@media (hover: hover) {
  .map-pin[data-name]::after {
    content: attr(data-name);
    position: absolute;
    bottom: calc(100% + 0.45rem);
    left: 50%;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-50%);
    transition: opacity 0.15s ease;
    pointer-events: none;
  }

  .map-pin[data-name]:hover::after {
    opacity: 1;
  }

  .map-pin.is-active::after {
    display: none;
  }
}

.map-north {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 4;
  width: 1.5rem;
  height: 3rem;
  color: var(--gold);
  pointer-events: none;
}

.map-north text {
  fill: currentColor;
  font-family: var(--font-serif);
  font-size: 9px;
}

/* The card that opens when a place is tapped */
.map-card {
  position: absolute;
  z-index: 6;
  width: min(17.5rem, calc(100% - 1.5rem));
  padding: 0.9rem 1.1rem 1rem;
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 0 12px 32px rgba(28, 27, 25, 0.18);
  animation: map-card-in 0.2s ease;
}

@keyframes map-card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.map-card-close {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
}

.map-card-cat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.35rem;
  color: var(--gold-deep);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.map-card-icon {
  width: 1rem;
  height: 1rem;
}

.map-card-name {
  margin: 0 0 0.3rem;
  padding-right: 1.5rem;
  color: var(--green);
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.map-card-note {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.map-hint {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-align: center;
}

/* The list of places under the map */
.places {
  padding-bottom: var(--space);
}

.place-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem 3rem;
}

.place-group-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
  color: var(--green);
  font-size: 0.9375rem;
  letter-spacing: 0.25em;
}

.place-icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--gold-deep);
}

.place-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.place a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.place a:hover {
  color: var(--green);
}

.place-note {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.travel-notes {
  padding-bottom: var(--space);
}

@media (prefers-reduced-motion: reduce) {
  .map-pin--wedding::before {
    animation: none;
    opacity: 0;
  }
}

/* Inner pages
   ========================================================================== */

.page-intro {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.page-intro > :last-child {
  margin-bottom: 0;
}

.page-intro h1 {
  margin-bottom: 0.2em;
  color: var(--green);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
}

/* A page title followed straight away by content, like Our Story */
.page-intro--short {
  padding-bottom: 0;
}

.page-intro--short .script-sub {
  margin-bottom: 0;
}

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

.site-footer {
  padding-block: var(--space);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
  text-align: center;
}

.site-footer .wrap > :last-child {
  margin-bottom: 0;
}

.footer-names {
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.footer-meta {
  font-size: 0.875rem;
  font-style: italic;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Registry
   ========================================================================== */

.registry-banner {
  margin-bottom: var(--space);
  padding: 0.85rem 1.25rem;
  border-radius: 4px;
  font-size: 0.9375rem;
  text-align: center;
}

.registry-banner--success {
  background: #eaf1e9;
  color: var(--green);
}

.registry-banner--error {
  background: #fbeceb;
  color: #8a2f28;
}

.registry-status {
  margin-bottom: var(--space);
  color: var(--muted);
  text-align: center;
}

.registry-status:empty {
  display: none;
}

.registry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  padding-bottom: var(--space);
}

.registry-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
}

.registry-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--placeholder);
}

.registry-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem;
}

.registry-card-body h3 {
  margin-bottom: 0.35em;
  font-size: 1rem;
  letter-spacing: 0.15em;
}

.registry-card-price {
  margin-bottom: 1rem;
  color: var(--gold-deep);
  font-family: var(--font-italic);
  font-size: 1.125rem;
}

.registry-card-fulfilled {
  margin-top: auto;
  margin-bottom: 0;
  color: var(--green);
  font-size: 0.875rem;
}

.registry-card-button {
  margin-top: auto;
  padding: 0.7rem 1rem;
  border: 1px solid var(--green);
  background: transparent;
  color: var(--green);
  font: 500 0.8125rem/1 var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.registry-card-button:hover,
.registry-card-button:focus-visible {
  background: var(--green);
  color: var(--on-dark);
}

.registry-card-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.registry-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(28, 27, 25, 0.55);
}

/* Without this, the "display: flex" above outranks the browser's own [hidden] rule (same
   specificity, author styles win), so the overlay would stay on screen even while hidden */
.registry-gate[hidden] {
  display: none;
}

.registry-gate-card {
  width: min(100%, 420px);
  padding: 2rem;
  background: var(--white);
  text-align: center;
}

.registry-gate-card h2 {
  font-size: 1.25rem;
}

.registry-gate-card form {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
  text-align: left;
}

.registry-gate-card label {
  margin-bottom: 0.3rem;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.registry-gate-card input {
  margin-bottom: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  font: inherit;
}

.registry-gate-card button {
  margin-top: 0.5rem;
  padding: 0.8rem 1rem;
  border: none;
  background: var(--green);
  color: var(--on-dark);
  font: 500 0.8125rem/1 var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

/* The "never mind" button: secondary to "Continue to claim" above it, so it reads as an escape
   hatch, not a second thing to choose between */
.registry-gate-card button.registry-gate-cancel {
  margin-top: 0.6rem;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.registry-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.registry-confirm-yes,
.registry-confirm-cancel {
  flex: 1;
  padding: 0.8rem 1rem;
  border: none;
  font: 500 0.8125rem/1 var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.registry-confirm-yes {
  background: var(--green);
  color: var(--on-dark);
}

.registry-confirm-cancel {
  background: #e4e1d8;
  color: var(--ink);
}

.registry-confirm-yes:disabled,
.registry-confirm-cancel:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
