/* NEXTDOOR – custom styles beyond Tailwind */

html {
  scroll-behavior: smooth;
}

body {
  background-color: #050505;
  color: #f5f5f5;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ---------- 4. TYPOGRAPHY ---------- */
h1 {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h3 {
  letter-spacing: -0.02em;
}

@media (max-width: 640px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
}

::selection {
  background: #d4af37;
  color: #050505;
}

/* ---------- 5. SPACING ---------- */
main > section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* ---------- 3. PREMIUM EFFECTS: Glassmorphism ---------- */
.glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---------- 3. Bento cards with edge lighting + scale ---------- */
.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.5s ease, box-shadow 0.5s ease;
}

.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(0, 229, 153, 0.6), transparent 40%, transparent 60%, rgba(157, 78, 221, 0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.3;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.bento-card:hover {
  transform: scale(1.03);
  border-color: rgba(0, 229, 153, 0.35);
  box-shadow: 0 0 30px rgba(0, 229, 153, 0.15), 0 0 60px rgba(157, 78, 221, 0.1);
}

.bento-card:hover::before {
  opacity: 1;
}

/* ---------- 1. HERO tagline ---------- */
.hero-tagline {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00e599;
  letter-spacing: 0.15em;
}

/* ---------- 1. BUTTONS: emerald→violet gradient ---------- */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 9999px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #f5f5f5;
  background: linear-gradient(135deg, #00E599 0%, #9D4EDD 100%);
  box-shadow: 0 4px 20px -4px rgba(0, 229, 153, 0.4);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(0, 229, 153, 0.5), 0 0 80px rgba(157, 78, 221, 0.3);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 9999px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #f5f5f5;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.35s ease;
}

.btn-ghost:hover {
  border-color: rgba(0, 229, 153, 0.6);
  color: #fff;
  box-shadow: 0 0 30px rgba(0, 229, 153, 0.35), 0 0 60px rgba(157, 78, 221, 0.2);
  transform: scale(1.05);
}

/* ---------- Focus states ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #f5d77e;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Navigation ---------- */
header nav ul a {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.65);
  background-image: linear-gradient(90deg, #f5d77e, #f5d77e);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  padding-bottom: 2px;
  transition: color 0.3s ease, background-size 0.3s ease, text-shadow 0.3s ease;
}

header nav ul a:hover {
  color: #f5d77e;
  background-size: 100% 1px;
  text-shadow: 0 0 20px rgba(245, 215, 126, 0.5);
}

#mobile-menu a {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

/* ---------- Logo glow (gold & rainbow) ---------- */
.logo-glow {
  animation: rainbow-glow 8s linear infinite;
}

.logo-glow-sm {
  animation: header-logo-glow 12s linear infinite;
}

@keyframes header-logo-glow {
  0%, 100% { filter: brightness(0) invert(1) drop-shadow(0 0 7px rgba(255, 215, 0, 0.6)); }
  25%      { filter: brightness(0) invert(1) drop-shadow(0 0 7px rgba(255, 45, 149, 0.55)); }
  50%      { filter: brightness(0) invert(1) drop-shadow(0 0 7px rgba(157, 78, 221, 0.55)); }
  75%      { filter: brightness(0) invert(1) drop-shadow(0 0 7px rgba(0, 229, 153, 0.55)); }
}

@keyframes rainbow-glow {
  0%   { filter: drop-shadow(0 0 14px #ffd700) drop-shadow(0 0 46px rgba(255, 215, 0, 0.55)); }
  20%  { filter: drop-shadow(0 0 14px #ff2d95) drop-shadow(0 0 46px rgba(255, 45, 149, 0.5)); }
  40%  { filter: drop-shadow(0 0 14px #9d4edd) drop-shadow(0 0 46px rgba(157, 78, 221, 0.5)); }
  60%  { filter: drop-shadow(0 0 14px #00c2ff) drop-shadow(0 0 46px rgba(0, 194, 255, 0.5)); }
  80%  { filter: drop-shadow(0 0 14px #00e599) drop-shadow(0 0 46px rgba(0, 229, 153, 0.5)); }
  100% { filter: drop-shadow(0 0 14px #ffd700) drop-shadow(0 0 46px rgba(255, 215, 0, 0.55)); }
}

/* ---------- 2. HERO VIDEO ---------- */
.hero-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 6. Fade-in on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Hero ---------- */
.hero-gradient {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(245, 215, 126, 0.09), transparent 58%),
    radial-gradient(ellipse at 20% 80%, rgba(157, 78, 221, 0.22), transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 229, 153, 0.18), transparent 55%),
    linear-gradient(to bottom, rgba(5, 5, 5, 0.35), rgba(5, 5, 5, 0.55) 60%, #050505);
}

.text-glow {
  text-shadow: 0 0 30px rgba(245, 215, 126, 0.35), 0 0 70px rgba(124, 92, 232, 0.3);
}

/* ---------- 7. GALLERY: asymmetric + zoom ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 1rem;
}

.gallery-grid .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-grid .gallery-item:nth-child(2) { grid-column: span 1; grid-row: span 1; }
.gallery-grid .gallery-item:nth-child(3) { grid-column: span 1; grid-row: span 2; }
.gallery-grid .gallery-item:nth-child(4) { grid-column: span 2; grid-row: span 1; }
.gallery-grid .gallery-item:nth-child(5) { grid-column: span 1; grid-row: span 1; }
.gallery-grid .gallery-item:nth-child(6) { grid-column: span 1; grid-row: span 1; }
.gallery-grid .gallery-item:nth-child(7) { grid-column: span 1; grid-row: span 1; }
.gallery-grid .gallery-item:nth-child(8) { grid-column: span 2; grid-row: span 1; }

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }
  .gallery-grid .gallery-item:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
  }
  .gallery-grid .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
}

.moment-img {
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
}

.moment-img:hover {
  transform: scale(1.1);
  box-shadow: 0 0 35px rgba(0, 229, 153, 0.35), 0 0 70px rgba(157, 78, 221, 0.2);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.4s ease;
}

.gallery-item:hover {
  border-color: rgba(0, 229, 153, 0.4);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 0.75rem;
  box-shadow: 0 0 80px rgba(0, 229, 153, 0.2);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 2rem;
  color: #f5f5f5;
  line-height: 1;
  padding: 0.5rem;
}

/* ---------- Accent line ---------- */
.accent-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, #00e599, #9d4edd, transparent);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bento-card,
  .moment-img,
  .btn-primary,
  .btn-ghost {
    transition: none;
  }
  .logo-glow {
    animation: none;
    filter: drop-shadow(0 0 12px rgba(245, 215, 126, 0.5));
  }
  .logo-glow-sm {
    animation: none;
    filter: brightness(0) invert(1) drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
  }
}
