:root {
  --ink: #273129;
  --olive: #68725f;
  --sage: #aab19a;
  --cream: #f7f2e9;
  --paper: #fffdf9;
  --taupe: #b2a595;
  --rose: #c7a39b;
  --gold: #a98d5d;
  --serif: "Cormorant Garamond", Georgia, serif;
  --display: "Italiana", Georgia, serif;
  --script: "Parisienne", cursive;
  --sans: "Montserrat", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
}

ul {
  list-style-type: none;
  margin: 0px;
  padding: 0px;
  column-count: 3;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--cream);
  transition: opacity .6s ease, visibility .6s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-monogram,
.nav-brand,
.footer-monogram {
  font-family: var(--display);
  letter-spacing: .12em;
}

.loader-monogram {
  font-size: clamp(2rem, 7vw, 4rem);
  animation: pulse 1.5s ease-in-out infinite;
}

.loader-monogram span,
.nav-brand span,
.footer-monogram span {
  font-family: var(--script);
  color: var(--gold);
}

@keyframes pulse {
  50% { opacity: .45; transform: scale(.97); }
}

.site-header {
  min-height: 100vh;
}

.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 6vw, 90px);
  color: white;
  border-bottom: 1px solid rgba(255,255,255,.25);
  background-color: #4e5449;
}

.nav-brand {
  text-decoration: none;
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
  font-family: var(--sans);
  font-size: .69rem;
  letter-spacing: .18em;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 1px;
  background: white;
  transition: width .3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-button {
  display: none;
  border: 0;
  background: none;
  padding: 8px;
}

.menu-button span {
  display: block;
  width: 25px;
  height: 1px;
  margin: 6px 0;
  background: white;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    url("images/hero.jpg") center 35% / cover no-repeat,
    linear-gradient(135deg, #798071, #3e493f);
}

.hero-overlay,
.quote-overlay,
.rsvp-overlay {
  position: absolute;
  inset: 0;
}

.hero-overlay {
  background:
    linear-gradient(to bottom, rgba(15,20,15,.25), rgba(15,20,15,.48)),
    linear-gradient(to right, rgba(0,0,0,.12), transparent 45%, rgba(0,0,0,.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 950px;
  padding: 120px 24px 50px;
  color: white;
  text-align: center;
}

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .32em;
  line-height: 1.5;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(4.4rem, 12vw, 9.5rem);
  line-height: .78;
  text-shadow: 0 3px 25px rgba(0,0,0,.18);
}

.hero h1 span {
  display: block;
}

.hero h1 small {
  display: block;
  margin: .22em 0;
  font-family: var(--script);
  font-size: .38em;
  color: #f1e2c7;
}

.hero-copy {
  margin: 34px 0 12px;
  font-size: 1.2rem;
  font-style: italic;
}

.hero-date {
  font-family: var(--sans);
  font-size: .82rem;
  letter-spacing: .38em;
}

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 70px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: .65rem;
  letter-spacing: .25em;
  text-transform: uppercase;
}

.scroll-cue i {
  display: block;
  width: 1px;
  height: 46px;
  background: rgba(255,255,255,.75);
  animation: scrollLine 1.7s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(.55); transform-origin: top; opacity: .4; }
  50% { transform: scaleY(1); opacity: 1; }
}

.section {
  position: relative;
  padding: clamp(88px, 11vw, 150px) 24px;
}

.section-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
  text-align: center;
}

.section-inner.narrow {
  width: min(820px, 100%);
}

h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
}

.ornament {
  margin: 22px auto 26px;
  color: var(--gold);
  font-size: .9rem;
}

.ornament.left {
  margin-left: 0;
}

.lead {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.25rem;
}

.invitation {
  overflow: hidden;
  background: var(--cream);
}

.botanical {
  position: absolute;
  color: rgba(104,114,95,.16);
  font-size: clamp(12rem, 30vw, 28rem);
  line-height: 1;
  user-select: none;
}

