:root {
  --bg: #fcf4e7;
  --bg2: #f3e8d6;
  --ink: #3f211c;
  --muted: #795b46;
  --line: rgba(63, 33, 28, .2);
  --accent: #73784a;
  --deep: #3f211c;
  --deepink: #fcf4e7;
  --card: #fffaf1;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(64px + env(safe-area-inset-top, 0px))
}

*,
*::before,
*::after {
  box-sizing: inherit
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased
}

body.lock {
  overflow: hidden
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--deep);
  z-index: 30
}

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

a {
  color: inherit
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  margin: 0
}

h2 {
  font-size: 2.25rem;
  font-style: italic;
  text-align: center;
  margin-bottom: .4rem
}

p {
  margin: 0 0 1rem
}

.wrap {
  max-width: 34rem;
  margin: 0 auto;
  padding: 0 1.9rem
}

section {
  padding: 4.5rem 0
}

.deep {
  background: var(--deep);
  color: var(--deepink)
}

.alt {
  background-color: var(--bg2);
  background-image: url("papertexture.jpeg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat
}

.lede {
  text-align: center;
  color: var(--muted);
  max-width: 26rem;
  margin: 0 auto 2rem
}

.deep .lede {
  color: var(--satin, #d8b097)
}

.sprig {
  display: block;
  width: 70px;
  height: 20px;
  margin: 1rem auto;
  color: var(--accent)
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font: 400 .95rem var(--sans);
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer
}

.btn.ghost {
  background: transparent;
  color: var(--ink)
}

.deep .btn.ghost {
  color: var(--deepink);
  border-color: var(--deepink)
}

.btns {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center
}

/* Envelope gate */
#gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  isolation: isolate;
  background: var(--deep);
  display: grid;
  place-items: center;
  transition: opacity .65s .25s, visibility 0s .9s
}

#gate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(23, 16, 14, .4), rgba(23, 16, 14, .55));
  pointer-events: none
}

.gate-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center
}

@media (min-width:960px) {
  .gate-background {
    object-position: center 60%
  }
}

#gate.gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none
}

.gate-in {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fcf4e7;
  padding: 1.5rem
}

.gate-in .to {
  font: italic 1.3rem/1.4 var(--serif);
  color: #fcf4e7;
  text-shadow: 0 1px 8px rgba(23, 16, 14, .6);
  margin: 0 auto 1.75rem;
  text-align: center
}

.gate-in .l1,
.gate-in .l2 {
  display: block
}

.gate-in .l2::first-letter {
  text-transform: uppercase
}

@media (min-width:640px) {
  .gate-in .to {
    white-space: nowrap;
    font-size: 1.65rem
  }

  .gate-in .l1,
  .gate-in .l2 {
    display: inline
  }
}

.env {
  position: relative;
  display: block;
  width: min(82vw, 380px);
  aspect-ratio: 1;
  margin: 0 auto 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 1200px;
  isolation: isolate;
  overflow: visible
}

.env-part {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none
}

.env-closed {
  opacity: 1;
  transition: opacity .65s ease;
  z-index: 3
}

.env-open {
  opacity: 0;
  transition: opacity .65s ease;
  z-index: 0
}

.env-card {
  z-index: 1;
  opacity: 0;
  transform: translateY(0) scale(.95);
  transition: opacity .65s ease, transform 1.7s cubic-bezier(.18, .72, .2, 1)
}

.env-front {
  z-index: 2;
  opacity: 1;
}

.opening .env-closed {
  opacity: 0
}

.opening .env-open,
.opening .env-front {
  opacity: 1
}

.card-inserted .env-card {
  opacity: 1;
  transform: translateY(0) scale(.95)
}

.card-pulling .env-card {
  transform: translateY(-18%) scale(.95)
}

.seal {
  position: absolute;
  left: 50%;
  top: 72%;
  width: clamp(44px, 17%, 64px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4));
  pointer-events: none;
  z-index: 4;
  transition: opacity .28s ease;
}

@media (prefers-reduced-motion:reduce) {
  .env-part {
    transition: none
  }

  .env-card {
    transition: none
  }

  .gate-in .tap {
    animation: none;
    opacity: 1
  }

  .env.opening+.tap {
    opacity: 0
  }
}

