:root {
  --primary: #40465f;
  --primary-deep: #2d3142;
  --ivory: #f3efe9;
  --ivory-deep: #dfd7cd;
  --ink: #353a50;
  --muted-ink: #646978;
  --accent: #7d849c;
  --accent-soft: #e1e2e7;
  --champagne: #c8b28d;
  --line-light: rgba(243, 239, 233, 0.58);
  --line-dark: rgba(64, 70, 95, 0.22);
  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--primary-deep);
}

body {
  min-width: 280px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--ivory);
  font-family: "Cormorant Garamond", Baskerville, "Times New Roman", serif;
}

body.invitation-locked {
  overflow: hidden;
  background: var(--primary-deep);
}

body.invitation-locked main,
body.invitation-locked .site-footer {
  opacity: 0;
}

body.invitation-locked.invitation-revealed main,
body.invitation-locked.invitation-revealed .site-footer {
  opacity: 1;
  transition: opacity 500ms ease;
}

body.invitation-locked .reveal {
  opacity: 0;
  animation: none !important;
  transform: translateY(24px);
}

.invitation-cover {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  min-height: 100dvh;
  overflow: hidden;
  place-items: center;
  background: var(--primary);
  transform: translateZ(0);
}

.invitation-cover[hidden] {
  display: none;
}

.youtube-player-shell {
  position: fixed;
  bottom: 0;
  left: -220px;
  z-index: -1;
  width: 200px;
  height: 200px;
  overflow: hidden;
  opacity: 0.001;
  pointer-events: none;
}

.youtube-player-shell iframe {
  display: block;
  width: 200px;
  height: 200px;
  border: 0;
}

.envelope-surface {
  position: absolute;
  inset: 0;
  background-image: url("assets/envelope-cover-wide-blue.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.005);
}

.envelope-seal {
  position: absolute;
  top: 80%;
  left: 50%;
  display: grid;
  width: clamp(146px, 15vw, 190px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  place-items: center;
  color: #4b2f1d;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 11px 12px rgba(64, 46, 61, 0.3));
  transform: translate(-50%, -50%);
  transition: filter 180ms ease, transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.envelope-seal img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.envelope-seal span {
  position: relative;
  z-index: 1;
  margin-top: -2%;
  font-family: Italianno, "Cormorant Garamond", cursive;
  font-size: clamp(2.4rem, 4.2vw, 3.35rem);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 241, 205, 0.25);
}

.envelope-seal:hover {
  filter: drop-shadow(0 14px 14px rgba(64, 46, 61, 0.34));
  transform: translate(-50%, -52%) scale(1.025);
}

.envelope-seal:active {
  filter: drop-shadow(0 6px 7px rgba(64, 46, 61, 0.25));
  transform: translate(-50%, -48%) scale(0.97);
}

.invitation-cover.is-opening {
  pointer-events: none;
  animation: open-envelope 1.3s cubic-bezier(0.72, 0, 0.2, 1) forwards;
}

.invitation-cover.is-opening .envelope-seal {
  animation: break-seal 430ms ease-in forwards;
}

@keyframes break-seal {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  45% {
    opacity: 1;
    transform: translate(-50%, -47%) scale(0.93);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -58%) scale(1.08);
  }
}

@keyframes open-envelope {
  0%,
  26% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-105%);
  }
}

a {
  -webkit-tap-highlight-color: transparent;
}

#invitation-content:focus {
  outline: none;
}

svg {
  display: block;
}

.section-shell {
  width: min(calc(100% - 64px), var(--shell));
  margin-inline: auto;
}