.botanical-left {
  left: -7vw;
  top: 10%;
  transform: rotate(-25deg);
}

.botanical-right {
  right: -7vw;
  bottom: 4%;
  transform: rotate(150deg);
}

.date-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 650px;
  margin: 55px auto;
  border-top: 1px solid rgba(39,49,41,.22);
  border-bottom: 1px solid rgba(39,49,41,.22);
}

.date-grid > div {
  padding: 24px;
}

.date-grid strong {
  display: block;
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 400;
}

.date-label,
.date-month small {
  font-family: var(--sans);
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.date-month {
  min-width: 150px;
  border-right: 1px solid rgba(39,49,41,.22);
  border-left: 1px solid rgba(39,49,41,.22);
}

.date-month span {
  display: block;
  font-family: var(--script);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--olive);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 680px;
  margin: 0 auto;
}

.countdown div {
  position: relative;
  padding: 10px;
}

.countdown div:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(39,49,41,.18);
}

.countdown strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 400;
  line-height: 1;
}

.countdown span {
  font-family: var(--sans);
  font-size: .63rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.story-section,
.dresscode {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 780px;
  padding: 0;
}

.story-photo,
.dresscode-photo {
  position: relative;
  min-height: 700px;
  background: #d9d5cc;
}

.photo-caption {
  position: absolute;
  right: -35px;
  bottom: 70px;
  padding: 20px 26px;
  background: var(--paper);
  font-family: var(--script);
  font-size: 1.8rem;
  box-shadow: 0 12px 35px rgba(0,0,0,.1);
}

.story-copy,
.dresscode-copy {
  align-self: center;
  padding: clamp(65px, 9vw, 140px);
}

.story-copy h2,
.dresscode-copy h2 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
}

.story-copy p,
.dresscode-copy p {
  max-width: 590px;
}

.signature {
  margin-top: 35px;
  font-family: var(--script);
  font-size: 2.1rem;
  color: var(--olive);
}

.quote-section {
  position: relative;
  min-height: 610px;
  display: grid;
  place-items: center;
  padding: 80px 24px;
  background:
    url("images/quote-bg.jpg") center / cover no-repeat,
    #536052;
  color: white;
  text-align: center;
}

.quote-overlay {
  background: rgba(25,35,27,.56);
}

.quote-section blockquote {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 5.5vw, 5rem);
  line-height: 1.22;
}

.quote-section cite {
  display: block;
  margin-top: 30px;
  font-family: var(--sans);
  font-size: .65rem;
  font-style: normal;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.lovely-message {
  position: relative;
  padding: 20px;
  border: 1px solid rgba(39,49,41,.18);
  background: var(--paper);
}

.details {
  background: var(--paper);
}

.detail-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 60px;
}

.detail-card {
  position: relative;
  min-height: 430px;
  padding: 60px 32px 40px;
  border: 1px solid rgba(39,49,41,.18);
  background: var(--paper);
}

.detail-card + .detail-card {
  border-left: 0;
}

.detail-card.featured {
  transform: translateY(-18px);
  background: var(--olive);
  color: white;
  box-shadow: 0 20px 45px rgba(39,49,41,.18);
}

.card-number {
  position: absolute;
  left: 22px;
  top: 18px;
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .15em;
  opacity: .55;
}

.line-icon {
  font-size: 2.5rem;
  color: var(--gold);
}

.detail-card h3 {
  margin: 22px 0 5px;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 400;
}

.detail-time {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.detail-card a {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--sans);
  font-size: .65rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  text-underline-offset: 7px;
}

.timeline-section {
  background: var(--cream);
}

.section-heading {
  text-align: center;
}

.timeline {
  width: min(850px, 100%);
  margin: 65px auto 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 100px 30px 1fr;
  gap: 24px;
  text-align: left;
}

.timeline-item time {
  padding-top: 2px;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
}

.timeline-dot {
  position: relative;
}

.timeline-dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--cream);
  transform: translateX(-50%);
}

