:root {
  --evergreen: #0b120d;
  --evergreen-rgb: 11, 18, 13;
  --ivory: #f6f1e6;
  --ivory-soft: rgba(246, 241, 230, 0.78);
  --champagne: #dcc08a;
  --hairline: rgba(220, 192, 138, 0.38);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--evergreen);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: clip;
  background: var(--evergreen);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p {
  margin: 0;
  font-weight: inherit;
}

[hidden] {
  display: none !important;
}

/* Photo: anchored left and oversized so the couple sits right of the text. */
.photo {
  position: fixed;
  inset: -16px;
  overflow: hidden;
  transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0);
}

.photo__drift {
  position: absolute;
  inset: 0;
  transform-origin: 62% 40%;
  animation: drift 38s ease-in-out infinite alternate;
}

.photo__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 125%;
  height: 100%;
  object-fit: cover;
  object-position: 0% 18%;
  transition: filter 3.2s var(--ease), transform 4.5s var(--ease);
}

.js .photo__img {
  filter: blur(26px) brightness(1.12);
  transform: scale(1.06);
}

.js .is-ready .photo__img {
  filter: blur(0) brightness(1);
  transform: none;
}

@keyframes drift {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}

.scrim {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg,
      rgba(var(--evergreen-rgb), 0.9) 0%,
      rgba(var(--evergreen-rgb), 0.76) 28%,
      rgba(var(--evergreen-rgb), 0.34) 46%,
      rgba(var(--evergreen-rgb), 0) 60%),
    linear-gradient(0deg, rgba(var(--evergreen-rgb), 0.45) 0%, rgba(var(--evergreen-rgb), 0) 30%);
}

.light {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Content */
.stage {
  position: relative;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: center;
  padding: clamp(5rem, 11vh, 7rem) clamp(2rem, 7vw, 6.5rem) clamp(1.5rem, 4vh, 3rem);
}

.monogram {
  position: absolute;
  top: clamp(1.5rem, 4vh, 2.75rem);
  left: clamp(2rem, 7vw, 6.5rem);
  color: var(--champagne);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-style: italic;
  letter-spacing: 0.08em;
}

.intro {
  width: min(100%, 31rem);
}

.eyebrow,
.soon__title,
.countdown__label,
.button,
.hint {
  font-family: var(--sans);
  text-transform: uppercase;
}

.eyebrow {
  color: var(--ivory-soft);
  font-size: 0.75rem;
  letter-spacing: 0.36em;
}

.names {
  margin-top: clamp(0.6rem, 1.6vh, 1rem);
  font-family: var(--serif);
  font-size: clamp(3rem, min(5.6vw, 10vh), 5.4rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
}

.names [data-partner="one"] {
  display: block;
}

.names__amp {
  color: var(--champagne);
  font-style: italic;
}

.date {
  margin-top: clamp(0.5rem, 1.6vh, 1rem);
  font-family: var(--serif);
  font-size: clamp(2.4rem, min(4.6vw, 8vh), 4.4rem);
  font-variant-numeric: lining-nums;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0.05em;
}

.soon {
  margin-top: clamp(1rem, 3vh, 1.9rem);
  padding-top: clamp(1rem, 2.6vh, 1.6rem);
  border-top: 1px solid var(--hairline);
}

.soon__title {
  color: var(--champagne);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.42em;
}

.soon__text {
  margin-top: 0.5rem;
  color: var(--ivory-soft);
  font-size: 1rem;
  line-height: 1.5;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(1rem, 3vh, 1.9rem);
}

.countdown__unit {
  padding-inline: 0.9rem;
  border-left: 1px solid var(--hairline);
}

.countdown__unit:first-child {
  padding-left: 0;
  border-left: 0;
}

.countdown__value {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 6vh, 2.9rem);
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 300;
  line-height: 1.1;
}

.countdown__label {
  display: block;
  margin-top: 0.2rem;
  color: var(--ivory-soft);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.24em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.1rem, 3.4vh, 2.1rem);
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--champagne);
  border-radius: 0;
  background: var(--champagne);
  color: var(--evergreen);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-decoration: none;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease);
}

.button:hover {
  border-color: var(--ivory);
  background: var(--ivory);
}

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