.hero {
  position: relative;
  display: grid;
  width: 100%;
  height: calc(100svh - 64px);
  min-height: 560px;
  max-height: 920px;
  overflow: hidden;
  place-items: center;
  isolation: isolate;
  color: var(--ivory);
  background-color: var(--primary);
  background-image: url("assets/hero-slate.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(45, 49, 66, 0.16), rgba(45, 49, 66, 0.05) 55%, rgba(45, 49, 66, 0.28)),
    radial-gradient(circle at 50% 42%, rgba(64, 70, 95, 0.04), rgba(45, 49, 66, 0.2));
}

.hero-content {
  width: min(calc(100% - 48px), 1050px);
  padding: 76px 0 64px;
  text-align: center;
}

.overline {
  margin: 0;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-overline {
  margin-bottom: 24px;
  color: var(--champagne);
}

h1,
h2,
h3,
p {
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: 5.75rem;
  font-weight: 500;
  line-height: 0.91;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  text-shadow: 0 4px 26px rgba(0, 0, 0, 0.3);
}

h1 span {
  display: block;
}

.ornament {
  display: grid;
  width: min(100%, 360px);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 13px;
}

.ornament > span {
  height: 1px;
}

.ornament b {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
}

.ornament-light {
  margin: 34px auto 26px;
  color: #a9aec0;
}

.ornament-light > span {
  background: linear-gradient(90deg, transparent, var(--line-light));
}

.ornament-light > span:last-child {
  background: linear-gradient(90deg, var(--line-light), transparent);
}

.hero-date {
  display: inline-flex;
  margin: 0 0 14px;
  align-items: baseline;
  gap: 12px;
  color: var(--champagne);
  text-transform: uppercase;
}

.hero-date span:first-child {
  font-size: 2.15rem;
  font-weight: 500;
  line-height: 1;
}

.hero-date span:last-child {
  font-family: Montserrat, Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.25em;
}

.hero-copy {
  margin: 0;
  color: #eee7dd;
  font-size: 1.36rem;
  line-height: 1.45;
}

.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(242, 236, 228, 0.56);
  border-radius: 50%;
  place-items: center;
  color: var(--ivory);
  text-decoration: none;
  transform: translateX(-50%);
  transition: background-color 180ms ease, transform 180ms ease;
}

.scroll-cue svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.scroll-cue:hover {
  background: rgba(242, 236, 228, 0.12);
  transform: translate(-50%, 3px);
}

.message-section {
  position: relative;
  overflow: hidden;
  background: var(--ivory);
}

.message-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 7%;
  width: 1px;
  height: 72px;
  background: var(--line-dark);
}

.message-layout {
  display: grid;
  min-height: 520px;
  padding-block: 104px;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 88px;
}

.message-heading {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 62px 8px 0;
  border-right: 1px solid var(--line-dark);
  color: var(--accent);
}

.roman-mark {
  margin: 0;
  color: rgba(125, 132, 156, 0.18);
  font-size: 9rem;
  font-weight: 500;
  line-height: 0.72;
}

.message-copy {
  max-width: 720px;
}

.ornament-dark {
  width: 150px;
  margin-bottom: 32px;
  color: var(--accent);
}

.ornament-dark > span {
  background: linear-gradient(90deg, transparent, var(--line-dark));
}

.ornament-dark > span:last-child {
  background: linear-gradient(90deg, var(--line-dark), transparent);
}

.message-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 3.35rem;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: 0;
}

.message-copy p {
  max-width: 520px;
  margin: 28px 0 0;
  color: var(--muted-ink);
  font-size: 1.36rem;
  line-height: 1.55;
}

.details-section {
  position: relative;
  padding: 108px 0 116px;
  overflow: hidden;
  isolation: isolate;
  background: var(--accent-soft);
}

.dress-decoration {
  position: absolute;
  top: 70px;
  z-index: -1;
  display: block;
  width: min(25%, 330px);
  height: auto;
  opacity: 0.11;
  filter: brightness(0) saturate(100%) invert(29%) sepia(12%) saturate(1040%) hue-rotate(191deg)
    brightness(87%) contrast(86%);
  pointer-events: none;
  user-select: none;
  transform: translate3d(0, var(--parallax-offset, 0), 0);
  will-change: transform;
}

.dress-decoration-left {
  left: -96px;
}

.dress-decoration-right {
  right: -96px;
  transform: translate3d(0, var(--parallax-offset, 0), 0) scaleX(-1);
}

.details-section::before,
.details-section::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 1px;
  background: rgba(64, 70, 95, 0.18);
}

.details-section::before {
  top: 64px;
  left: 0;
}

.details-section::after {
  right: 0;
  bottom: 64px;
}

