:root {
  color-scheme: dark;
  --bone: #eeeae1;
  --quiet: #beb9ae;
  --faint: #8b877f;
  --night: #050505;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--night);
}

body {
  min-height: 100svh;
  overflow: hidden;
  color: var(--bone);
  font-family: Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.threshold {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--night);
}

.threshold img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: breathe 22s ease-in-out infinite alternate;
}

.origin {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  width: min(48rem, 56vw);
  margin-left: clamp(3.5rem, 7vw, 8rem);
  padding: 3rem 0 3.5rem;
}

.origin p,
.origin h1 {
  margin: 0;
  font-weight: 400;
}

.name {
  margin-bottom: clamp(2rem, 4.2vh, 3.25rem) !important;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(3rem, 4.75vw, 5.15rem);
  font-weight: 400 !important;
  line-height: 0.9;
  letter-spacing: 0.48em;
  white-space: nowrap;
}

h1 {
  max-width: none;
  font-size: clamp(2rem, 3vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.invitation {
  margin-top: clamp(2rem, 4.3vh, 3.4rem) !important;
  color: var(--quiet);
  font-size: clamp(1rem, 1.28vw, 1.38rem);
  line-height: 1.55;
}

.freedom {
  margin-top: clamp(1.55rem, 3.2vh, 2.5rem) !important;
  color: var(--faint);
  font-size: clamp(0.88rem, 1vw, 1.08rem);
  font-style: italic;
  line-height: 1.55;
}

.beginning {
  margin-top: clamp(2.6rem, 6.4vh, 5rem) !important;
  color: var(--quiet);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(0.67rem, 0.64vw, 0.79rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@keyframes breathe {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.012);
  }
}

@media (orientation: portrait) {
  .threshold img {
    object-position: center;
  }

  .origin {
    justify-content: flex-end;
    width: auto;
    margin: 0;
    padding: 0 7vw max(5.5vh, env(safe-area-inset-bottom));
  }

  .name {
    margin-bottom: clamp(1.6rem, 3.5vh, 2.6rem) !important;
    font-size: clamp(2.2rem, 11vw, 4rem);
    letter-spacing: 0.34em;
  }

  h1 {
    max-width: none;
    font-size: clamp(1.45rem, 7.8vw, 2.8rem);
  }

  .invitation {
    max-width: 22rem;
    margin-top: clamp(1.6rem, 3.4vh, 2.5rem) !important;
    font-size: clamp(0.92rem, 2.6vw, 1.12rem);
    line-height: 1.48;
  }

  .invitation .wide {
    display: none;
  }

  .freedom {
    margin-top: clamp(1.25rem, 2.6vh, 2rem) !important;
    font-size: clamp(0.82rem, 2.25vw, 1rem);
  }

  .beginning {
    margin-top: clamp(2rem, 4.4vh, 3.25rem) !important;
    font-size: clamp(0.58rem, 1.65vw, 0.72rem);
  }
}

@media (max-height: 650px) {
  body {
    overflow: auto;
  }

  .origin {
    justify-content: flex-start;
    padding-top: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .threshold img {
    animation: none;
  }
}
