/* ============================================================
   WEDDING-15 | layouts.css
   "SCRAPBOOK" — pill nav, starburst hero, polaroids, collage
   ============================================================ */

/* ── STICKY PILL NAV ── */
#pillnav {
  position: sticky;
  top: var(--space-4);
  z-index: 100;
  display: flex;
  justify-content: center;
  padding-inline: var(--space-4);
}
.pillnav-inner {
  display: flex;
  gap: var(--space-2);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 3px 3px 0 var(--ink);
  overflow-x: auto;
  max-width: 100%;
}
.pillnav-inner a {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--navy);
  white-space: nowrap;
  transition: background var(--duration);
}
.pillnav-inner a:hover {
  background: var(--pink-soft);
}

/* ── HERO ── */
.hero-zine {
  padding-block: var(--space-16) var(--space-20);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-guest {
  font-family: var(--font-script);
  font-size: var(--text-xl);
  color: var(--navy);
  transform: rotate(-2deg);
  display: inline-block;
}
.starburst {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 150px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 50%;
  transform: rotate(-8deg);
  margin: var(--space-6) auto;
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--ink);
  line-height: 1.1;
  position: relative;
}
.hero-title {
  font-size: clamp(3rem, 12vw, var(--text-5xl));
  color: var(--navy);
  margin-top: var(--space-6);
}
.hero-title .pink {
  color: var(--pink);
}
.hero-tagline {
  font-family: var(--font-script);
  font-size: var(--text-2xl);
  color: var(--pink);
  margin-top: var(--space-3);
  transform: rotate(-1.5deg);
}
.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding: 10px 24px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--text-sm);
  transform: rotate(1deg);
}
.hero-meta .sep {
  color: var(--pink);
}
.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-10);
}

/* ── POLAROID (couple / gallery) ── */
.polaroid {
  background: var(--cream);
  border: 2px solid var(--ink);
  padding: var(--space-3) var(--space-3) var(--space-8);
  box-shadow: 5px 5px 0 var(--ink);
  position: relative;
}
.polaroid .tape {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 70px;
  height: 26px;
  background: rgba(255, 210, 63, 0.75);
  border: 1px solid rgba(36, 31, 61, 0.15);
}
.polaroid-photo {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--pink-soft);
}
.polaroid-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.polaroid-caption {
  font-family: var(--font-script);
  font-size: var(--text-lg);
  text-align: center;
  margin-top: var(--space-3);
  color: var(--navy);
}

/* ── COUPLE (two rotated polaroids) ── */
.couple-collage {
  display: flex;
  gap: var(--space-10);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-10);
}
.couple-collage .polaroid {
  width: 260px;
}
.couple-collage .polaroid:nth-child(1) {
  transform: rotate(-4deg);
}
.couple-collage .polaroid:nth-child(2) {
  transform: rotate(3deg);
}
.polaroid-initial {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--navy);
}
.polaroid-role {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink);
  text-align: center;
  margin-top: var(--space-2);
}
.polaroid-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  text-align: center;
  color: var(--ink);
  margin-top: var(--space-1);
}
.polaroid-parents {
  font-size: var(--text-xs);
  text-align: center;
  color: var(--ink);
  opacity: 0.7;
  margin-top: var(--space-2);
  line-height: 1.6;
}

/* ── STORY — scrapbook notes ── */
.story-collage {
  margin-top: var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}
.note-card {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: var(--space-6) var(--space-8);
  max-width: 460px;
  box-shadow: 5px 5px 0 var(--ink);
  position: relative;
}
.story-collage > div:nth-child(odd) .note-card {
  transform: rotate(-2deg);
  margin-right: auto;
}
.story-collage > div:nth-child(even) .note-card {
  transform: rotate(2deg);
  margin-left: auto;
}
.note-year {
  font-family: var(--font-script);
  font-size: var(--text-xl);
  color: var(--pink);
}
.note-title {
  font-size: var(--text-xl);
  margin-block: var(--space-2);
}
.note-desc {
  font-size: var(--text-sm);
  color: var(--ink);
  opacity: 0.75;
}

