:root{
  /* Cottage-inspired palette (browns + creams) */
  --bg-cream: #f3efe6;
  --bg-parchment: #fbf7ef;
  --brown-900: #2a1b14;
  --brown-700: #4a2f24;
  --brown-600: #5b3b2d;
  --brown-500: #7a5646;
  --accent-honey: #caa56a;

  --shadow: 0 16px 48px rgba(42, 27, 20, 0.18);
  --radius: 18px;
}

*{ box-sizing: border-box; }

html, body{
  height: 100%;
}

body{
  margin: 0;
  font-family: "Lato", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--brown-900);
  background:
    radial-gradient(1000px 600px at 20% 20%, rgba(202,165,106,0.18), transparent 55%),
    radial-gradient(900px 700px at 90% 10%, rgba(122,86,70,0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-parchment), var(--bg-cream));
}

.page{
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 40px 16px 24px;
  gap: 20px;
}

.login-card{
  width: 100%;
  max-width: 440px;
  background: rgba(251, 247, 239, 0.82);
  border: 1px solid rgba(74, 47, 36, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  backdrop-filter: blur(8px);
}

.login-header{
  text-align: center;
  margin-bottom: 18px;
}

.brand-mark{
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--bg-parchment);
  background: linear-gradient(135deg, var(--brown-700), var(--brown-500));
  border: 1px solid rgba(42, 27, 20, 0.25);
}

.brand-title{
  margin: 0;
  font-size: 30px;
  letter-spacing: 0.2px;
}

.brand-subtitle{
  margin: 6px 0 0;
  font-size: 14px;
  color: rgba(42, 27, 20, 0.72);
}

.login-form{
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.field{
  display: grid;
  gap: 8px;
}

.field-label{
  font-size: 13px;
  font-weight: 700;
  color: rgba(42, 27, 20, 0.78);
}

.field-input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(74, 47, 36, 0.22);
  background: rgba(243, 239, 230, 0.55);
  outline: none;
  font-size: 15px;
}

.field-input:focus{
  border-color: rgba(202, 165, 106, 0.9);
  box-shadow: 0 0 0 4px rgba(202, 165, 106, 0.22);
  background: rgba(243, 239, 230, 0.82);
}

.btn-primary{
  margin-top: 4px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  color: var(--bg-parchment);
  background: linear-gradient(135deg, var(--brown-700), var(--brown-500));
  border: 1px solid rgba(42, 27, 20, 0.25);
}

.btn-primary:hover{
  filter: brightness(1.03);
}

.btn-primary:active{
  transform: translateY(1px);
}

.login-footer{
  margin-top: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.link-muted{
  color: rgba(42, 27, 20, 0.68);
  text-decoration: none;
  border-bottom: 1px dashed rgba(42, 27, 20, 0.35);
  padding-bottom: 2px;
}

.link-muted:hover{
  color: rgba(42, 27, 20, 0.9);
  border-bottom-color: rgba(42, 27, 20, 0.6);
}

.dot{
  color: rgba(42, 27, 20, 0.35);
}

.site-footer{
  text-align: center;
  color: rgba(42, 27, 20, 0.55);
  font-size: 13px;
}

/* =========================
   Cottage scene page styles
   ========================= */

.scene-body{
  margin: 0;
  font-family: "Lato", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #111; /* behind image while loading */
}

.scene{
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Full-screen background using your image */
.scene-bg{
  position: absolute;
  inset: 0;
  background-image: url("../assets/images/scenes/cottage/cottage-front.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.01); /* prevents thin edges on some browsers */
}

/* Hotspot placed over the front gate area.
   You can fine-tune left/top/width/height if needed. */
.hotspot-gate{
  position: absolute;

  /* Approximate placement for the gate in your image.
     Tweak these four values if you want it tighter. */
  left: 18%;
  top: 64%;
  width: 28%;
  height: 18%;

  display: block;
  border-radius: 14px;
  text-decoration: none;

  /* Keep it invisible except for the glow */
  background: transparent;
  outline: none;
}

/* The glowing effect: faint pulse roughly every 10 seconds */
.hotspot-gate::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;

  /* Warm lantern-like glow */
  box-shadow:
    0 0 0 rgba(202, 165, 106, 0),
    0 0 32px rgba(202, 165, 106, 0);

  opacity: 0;
  animation: gateGlow 10s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gateGlow{
  /* Most of the time: no glow */
  0%, 78%   { opacity: 0; }

  /* Rise */
  82%       { opacity: 0.18; }
  86%       { opacity: 0.35; }

  /* Peak */
  90%       { opacity: 0.55;
              box-shadow:
                0 0 0 2px rgba(202,165,106,0.25),
                0 0 40px rgba(202,165,106,0.55); }

  /* Fade out */
  100%      { opacity: 0; }
}

/* Optional label (hidden by default; shows on hover for debugging) */
.hotspot-label{
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translate(-50%, -100%);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #fff;
  background: rgba(42, 27, 20, 0.72);
  border: 1px solid rgba(202, 165, 106, 0.35);
  opacity: 0;
  pointer-events: none;
}

.hotspot-gate:hover .hotspot-label{
  opacity: 1;
}

/* Small back link */
.scene-back{
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-weight: 800;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.18);
}
.scene-back:hover{
  background: rgba(0,0,0,0.5);
}

/* Page transition fade */

body {
  opacity: 0;
  transition: opacity 1.5s ease;
}

body.page-loaded {
  opacity: 1;
}

body.fade-out {
  opacity: 0;
}