/* =====================================================================
   Sashin & Ornessa — the front door: "RSVP coming soon".
   The paper, the type, .eyebrow, .couple, .btn and .foot are styles.css's;
   this is only how the page is laid out and how it arrives.
   ===================================================================== */

.home {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(12vh, 96px) 24px 5vh;
  text-align: center;
  overflow: hidden;
}
.home-inner { width: 100%; max-width: 640px; margin: auto 0; }

/* ---------------------------------------------------------------------
   The jasmine in the corners
   Each strand is sized from its own height in the artwork (--h, in the
   card's pixels) times --u, the size of one of those pixels here, so the
   group keeps its proportions on any screen.
   --------------------------------------------------------------------- */
.garlands {
  --u: clamp(.4px, .074vh, .7px);
  position: absolute;
  top: 0;
  height: 0;
  pointer-events: none;
}
.garlands-l { left: max(4px, 5vw); }
.garlands-r { right: max(4px, 5vw); --u: clamp(.34px, .062vh, .6px); }
.garlands .strand {
  position: absolute;
  top: 0;
  height: calc(var(--h) * var(--u));
  width: auto;
  max-width: none;
  user-select: none;
  transform-origin: 50% 0;
  will-change: transform;
}
.garlands-l .s-g { --h: 521; left: 0;                      animation: swing-long  5.4s ease-in-out -1.2s infinite alternate; }
.garlands-l .s-h { --h: 381; left: calc(50 * var(--u));    animation: swing-short 4.4s ease-in-out -3.4s infinite alternate; }
.garlands-l .s-i { --h: 316; left: calc(102 * var(--u));   animation: swing-short 4.1s ease-in-out  -.3s infinite alternate; }
.garlands-r .s-g { --h: 521; right: 0;                     animation: swing-long  5.2s ease-in-out -2.2s infinite alternate; }
.garlands-r .s-i { --h: 316; right: calc(56 * var(--u));   animation: swing-short 3.9s ease-in-out -1.5s infinite alternate; }
@keyframes swing-long  { from { transform: rotate(-.9deg); }  to { transform: rotate(.9deg); } }
@keyframes swing-short { from { transform: rotate(-1.3deg); } to { transform: rotate(1.3deg); } }

/* ---------------------------------------------------------------------
   The seal, the names, and the word itself
   --------------------------------------------------------------------- */
.emblem {
  position: relative;
  width: clamp(92px, 15vh, 128px);
  aspect-ratio: 1;
  margin: 0 auto 30px;
}
.emblem .seal-shadow, .emblem .wax { animation: float 7s ease-in-out infinite; }

.home .couple { font-size: clamp(34px, 7vw, 54px); }
.when {
  margin: 16px 0 0;
  font-size: clamp(12px, 2.6vw, 14px);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.when span { margin: 0 .35em; color: var(--gold); }

.lotus-mark { display: block; width: 46px; height: 32px; margin: 38px auto 0; color: var(--gold); }

.rsvp { margin: 22px 0 0; font-weight: inherit; }
.rsvp-word {
  display: block;
  font-size: clamp(64px, 17vw, 124px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .26em;
  text-indent: .26em;               /* keeps the tracked word centred */
  color: var(--ink);
}
.rsvp-soon {
  display: block;
  margin-top: 14px;
  font-size: clamp(24px, 5vw, 34px);
  font-style: italic;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--gold-dark);
}

.note {
  margin: 30px auto 34px;
  max-width: 430px;
  font-size: clamp(17px, 2.4vw, 20px);
  font-style: italic;
  color: var(--ink-soft);
}

.home .foot { margin-top: 8vh; }

/* ---------------------------------------------------------------------
   Arriving: each line settles into place, one after the other
   --------------------------------------------------------------------- */
.arrive { animation: arrive 1.5s cubic-bezier(.2,.7,.2,1) both; }
.arrive:nth-child(1) { animation-delay: .15s; }
.arrive:nth-child(2) { animation-delay: .5s; }
.arrive:nth-child(3) { animation-delay: .68s; }
.arrive:nth-child(4) { animation-delay: .86s; }
.arrive:nth-child(5) { animation-delay: 1.1s; }
.arrive:nth-child(6) { animation-delay: 1.3s; }
.arrive:nth-child(7) { animation-delay: 1.6s; }
.arrive:nth-child(8) { animation-delay: 1.8s; }
@keyframes arrive {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 520px) {
  .home { padding-top: max(13vh, 104px); }
  .home .btn { width: auto; }                      /* styles.css makes buttons full-width here */
  .rsvp-word { letter-spacing: .2em; text-indent: .2em; }
}

/* short, wide screens (a phone on its side): bring everything in a little */
@media (max-height: 560px) {
  .home { padding-top: 40px; }
  .emblem { margin-bottom: 16px; }
  .lotus-mark { margin-top: 20px; }
  .note { margin: 18px auto 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .garlands .strand, .emblem .seal-shadow, .emblem .wax, .arrive { animation: none !important; }
}
