/* landing-intro.css - Haryana Village Entrance Experience */
:root {
  --mud-wall: #b38b6d;
  --mud-wall-dark: #8c6239;
  --wood: #5c4033;
  --wood-dark: #3e2723;
  --sky-morning: linear-gradient(180deg, #87CEEB 0%, #ffb75e 100%);
  --field: #e6c229;
}

body.village-intro-active {
  overflow: hidden;
}

.village-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--sky-morning);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  overflow: hidden;
  transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
  perspective: 1000px;
}

.village-intro-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Background sceneries */
.village-sky {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 50%;
  background: var(--sky-morning);
  z-index: 1;
}

.sun {
  position: absolute;
  top: 10%;
  left: 20%;
  width: 80px;
  height: 80px;
  background: #FFD700;
  border-radius: 50%;
  box-shadow: 0 0 50px #FF8C00;
  z-index: 2;
  animation: slowRise 10s ease-out forwards;
}

.wheat-fields {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, #e6c229 0%, #c49a00 100%);
  z-index: 3;
}

.tractor-silhouette {
  position: absolute;
  bottom: 45%;
  right: 10%;
  width: 150px;
  height: 100px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%234a4a4a" d="M20,60 A15,15 0 0,0 50,60 L70,60 A10,10 0 0,0 90,60 L90,40 L60,40 L50,20 L20,20 Z" /><circle fill="%23222" cx="35" cy="65" r="15"/><circle fill="%23222" cx="80" cy="65" r="10"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 4;
  opacity: 0.6;
}

/* House & Entrance */
.village-house {
  position: absolute;
  bottom: 0;
  width: 100%;
  max-width: 800px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.mud-wall {
  position: absolute;
  inset: 0;
  background-color: var(--mud-wall);
  background-image: radial-gradient(var(--mud-wall-dark) 10%, transparent 11%);
  background-size: 20px 20px;
  opacity: 0.9;
  border-top-left-radius: 40% 20px;
  border-top-right-radius: 40% 20px;
  box-shadow: inset 0 20px 50px rgba(0,0,0,0.3);
}

.house-header {
  position: relative;
  z-index: 12;
  text-align: center;
  margin-top: 5vh;
  padding: 20px;
  background: rgba(255,255,255,0.85);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  border: 2px solid var(--wood);
}

.house-header h1 {
  color: #1b5e20;
  font-size: 2.5rem;
  margin: 0;
  font-weight: 800;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.house-header p {
  color: #c62828;
  font-size: 1.1rem;
  margin: 5px 0 0 0;
  font-weight: 600;
}

.door-frame {
  position: absolute;
  bottom: 0;
  width: 300px;
  height: 450px;
  border: 15px solid var(--wood-dark);
  border-bottom: none;
  background: #111; /* Dark inside */
  z-index: 11;
  display: flex;
  perspective: 1500px;
  transform-style: preserve-3d;
}

.wooden-door {
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, var(--wood), var(--wood-dark));
  border: 2px solid #2e1505;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
  transform-origin: left center;
  transition: transform 1.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
}

.wooden-door.right {
  transform-origin: right center;
}

/* Door details */
.door-panel {
  width: 80%;
  height: 25%;
  border: 2px solid #2e1505;
  background: rgba(0,0,0,0.1);
}

.door-handle {
  position: absolute;
  top: 50%;
  width: 15px;
  height: 60px;
  background: #b8860b;
  border-radius: 8px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.wooden-door.left .door-handle {
  right: 15px;
}

.wooden-door.right .door-handle {
  left: 15px;
}

/* Opening states */
.village-intro-overlay.is-opening .wooden-door.left {
  transform: rotateY(-110deg);
}

.village-intro-overlay.is-opening .wooden-door.right {
  transform: rotateY(110deg);
}

.village-intro-overlay.is-opening {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease-in 1s; /* fade out after door opens */
}

/* UI Controls */
.intro-controls {
  position: absolute;
  bottom: 5vh;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.enter-btn {
  background: #1b5e20;
  color: white;
  border: 2px solid #ffd700;
  padding: 15px 30px;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.enter-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.enter-btn:active {
  transform: scale(0.98);
}

.skip-intro {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.skip-intro:hover {
  background: rgba(255,255,255,0.4);
}

/* Animations */
@keyframes slowRise {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .wooden-door {
    transition: none !important;
  }
  .sun {
    animation: none !important;
  }
  .village-intro-overlay {
    transition: opacity 0.5s ease !important;
  }
}

@media (max-width: 600px) {
  .house-header h1 { font-size: 2rem; }
  .door-frame { width: 220px; height: 350px; }
  .enter-btn { font-size: 1.2rem; padding: 12px 25px; }
}
