/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --c-forest:       #4a5842;
  --c-brown:        #3d2e1e;
  --c-bg:           #ddd7c9;
  --c-cream:        #faf6ee;
  --c-gold:         #c4a94e;
  --c-gold-hover:   #d4bc6a;
  --c-gold-muted:   #947b39;
  --c-gold-warm:    #b8973a;
  --c-text-light:   #e8dcc0;
  --c-text-sage:    #c8cfc2;
  --c-text-warm:    #9a8a6e;

  /* Fonts */
  --f-script:  'Pinyon Script', cursive;
  --f-serif:   'EB Garamond', serif;
  --f-sans:    'Josefin Sans', sans-serif;
  --f-italic:  'Cormorant', serif;
}


/* ============================================================
   RESET & BASE
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--f-serif);
  background: var(--c-bg);
  color: var(--c-brown);
  overflow-x: hidden;
}

/* Full-screen decorative border frame */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  border: 20px solid var(--c-forest);
  pointer-events: none;
  z-index: 9999;
}


/* ============================================================
   GATE — Password entry screen
   ============================================================ */
#gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--c-forest);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s, transform 1s;
}

#gate.hide {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

.gate-wrapper {
  text-align: center;
  max-width: 380px;
  width: 90%;
  padding: 40px 20px;
}

.gate-names {
  font-family: var(--f-script);
  font-size: 56px;
  color: var(--c-text-light);
  line-height: 1.2;
}

.gate-ampersand {
  font-family: var(--f-italic);
  font-weight: 300;
  font-style: italic;
  font-size: 22px;
  color: var(--c-gold);
  display: block;
  margin: 4px 0;
}

.gate-subtitle {
  font-family: var(--f-sans);
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--c-text-sage);
  margin: 28px 0;
}

.gate-input-row {
  display: flex;
  justify-content: center;
}

.gate-input {
  width: 100%;
  max-width: 240px;
  padding: 13px 18px;
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 3px;
  text-align: center;
  background: transparent;
  border: 1px solid rgba(196, 169, 78, 0.5);
  color: var(--c-text-light);
  outline: 0;
}

.gate-input::placeholder {
  color: rgba(232, 220, 192, 0.25);
}

.gate-input:focus {
  border-color: var(--c-gold);
  box-shadow: 0 0 20px rgba(196, 169, 78, 0.1);
}

.gate-btn {
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--c-forest);
  background: var(--c-gold);
  border: 0;
  padding: 11px 36px;
  cursor: pointer;
  margin-top: 10px;
}

.gate-btn:hover {
  background: var(--c-gold-hover);
}

.gate-error {
  font-style: italic;
  font-size: 14px;
  color: var(--c-text-light);
  opacity: 0;
  margin-top: 14px;
  transition: opacity 0.3s;
}

.gate-error.visible {
  opacity: 1;
}


/* ============================================================
   MAIN SITE — shown after authentication
   ============================================================ */
#site {
  display: none;
  opacity: 0;
  transition: opacity 1.2s;
}

#site.on {
  display: block;
  opacity: 1;
}


/* ============================================================
   LAYOUT — centered single column
   ============================================================ */
.main-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 24px;
  background: radial-gradient(circle, #e4ded0 0%, var(--c-bg) 70%, #ccd2c4 100%);
}

.scene {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}


/* ============================================================
   INVITATION CARD
   ============================================================ */
.invite {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 912 / 1157;
  background: var(--c-cream);
  overflow: visible;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
  z-index: 5;
  -webkit-mask-image: radial-gradient(ellipse 94% 96% at center, black 65%, transparent 100%);
  mask-image: radial-gradient(ellipse 94% 96% at center, black 65%, transparent 100%);
}

/* Background venue image */
.bg-maidens {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 2s ease 0.5s forwards;
  -webkit-mask-image: radial-gradient(ellipse 85% 88% at center, black 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 88% at center, black 50%, transparent 100%);
}
.bg-maidens img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.2;
}

/* Decorative frame overlay */
.frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  animation: scaleIn 1.4s ease 0.3s forwards;
  overflow: hidden;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform: scaleY(1.05);
}

/* Decorative scene elements (uncomment in HTML to enable) */
.el-tree {
  position: absolute;
  bottom: 8%;
  right: 5%;
  width: 38%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  animation: riseIn 1.3s ease 1.1s forwards;
}
.el-tree img { width: 100%; height: auto; display: block; opacity: 0.45; }

.el-deer {
  position: absolute;
  bottom: 5%;
  right: 28%;
  width: 20%;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  animation: riseIn 1.4s ease 1.4s forwards;
}
.el-deer img { width: 100%; height: auto; display: block; opacity: 0.55; }

.el-bird {
  position: absolute;
  pointer-events: none;
  z-index: 4;
}
.el-bird img { width: 100%; height: auto; display: block; opacity: 0.5; }

.bird-1 {
  top: 28%;
  right: 25%;
  width: 10%;
  opacity: 0;
  animation: fadeIn 1.8s ease 2s forwards;
}
.bird-1 img { animation: birdFloat 7s ease-in-out infinite; }

