* { box-sizing: border-box; }

:root {
  --ink: #1c3578;
  --cream: #fbf8f1;
  --muted: #4a5a8c;
  --rule: #ddd0b4;
  --media-bg: #1f2633;
  --font: 'Sorts Mill Goudy', serif;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  font-weight: 400;
  text-transform: uppercase;
  font-variant-numeric: lining-nums; /* numbers at full capital height */
  letter-spacing: 0.12em;
  color: var(--ink);
  background: var(--cream);
}

/* Home hero: title + details on the left, video in the center, menu on the right */
.hero {
  position: relative;
  z-index: 10; /* keeps the menu (inside the hero) above later sections */
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(290px, 1fr) auto minmax(290px, 1fr);
  gap: 32px;
  padding: 40px 48px 36px;
}

.hero-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* Title */
.site-title {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 400;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.08;
  white-space: nowrap;
}

.site-title a {
  color: var(--ink);
  text-decoration: none;
}

.hero-rule {
  display: block;
  width: 36px;
  height: 1px;
  background: var(--ink);
}

/* Location and date */
.details {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  line-height: 1.7;
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

/* Vertical 9:16 save-the-date video */
.hero-video {
  height: min(640px, calc(100vh - 220px));
  aspect-ratio: 9 / 16;
  border-radius: 4px;
  overflow: hidden;
  background: var(--media-bg);
  box-shadow: 0 18px 40px rgba(28, 53, 120, 0.18);
}

.hero-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Scroll cue: chevron + two lowercase lines on a soft, blurred patch */
.scroll-cue {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 34px 18px;
  color: var(--ink);
  text-decoration: none;
  text-transform: none;
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.scroll-cue::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 20px;
  background: rgba(251, 248, 241, 0.82);
  filter: blur(12px);
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-chevron { animation: bob 2.4s ease-in-out infinite; }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Menu: stacked in the top right corner */
/* Menu: the full list sits in the top right corner of the first screen.
   Once you scroll down, it folds into a small "Menu" button (nav.js adds
   body.nav-collapsed) that opens on hover or tap, so it never covers the page. */
.nav {
  position: fixed;
  top: 26px;
  right: 30px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 14px 18px;
  border-radius: 12px;
  text-align: right;
  transition: padding 0.6s ease, border-radius 0.6s ease, background-color 0.4s ease;
}

.nav-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
  max-height: 480px;
  overflow: hidden;
  transition: max-height 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.7s ease 0.1s,
              margin-top 0.6s ease,
              visibility 0s linear 0s;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

body.nav-collapsed .nav {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(251, 248, 241, 0.96);
  box-shadow: 0 6px 20px rgba(28, 53, 120, 0.1);
}

body.nav-collapsed .nav-toggle { font-size: 0.82rem; gap: 9px; }

body.nav-collapsed .nav-toggle { display: flex; }

/* Folded menu: a compact dropdown */
body.nav-collapsed .nav-links { gap: 12px; }

body.nav-collapsed .nav-links a {
  padding-right: 22px;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

body.nav-collapsed .nav-links a[aria-current="page"] { padding-right: 0; }
body.nav-collapsed .nav-links a[aria-current="page"]::after { width: 12px; }

/* Folded: the pill only wraps "Menu"; the list hangs below it as its own
   panel, shrunk to nothing until opened, then unfolds slowly */
body.nav-collapsed .nav-links {
  position: absolute;
  top: 100%;
  right: 0;
  width: max-content;
  max-height: 0;
  margin-top: 8px;
  padding: 0 16px;
  border-radius: 12px;
  background: rgba(251, 248, 241, 0.97);
  box-shadow: 0 10px 28px rgba(28, 53, 120, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.6s ease, padding 0.6s ease, opacity 0.3s ease,
              visibility 0s linear 0.6s;
}

/* Invisible strip over the 8px gap, so the menu stays open while the
   mouse travels from the button down to the list */
body.nav-collapsed .nav-links::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}

body.nav-collapsed .nav.is-open .nav-links {
  max-height: 480px;
  padding: 14px 16px;
  opacity: 1;
  visibility: visible;
  transition: max-height 0.9s cubic-bezier(0.22, 0.61, 0.36, 1), padding 0.6s ease,
              opacity 0.7s ease 0.15s, visibility 0s;
}

@media (hover: hover) {
  body.nav-collapsed .nav:hover .nav-links {
    max-height: 480px;
    padding: 14px 16px;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.9s cubic-bezier(0.22, 0.61, 0.36, 1), padding 0.6s ease,
                opacity 0.7s ease 0.15s, visibility 0s;
  }
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 28px;
  font-size: 1.03rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover { color: var(--ink); }

.nav a[aria-current="page"] {
  padding-right: 0;
  color: var(--ink);
}

.nav a[aria-current="page"]::after {
  content: "";
  width: 18px;
  height: 1.5px;
  background: var(--ink);
}

/* Text */
.page-name {
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 0;
}

/* Button */
.button {
  display: inline-block;
  padding: 0.9rem 2rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.button:hover {
  background: var(--ink);
  color: var(--cream);
}


/* The watercolor painting stays pinned along the bottom of the screen on every
   section, fading up into the cream */
body::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: 55vh;
  background: url("images/alps-watercolor.jpg") center 68% / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 15%, #000 40%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 15%, #000 40%);
  pointer-events: none;
}

/* Soft white glow behind each section's text and photo. It's a single blurred
   white layer behind the block, so it fades smoothly into the painting with
   no visible edge. */
.split-inner,
.section-gallery .section-title,
.gallery-count {
  position: relative;
  isolation: isolate;
}

.split-inner::before,
.section-gallery .section-title::before,
.gallery-count::before {
  content: "";
  position: absolute;
  inset: -22px;
  z-index: -1;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.9);
  filter: blur(36px);
  pointer-events: none;
}

.section-gallery .section-title::before,
.gallery-count::before {
  inset: -14px -28px;
  filter: blur(22px);
}

/* Page snapping is handled by snap.js, which glides slowly onto the nearest
   page; the browser's built-in snapping is too fast and can't be slowed down */

/* Scrolling sections below the hero */
.section {
  max-width: 680px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 112px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

/* Text beside a photo: text on the left and photo on the right by default;
   add "photo-left" to the section to swap sides */
/* On laptops, sections keep clear of the menu in the top-right corner by
   leaving extra room on the right (which also nudges the content left) */
:root { --menu-room: clamp(48px, calc(260px - (100vw - 1180px) / 2), 250px); }

.section.section-split {
  max-width: 1180px;
  padding: 96px var(--menu-room) 96px 48px;
  text-align: left;
}

.split-inner {
  padding: 36px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  align-items: center;
  gap: 80px;
}

.section-split.photo-left .split-inner {
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
}

.section-split.photo-left .split-photo { order: -1; }

.section-split .timeline { margin: 0; }

.split-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(28, 53, 120, 0.15);
}

.split-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 55% center;
}


/* Gallery: one photo at a time, centered, with arrows on either side */
.section.section-gallery {
  position: relative;
  max-width: 1180px;
  padding: 72px var(--menu-room) 72px 48px;
  align-items: center;
}

.gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
}

.gallery-frame {
  margin: 0;
  flex: 1;
  min-width: 0;
  height: min(calc(100vh - 260px), 720px); /* leaves room for the title and counter */
}

/* Every photo gets the same box and is scaled to fit inside it, so landscape and
   portrait photos show at the same height and never spill off the screen */
.gallery-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.gallery-photo.is-shown { opacity: 1; }

.gallery-frame { position: relative; }

/* Small credit printed over the lower right corner of each photo */
.gallery-watermark[hidden] { display: none; }

.gallery-watermark {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.gallery-arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.gallery-arrow {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(28, 53, 120, 0.25);
}

.gallery-arrow:hover { border-color: var(--ink); }


/* Full-screen photo viewer, opened by tapping a gallery photo */
html.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  grid-template-rows: 64px minmax(0, 1fr) 56px;
  align-items: center;
  justify-items: center;
  background: #0e111a;
  color: #fff;
  outline: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox[hidden] { display: none; }

.lightbox.is-visible { opacity: 1; }

.lightbox-frame {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  height: 100%;
  margin: 0;
}

.lightbox-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.lightbox-photo.is-shown { opacity: 1; }

.lightbox-close,
.lightbox-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.lightbox-close {
  grid-column: 3;
  grid-row: 1;
  border: 0;
}

.lightbox-arrow.prev { grid-column: 1; grid-row: 2; }
.lightbox-arrow.next { grid-column: 3; grid-row: 2; }

.lightbox-count {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.75);
}

.gallery-count {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.section-title {
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  margin: 0 0 2.5rem;
}

/* Paragraphs read in sentence case; headings and labels stay in capitals */
.prose {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 1.2rem;
  line-height: 1.7;
}

.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--ink); }

