/* Base */
:root {
  /* Cosmic dark theme */
  --bg: #0b0f1a;              /* deep space */
  --surface: rgba(255,255,255,0.06);
  --text: #e6e8ef;            /* soft silver */
  --muted: #a7adba;           /* slate */
  --primary: #b7cedd;         /* moonlit teal */
  --primary-contrast: #0b0f1a;
  --accent: #5fd3f3;          /* cyan star */
  --border: rgba(255,255,255,0.16);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --rainbow: linear-gradient(90deg,#ff8a00,#ff3d81,#7a5cff,#2ebfff,#33d17a,#ffd166);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background-color: #0b0f1a;
  font-size: 20px;
}
body {
  margin: 0;
  font-family: 'Lexend', Arial, Helvetica, sans-serif;
  color: var(--text);
}

/* Global rotated background image (vertical) */
body::before {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  transform: none;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6,10,20,0.60), rgba(6,10,20,0.20) 40%, rgba(6,10,20,0.70)),
    url('../img/bg-noise.svg') center/600px repeat,
    url("../img/ChatGPT Image Sep 5, 2025, 12_46_35 PM.png") center/cover no-repeat;
  background-blend-mode: normal, normal, normal;
}

h1, h2, h3, .brand-text { font-family: "Playfair Display", Georgia, "Times New Roman", Times, serif; }
h1, h2, h3 { color: var(--text); }
h1 { font-size: 4rem; margin: 0 0 .5rem; letter-spacing: 1px; }
h2 { font-size: 2rem; margin: 0 0 1rem; }
h3 { font-size: 1.125rem; margin: 0 0 .5rem; }
p { line-height: 1.65; margin: 0 0 1rem; }
a { color: #7dd3fc; }
.lead { font-size: 1.1rem; color: var(--text); }
.small { font-size: .9rem; color: var(--muted); }
.hint { font-size: .9rem; color: var(--muted); margin-top: .5rem; }

.container { width: min(1100px, 100% - 2rem); margin: 0 auto; }
.section { padding: 64px 0; }
.section.alt { background: rgba(255,255,255,0.03); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6,10,20,0.55);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 12px 0; }
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: inherit; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--accent); color: #3b2f41; font-weight: 700; font-size: .9rem; }
.brand-text { font-weight: 600; letter-spacing: .3px; }
.ampersand-img {
  height: 1.25em; width: auto; vertical-align: -0.25em;
  /* Ensure transparent background and add drop shadow */
  background: transparent;
  mix-blend-mode: normal;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 1px, 1px); white-space: nowrap; border: 0; }

