/* =====================================================
   TonySimpson.org · Landing Page Stylesheet
   ===================================================== */

/* ============ DESIGN TOKENS ============ */
:root {
  --cream: #f6f1e7;
  --cream-deep: #ede4d1;
  --ink: #1a1410;
  --ink-soft: #3a322a;
  --wish-blue: #1c4ed8;
  --wish-blue-deep: #0f2a8a;
  --amber: #d97706;
  --gold: #c9a14a;
  --rose: #c2526b;
  --sage: #5a7a5e;
  --paper-shadow: 0 20px 40px -15px rgba(26, 20, 16, 0.15), 0 5px 15px -5px rgba(26, 20, 16, 0.1);
}

/* ============ RESET ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: 'Inter Tight', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
}

/* Grain overlay for warmth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ LANDING PAGE LAYOUT ============ */
.landing-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ============ CONTENT AREA ============ */
.content-area {
  width: 45vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  z-index: 10;
  position: relative;
  overflow: hidden;
}

/* Subtle background glow */
.content-bg-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.content-bg-glow::before {
  content: '';
  position: absolute;
  top: -10%; left: -10%;
  width: 80%; height: 80%;
  background: radial-gradient(circle, rgba(28, 78, 216, 0.05) 0%, transparent 60%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.05); }
}

/* Background video */
.content-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.16;
  pointer-events: none;
}

/* Header Brand & Row */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.brand-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.brand-mark {
  color: var(--gold);
  font-size: 1.15rem;
  animation: starPulse 3s ease-in-out infinite;
}
@keyframes starPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(72deg); }
}

/* Pics Button */
.btn-pics {
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-pics:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-1px);
}

/* Card Wrapper & Content */
.thank-you-card {
  max-width: 480px;
  margin: auto 0;
  animation: fadeUp 1s 0.2s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
  opacity: 0;
  transform: translateY(20px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wish-blue);
  margin-bottom: 1.5rem;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  background: var(--wish-blue);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.thank-you-card h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--ink);
}
.thank-you-card h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--wish-blue);
}

.thank-you-card p {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 2.2rem;
}

/* CTA Button */
.btn-donate, .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 100px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 10px 25px -5px rgba(26, 20, 16, 0.15);
}
.btn-donate:hover, .btn-primary:hover {
  background: var(--wish-blue);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(28, 78, 216, 0.4);
}
.btn-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}
.btn-donate:hover .btn-arrow, .btn-primary:hover .btn-arrow {
  transform: translateX(5px);
}

/* Footer note */
.footer-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  opacity: 0.6;
}

/* ============ PHOTO AREA (COLLAGE) ============ */
.photo-area {
  width: 55vw;
  height: 100vh;
  background: var(--cream-deep);
  border-left: 1px solid rgba(26, 20, 16, 0.08);
  overflow: hidden;
  position: relative;
}

.collage-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Polaroid Component */
.polaroid {
  background: white;
  padding: 12px 12px 28px 12px;
  box-shadow: var(--paper-shadow);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease, z-index 0.5s step-start;
  position: absolute;
  cursor: pointer;
  will-change: transform;
}
.polaroid img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--cream-deep);
}



.polaroid:hover {
  transform: scale(1.15) rotate(0deg) !important;
  z-index: 100 !important;
  box-shadow: 0 30px 60px -15px rgba(26, 20, 16, 0.35);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}

/* ============ GOOGLE PHOTOS-STYLE GALLERY MODAL ============ */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--cream);
  display: none;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gallery-modal.show {
  display: flex;
  opacity: 1;
}

.gallery-header {
  height: 70px;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(26, 20, 16, 0.08);
  background: rgba(246, 241, 231, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}
.gallery-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
}
.gallery-close {
  font-size: 2.2rem;
  font-weight: 300;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s, transform 0.3s;
}
.gallery-close:hover {
  background: rgba(26, 20, 16, 0.06);
  transform: scale(1.05);
}

.gallery-body {
  flex: 1;
  overflow-y: auto;
  padding: 3rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}
.gallery-item {
  background: white;
  padding: 10px 10px 22px 10px;
  box-shadow: 0 8px 20px -10px rgba(26, 20, 16, 0.15);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  transform: rotate(var(--rot, 0deg));
}
.gallery-item:hover {
  transform: scale(1.04) rotate(0deg);
  box-shadow: 0 20px 35px -15px rgba(26, 20, 16, 0.25);
  z-index: 2;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--cream-deep);
  display: block;
}

/* ============ LIGHTBOX SLIDESHOW ============ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(26, 20, 16, 0.98);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox-overlay.show {
  display: flex;
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2.8rem;
  font-weight: 200;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 20;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.lightbox-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.lightbox-image-container {
  max-width: 85vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0.97);
}
.lightbox-image.loaded {
  opacity: 1;
  transform: scale(1);
}

/* Lightbox navigation */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8rem;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.6;
  z-index: 10;
}
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  opacity: 1;
  transform: translateY(-50%) scale(1.06);
}
.nav-prev { left: 2.5rem; }
.nav-next { right: 2.5rem; }

.lightbox-counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0.6;
  letter-spacing: 0.05em;
}

/* ============ RESPONSIVE LAYOUT ============ */
@media (max-width: 980px) {
  .landing-container {
    flex-direction: column;
  }
  
  .content-area {
    width: 100vw;
    height: 55vh;
    padding: 2rem 1.5rem;
    justify-content: space-between;
    align-items: center;
    text-align: center;
  }
  
  .thank-you-card {
    margin: auto;
    max-width: 480px;
  }
  
  .thank-you-card h1 {
    font-size: clamp(2rem, 6vw, 2.8rem);
    margin-bottom: 1rem;
  }
  
  .thank-you-card p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .btn-donate {
    padding: 0.9rem 1.8rem;
    font-size: 0.95rem;
  }
  
  .photo-area {
    width: 100vw;
    height: 45vh;
    border-left: none;
    border-top: 1px solid rgba(26, 20, 16, 0.08);
  }
  
  /* Overlapping layout on mobile (show only first 5 images to keep it neat) */
  .polaroid {
    padding: 8px 8px 18px 8px;
  }


  .gallery-header {
    padding: 0 1.5rem;
  }
  .gallery-body {
    padding: 1.5rem;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.8rem;
  }
  .gallery-item {
    padding: 6px 6px 14px 6px;
  }
  .lightbox-nav {
    width: 46px;
    height: 46px;
    font-size: 1.4rem;
  }
  .nav-prev { left: 1rem; }
  .nav-next { right: 1rem; }
}

@media (max-width: 480px) {
  .content-area {
    height: 60vh;
    padding: 1.5rem 1.25rem 1rem;
  }
  .photo-area {
    height: 40vh;
  }
  .thank-you-card h1 {
    font-size: 1.85rem;
  }
  .thank-you-card p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}

/* ============ ANIMATIONS LAYER ============ */
.sparkle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.sparkle {
  position: fixed;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(201, 161, 74, 0.6);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: sparkleFade 0.9s ease-out forwards;
  will-change: transform, opacity;
}
@keyframes sparkleFade {
  0%   { opacity: 0;   transform: translate(-50%, -50%) scale(0.4) rotate(0deg); }
  20%  { opacity: 1;   transform: translate(-50%, -50%) scale(1)   rotate(60deg); }
  100% { opacity: 0;   transform: translate(-50%, -100%) scale(0.6) rotate(180deg); }
}

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