.gate-in .tap {
  font: 300 .9rem var(--sans);
  letter-spacing: .12em;
  color: #fcf4e7;
  text-shadow: 0 1px 8px rgba(23, 16, 14, .6);
  animation: seal-prompt-breathe 2.2s ease-in-out infinite;
  transition: opacity .3s ease
}

.env.opening+.tap {
  opacity: 0;
  animation: none
}

@keyframes seal-prompt-breathe {

  0%,
  100% {
    opacity: .72;
    text-shadow: 0 1px 8px rgba(23, 16, 14, .6), 0 0 2px rgba(252, 244, 231, .2)
  }

  50% {
    opacity: 1;
    text-shadow: 0 1px 8px rgba(23, 16, 14, .55), 0 0 14px rgba(252, 244, 231, .72)
  }
}

/* Header */
header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--deep);
  color: var(--deepink);
  border-bottom: 1px solid rgba(252, 244, 231, .15);
  opacity: 1;
  visibility: visible;
  transition: opacity .2s .9s, visibility 0s .9s
}

#gate:not(.gone)~header {
  opacity: 0;
  visibility: hidden;
  transition-delay: 0s
}

.bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.25rem
}

.music-toggle {
  position: absolute;
  left: .5rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(252, 244, 231, .42);
  border-radius: 50%;
  background: transparent;
  color: var(--deepink);
  cursor: pointer
}

.music-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round
}

.music-toggle .music-mute,
.music-toggle[aria-pressed="true"] .music-mute {
  display: none
}

.music-toggle[aria-pressed="false"] .music-waves {
  display: none
}

.couple-mark {
  font: 1.5rem var(--script);
  text-decoration: none
}

.language-toggle {
  position: absolute;
  top: 50%;
  right: .5rem;
  display: flex;
  gap: 2px;
  padding: 3px;
  transform: translateY(-50%);
  border: 1px solid rgba(252, 244, 231, .42);
  border-radius: 4px
}

.language-toggle button {
  min-width: 30px;
  height: 28px;
  padding: 0 .35rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: 500 .7rem/1 var(--sans);
  cursor: pointer
}

.language-toggle button[aria-pressed="true"] {
  background: rgba(252, 244, 231, .2)
}

.language-toggle button:focus-visible {
  outline: 2px solid var(--deepink);
  outline-offset: 2px
}

nav {
  position: fixed;
  right: max(.4rem, env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem 0;
  box-shadow: 0 4px 14px rgba(63, 33, 28, .12)
}

@media (max-width:639px) {
  nav {
    transition: opacity .25s ease
  }

  nav:not(.idle) a.on span {
    opacity: 1
  }

  nav.idle {
    opacity: 0;
    pointer-events: none
  }

  nav:focus-within {
    opacity: 1;
    pointer-events: auto
  }
}

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

nav a {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 44px;
  text-decoration: none
}

nav a::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  transition: all .25s
}

nav a.on::before {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-color: var(--accent)
}

nav a span {
  position: absolute;
  right: 100%;
  margin-right: .4rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: 400 .8rem var(--sans);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s
}

@media (hover:hover) {
  nav a:hover span {
    opacity: 1
  }
}

nav a:focus-visible span {
  opacity: 1
}

@media (max-width:639px) {

  nav a:not(.on):hover span,
  nav a:not(.on):focus-visible span {
    opacity: 0
  }

  nav:not(.idle) a.on span {
    opacity: 1
  }
}

/* Hero */
#top {
  padding: 3.5rem 0 4rem;
  text-align: center
}

.names {
  font: 40px/1.1 var(--script);
  white-space: nowrap;
  margin: .2rem 0 .6rem
}

.when {
  display: block;
  font: 400 1.35rem/1.6 var(--serif);
  text-decoration: underline dotted;
  text-decoration-color: var(--line);
  text-underline-offset: 7px
}

.where {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin: .9rem 0 1.5rem
}

.arch {
  width: min(82vw, 380px);
  aspect-ratio: 1;
  margin: 0 auto 1.5rem;
  border-radius: 16px;
  overflow: hidden
}

.arch>div,
.ph {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(165deg, #a4b49a, #73784a 55%, #3f211c);
  display: grid;
  place-items: center;
  color: rgba(252, 244, 231, .75);
  font: italic 1rem var(--serif);
  text-align: center
}

.arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit
}

.note {
  font: italic 1.3rem/1.5 var(--serif);
  max-width: 22rem;
  margin: 2.5rem auto 1.75rem
}

