/* ===== CSS VARIABLES ===== */
:root {
  --green-deep: #1a3a2a;
  --green-mid: #2d6a4f;
  --green-bright: #52b788;
  --green-soft: #95d5b2;
  --green-pale: #d8f3dc;
  --gold: #c9a84c;
  --cream: #fdfaf4;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Josefin Sans", sans-serif;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--green-deep);
  color: var(--cream);
  overflow-x: hidden;
  cursor: none;
}

/* ===== CUSTOM CURSOR ===== */
.cursor {
  position: fixed;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-bright);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
  mix-blend-mode: screen;
}
.cursor-ring {
  position: fixed;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--green-soft);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition:
    transform 0.18s ease,
    width 0.3s,
    height 0.3s;
}
@media (max-width: 768px) {
  body {
    cursor: auto;
  }
  .cursor,
  .cursor-ring {
    display: none;
  }
}

/* ===== FIXED CANVASES ===== */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 500;
  display: none;
}

/* =====================================================
       PASSWORD GATE
    ====================================================== */
#gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at 30% 40%, rgba(82, 183, 136, 0.12) 0%, transparent 60%), radial-gradient(ellipse at 70% 70%, rgba(45, 106, 79, 0.18) 0%, transparent 55%), var(--green-deep);
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease;
}
#gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-card {
  width: 100%;
  max-width: 460px;
  text-align: center;
  padding: 60px 48px;
  background: linear-gradient(135deg, rgba(45, 106, 79, 0.3), rgba(26, 58, 42, 0.5));
  border: 1px solid rgba(82, 183, 136, 0.2);
  border-radius: 6px;
  backdrop-filter: blur(10px);
  animation: fadeSlideUp 1s ease 0.2s both;
}

.gate-floater {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 24px;
  animation: floatLoop 4s ease-in-out infinite;
}
.gate-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--green-soft);
  margin-bottom: 8px;
  line-height: 1.3;
}
.gate-sub {
  font-size: 9px;
  letter-spacing: 4px;
  color: rgba(149, 213, 178, 0.45);
  margin-bottom: 36px;
}
.gate-input {
  width: 100%;
  background: rgba(13, 31, 23, 0.7);
  border: 1px solid rgba(82, 183, 136, 0.35);
  border-radius: 4px;
  color: var(--green-pale);
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 4px;
  padding: 16px 20px;
  text-align: center;
  outline: none;
  transition: border-color 0.3s;
  margin-bottom: 14px;
  cursor: none;
}
.gate-input:focus {
  border-color: var(--green-bright);
}
.gate-input::placeholder {
  letter-spacing: 2px;
  font-size: 11px;
  opacity: 0.4;
}

.gate-error {
  display: none;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(255, 110, 110, 0.8);
  margin-bottom: 14px;
  animation: fadeSlideUp 0.4s ease;
}
.gate-error.show {
  display: block;
}

.gate-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--green-bright);
  color: var(--green-soft);
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 4px;
  padding: 16px;
  border-radius: 4px;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: color 0.35s;
  margin-bottom: 24px;
}
.gate-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--green-mid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  z-index: -1;
}
.gate-btn:hover::before {
  transform: scaleX(1);
}
.gate-btn:hover {
  color: var(--cream);
}

.gate-hint {
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(82, 183, 136, 0.4);
  line-height: 1.7;
}
.gate-hint span {
  color: rgba(201, 168, 76, 0.6);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
}
.shake {
  animation: shake 0.45s ease !important;
}

/* =====================================================
       MAIN CONTENT — hidden until unlocked
    ====================================================== */
#main-content {
  display: none;
  opacity: 0;
  transition: opacity 1s ease;
}
#main-content.visible {
  opacity: 1;
}