.section-heading {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 48px), 720px);
  margin: 0 auto 70px;
  text-align: center;
}

.section-heading .overline {
  margin-bottom: 15px;
  color: var(--accent);
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 3.5rem;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0;
}

.event-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-block {
  display: flex;
  min-height: 510px;
  padding: 14px 70px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.event-block + .event-block {
  border-left: 1px solid rgba(64, 70, 95, 0.2);
}

.event-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 26px;
  border: 1px solid rgba(64, 70, 95, 0.3);
  border-radius: 50%;
  place-items: center;
  color: var(--accent);
}

.event-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.event-type {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-transform: uppercase;
}

.event-block h3 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 2.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.event-block time,
.event-time {
  min-height: 32px;
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
}

.event-block address {
  min-height: 112px;
  margin: 0;
  color: #565d72;
  font-size: 1.24rem;
  font-style: normal;
  line-height: 1.45;
}

.action-button {
  display: inline-flex;
  min-width: 214px;
  min-height: 48px;
  margin-top: auto;
  padding: 11px 22px;
  border: 1px solid var(--primary);
  border-radius: 5px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ivory);
  background: var(--primary);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  line-height: 1.3;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.action-button svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.action-button:hover {
  color: var(--primary);
  background: transparent;
  transform: translateY(-2px);
}

.contact-section {
  position: relative;
  display: grid;
  min-height: 550px;
  overflow: hidden;
  place-items: center;
  isolation: isolate;
  color: var(--ivory);
  background-color: var(--primary);
  background-image: url("assets/hero-slate.jpg");
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: cover;
}

.contact-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(45, 49, 66, 0.62);
}

.contact-layout {
  display: grid;
  padding-block: 92px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 80px;
}

.contact-copy {
  max-width: 690px;
}

.contact-copy .overline {
  margin-bottom: 20px;
  color: var(--champagne);
}

.contact-copy h2 {
  margin: 0;
  font-size: 3.7rem;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
}

.phone-action {
  display: flex;
  min-width: 310px;
  min-height: 96px;
  padding: 18px 28px;
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
  align-items: center;
  gap: 18px;
  color: var(--ivory);
  text-decoration: none;
  transition: background-color 180ms ease;
}

.phone-action:hover {
  background: rgba(242, 236, 228, 0.08);
}

.phone-icon {
  display: grid;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  place-items: center;
}

.phone-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.phone-copy {
  display: grid;
  gap: 3px;
}