/* ── SCHEDULE — sticker cards ── */
.schedule-collage {
  display: flex;
  gap: var(--space-10);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-12);
}
.schedule-sticker {
  width: 300px;
  background: var(--navy);
  color: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: var(--space-8);
  box-shadow: 5px 5px 0 var(--ink);
}
.schedule-sticker:nth-child(1) {
  transform: rotate(-3deg);
}
.schedule-sticker:nth-child(2) {
  transform: rotate(3deg);
  background: var(--pink);
}
.schedule-type {
  font-family: var(--font-script);
  font-size: var(--text-xl);
}
.schedule-name {
  font-size: var(--text-2xl);
  color: var(--cream);
  margin-block: var(--space-2);
}
.schedule-detail {
  font-size: var(--text-sm);
  margin-top: var(--space-3);
  opacity: 0.9;
}
.schedule-detail strong {
  display: block;
}
.schedule-sticker .btn-pink,
.schedule-sticker .btn-navy-outline {
  margin-top: var(--space-5);
  font-size: var(--text-xs);
  padding: 10px 20px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: 6px 14px;
  background: var(--yellow);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--text-xs);
}
.live-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
  animation: dotPulse 1.6s infinite;
}
@keyframes dotPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.map-frame {
  margin-top: var(--space-12);
  max-width: 600px;
  margin-inline: auto;
  height: 260px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-1deg);
}
.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── GALLERY — scattered polaroids ── */
.gallery-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-10) var(--space-6);
  margin-top: var(--space-16);
}
.gallery-collage .polaroid {
  cursor: pointer;
  transition: transform var(--duration) var(--ease-bounce);
}
.gallery-collage .polaroid:hover {
  transform: rotate(0deg) scale(1.04) !important;
  z-index: 2;
}
.gallery-collage > *:nth-child(1) {
  transform: rotate(-4deg);
}
.gallery-collage > *:nth-child(2) {
  transform: rotate(3deg);
}
.gallery-collage > *:nth-child(3) {
  transform: rotate(-2deg);
}
.gallery-collage > *:nth-child(4) {
  transform: rotate(4deg);
}
.gallery-collage > *:nth-child(5) {
  transform: rotate(-3deg);
}
.gallery-collage > *:nth-child(6) {
  transform: rotate(2deg);
}

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(26, 26, 78, 0.92);
  align-items: center;
  justify-content: center;
}
#lightbox.open {
  display: flex;
}
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: var(--cream);
  border: 3px solid var(--ink);
  padding: var(--space-4) var(--space-4) var(--space-10);
  border-radius: 8px;
}
#lightbox-img {
  max-width: 80vw;
  max-height: 74vh;
  object-fit: contain;
}
.lightbox-btn,
.lightbox-close {
  position: absolute;
  color: var(--ink);
  background: var(--yellow);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 1rem;
  transition: transform var(--duration) var(--ease-bounce);
}
.lightbox-btn:hover,
.lightbox-close:hover {
  transform: scale(1.1);
}
.lightbox-btn {
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-prev {
  left: -18px;
}
.lightbox-next {
  right: -18px;
}
.lightbox-close {
  top: -16px;
  right: -16px;
}

/* ── GIFT ── */
.gift-collage {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-10);
}
.gift-sticker {
  width: 280px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: var(--space-6);
  box-shadow: 5px 5px 0 var(--ink);
}
.gift-sticker:nth-child(1) {
  transform: rotate(-2deg);
}
.gift-sticker:nth-child(2) {
  transform: rotate(2deg);
}
.gift-label {
  font-family: var(--font-script);
  font-size: var(--text-lg);
  color: var(--pink);
}
.gift-name {
  font-size: var(--text-xl);
  margin-block: var(--space-2);
}
.gift-num {
  font-weight: 700;
  font-size: var(--text-sm);
}
.gift-copy {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  padding: 10px 18px;
}

/* ── RSVP ── */
.rsvp-card {
  max-width: 640px;
  margin: var(--space-10) auto 0;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 22px;
  padding: var(--space-10);
  box-shadow: 6px 6px 0 var(--ink);
}
.guest-count {
  text-align: center;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--navy);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px dashed var(--ink);
}
.guest-count strong {
  color: var(--pink);
}
.wishes-collage {
  max-width: 720px;
  margin: var(--space-10) auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
.wish-note {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: var(--space-5);
  box-shadow: 4px 4px 0 var(--ink);
}
.wish-note:nth-child(odd) {
  transform: rotate(-1.5deg);
}
.wish-note:nth-child(even) {
  transform: rotate(1.5deg);
}
.wish-name {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--navy);
}
.wish-attend {
  font-family: var(--font-script);
  font-size: var(--text-base);
  color: var(--pink);
  margin-block: var(--space-1);
}
.wish-message {
  font-size: var(--text-sm);
  opacity: 0.8;
}
.wish-time {
  font-size: var(--text-xs);
  opacity: 0.5;
  margin-top: var(--space-2);
}

/* ── CONFETTI CANVAS ── */
#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 260;
  pointer-events: none;
}

/* ── FOOTER ── */
#site-footer {
  background: var(--navy);
  color: var(--cream);
  padding-block: var(--space-16);
  text-align: center;
  margin-top: var(--space-10);
}
.footer-title {
  color: var(--cream);
  font-size: clamp(2rem, 6vw, var(--text-4xl));
}
.footer-script {
  font-family: var(--font-script);
  color: var(--yellow);
  font-size: var(--text-xl);
  margin-top: var(--space-2);
}
.footer-links {
  margin-top: var(--space-8);
  display: flex;
  gap: var(--space-6);
  justify-content: center;
  flex-wrap: wrap;
}
.footer-links a {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--cream);
  border-bottom: 2px solid var(--pink);
}
.footer-fine {
  margin-top: var(--space-10);
  font-size: var(--text-xs);
  opacity: 0.5;
}

/* ── Floating audio ── */
#audio-toggle {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: 150;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  display: grid;
  place-items: center;
  color: var(--cream);
  transition: transform var(--duration) var(--ease-bounce);
}
#audio-toggle:hover {
  transform: rotate(-8deg) scale(1.05);
}
#audio-toggle svg {
  width: 20px;
  height: 20px;
}

#toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  padding: 12px 24px;
  background: var(--navy);
  color: var(--cream);
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: 999px;
  display: none;
  white-space: nowrap;
}
#toast.show {
  display: block;
  animation: toastIn 0.35s var(--ease-bounce) forwards;
}
#toast.hide {
  animation: toastOut 0.25s ease forwards;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(14px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}
@keyframes toastOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 760px) {
  .gallery-collage {
    grid-template-columns: repeat(2, 1fr);
  }
  .wishes-collage {
    grid-template-columns: 1fr;
  }
  .lightbox-prev {
    left: 4px;
  }
  .lightbox-next {
    right: 4px;
  }
  .schedule-collage,
  .gift-collage {
    flex-direction: column;
    align-items: center;
  }
}