/* ===== HERO ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  overflow: hidden;
  z-index: 1;
  background: radial-gradient(ellipse at 30% 40%, rgba(82, 183, 136, 0.15) 0%, transparent 60%), radial-gradient(ellipse at 70% 70%, rgba(45, 106, 79, 0.2) 0%, transparent 55%), var(--green-deep);
}
.floater {
  position: absolute;
  font-size: clamp(1rem, 3vw, 2rem);
  animation: floatLoop var(--dur, 6s) ease-in-out infinite;
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}
.hero-badge {
  font-size: 10px;
  letter-spacing: 5px;
  color: var(--green-bright);
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: fadeSlideUp 1s ease 0.2s both;
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(3.5rem, 10vw, 9rem);
  line-height: 1;
  color: var(--cream);
  letter-spacing: -1px;
  margin-bottom: 8px;
  animation: fadeSlideUp 1s ease 0.4s both;
}
.hero-title em {
  font-style: italic;
  color: var(--green-soft);
}
.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 5rem);
  letter-spacing: 4px;
  margin-bottom: 32px;
  animation: fadeSlideUp 1s ease 0.6s both;
}
.shimmer-text {
  background: linear-gradient(90deg, var(--gold), var(--cream), var(--gold), var(--green-soft), var(--gold));
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation:
    shimmer 4s linear infinite,
    fadeSlideUp 1s ease 0.6s both;
}
.hero-sub {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--green-soft);
  animation: fadeSlideUp 1s ease 0.8s both;
  margin-bottom: 56px;
}
.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: fadeSlideUp 1s ease 1.4s both;
}
.scroll-cue span {
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--green-bright);
}
.scroll-cue-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--green-bright), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}

/* ===== SECTIONS ===== */
section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}
.section-label {
  font-size: 9px;
  letter-spacing: 5px;
  color: var(--green-bright);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== MESSAGE ===== */
#message {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(135deg, rgba(45, 106, 79, 0.25), rgba(26, 58, 42, 0.4));
  border: 1px solid rgba(82, 183, 136, 0.2);
  border-radius: 4px;
  padding: 80px 60px;
  backdrop-filter: blur(6px);
}
#message h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  font-style: italic;
  color: var(--green-soft);
  margin-bottom: 32px;
  line-height: 1.2;
}
#msg-content p {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: rgba(253, 250, 244, 0.88);
  line-height: 1.9;
  margin-bottom: 20px;
}
.signature {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--gold);
  margin-top: 40px;
  display: block;
}

/* ===== GALLERY ===== */
#gallery {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
#gallery h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  color: var(--cream);
  margin-bottom: 8px;
}
#gallery h2 em {
  font-style: italic;
  color: var(--green-soft);
}
.gallery-subtitle {
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(149, 213, 178, 0.45);
  margin-bottom: 52px;
}

/* Masonry-style CSS columns */
.gallery-grid {
  columns: 3 280px;
  column-gap: 14px;
}
.gallery-card {
  break-inside: avoid;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: none;
  display: block;
}
.gallery-card img {
  width: 100%;
  display: block;
  transition: transform 0.6s ease;
  filter: saturate(0.65) brightness(0.88);
}
.gallery-card:hover img {
  transform: scale(1.05);
  filter: saturate(1) brightness(1);
}
.gallery-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 18px;
  background: linear-gradient(transparent, rgba(16, 42, 28, 0.88));
  transform: translateY(100%);
  transition: transform 0.38s ease;
}
.gallery-card:hover .gallery-card-overlay {
  transform: translateY(0);
}
.gallery-card-overlay span {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--green-soft);
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(10, 24, 16, 0.95);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
#lightbox.open {
  display: flex;
}
#lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(82, 183, 136, 0.15);
  animation: fadeSlideUp 0.4s ease;
}
#lightbox-caption {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--green-soft);
  white-space: nowrap;
}
#lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: 1px solid rgba(82, 183, 136, 0.3);
  color: var(--green-soft);
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: none;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightbox-close:hover {
  background: rgba(82, 183, 136, 0.15);
}
#lightbox-prev,
#lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(45, 106, 79, 0.4);
  border: 1px solid rgba(82, 183, 136, 0.25);
  color: var(--green-soft);
  font-size: 1.2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: none;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightbox-prev {
  left: 20px;
}
#lightbox-next {
  right: 20px;
}
#lightbox-prev:hover,
#lightbox-next:hover {
  background: rgba(82, 183, 136, 0.25);
}
#lightbox-counter {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(149, 213, 178, 0.45);
}

@media (max-width: 768px) {
  .gallery-grid {
    columns: 2 160px;
    column-gap: 10px;
  }
  .gallery-card {
    margin-bottom: 10px;
  }
}
@media (max-width: 420px) {
  .gallery-grid {
    columns: 1;
  }
}

/* ===== DIVIDER & FOOTER ===== */
.divider {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 10px 0;
}
.divider span {
  color: var(--green-bright);
  font-size: 1.2rem;
  letter-spacing: 12px;
  opacity: 0.5;
}
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 24px;
  border-top: 1px solid rgba(82, 183, 136, 0.1);
}
footer p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(149, 213, 178, 0.5);
}

/* ===== KEYFRAMES ===== */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes floatLoop {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(8deg);
  }
}
@keyframes floatIcon {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #message {
    padding: 50px 28px;
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-card:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1;
  }
  .gallery-card:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .gallery-card:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
  }
  .gallery-card:nth-child(4) {
    grid-column: 1 / 3;
    grid-row: 3;
  }
  .gate-card {
    padding: 48px 28px;
  }
}
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-card:nth-child(n) {
    grid-column: 1;
    grid-row: auto;
  }
  section {
    padding: 70px 20px;
  }
}