/* Schedule timeline: a vertical line with a dot per day */
.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 480px;
  text-align: left;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--ink);
  opacity: 0.35;
}

.timeline li {
  position: relative;
  padding: 0 0 2rem 2.5rem;
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--cream);
}

.timeline li.highlight::before { background: var(--ink); }

.timeline .when {
  display: block;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.timeline .what {
  display: block;
  font-size: 1.25rem;
  margin-top: 0.2rem;
}

/* Mobile: title, menu, then video, with the painting along the bottom */
@media (max-width: 899px) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 24px;
    padding: 72px 16px 40px; /* room for the Menu button above the title */
    text-align: center;
  }

  .hero-intro { align-items: center; }

  .site-title {
    font-size: 2rem;
    white-space: normal;
  }

  .details { font-size: 0.8rem; }

  /* Phones: always a small "Menu" button in the corner (so nothing sits over
     the video); tapping it slides a sidebar in from the right */
  body.nav-collapsed .nav,
  body.nav-collapsed .nav.is-open {
    top: 12px;
    right: 12px;
    padding: 9px 14px;
    border-radius: 999px;
    /* no blur here: it would trap the sidebar inside the button */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(251, 248, 241, 0.94);
  }

  .nav-toggle {
    position: relative;
    z-index: 2;
    font-size: 0.85rem;
  }

  /* Phones: just the hamburger icon, no "Menu" label */
  .nav-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  body.nav-collapsed .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(78vw, 300px);
    max-height: none;
    margin: 0;
    padding: 84px 28px 32px;
    border-radius: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 24px;
    opacity: 1;
    background: var(--cream);
    box-shadow: -14px 0 40px rgba(28, 53, 120, 0.16);
    transform: translateX(105%);
    transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0.7s;
  }

  body.nav-collapsed .nav.is-open .nav-links {
    max-height: none;
    margin: 0;
    padding: 84px 28px 32px;
    transform: none;
    transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s;
  }

  .nav a { padding-right: 0; font-size: 1rem; }
  body.nav-collapsed .nav-links a { padding-right: 0; font-size: 0.95rem; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }

  .hero-center { order: 2; }

  .hero-video {
    height: auto;
    width: min(100%, 360px);
  }

  body::before { height: 40vh; }

  /* Each section fills one phone screen (taller ones can scroll) */
  .section {
    padding: 48px 20px;
    min-height: 100vh;
    min-height: 100svh;
  }

  .section.section-split {
    padding: 48px 20px;
    text-align: center;
  }

  .split-inner,
  .section-split.photo-left .split-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px 18px;
  }

  .section.section-split { padding-left: 14px; padding-right: 14px; }

  .split-photo { max-width: 340px; margin: 0 auto; }

  .split-photo img { aspect-ratio: 4 / 3; }

  /* Smaller, comfortable reading sizes on phones */
  .section-title { font-size: 1.25rem; margin-bottom: 1.25rem; }

  .prose { font-size: 1rem; line-height: 1.55; }

  .prose p { margin-bottom: 0.8rem; }

  .timeline li { padding: 0 0 1.1rem 2.1rem; }

  .timeline .when { font-size: 0.72rem; }

  .timeline .what { font-size: 1.02rem; }

  .section-split .timeline { margin: 0 auto; }

  .section.section-gallery { padding: 48px 16px; }

  /* Phones: the photo uses the full width, with the arrows underneath */
  .gallery {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 16px 28px;
  }

  .gallery-frame {
    grid-column: 1 / -1;
    width: 100%;
    height: 62vh;
  }

  .gallery-arrow { grid-row: 2; width: 40px; height: 40px; }
  .gallery-arrow.prev { justify-self: end; }
  .gallery-arrow.next { justify-self: start; }

  /* Viewer on phones: the photo fills the screen; swipe, or use the arrows at the bottom */
  .lightbox {
    grid-template-columns: 1fr auto auto 1fr;
    grid-template-rows: 56px minmax(0, 1fr) 72px;
    column-gap: 20px;
  }

  .lightbox-frame { grid-column: 1 / -1; }

  .lightbox-close { grid-column: 4; justify-self: end; margin-right: 8px; }

  .lightbox-arrow.prev { grid-column: 2; grid-row: 3; }
  .lightbox-arrow.next { grid-column: 3; grid-row: 3; }

  .lightbox-count {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin-left: 20px;
  }

  /* Read This!, Travel and Accommodations read left-aligned on phones too */
  #note .split-copy,
  #travel .split-copy,
  #accommodations .split-copy { text-align: left; }


}