/* Countdown + timeline */
.cd {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin: 2rem 0 2.75rem;
  text-align: center
}

.cd div {
  border: 1px solid rgba(252, 244, 231, .25);
  border-radius: 6px;
  padding: 1rem .5rem
}

.cd b {
  display: block;
  font: 400 2.6rem/1 var(--serif)
}

.cd span {
  font-size: .85rem;
  color: #d8b097;
  letter-spacing: .06em
}

#cdMsg {
  text-align: center;
  font: italic 1.5rem var(--serif);
  margin: 2rem 0
}

.tl {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.5rem;
  border-left: 1px solid rgba(252, 244, 231, .35)
}

.tl li {
  position: relative;
  padding: 0 0 1.6rem 1rem
}

.tl li::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 5px);
  top: .55rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a4b49a
}

.tl li.main::before {
  background: #d8b097;
  box-shadow: 0 0 0 4px rgba(216, 176, 151, .25)
}

.tl time {
  font: 500 1.35rem var(--serif);
  display: block
}

.tl small {
  display: block;
  color: #d8b097;
  font-size: .9rem
}

.tl .pin {
  text-decoration: underline dotted;
  text-underline-offset: 4px;
  display: inline-block;
  padding: .3rem 0;
  margin: -.3rem 0
}

.fine {
  font-size: .85rem;
  color: #d8b097;
  text-align: center;
  margin-top: .5rem;
  font-style: italic
}

/* Find us */
.venue {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem
}

.venue h3 {
  font-size: 1.7rem
}

.venue address {
  font-style: normal;
  color: var(--muted);
  margin: .4rem 0 1.1rem
}

.venue-map {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  border-radius: 4px;
  margin: 1.25rem 0
}

.warn {
  border-left: 3px solid var(--accent);
  padding: .2rem 0 .2rem 1rem;
  margin: 1.5rem 0;
  font-size: .98rem
}

details {
  border-bottom: 1px solid var(--line)
}

summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
  font: 400 1.4rem var(--serif);
  cursor: pointer
}

summary::-webkit-details-marker {
  display: none
}

summary::after {
  content: "+";
  font: 300 1.6rem var(--sans);
  color: var(--accent);
  transition: transform .25s
}

details[open] summary::after {
  transform: rotate(45deg)
}

details ul {
  margin: 0 0 1.2rem;
  padding-left: 1.1rem
}

details li {
  margin-bottom: .35rem
}

/* Dress code */
.sw {
  display: grid;
  grid-template-columns: repeat(3, 54px);
  justify-content: center;
  gap: .75rem;
  padding: .5rem 0 1rem
}

.sw button {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--bg2);
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer
}

.sw button[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--ink)
}

.pick {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 48px;
  margin: .5rem 0 2rem;
  font: 400 1.15rem var(--serif)
}

.pick code {
  font: 400 .95rem var(--sans);
  color: var(--muted)
}

.pick .btn {
  min-height: 40px;
  padding: 0 1rem;
  font-size: .85rem
}

.quote {
  font: italic 1.4rem/1.45 var(--serif);
  text-align: center;
  margin: 2.25rem 0 0
}

.dress-note {
  text-align: center;
  max-width: 30rem;
  margin: .5rem auto 0
}

/* Story carousel */
.story-section h2 {
  color: var(--deepink)
}

.story-carousel {
  margin-top: 2rem
}

.story-window {
  width: 100%;
  overflow: hidden
}

.story-track {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
  width: max-content;
  touch-action: pan-y;
  user-select: none;
  transition: transform .35s ease
}

.story-track {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
  width: max-content;
  touch-action: pan-y;
  user-select: none;
  transition: transform .6s cubic-bezier(.22, .68, 0, 1)
}

.story-track.is-initializing {
  transition: none !important
}

.story-slide {
  flex: 0 0 var(--story-card-width, min(72vw, 400px));
  min-width: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  transition: opacity .3s
}

.story-spacer {
  min-width: 0;
  width: 100%;
  aspect-ratio: 4/5
}

.story-spacer {
  flex: 0 0 var(--story-end-space, 0px);
  width: var(--story-end-space, 0px);
  min-width: 0;
  pointer-events: none
}

.story-slide.active {
  opacity: 1
}

.story-slide:not(.active) {
  opacity: .48;
  cursor: pointer
}

.story-image,
.story-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover
}