.hint {
  margin-top: 1rem;
  color: var(--ivory-soft);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  transition: opacity 1.2s var(--ease);
}

.js .hint.is-used {
  opacity: 0;
}

/* Entrance: the text arrives as the photo comes into focus. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}

.js .is-ready .reveal {
  opacity: 1;
  transform: none;
}

.js .is-ready .hint.is-used {
  opacity: 0;
}

.js .is-ready .eyebrow { transition-delay: 1.3s; }
.js .is-ready .names { transition-delay: 1.5s; }
.js .is-ready .date { transition-delay: 1.75s; }
.js .is-ready .soon { transition-delay: 2s; }
.js .is-ready .countdown { transition-delay: 2.25s; }
.js .is-ready .actions { transition-delay: 2.5s; }
.js .is-ready .hint:not(.is-used) { transition-delay: 2.75s; }
.js .is-ready .monogram { transition-delay: 2.75s; }

/* Dialogs */
.dialog {
  width: min(calc(100vw - 2rem), 26rem);
  padding: 2.5rem 2rem 2rem;
  border: 1px solid var(--hairline);
  background: var(--evergreen);
  color: var(--ivory);
  text-align: center;
}

.dialog[open] {
  animation: rise 0.5s var(--ease);
}

.dialog::backdrop {
  background: rgba(var(--evergreen-rgb), 0.62);
  backdrop-filter: blur(6px);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.dialog__close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: none;
  color: var(--ivory-soft);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.dialog__close:hover {
  color: var(--ivory);
}

.dialog__title {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 300;
  line-height: 1.1;
}

.dialog__text {
  margin-top: 0.5rem;
  color: var(--ivory-soft);
  font-size: 1rem;
  line-height: 1.5;
}

.dialog__links {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Large monitors: scale the whole text column up with the photo. */
@media (min-width: 1700px) and (min-height: 950px) {
  html {
    font-size: 125%;
  }
}

/* Squarer screens: push the couple further right to keep them clear of the text. */
@media (max-aspect-ratio: 3/2) {
  .photo__img {
    width: 145%;
  }

  .intro {
    width: min(100%, 42vw);
  }
}

/* Phones and portrait screens: the photo sits above the text and scrolls away. */
@media (max-width: 820px), (max-aspect-ratio: 1/1) {
  .photo {
    position: absolute;
    inset: 0 0 auto;
    height: 62svh;
    transform: none;
  }

  .photo__img {
    width: 100%;
    object-position: 49% 12%;
  }

  .scrim {
    position: absolute;
    inset: 0 0 auto;
    height: calc(62svh + 1px);
    background: linear-gradient(180deg,
      rgba(var(--evergreen-rgb), 0.28) 0%,
      rgba(var(--evergreen-rgb), 0) 22%,
      rgba(var(--evergreen-rgb), 0) 56%,
      rgba(var(--evergreen-rgb), 0.82) 86%,
      var(--evergreen) 100%);
  }

  .stage {
    align-items: center;
    justify-content: flex-start;
    padding: 49svh 1.25rem 2rem;
    text-align: center;
  }

  .monogram {
    left: 0;
    width: 100%;
    color: var(--ivory);
  }

  .intro {
    width: min(100%, 27rem);
  }

  .eyebrow {
    font-size: 0.6875rem;
    letter-spacing: 0.3em;
  }

  .names {
    font-size: clamp(2rem, 10.8vw, 4.5rem);
  }

  .names [data-partner="one"] {
    display: inline;
  }

  .date {
    font-size: clamp(2.2rem, 10.5vw, 3.6rem);
  }

  .soon__title {
    font-size: 0.95rem;
    letter-spacing: 0.36em;
  }

  .countdown__unit {
    padding-inline: 0.25rem;
  }

  .countdown__unit:first-child {
    padding-left: 0.25rem;
  }

  .countdown__label {
    font-size: 0.5625rem;
    letter-spacing: 0.16em;
  }

  .actions {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo__drift,
  .dialog[open] {
    animation: none;
  }

  .photo__img,
  .js .photo__img,
  .js .reveal {
    transform: none;
    transition: opacity 0.4s linear;
  }

  .js .photo__img {
    filter: none;
  }

  .js .is-ready .reveal {
    transition-delay: 0s;
  }
}