.timeline-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 17px;
  bottom: 0;
  width: 1px;
  background: rgba(39,49,41,.2);
}

.timeline-item:last-child .timeline-dot::after {
  display: none;
}

.timeline-item > div:last-child {
  padding: 0 0 45px;
}

.timeline-item h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 400;
}

.timeline-item p {
  margin: 3px 0 0;
}

.dresscode {
  grid-template-columns: .9fr 1.1fr;
  background: var(--paper);
}

.dresscode-photo {
  grid-column: 2;
  grid-row: 1;
}

.dresscode-copy {
  grid-column: 1;
  grid-row: 1;
}

.palette {
  display: flex;
  gap: 12px;
  margin-top: 36px;
}

.palette span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 5px solid white;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
}

.palette span:nth-child(1) { background: #f5f0e6; }
.palette span:nth-child(2) { background: #d8c5a9; }
.palette span:nth-child(3) { background: #9da58d; }
.palette span:nth-child(4) { background: #9e8e7d; }
.palette span:nth-child(5) { background: #c7a39b; }

.small-note {
  font-size: .9rem;
  font-style: italic;
}

.text-align-left {
  text-align: left;
}

.gallery {
  background: var(--cream);
}

.gallery-grid {
  width: min(1180px, 100%);
  margin: 55px auto 0;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  grid-template-rows: 340px 340px;
  gap: 18px;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
}

/*.gallery-grid img {
  transition: transform .8s ease;
}

.gallery-grid figure:hover img {
  transform: scale(1.035);
}*/

.gallery-large {
  grid-row: 1 / 3;
}

.gallery-wide {
  display: none;
}

.rsvp {
  min-height: 900px;
  display: grid;
  place-items: center;
  background:
    url("images/rsvp-bg.jpg") center / cover no-repeat,
    #4c594c;
}

.rsvp-overlay {
  background: rgba(31,42,33,.58);
}

.rsvp-card {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 24px));
  padding: clamp(45px, 7vw, 80px);
  background: rgba(255,253,249,.96);
  text-align: center;
  box-shadow: 0 25px 80px rgba(0,0,0,.18);
}

.rsvp-card > p {
  max-width: 520px;
  margin-right: auto;
  margin-left: auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

label,
legend {
  font-family: var(--sans);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid rgba(39,49,41,.32);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 1rem var(--serif);
  outline: none;
}

input {
	text-align: center;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
}

fieldset {
  margin: 28px 0;
  padding: 0;
  border: 0;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  margin: 14px 22px 0 0;
  cursor: pointer;
}

.radio-label input {
  width: auto;
  margin: 0 10px 0 0;
}

.button {
  display: block;
  min-width: 190px;
  margin: 36px auto 0;
  padding: 15px 28px;
  border: 1px solid var(--olive);
  background: var(--olive);
  color: white;
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: .3s ease;
}

.button:hover {
  background: transparent;
  color: var(--olive);
}

.form-status {
  margin: 18px 0 0;
  text-align: center;
  font-size: .95rem;
}

footer {
  padding: 70px 24px;
  background: #29332b;
  color: rgba(255,255,255,.8);
  text-align: center;
}

.footer-monogram {
  display: inline-block;
  margin-bottom: 18px;
  color: white;
  text-decoration: none;
  font-size: 2rem;
}

footer p {
  margin: 3px 0;
  font-family: var(--sans);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.footer-note {
  opacity: .55;
}

@media (max-width: 900px) {
  .navbar {
	  position: relative;
  }
  .nav-links {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    background: rgba(39,49,41,.98);
    transform: translateX(100%);
    transition: transform .4s ease;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: .85rem;
  }

  .menu-button {
    position: relative;
    z-index: 2;
    display: block;

  }

  .story-section,
  .dresscode {
    grid-template-columns: 1fr;
  }

  .story-photo,
  .dresscode-photo {
    min-height: 580px;
  }

  .dresscode-photo,
  .dresscode-copy {
    grid-column: 1;
  }

  .dresscode-photo {
    grid-row: 1;
  }

  .dresscode-copy {
    grid-row: 2;
  }

  .photo-caption {
    right: 24px;
    bottom: -25px;
  }

  .detail-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .detail-card + .detail-card {
    border-left: 1px solid rgba(39,49,41,.18);
  }

  .detail-card.featured {
    transform: none;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .navbar {
    height: 72px;
  }

  .hero

  .hero-copy {
    font-size: 1rem;
  }

  .hero-date {
    font-size: .68rem;
  }

  .scroll-cue {
    margin-top: 55px;
  }

  .date-grid {
    grid-template-columns: 1fr;
  }

  .date-month {
    border: 0;
    border-top: 1px solid rgba(39,49,41,.22);
    border-bottom: 1px solid rgba(39,49,41,.22);
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px 0;
  }

  .countdown div:nth-child(2)::after {
    display: none;
  }

  .story-photo,
  .dresscode-photo {
    min-height: 480px;
  }

  .story-copy,
  .dresscode-copy {
    padding: 78px 28px;
  }

  .quote-section {
    min-height: 500px;
  }

  .detail-card {
    min-height: auto;
  }

  .timeline-item {
    grid-template-columns: 65px 22px 1fr;
    gap: 12px;
  }

  .palette span {
    width: 43px;
    height: 43px;
  }

  .gallery-grid {
    display: block;
  }

  .gallery-grid figure {
    height: 360px;
    margin-bottom: 14px;
  }

  .gallery-grid figure:nth-child(3) {
    height: 470px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .radio-label {
    display: flex;
  }

  .rsvp-card {
    padding: 48px 24px;
  }

	input,
	select,
	textarea {
		margin-top: 2px;
		padding: 4px 0;
	}

	.button {
		margin: 16px auto 0;
		padding: 4px 28px;
	}
}

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

}

.invitation-site {
  opacity: 0;
  visibility: hidden;
  transform: translateY(28px) scale(.995);
  transition: opacity .9s ease, transform .9s ease, visibility .9s ease;
}

.invitation-site.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.envelope-home {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 30px 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.72), transparent 45%),
    #f4efe7;
  transition: opacity .85s ease, visibility .85s ease;
}

.envelope-home::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .36;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(2deg, rgba(91,72,51,.035) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(92deg, rgba(255,255,255,.28) 0 1px, transparent 1px 6px),
    radial-gradient(circle at 20% 30%, rgba(89,69,47,.045) 0 1px, transparent 1.5px),
    radial-gradient(circle at 75% 70%, rgba(89,69,47,.035) 0 1px, transparent 1.5px);
  background-size: auto, auto, 13px 15px, 17px 19px;
  mix-blend-mode: multiply;
}

.envelope-home::after {
  content: "";
  position: absolute;
  width: min(780px, 90vw);
  height: min(780px, 90vw);
  border: 1px solid rgba(104,114,95,.10);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(104,114,95,.025), 0 0 0 140px rgba(104,114,95,.018);
}

.envelope-home.is-entering { pointer-events: none; }

.envelope-home.opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-scene {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  text-align: center;
}

.envelope-kicker,
.envelope-date {
  margin: 0;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .25em;
  font-size: .68rem;
  transition: opacity .45s ease;
}

.envelope-kicker { margin-bottom: 30px; }
.envelope-date { margin-top: 22px; opacity: .72; }

.envelope-wrap {
  position: relative;
  width: min(590px, 90vw);
  aspect-ratio: 1.52 / 1;
  margin: 0 auto;
  perspective: 1500px;
  transform-style: preserve-3d;
  filter: drop-shadow(0 34px 30px rgba(74,59,42,.22));
}

/* Shared fibrous paper texture for all four envelope layers. */
.envelope-back,
.envelope-flap,
.envelope-side,
.envelope-bottom,
.invitation-card-preview {
  background-blend-mode: multiply, normal, normal;
}

/* Layer 4: back of the envelope. */
.envelope-back {
  position: absolute;
  z-index: 0;
  inset: 10% 0 0;
  border: 1px solid rgba(89,69,47,.18);
  border-radius: 3px;
  background-image:
    repeating-linear-gradient(3deg, rgba(94,72,48,.045) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(255,255,255,.58), transparent 18%),
    linear-gradient(145deg, #eadfd2, #d8c8b5);
  box-shadow: inset 0 0 30px rgba(108,87,62,.09);
}

.envelope-back::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: radial-gradient(circle, rgba(84,64,43,.24) 0 .55px, transparent .8px);
  background-size: 8px 10px;
}

/* Layer 3: invitation card preview. */
.invitation-card-preview {
  position: absolute;
  z-index: 3;
  left: 8%;
  right: 8%;
  top: 13%;
  height: 76%;
  display: grid;
  align-content: center;
  padding: 24px;
  background-image:
    repeating-linear-gradient(1deg, rgba(92,78,61,.03) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(255,255,255,.42), transparent 24%),
    linear-gradient(135deg, #fffdf9, #f4eee5);
  border: 1px solid rgba(169,141,93,.30);
  box-shadow: 0 8px 20px rgba(0,0,0,.09);
  will-change: transform;
  cursor: default;
  outline: none;
}

.invitation-card-preview::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(104,114,95,.13);
  pointer-events: none;
}

.invitation-card-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .17;
  background-image: radial-gradient(circle, rgba(80,64,48,.22) 0 .5px, transparent .75px);
  background-size: 9px 11px;
}

.invitation-card-preview p,
.invitation-card-preview h1,
.preview-line { position: relative; z-index: 1; }

.invitation-card-preview p {
  margin: 0;
  font-family: var(--sans);
  font-size: .58rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.invitation-card-preview h1 {
  margin: 16px 0 10px;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

.invitation-card-preview h1 span {
  font-family: var(--script);
  color: var(--gold);
}

.preview-line {
  width: 70px;
  height: 1px;
  margin: 8px auto 14px;
  background: var(--gold);
}
.preview-date { color: var(--olive); }

.preview-enter {
  left: 0;
  right: 0;
  color: var(--olive);
}

.preview-enter-fail {
  left: 0;
  right: 0;
  color: var(--rose);
}


/* Layer 2: left, right and bottom flaps. */
.envelope-pocket {
  position: absolute;
  z-index: 4;
  inset: 10% 0 0;
  overflow: hidden;
  border: 1px solid rgba(89,69,47,.17);
  border-radius: 3px;
  pointer-events: none;
}

.envelope-side,
.envelope-bottom {
  position: absolute;
  inset: 0;
  display: block;
  background-image:
    repeating-linear-gradient(2deg, rgba(94,72,48,.045) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(255,255,255,.42), transparent 30%),
    linear-gradient(145deg, #eee3d6, #d8c7b3);
  box-shadow: inset 0 -10px 24px rgba(90,70,48,.07);
}

.envelope-side-left { clip-path: polygon(0 0, 55% 58%, 0 100%); }
.envelope-side-right { clip-path: polygon(100% 0, 45% 58%, 100% 100%); }
.envelope-bottom {
  clip-path: polygon(0 100%, 50% 47%, 100% 100%);
  background-image:
    repeating-linear-gradient(-2deg, rgba(94,72,48,.045) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(255,255,255,.34), transparent 38%),
    linear-gradient(160deg, #f1e7dc, #d9c8b5);
}

/* Layer 1: front/top flap. */
.envelope-flap {
  position: absolute;
  z-index: 6;
  top: 10%;
  left: 0;
  width: 100%;
  height: 58%;
  border-top: 1px solid rgba(89,69,47,.18);
  background-image:
    repeating-linear-gradient(3deg, rgba(94,72,48,.045) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(255,255,255,.48), transparent 30%),
    linear-gradient(180deg, #eee4d8, #d7c6b2);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transform: rotateX(0deg);
  backface-visibility: visible;
  box-shadow: 0 7px 12px rgba(90,70,48,.06);
  will-change: transform;
}

.wax-seal {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 56%;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50% 47% 52% 49%;
  background:
    radial-gradient(circle at 33% 28%, rgba(255,255,255,.24), transparent 19%),
    radial-gradient(circle at 65% 70%, rgba(0,0,0,.12), transparent 35%),
    radial-gradient(circle, #78866d 0 58%, #5d6954 59% 100%);
  color: #f8f1e7;
  box-shadow: 0 7px 15px rgba(0,0,0,.24), inset 0 0 0 5px rgba(255,255,255,.075), inset 0 0 14px rgba(0,0,0,.14);
  transform: translate(-50%, -50%) rotate(-2deg);
  cursor: pointer;
  transition: transform .35s ease, opacity .35s ease;
}

.wax-seal::before,
.wax-seal::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 15px;
  border-radius: 50%;
  background: #66745d;
  z-index: -1;
}
.wax-seal::before { left: -5px; bottom: 10px; transform: rotate(25deg); }
.wax-seal::after { right: -4px; top: 15px; transform: rotate(-18deg); }
.wax-seal:hover { transform: translate(-50%, -50%) rotate(-2deg) scale(1.06); }
.wax-seal > span { font-family: var(--display); font-size: 1.35rem; letter-spacing: .05em; }
.seal-amp { margin: 0 2px; font-family: var(--script); color: #e8d7b6; }

.open-button {
  margin-top: 30px;
  padding: 13px 27px;
  border: 1px solid rgba(39,49,41,.7);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: .67rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .3s ease, color .3s ease, transform .3s ease, opacity .4s ease;
}
.open-button:hover { background: var(--ink); color: white; transform: translateY(-2px); }

@keyframes openFrontFlap {
  0% { transform: rotateX(0deg); z-index: 6; }
  49% { z-index: 6; }
  50%, 100% { transform: rotateX(180deg); z-index: 1; }
}

@keyframes revealInvitationCard {
  0%, 25% { transform: translateY(0); z-index: 3; }
  26% { z-index: 7; }
  100% { transform: translateY(-92%); z-index: 7; }
}

.envelope-wrap.is-opening .envelope-flap {
  animation: openFrontFlap 1.05s cubic-bezier(.65,.02,.25,1) forwards;
}

.envelope-wrap.is-opened .envelope-flap {
  animation: openFrontFlap 0s cubic-bezier(.65,.02,.25,1) forwards;
}

.envelope-wrap.is-opening .invitation-card-preview {
  animation: revealInvitationCard 1.9s cubic-bezier(.18,.76,.24,1) .52s forwards;
}

.envelope-wrap.is-opened .invitation-card-preview {
  animation: revealInvitationCard 0s cubic-bezier(.18,.76,.24,1) 0s forwards;
}

.envelope-wrap.card-ready .invitation-card-preview {
  cursor: default;
  transition: box-shadow .35s ease, filter .35s ease;
}

.envelope-wrap.card-ready .invitation-card-preview:hover,
.envelope-wrap.card-ready .invitation-card-preview:focus-visible {
  box-shadow: 0 18px 34px rgba(0,0,0,.16);
  filter: brightness(1.015);
}

.envelope-wrap.card-ready .preview-enter { opacity: .78; }

.envelope-wrap.is-opening .wax-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.45);
  pointer-events: none;
}

.envelope-wrap.is-opened .wax-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.45);
  pointer-events: none;
}

.envelope-wrap.is-opening + .open-button,
.envelope-home.is-transitioning .open-button,
.envelope-home.is-transitioning .envelope-date,
.envelope-home.is-transitioning .envelope-kicker { opacity: 0; }

@media (max-width: 600px) {
  .envelope-wrap { width: min(430px, 94vw); }
  .wax-seal { width: 70px; height: 70px; }
  .invitation-card-preview { padding: 4px 16px 0px 16px; }
}

