@font-face {
  font-family: sauceTomato;
  src: url(./sauce-tomato.otf);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }

html {
  background-color: #ee6c5f;
}

body {
  display: flex;
  flex-flow: column;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-start;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-color: #ee6c5f;
  min-height: 100%;
}

.title {
  width: 100%;
  max-width: 1000px;
  margin: 30px auto 20px;
  text-align: center;
}

.title img {
  width: 100%;
  padding: 0 20px;
}

.apply {
  margin-top: 30px;
}

.apply a {
  border-radius: 15px;
  font-family: sauceTomato;
  color: black;
  font-size: 26px;
  letter-spacing: 2px;
  padding: 10px 15px 5px;
  line-height: 26px;
  text-decoration: none;
  background: white;
}

.logo {
  width: 100px;
  margin: 50px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.calendar-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;
  padding: 20px;
  margin: 0 20px 0 0;
}

.calendar {
  position: relative;
  margin: 0 auto;
  width: 966px;
  height: 686px;
  perspective: 1200px;
  perspective-origin: left center;
  -webkit-overflow-scrolling: touch;
  transform-origin: top left;
}

.calendar-img {
  display: block;
  height: auto;
}

/* ===== DOOR ===== */
.door {
  position: absolute;
  transform-origin: left center;
  transform-style: preserve-3d;
  overflow: visible;
  cursor: pointer;
  transform: rotateY(0deg);
  will-change: transform;
  z-index: 1; /* base level for all doors */
}

/* Front of door */
.door-front {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background-size: cover;
  background-position: center;
}

/* Back of door (same for all doors) */
.door-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  background-image: url('door-back.png');
  background-size: auto;
  background-position: center;
}

/* Side of door */
.door-side {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: #d6c4a3;
  transform-origin: left center;
  transform: rotateY(90deg);
  backface-visibility: hidden;
}

/* Door open animation */
.door.open {
  transform: rotateY(-135deg) skewY(2deg);
  transition: transform 1.4s ease;
}

/* Shadows & shading (optional) */
.door::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  filter: blur(25px);
  transform: translateZ(-2px);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.door::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.4), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.door.open::before,
.door.open::after { opacity: 1; }

/* Video modal */
.video-modal {
  position: fixed;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  transition: opacity 0.8s ease;
}

.video-modal.active { opacity: 1; pointer-events: auto; }

.video-content {
  position: absolute;
  display: flex;
  justify-content: center;
  width: 1px;
  height: 1px;
  left: var(--start-x);
  top: var(--start-y);
  opacity: 1;
  overflow: hidden;
  background: black;
  transform: translate(-50%, -50%);
  transition:
    width 0.8s ease,
    height 0.8s ease,
    left 0.8s ease,
    top 0.8s ease;
  z-index: 1001;
}

.video-content video {
  width: 100%;
  height: 100%;
  display: block;
}

.video-modal.expanded .video-content {
  width: 90vw;
  height: 90vh;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.video-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 80px;
  line-height: 40px;
  color: white;
  cursor: pointer;
  z-index: 1002;
  opacity: 0;               /* hidden until modal opens */
  transition: opacity 0.3s ease;
  user-select: none;
}

.video-title {
  position: absolute;
  top: 5%;
  z-index: 1002;
  font-family: sauceTomato;
  color: white;
  font-size: 26px;
  letter-spacing: 2px;
  line-height: 26px;
}

.video-modal.active .video-close {
  opacity: 1;
}

.door-overlay {
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
  background: transparent;
  z-index: 10; /* ensure it's above the doors */
}

.toast {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  left: 50%;
  bottom: -350px; /* start off screen */
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 16px;
  padding: 14px 22px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s ease-out;
  z-index: 9999;
}

.toast.show {
  bottom: 30px; /* slide up */
  opacity: 1;
}

.toast span {
  font-family: sauceTomato;
  color: white;
  font-size: 26px;
  letter-spacing: 2px;
  line-height: 50px;
}

.toast img {
  width: 200px;
}