@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;700&display=swap');

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
/* Snap to each slide on screens wide enough to show a whole slide */
@media (min-aspect-ratio: 4/3) {
  html {
    scroll-snap-type: y mandatory;
  }
  .page {
    scroll-snap-align: start;
  }
}
body {
  margin: 0;
  padding: 0;
  background-color: #191a19; /* Updated background color */
  color: #4e5e72;
  text-align: center;
  font-family: 'Heebo', Arial, sans-serif;
  overflow-x: hidden; /* Prevent horizontal scroll */
}
h1, p {
  margin: 0;
  padding: 0;
}
h1 {
  font-size: 2rem;
  font-weight: 300;
}
small {
  display: block;
  color: #b9c2cc;
  padding: 1rem 0;
  font-size: 0.8rem;
  transition: opacity 0.33s;
}
textarea, input, button {
  line-height: 1.5rem;
  border: 0;
  outline: none;
  font-family: inherit;
  appearance: none;
}
textarea, input {
  color: #4e5e72;
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='24'><rect fill='rgb(229, 225, 187)' x='0' y='23' width='10' height='1'/></svg>");
}
textarea {
 width: 100%;
 height: 8rem;
 resize: none;
}
input {
 width: 50%;
 margin-bottom: 1rem;
}
input:user-invalid, textarea:user-invalid {
  box-shadow: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='24'><rect fill='rgba(240, 132, 114, 0.5)' x='0' y='23' width='10' height='1'/></svg>");
}
input[type=email] {
  text-align: right;
}
.honey {
  position: absolute;
  left: -9999px;
}
button {
 padding: 0.5rem 1rem;
 border-radius: 0.25rem;
 background-color: rgba(78, 94, 114, 0.9);
 color: white;
 font-size: 1rem;
 transition: background-color 0.2s;
  cursor: pointer;
}
button:hover,
button:focus-visible {
  outline: none;
  background-color: rgba(78, 94, 114, 1);
}
button:disabled {
  cursor: default;
}
input[type=text]:focus,
input[type=email]:focus,
textarea:focus {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='24'><rect fill='rgba(78, 94, 114, 0.3)' x='0' y='23' width='10' height='1'/></svg>");
  outline: none;
}
.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
/* Slide images scale to fit the screen; links are positioned over the image */
.slide {
  position: relative;
  width: min(100vw, calc(100vh * 1366 / 768));
}
.slide img {
  display: block;
  width: 100%;
  height: auto;
}
/* On portrait phones the slides are short, so don't force a full screen per slide */
@media (max-aspect-ratio: 4/3) {
  .page:not(#contact) {
    min-height: 0;
  }
}
#contact {
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Move contact form to the bottom */
}
.contact-wrapper {
  width: 100%;
  max-width: 35rem;
  padding: 0 1rem;
  background-color: #191a19;
  margin: 2rem auto; /* Center the contact form horizontally */
}
.wrapper {
  width: 100%;
  background-color: #191a19;
}
.letter {
  position: relative;
  width: 100%;
  max-width: 30rem;
  margin: auto;
  perspective: 60rem;
}
.side {
  height: 12rem;
  background-color: #fcfcf8;
  outline: 1px solid transparent;
}
.side:nth-of-type(1) {
  padding: 2rem 2rem 0;
  border-radius: 1rem 1rem 0 0;
  box-shadow: inset 0 0.75rem 2rem rgba(229, 225, 187, 0.5);
}
.side:nth-of-type(2) {
  padding: 2rem;
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 0.3rem 0.3rem rgba(0, 0, 0, 0.05), inset 0 -0.57rem 2rem rgba(229, 225, 187, 0.5);
  text-align: right;
}
.wrapper {
  position: relative;
}
.result-message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-size: 1.4rem;
  color: #e9dc9d;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s 1.6s;
}

/* Animations for Contact Page */
.sent .letter {
  animation: sendLetter 1s 0.6s forwards ease-in;
}
.sent .side:nth-of-type(1) {
  transform-origin: 0 100%;
  animation: closeLetter 0.66s forwards ease-in;
}
.sent .side:nth-of-type(1) h1, .sent .side:nth-of-type(1) textarea {
  animation: fadeOutText 0.66s forwards linear;
}
.sent button {
  background-color: rgba(78, 94, 114, 0.2);
}
.sent .result-message {
  opacity: 1;
}
.sent small {
  opacity: 0;
}
@keyframes closeLetter {
   50% {transform: rotateX(-90deg);}
   100% {transform: rotateX(-180deg);}
}
@keyframes fadeOutText {
   49% {opacity: 1;}
   50% {opacity: 0;}
   100% {opacity: 0;}
}
@keyframes sendLetter {
  100% {transform: translateY(-6rem) scale(0.3); opacity: 0;}
}

/* Invisible buttons over the menu in the image */
.clickable-area {
  position: absolute;
  display: block;
  left: 64.5%;
  width: 31%;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
}
.clickable-area:hover,
.clickable-area:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.error-message {
  min-height: 1.5rem;
  margin-top: 1rem;
  color: rgb(240, 132, 114);
}

/* Sections to scroll to */
.section {
  padding: 2rem;
  height: 100vh; /* Full viewport height */
  background-color: #f0f0f0;
  border-bottom: 1px solid #ddd;
}

h2 {
  margin-top: 0;
}
/* ---------- Phone layout: real text instead of wide slide images ---------- */
.mobile {
  display: none;
}
@media (max-aspect-ratio: 4/3) {
  .slide {
    display: none;
  }
  .mobile {
    display: block;
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
  }
  .page:not(#contact) {
    display: block;
    min-height: 0;
    padding-bottom: 2.5rem;
  }
  .crop {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
  }
  .crop-1 {
    aspect-ratio: 880 / 768;
    object-position: 0% 0%;
  }
  .crop-2 {
    aspect-ratio: 775 / 768;
    object-position: 0% 0%;
  }
  /* Zoom into the faces at the top of slide 3, above the text baked into the image */
  .crop-3 {
    position: relative;
    overflow: hidden;
    aspect-ratio: 900 / 300;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
    mask-image: linear-gradient(to bottom, #000 70%, transparent);
  }
  .crop-3 img {
    position: absolute;
    top: 0;
    left: -25.6%;
    width: 151.8%;
    max-width: none;
    height: auto;
  }
  .mobile-menu {
    padding: 0.5rem 1.5rem 0;
  }
  .mobile-menu a {
    display: block;
    padding: 1rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 300;
    text-align: right;
    text-decoration: none;
  }
  .mobile-menu a:active {
    background: rgba(255, 255, 255, 0.08);
  }
  .text {
    padding: 1.5rem 1.25rem 0;
    color: #e6e6e6;
    line-height: 1.7;
  }
  .text h2 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.5;
  }
  .text p {
    margin: 0 0 1rem;
    font-size: 1rem;
  }
  .questions {
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
  }
  .questions li {
    padding: 0.2rem 0;
  }
  .soon {
    padding-top: 3rem;
  }
  #contact {
    min-height: 0;
    justify-content: flex-start;
    padding: 1rem 0 3rem;
  }
  .soon .big {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
  }
}
