* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #1f0d0d;
}

body {
  font-family: Georgia, serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.page {
  min-height: 100vh;
  width: 100%;
}

.fade-out {
  animation: fadeOut 700ms ease forwards;
}

.fade-in {
  animation: fadeIn 700ms ease forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* PAGE 1: CODE ENTRY */

.gate {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  background:
    url("assets/landing-background.png")
    center center / cover
    no-repeat;
}

.card {
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translate(-50%, -50%);

  width: 42%;
  max-width: 560px;

  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.card label,
.card button {
  display: none;
}

form {
  width: 100%;
  margin: 0;
}

.input-row {
  width: 100%;
}

#code {
  display: block;
  width: 100%;
  height: 82px;

  padding: 0 30px;

  border: 2px solid rgba(74, 36, 29, 0.45);
  border-radius: 999px;
  outline: none;

  background: rgba(190, 166, 157, 0.44);
  color: #4a241d;

  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;

  font-family: Georgia, serif;
  font-size: 25px;

  box-shadow:
    0 2px 8px rgba(0,0,0,0.08),
    inset 0 1px 2px rgba(255,255,255,0.15);
}

#code:focus {
  background: rgba(190, 166, 157, 0.58);

  border-color: #4a241d;

  box-shadow:
    0 0 0 4px rgba(74,36,29,0.12),
    0 4px 12px rgba(0,0,0,0.12);
}

.error {
  min-height: 0;
  margin: 0;

  color: #5b211b;
  text-align: center;
  font-size: 14px;
  line-height: 1.25;
}

.error:empty {
  display: none;
}

.error:not(:empty) {
  width: max-content;
  max-width: 100%;
  margin: 12px auto 0;
  padding: 7px 12px;

  background: rgba(243, 234, 220, 0.96);
  border: 1px solid rgba(91, 33, 27, 0.35);
  border-radius: 999px;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* PAGE 2: DARK HERO PHOTO */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;

  background-color: #1f0d0d;
  background-image: url("assets/wedding-hero.png");
  background-position: center center;
  background-size: 110% auto;
  background-repeat: no-repeat;
}

.hero-button {
  margin-bottom: 8vh;
  min-width: 180px;

  padding: 14px 28px;

  border: 1px solid rgba(241, 220, 197, 0.75);
  border-radius: 999px;

  background: rgba(35, 14, 9, 0.25);
  color: #ead5bd;

  font-family: Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  backdrop-filter: blur(4px);
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.hero-button:hover {
  background: rgba(35, 14, 9, 0.5);
  transform: translateY(-2px);
}

/* PAGE 3: SAVE-THE-DATE ARTWORK */

.save-the-date-page {
  position: relative;

  width: 100%;
  min-height: 100vh;

  background-color: #15100e;
  background-image: url("assets/save-the-date.png");
  background-position: center top;
  background-size: contain;
  background-repeat: no-repeat;

  aspect-ratio: 1024 / 1536;
}

.details-button {
  position: absolute;

  left: 50%;
  top: 57%;

  transform: translate(-50%, -50%);

  width: 360px;
  height: 100px;

  border: 0;
  background: transparent;
  color: transparent;
}

.details-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 4px;
}

/* PAGE 4: TEMPORARY DETAILS SCREEN */

.details-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 40px;

  background: #f3eadc;
  color: #4b241d;
  text-align: center;
}

.details-page p {
  margin: 0 0 26px;
  font-size: 28px;
}

#start-over {
  padding: 14px 22px;

  border: 1px solid #4b241d;
  border-radius: 999px;

  background: transparent;
  color: #4b241d;

  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* MOBILE */

@media (max-width: 768px) {
  .gate {
    background-image: url("assets/landing-background-mobile.png");
    background-position: center center;
    background-size: cover;
  }

  .card {
    top: 57%;
    width: 42%;
  }

  #code {
    height: 48px;
    padding: 0 12px;
    font-size: 16px;
  }

    .error:not(:empty) {
    position: absolute;
    top: 58px;
    left: 50%;
    transform: translateX(-50%);

    width: 260px;
    max-width: 80vw;
    margin: 0;

    font-size: 12px;
  }

  .hero {
    background-image: url("assets/wedding-hero-mobile.png");
    background-position: center center;
    background-size: cover;
  }

  .hero-button {
    margin-bottom: 7vh;
    min-width: 150px;
    padding: 12px 22px;
    font-size: 13px;
  }

  .save-the-date-page {
    min-height: 0;
    height: auto;
    aspect-ratio: 430 / 932;

    background-position: top center;
    background-size: 100% auto;
    background-repeat: no-repeat;
  }

  .details-button {
    top: 57%;
    width: 240px;
    height: 74px;
  }
}