.bird-2 {
  top: 42%;
  right: 45%;
  width: 6%;
  transform: scaleX(-1);
  opacity: 0;
  animation: fadeIn 2s ease 2.3s forwards;
}
.bird-2 img { animation: birdFloat2 9s ease-in-out infinite; }


/* ============================================================
   CARD TEXT
   ============================================================ */
.txt {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12% 10% 15%;
  z-index: 6;
}

.t-label {
  font-family: var(--f-sans);
  font-weight: 320;
  font-size: clamp(14px, 1.5vw, 12px);
  letter-spacing: clamp(4px, 1.2vw, 8px);
  text-transform: uppercase;
  color: var(--c-gold-muted);
  margin-bottom: clamp(10px, 3vw, 30px);
  opacity: 0;
  animation: fadeUp 0.8s ease 1s forwards;
  text-shadow: 0.5px 0.5px 1px rgba(255, 255, 255, 0.8);
}

.t-names {
  margin-bottom: clamp(4px, 1vw, 8px);
  opacity: 0;
  animation: fadeUp 1s ease 1.2s forwards;
}

.t-name {
  font-family: var(--f-script);
  font-size: clamp(36px, 7.5vw, 62px);
  color: var(--c-forest);
  display: block;
  line-height: 1.15;
}

.t-amp {
  font-family: var(--f-italic);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(18px, 3.5vw, 28px);
  color: var(--c-gold-warm);
  display: block;
  margin: clamp(0px, 0.5vw, 4px) 0;
}

.t-div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 14px);
  margin: clamp(10px, 2.5vw, 22px) 0;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.5s forwards;
}

.t-line {
  width: clamp(35px, 9vw, 70px);
  height: 0.5px;
  background: var(--c-gold-warm);
}

.t-dot {
  width: clamp(4px, 1vw, 6px);
  height: clamp(4px, 1vw, 6px);
  background: var(--c-gold-warm);
  transform: rotate(45deg);
}

.t-date {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(14px, 2.4vw, 20px);
  letter-spacing: clamp(1px, 0.5vw, 3px);
  color: var(--c-brown);
  margin-bottom: 4px;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.7s forwards;
}

.t-venue {
  font-family: var(--f-sans);
  font-weight: 460;
  font-size: clamp(9px, 1.5vw, 12px);
  letter-spacing: clamp(2px, 0.7vw, 4px);
  text-transform: uppercase;
  color: var(--c-gold-muted);
  margin-bottom: clamp(14px, 3.5vw, 32px);
  opacity: 0;
  animation: fadeUp 0.8s ease 1.85s forwards;
  text-shadow: 0.5px 0.5px 1px rgba(255, 255, 255, 0.8);
}

.t-formal {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(12px, 1.8vw, 15px);
  color: var(--c-text-warm);
  opacity: 0;
  animation: fadeUp 0.8s ease 2s forwards;
}

.t-rsvp-btn {
  display: inline-block;
  margin-top: clamp(14px, 3vw, 22px);
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: clamp(8px, 1vw, 10px);
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--c-forest);
  background: var(--c-gold);
  padding: 10px 28px;
  text-decoration: none;
  opacity: 0;
  animation: fadeUp 0.8s ease 2.3s forwards;
  transition: background 0.2s;
}
.t-rsvp-btn:hover { background: var(--c-gold-hover); }



/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  background: var(--c-forest);
  padding: 60px 20px;
  text-align: center;
  position: relative;
  z-index: 5;
}

.fn {
  font-family: var(--f-script);
  font-size: 26px;
  color: var(--c-text-light);
  margin-bottom: 6px;
}

.fd {
  font-family: var(--f-sans);
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 5px;
  color: var(--c-text-sage);
  text-transform: uppercase;
}

.fm {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 13px;
  color: rgba(200, 207, 194, 0.35);
  margin-top: 18px;
}


/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes birdFloat {
  0%,100% { transform: translate(0, 0) rotate(0); }
  20%     { transform: translate(4px, -7px) rotate(1.5deg); }
  45%     { transform: translate(-3px, -12px) rotate(-1deg); }
  70%     { transform: translate(6px, -5px) rotate(1deg); }
  90%     { transform: translate(-2px, -8px) rotate(-0.5deg); }
}

@keyframes birdFloat2 {
  0%,100% { transform: translate(0, 0); }
  30%     { transform: translate(-5px, -6px) rotate(-2deg); }
  60%     { transform: translate(3px, -10px) rotate(1deg); }
  85%     { transform: translate(-2px, -3px); }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 768px) {
  body::before { border-width: 10px; }
  .main-container { padding: 30px 20px; }
}

/* Mobile */
@media (max-width: 480px) {
  body::before { border-width: 8px; }
  .main-container { padding: 20px 16px; }
  .invite { max-width: 100%; }
  .el-deer { right: 25%; }
  .gate-btn { width: 100%; padding: 14px 36px; }
  .foot { padding: 40px 20px; }
}
