/* ==========================================================================
   Christmas Dinner · the private page (private.js)
   The sealed envelope for visitors without a personal link, links that no
   longer work, and email preferences. The envelope itself is in intro.css.
   ========================================================================== */

.private__main {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(clamp(92px, 13vh, 140px) + env(safe-area-inset-top, 0px)) var(--gutter) calc(clamp(36px, 7vh, 72px) + env(safe-area-inset-bottom, 0px));
}

.private__stage {
  display: grid;
  justify-items: center;
  width: 100%;
}

/* Phones and small tablets: the envelope is nearly as wide as the screen, so the moon rises to
   hang between the lights and the envelope, and the envelope always starts below it */
@media (max-width: 740px) {
  .private .moon {
    top: clamp(60px, 9vh, 96px);
  }

  .private__main {
    padding-top: calc(max(clamp(92px, 13vh, 140px), clamp(60px, 9vh, 96px) + 54px) + env(safe-area-inset-top, 0px));
  }
}

.private .env-sealed__heading {
  color: var(--gold-hi);
  text-shadow: 0 0 28px rgba(255, 196, 92, 0.26), 0 2px 1px rgba(0, 0, 0, 0.5);
  outline: none;
}

/* Email preferences: a question in serif, with the dinner's name set apart */
.private--question .env-sealed__heading {
  max-width: 22ch;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 5.4vw, 2.7rem);
  line-height: 1.16;
  color: var(--snow);
  text-shadow: none;
}

.private--question .env-sealed__heading em {
  font-style: italic;
  color: var(--gold-hi);
}

.private__again {
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold-hi);
  text-decoration-color: rgba(242, 217, 148, 0.45);
}

.private__again:hover {
  color: #fff4d0;
}

.private__again[aria-busy="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.private__status {
  min-height: 1.5em;
  max-width: 34rem;
  margin: 20px 0 0;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: center;
  color: var(--frost);
}

.private__status.is-error {
  color: var(--no);
}

.private__fallback {
  display: grid;
  gap: 12px;
  max-width: 32rem;
  text-align: center;
  font-size: 1.25rem;
  color: var(--frost);
}

.private__fallback-title {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 3.2rem;
  line-height: 1.1;
  color: var(--gold-hi);
}

/* --------------------------------------------------------------------------
   The string of lights (lights.js), as on the invitation
   -------------------------------------------------------------------------- */

.private__lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 150px;
  z-index: 3;
  pointer-events: none;
}

.private__lights svg {
  overflow: visible;
  pointer-events: none;
}

.private__lights .lights__wire {
  fill: none;
  stroke: #0d1f18;
  stroke-width: 2.2;
}

.private__lights .lights__wire--twist {
  stroke: rgba(160, 190, 170, 0.18);
  stroke-width: 0.8;
  stroke-dasharray: 3 5;
}

.private__lights .bulb {
  animation: private-bulb var(--d) ease-in-out var(--delay) infinite alternate;
}

.private__lights .bulb__halo {
  transform-box: fill-box;
  transform-origin: center;
  animation: private-halo var(--d) ease-in-out var(--delay) infinite alternate;
}

.private__lights .bulb__cap {
  fill: #2c3a33;
  stroke: #0b1511;
  stroke-width: 0.6;
}

.private__lights .bulb__shine {
  fill: #fff;
  opacity: 0.6;
}

.private__lights .bulb__hit {
  fill: transparent;
}

@keyframes private-bulb {
  from {
    opacity: 0.78;
  }
  to {
    opacity: 1;
  }
}

@keyframes private-halo {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}