.story-placeholder {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  place-items: center;
  background: linear-gradient(165deg, #a4b49a, #73784a 55%, #3f211c);
  color: rgba(252, 244, 231, .82);
  font: italic .9rem/1.3 var(--serif);
  text-align: center;
  padding: .5rem
}

.story-image {
  opacity: 0;
  background: var(--story-frame-color, #b5a18b);
  border-radius: var(--story-card-radius, 8px);
  cursor: zoom-in;
  transition: opacity .25s ease
}

.story-image.loaded {
  opacity: 1
}

.story-timeline {
  position: relative;
  display: flex;
  width: 100%;
  margin: .65rem auto .85rem
}

.story-timeline:before {
  content: "";
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  top: 50%;
  height: 1px;
  background: rgba(252, 244, 231, .36)
}

.story-dot {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 1 1 0;
  place-items: center;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer
}

.story-dot:before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1px solid var(--deepink);
  border-radius: 50%;
  background: var(--deep)
}

.story-dot[aria-current="true"]:before {
  width: 14px;
  height: 14px;
  border-color: #d8b097;
  background: #d8b097;
  box-shadow: 0 0 0 4px rgba(216, 176, 151, .3), 0 0 12px rgba(216, 176, 151, .8)
}

.story-dot:focus-visible {
  outline-offset: -2px;
  border-radius: 50%
}

.story-copy {
  text-align: center;
  min-height: 6.5rem
}

.story-copy h3 {
  font: italic 1.65rem/1.2 var(--serif);
  color: var(--deepink);
  margin: 0 0 .4rem
}

.story-copy p {
  color: rgba(252, 244, 231, .82);
  font-size: .98rem;
  line-height: 1.5;
  margin: 0 auto;
  max-width: 30rem
}

.story-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(23, 16, 14, .96);
  padding: 1rem
}

.story-lightbox[hidden] {
  display: none
}

.story-lightbox img {
  width: min(92vw, 900px);
  height: min(88vh, 1100px);
  object-fit: contain
}

.story-lightbox-close {
  position: absolute;
  top: max(.5rem, env(safe-area-inset-top));
  right: max(.5rem, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: #fcf4e7;
  font: 300 2rem/1 var(--sans);
  cursor: pointer
}

footer {
  padding: 3rem 1.5rem calc(3rem + env(safe-area-inset-bottom, 0px));
  text-align: center
}

footer.deep {
  background-color: var(--deep);
  background-image: linear-gradient(to bottom, #3f211c 0%, rgba(63, 33, 28, .92) 20%, rgba(63, 33, 28, 0) 78%), url("footer.png");
  background-position: center top, center bottom;
  background-size: 100% 100%, cover;
  background-repeat: no-repeat
}

footer .footer-seal {
  width: clamp(48px, 10vw, 72px);
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto 1rem
}

footer .footer-story {
  font: italic 1.45rem/1.5 var(--serif);
  color: var(--deepink);
  margin: 0 auto .5rem
}

footer .footer-wait {
  color: #d8b097;
  margin: 0
}

/* Tablet */
@media (min-width:640px) {
  .names {
    font-size: 74px
  }

  h2 {
    font-size: 2.75rem
  }

  .wrap {
    max-width: 40rem
  }

  .cd {
    grid-template-columns: repeat(4, 1fr)
  }

  .sw {
    grid-template-columns: repeat(4, 54px)
  }
}

/* Desktop */
@media (min-width:960px) {
  .names {
    font-size: 88px
  }

  footer.deep {
    background-position: center top, center 70%
  }

  .wrap {
    max-width: 46rem
  }

  #top .wrap {
    max-width: 52rem
  }

  .sw {
    grid-template-columns: repeat(6, 54px)
  }
}

/* Wide screens: show section names in the side bar */
@media (min-width:1100px) {
  nav {
    right: 1.25rem;
    border-radius: 18px;
    padding: .5rem .35rem .5rem .9rem
  }

  nav a {
    width: auto;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    padding: 0 .6rem 0 0
  }

  nav a span {
    position: static;
    order: -1;
    opacity: 1;
    background: none;
    color: var(--muted);
    padding: 0;
    margin: 0;
    font-size: .95rem
  }

  nav a.on span {
    color: var(--ink);
    font-weight: 500
  }
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto
  }

  .story-track {
    scroll-behavior: auto
  }

  .story-track {
    transition: none
  }

  .story-slide {
    transition: none
  }

  * {
    transition-duration: .01ms !important
  }
}