.site-nav { display: flex; align-items: center; gap: .75rem; }
.site-nav a { color: #e7eaf3; text-decoration: none; padding: .5rem .75rem; border-radius: 8px; }
.site-nav a:hover { background: rgba(255,255,255,0.06); }
.site-nav .btn.rsvp { background: var(--surface); color: #e7eaf3; border: 1px solid var(--border); }
.site-nav .btn.rsvp:hover { background: rgba(255,255,255,0.1); }

.nav-toggle { display: none; background: transparent; border: 1px solid var(--border); border-radius: 8px; padding: .35rem .5rem; font-size: 1.1rem; }

/* Hero */
.hero {
  position: relative;
  text-align: center;
  padding: 120px 0 80px;
  overflow: hidden;
}
.hero * { text-align: center; }
.hero h1, .hero .date, .hero .location { text-shadow: 0 2px 16px rgba(0,0,0,0.6); }
.hero h1 { text-transform: uppercase; letter-spacing: 4px; }
.hero .date { font-weight: 700; color: var(--primary); letter-spacing: 3px; font-size: 1.125rem; }
.hero .location { color: #c9cfdd; letter-spacing: 2px; }
.cta { margin-top: 1.25rem; display: inline-flex; gap: .75rem; }

/* Polaroid Hero */
.polaroid-hero {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}
.polaroid {
  position: relative;
  max-width: 400px;
  cursor: pointer;
}
.polaroid-inner {
  position: relative;
  width: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  background: #fff;
  padding: 16px 16px 30px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
  transform: rotate(-2deg);
}
.polaroid:hover .polaroid-inner {
  transform: rotate(-1deg) translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
}
.polaroid:active .polaroid-inner {
  transform: rotate(-1deg) translateY(-2px);
  transition: transform 0.1s ease;
}
.polaroid.flipped .polaroid-inner {
  transform: rotate(-2deg) rotateY(180deg);
}
.polaroid-front,
.polaroid-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.polaroid-back {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  bottom: 30px;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.polaroid-back-content {
  text-align: center;
  padding: 20px;
}
.polaroid img {
  width: 100%;
  height: auto;
  display: block;
  border: none;
}
.polaroid img.zoom-crop {
  object-fit: cover;
  height: 100%;
  min-height: 350px;
  transform: scale(1.5);
  transform-origin: center center;
}
.polaroid-caption {
  text-align: center;
  padding-top: 8px;
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  color: #333;
  font-weight: 600;
  line-height: 1.2;
}
.polaroid-pin {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #e74c3c 45%, #c0392b 50%, #e74c3c 55%);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.3);
  z-index: 10;
}
.polaroid-pin::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #922;
  border-radius: 50%;
}

/* Buttons */
.btn { display: inline-block; padding: .625rem 1rem; border-radius: 12px; font-weight: 600; text-decoration: none; border: 1px solid var(--border); box-shadow: var(--shadow); }
.btn.primary { background: var(--surface); color: #e7eaf3; }
.btn.primary:hover { background: rgba(255,255,255,0.12); }
.btn.ghost { background: transparent; color: #e7eaf3; border-color: var(--border); }
.btn.ghost:hover { background: rgba(255,255,255,0.06); }
.btn.rainbow { background: var(--rainbow); color: #0b0f1a; border: none; }
.btn.rainbow:hover { filter: brightness(1.05); }

/* Content blocks */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 1rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.list { padding-left: 1rem; margin: .25rem 0; }
.list li { margin: .5rem 0; }
/* Subsections within sections */
.subsection { margin-top: 28px; }
/* Tighten space above lists when following text */
.lead + .list,
p + .list,
h1 + .list,
h2 + .list,
h3 + .list { margin-top: -.5rem; }

.map-wrap iframe { width: 100%; border-radius: 12px; border: 1px solid var(--border); filter: saturate(90%); }

/* Map wrapping and positioning */
#venue .map-wrap { float: right; max-width: min(420px, 45%); margin: 0 0 1rem 1rem; }
#venue .map-wrap.wrap-right { float: right; margin: 0 0 1rem 1rem; }
#venue .map-wrap.wrap-left { float: left; margin: 0 1rem 1rem 0; }
@media (max-width: 680px) {
  #venue .map-wrap,
  #venue .map-wrap.wrap-right,
  #venue .map-wrap.wrap-left { float: none; max-width: none; margin: 12px 0; }
}


/* Disco ball sparkle animation */
@keyframes sparkle {
  0% { filter: drop-shadow(0 0 10px rgba(95, 211, 243, 0.5)) drop-shadow(0 0 20px rgba(183, 102, 217, 0.3)); }
  100% { filter: drop-shadow(0 0 15px rgba(95, 211, 243, 0.8)) drop-shadow(0 0 30px rgba(183, 102, 217, 0.6)) drop-shadow(0 0 5px rgba(255, 255, 255, 0.4)); }
}

/* Form styles */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .5rem; }
.form-group label { font-weight: 600; font-size: .95rem; color: var(--text); }
.form-group input,
.form-group textarea {
  padding: .75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s;
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(95, 211, 243, 0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); opacity: 0.6; }
.btn-submit {
  padding: .875rem 1.5rem;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: var(--primary-contrast);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.btn-submit:hover {
  background: #7dd3fc;
  transform: translateY(-1px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.4);
}
.btn-submit:active {
  transform: translateY(0);
}
.btn-submit:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

/* Polaroid Carousel */
.polaroid-carousel {
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
  height: fit-content;
}
.polaroid-carousel::before,
.polaroid-carousel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.polaroid-carousel::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}
.polaroid-carousel::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}
.polaroid-scroll {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 2rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.polaroid-scroll::-webkit-scrollbar {
  height: 8px;
}
.polaroid-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.polaroid-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}
.polaroid-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}
.polaroid-carousel-item {
  flex-shrink: 0;
  width: 280px;
  transform: rotate(-3deg);
  background: #fff;
  padding: 16px 16px 30px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.polaroid-carousel-item:hover {
  transform: rotate(-1deg) translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
}
.polaroid-carousel-item.landscape {
  width: 420px;
  padding: 16px 16px 12px 16px;
}
.polaroid-carousel-item:nth-child(2n) {
  transform: rotate(2deg);
}
.polaroid-carousel-item:nth-child(2n):hover {
  transform: rotate(1deg) translateY(-5px);
}
.polaroid-carousel-item:nth-child(3n) {
  transform: rotate(-1deg);
}
.polaroid-carousel-item:nth-child(3n):hover {
  transform: rotate(0deg) translateY(-5px);
}

/* Animated heart for loading state */
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(1); }
  75% { transform: scale(1.15); }
}
.heart-loading {
  display: inline-block;
  animation: heartBeat 1s ease-in-out infinite;
  margin-right: 0.5rem;
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; text-align: center; background: rgba(255,255,255,0.03); }

/* Responsive */
@media (max-width: 900px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  /* On small screens, ensure the image still covers */
  body::before { background-size: 100% 100%, 600px, cover; }
  .site-nav { position: absolute; top: 56px; right: 0; left: 0; display: none; flex-direction: column; background: rgba(10,14,24,0.97); border-bottom: 1px solid var(--border); padding: .5rem; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .header-inner { position: relative; }
  .info-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  h1 { font-size: 2.75rem; }
  .ampersand-img {
    height: 1.25em;
    min-height: 40px;
    display: inline-block;
  }
}

