/* Kristina & Matthew — fresh start */
:root {
  --ivory: #F2EEE2;
  --blush: #E7C6B8;
  --apricot: #DCA382;
  --pale-lime: #C8D492;
  --chartreuse: #B9BA63;
  --olive: #70752E;
  --wine: #81353E;
  --burgundy: #551C27;

  --bg: var(--ivory);
  --ink: var(--burgundy);
}

* { box-sizing: border-box; margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Figtree", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hero img {
  display: block;
  width: 100%;
  height: 62svh;
  min-height: 260px;
  object-fit: cover;
  object-position: 30% 71%;
}

.intro {
  text-align: center;
  padding: clamp(32px, 5vh, 64px) 16px clamp(36px, 6vh, 72px);
}
.intro h1 {
  font-family: "Homemade Apple", cursive;
  font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 1.5;
  color: var(--wine);
}
.intro h1 i {
  font-family: "La Belle Aurore", cursive;
  font-style: normal;
  font-size: 1.25em;
  margin-right: 0.1em;
}
.intro h1 .nw { white-space: nowrap; }
.intro .meta {
  margin-top: 20px;
  font-size: clamp(0.85rem, 3.6vw, 1rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Temporary password gate */
#gate { display: none; }
.locked body > :not(#gate) { display: none; }
.locked #gate { display: grid; place-items: center; min-height: 100svh; padding: 20px; }
#gate input {
  width: min(100%, 18rem);
  padding: 14px 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: center;
}
#gate input:focus { outline: 2px solid var(--wine); outline-offset: 2px; }

/* Page links at the bottom */
.directory {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 44px;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 56px;
  border-top: 1px solid rgba(129, 53, 62, 0.3);
}
.directory a {
  color: var(--burgundy);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.directory a:hover,
.directory a:focus-visible { color: var(--wine); border-bottom-color: var(--wine); }

/* Inner pages (Stay, Gallery) */
.page { min-height: 60svh; }
.page .home {
  font-family: "Homemade Apple", cursive;
  color: var(--wine);
  text-decoration: none;
  font-size: 1.4rem;
}
.page .home i { font-family: "La Belle Aurore", cursive; font-style: normal; }
.page h2 {
  font-family: "Bodoni Moda", serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4rem);
  margin-top: 48px;
}
.page .note { margin-top: 16px; font-size: 1.05rem; }
@media (max-width: 520px) {
  .directory { gap: 14px 30px; max-width: 290px; }
}

/* Gallery */
.page:has(+ .gallery) { min-height: 0; padding-bottom: 40px; }
.gallery {
  columns: 3 280px;
  column-gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 64px;
}
.gallery .photo {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  break-inside: avoid;
}
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity .25s;
}
.gallery .photo:hover img { opacity: .88; }
.gallery .photo:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }

.lightbox {
  width: 100vw;
  height: 100svh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(85, 28, 39, 0.94);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox img {
  max-width: calc(100vw - 32px);
  max-height: calc(100svh - 96px);
  object-fit: contain;
}
.lightbox button {
  position: absolute;
  border: 0;
  background: none;
  color: var(--ivory);
  font: 300 2.6rem/1 "Figtree", sans-serif;
  padding: 12px 18px;
  cursor: pointer;
}
.lightbox .close { top: 8px; right: 8px; }
.lightbox .prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 4px; top: 50%; transform: translateY(-50%); }
@media (max-width: 520px) {
  .lightbox .prev, .lightbox .next { top: auto; bottom: 8px; transform: none; }
}
@media (max-width: 600px) {
  .gallery { columns: 2; column-gap: 10px; padding: 0 12px 48px; }
  .gallery .photo { margin-bottom: 10px; }
}

/* Stay */
.page:has(+ .block) { min-height: 0; padding-bottom: 24px; }
.block {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px 72px;
  text-align: center;
  line-height: 1.7;
}
.block .eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wine);
}
.block .sketch {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 28px;
}
.block h3 {
  font-family: "Bodoni Moda", serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin: 0;
  text-wrap: balance;
}
.btn {
  display: inline-block;
  margin-top: 28px;
  padding: 15px 34px;
  background: var(--wine);
  color: var(--ivory);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background .2s;
}
.btn:hover, .btn:focus-visible { background: var(--burgundy); }
.btn:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }

/* Phones: keep the couple and the bridge tower in the photo frame */
@media (max-width: 600px) {
  .hero img { height: 52svh; object-position: 2% 60%; }
}