.phone-copy small {
  display: grid;
  gap: 3px;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 0.65rem;
  line-height: 1.35;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.phone-copy strong {
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.site-footer {
  display: flex;
  min-height: 92px;
  padding: 24px max(32px, calc((100% - var(--shell)) / 2));
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--ivory-deep);
  background: var(--primary-deep);
}

.site-footer p,
.site-footer span {
  margin: 0;
}

.site-footer p {
  font-size: 1.1rem;
  text-transform: uppercase;
}

.site-footer span {
  font-family: Montserrat, Arial, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-visible {
  animation: reveal-up 720ms ease both;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-cue:focus-visible,
.envelope-seal:focus-visible,
.action-button:focus-visible,
.phone-action:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

@media (orientation: portrait) {
  .envelope-surface {
    background-image: url("assets/envelope-cover-blue.jpg");
  }

  .envelope-seal {
    top: 64%;
    width: clamp(138px, 38vw, 176px);
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .envelope-seal {
    top: 70%;
    width: 128px;
  }
}

@media (max-width: 900px) {
  .section-shell {
    width: min(calc(100% - 48px), var(--shell));
  }

  h1 {
    font-size: 4.35rem;
  }

  .message-layout {
    min-height: 470px;
    padding-block: 84px;
    grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
    gap: 54px;
  }

  .message-heading {
    padding-right: 36px;
  }

  .roman-mark {
    font-size: 6.8rem;
  }

  .message-copy h2 {
    font-size: 2.7rem;
  }

  .dress-decoration {
    width: min(34%, 270px);
  }

  .dress-decoration-left {
    left: -120px;
  }

  .dress-decoration-right {
    right: -120px;
  }

  .event-block {
    padding-inline: 36px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact-copy {
    max-width: 620px;
  }

  .phone-action {
    width: min(100%, 360px);
  }
}

@media (max-width: 640px) {
  .section-shell {
    width: min(calc(100% - 40px), var(--shell));
  }

  .hero {
    height: calc(100svh - 48px);
    min-height: 520px;
    max-height: 820px;
    background-image: url("assets/invitation-slate.jpg");
    background-position: center 38%;
  }

  .hero-content {
    width: min(calc(100% - 36px), 520px);
    padding: 86px 0 68px;
  }

  .hero-overline {
    margin-bottom: 20px;
  }

  h1 {
    font-size: 3rem;
    line-height: 0.96;
  }

  .ornament-light {
    width: min(76%, 280px);
    margin: 28px auto 22px;
  }

  .hero-copy {
    max-width: 280px;
    margin-inline: auto;
    font-size: 1.12rem;
  }

  .scroll-cue {
    bottom: 15px;
    width: 40px;
    height: 40px;
  }

  .message-section::before {
    right: 24px;
    height: 48px;
  }

  .message-layout {
    min-height: 0;
    padding-block: 78px 84px;
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .message-heading {
    display: block;
    padding: 0;
    border-right: 0;
    text-align: center;
  }

  .roman-mark {
    margin-top: 28px;
    font-size: 5.5rem;
    line-height: 0.78;
  }

  .message-copy {
    text-align: center;
  }

  .ornament-dark {
    margin: 0 auto 27px;
  }

  .message-copy h2 {
    font-size: 2.2rem;
    line-height: 1.08;
  }

  .message-copy p {
    margin: 22px auto 0;
    font-size: 1.17rem;
  }

  .dress-decoration {
    top: 64px;
    width: 190px;
    opacity: 0.07;
  }

  .dress-decoration-left {
    left: 50%;
    transform: translate3d(-50%, var(--parallax-offset, 0), 0);
  }

  .dress-decoration-right {
    display: none;
  }

  .details-section {
    padding: 82px 0 88px;
  }

  .details-section::before,
  .details-section::after {
    width: 72px;
  }

  .details-section::before {
    top: 42px;
  }

  .details-section::after {
    bottom: 42px;
  }

  .section-heading {
    margin-bottom: 48px;
  }

  .section-heading h2 {
    font-size: 2.55rem;
  }

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

  .event-block {
    min-height: 0;
    padding: 6px 4px 56px;
  }

  .event-block + .event-block {
    padding-top: 56px;
    padding-bottom: 6px;
    border-top: 1px solid rgba(64, 70, 95, 0.2);
    border-left: 0;
  }

  .event-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 23px;
  }

  .event-block h3 {
    font-size: 2.35rem;
  }

  .event-block address {
    min-height: 0;
    font-size: 1.17rem;
  }

  .action-button {
    width: min(100%, 260px);
    margin-top: 32px;
  }

  .contact-section {
    min-height: 620px;
    background-image: url("assets/invitation-slate.jpg");
    background-position: center bottom;
  }

  .contact-shade {
    background: rgba(45, 49, 66, 0.57);
  }

  .contact-layout {
    padding-block: 90px 130px;
    gap: 44px;
    text-align: center;
  }

  .contact-copy h2 {
    font-size: 2.7rem;
    line-height: 1.06;
  }

  .phone-action {
    min-width: 0;
    margin-inline: auto;
    justify-content: center;
    text-align: left;
  }

  .site-footer {
    min-height: 112px;
    padding: 28px 20px;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 340px) {
  h1 {
    font-size: 2.5rem;
  }

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

  .message-copy h2 {
    font-size: 1.92rem;
  }

  .section-heading h2,
  .contact-copy h2 {
    font-size: 2.2rem;
  }

  .phone-action {
    padding-inline: 16px;
  }

  .phone-copy strong {
    font-size: 1.25rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .dress-decoration {
    will-change: auto;
  }

  .invitation-cover.is-opening,
  .invitation-cover.is-opening .envelope-seal {
    animation-duration: 0.01ms !important;
  }
}