/* Small page menu, top right of every page */
.topnav {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 5;
  display: flex;
  gap: 24px;
}
.topnav a {
  color: var(--burgundy);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.topnav a:hover,
.topnav a:focus-visible { color: var(--wine); border-bottom-color: var(--wine); }
@media (max-width: 520px) {
  .topnav { left: 0; right: 0; top: 12px; justify-content: center; gap: 14px; }
  .topnav a { font-size: 0.64rem; letter-spacing: 0.12em; }
}
.page { padding-top: max(clamp(32px, 5vh, 64px), 64px); }
.btn.soon, .btn.soon:hover { background: var(--wine); cursor: default; }



/* Home photo bike ride (see the script under the photo in index.html) */
.hero { position: relative; overflow: hidden; }
.hero .ride-bg,
.hero .ride-riders {
  position: absolute;
  inset: 0;
  display: none;
}
.hero .photo { position: relative; z-index: 2; transition: opacity 1.1s ease-in-out; }
.hero .ride-bg, .hero .ride-riders { z-index: 1; }
[data-ride="on"] .hero .photo { opacity: 0; }
[data-ride="on"] .hero.landing .photo { opacity: 1; }
[data-ride="on"] .hero .ride-bg { display: block; }
[data-ride="on"] .hero .ride-riders { display: block; transform: translateX(100%); }
[data-ride="on"] .hero.riding .ride-riders {
  animation: ride-in 4.2s cubic-bezier(.25, .7, .3, 1) both;
}
@keyframes ride-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}



/* Bike logo, bottom left of the inner pages; links home */
.logo {
  display: block;
  width: 80px;
  margin: -24px 0 20px 22px;
  line-height: 0;
}
.logo img { width: 100%; height: auto; }
.logo:focus-visible { outline: 2px solid var(--wine); outline-offset: 4px; }
@media (max-width: 520px) {
  .logo { width: 64px; margin: -28px 0 16px 14px; }
}

/* Blush band at the bottom of every page, like the edge of a stationery card.
   The band stretches edge to edge and down to the end of the page. */
.directory {
  border-top: 0;
  margin-top: auto;
  padding-top: 28px;
  padding-bottom: 30px;
  box-shadow: 0 0 0 100vmax var(--blush);
  clip-path: inset(0 -100vmax);
  background: var(--blush);
}
/* pages fill at least the screen, so on short pages the band rests at the bottom */
body { min-height: 100svh; display: flex; flex-direction: column; }
body > :has(+ .directory) { margin-bottom: 40px; }
body { overflow-x: hidden; }

/* Hovers: apricot with a chartreuse underline */
.topnav a:hover,
.topnav a:focus-visible { color: var(--apricot); border-bottom-color: var(--chartreuse); }
.directory a:hover,
.directory a:focus-visible { color: var(--wine); border-bottom: 2px solid var(--apricot); }
.logo { position: relative; z-index: 1; }

/* Bike logo sits on the menu line, at the far left of the blush band */
.directory { position: relative; }
.directory .logo {
  position: absolute;
  left: calc((100% - 100vw) / 2 + 22px);
  top: 16px;
  width: 52px;
  margin: 0;
  z-index: 1;
}
@media (max-width: 520px) {
  .directory .logo { width: 38px; left: calc((100% - 100vw) / 2 + 10px); top: 22px; }
}

/* Names at the top of inner pages: apricot on hover */
.page .home { transition: color .25s; }
.page .home:hover,
.page .home:focus-visible { color: var(--apricot); }

/* Gallery: each photo mounted on a thin blush or apricot mat, like prints on card stock */
.gallery .photo {
  padding: 7px;
  background: var(--blush);
  box-shadow: 0 1px 2px rgba(85, 28, 39, 0.08);
}
@media (max-width: 600px) {
  .gallery .photo { padding: 5px; }
}



.page h2 {
  display: table;
  margin-left: auto;
  margin-right: auto;
}

/* Blush border on the wine boxes (Book your room, View our registry, Coming Soon) */
.btn { border: 3px solid var(--blush); }

/* Home: a row of the same round chartreuse dots under the date and location */
.intro .meta {
  display: table;
  margin-left: auto;
  margin-right: auto;
}
.intro .meta::after {
  content: "";
  display: block;
  height: 8px;
  margin-top: 12px;
  background: radial-gradient(circle, var(--chartreuse) 2.6px, transparent 3.2px) 0 0 / 15px 8px round no-repeat;
}

/* Photo captions that appear on hover (always shown on touch screens) */
.gallery .photo { position: relative; }
.gallery .caption {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  padding: 34px 14px 14px;
  background: linear-gradient(to top, rgba(85, 28, 39, 0.92) 0%, rgba(85, 28, 39, 0.75) 45%, rgba(85, 28, 39, 0) 100%);
  color: var(--ivory);
  font-family: "Homemade Apple", cursive;
  font-size: 1.12rem;
  line-height: 1.55;
  text-shadow: 0 1px 3px rgba(85, 28, 39, 0.6);
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.gallery .photo:hover .caption,
.gallery .photo:focus-visible .caption { opacity: 1; transform: none; }
@media (hover: none) {
  .gallery .caption { opacity: 1; transform: none; font-size: 0.86rem; padding: 26px 8px 10px; }
}
@media (max-width: 600px) {
  .gallery .caption { left: 5px; right: 5px; bottom: 5px; }
}
