:root {
  --bg: #f7f3ee;
  --text: #111111;
  --accent: #c65b39;
  /* warm rust */
  --muted: #9b8c80;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-touch-callout: none;
}

/* Display serif for headings */
.display {
  font-family: "Playfair Display", serif;
  letter-spacing: -0.02em;
}

/* MARQUEE (repeating phrase) */
.marquee {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-track {
  display: inline-block;
  animation: marquee 20s linear infinite;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* Film grain overlay using SVG data URI */
.grain {
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='t'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23t)' opacity='0.02' fill='black' /></svg>");
  mix-blend-mode: overlay;
}

/* Hero title - Hayley Style */
.hero-container {
  padding-top: 100px;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero-title-large {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4rem, 15vw, 12rem);
  line-height: 0.8;
  color: var(--accent);
  /* Orange/Rust */
  font-weight: 400;
  /* Regular weight, slightly condensed feel */
  text-transform: uppercase;
  position: relative;
  z-index: 20;
  margin-bottom: -40px;
  /* Overlap with image */
  pointer-events: none;
  /* Let clicks pass through to image if needed */
}

/* Central Hero Image */
.hero-main-image {
  width: 100%;
  max-width: 600px;
  /* Constrain width */
  height: 700px;
  object-fit: cover;
  margin: 0 auto;
  display: block;
  position: relative;
  z-index: 10;
}

/* Floating/Collage Images */
.floating-img {
  position: absolute;
  z-index: 15;
  border: 4px solid #fff;
  /* White border like a photo print */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.floating-img:hover {
  transform: scale(1.05) rotate(0deg) !important;
  z-index: 30;
}

.img-left {
  top: 30%;
  left: 5%;
  width: 200px;
  height: 200px;
  object-fit: cover;
  transform: rotate(-5deg);
}

.img-right-top {
  top: 20%;
  right: 5%;
  width: 220px;
  height: 280px;
  object-fit: cover;
  transform: rotate(3deg);
}

.img-right-bottom {
  bottom: 5%;
  right: 15%;
  width: 180px;
  height: 240px;
  object-fit: cover;
  transform: rotate(-3deg);
  z-index: 25;
  /* Above main image bottom corner */
}

/* "Dear Rebel" Text Section */
.rebel-msg {
  text-align: center;
  max-width: 900px;
  margin: 60px auto 0;
  padding: 0 20px;
}

.rebel-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.1;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 30px;
}

.rebel-highlight {
  position: relative;
  display: inline-block;
}

.rebel-highlight::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: -5px;
  right: -5px;
  height: 15px;
  background: #d9f99d;
  /* Lime green brush stroke */
  z-index: -1;
  transform: rotate(-1deg);
  opacity: 0.7;
}

/* Mobile adjustments for collage */
@media (max-width: 768px) {
  .hero-title-large {
    font-size: 5rem;
    margin-bottom: -20px;
  }

  .hero-main-image {
    height: 400px;
    width: 90%;
  }

  .floating-img {
    display: none;
    /* Hide floating collage items on mobile to keep it clean */
  }
}

/* small display niceties */
.muted {
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

.accent-bg {
  background: var(--accent);
  color: white;
}

/* parallax layers */
.hero-layer {
  will-change: transform;
  transition: transform 0.45s cubic-bezier(.2, .9, .2, 1);
}

/* tilt card */
.tilt {
  transition: transform .45s cubic-bezier(.2, .9, .2, 1), box-shadow .45s;
  transform-origin: center;
}

.tilt:hover {
  transform: translateY(-8px) rotateZ(-0.4deg) scale(1.02);
  box-shadow: 0 18px 40px rgba(10, 10, 10, 0.18);
}

/* reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(.995);
  transition: all 700ms cubic-bezier(.2, .9, .2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Gallery Collage - Scrapbook style */
.gallery-collage {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 100px;
  gap: 15px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.gallery-item {
  position: relative;
  overflow: visible;
  /* Allow tape/doodles to overflow */
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
}

.gallery-item:hover {
  transform: scale(1.03) rotate(0deg) !important;
  z-index: 50;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 8px solid white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Tape effect */
.gallery-item::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 80px;
  height: 30px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(2px);
  z-index: 20;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.gallery-item:nth-child(even)::before {
  transform: translateX(-50%) rotate(2deg);
  background: rgba(220, 220, 220, 0.3);
}

/* Polaroids */
.gallery-item.polaroid {
  padding-bottom: 50px;
  background: white;
  border: 8px solid white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gallery-item.polaroid img {
  border: none;
  box-shadow: none;
}

.gallery-item.polaroid::after {
  content: "LOVE";
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: #999;
  letter-spacing: 2px;
}

/* Positional classes */
.gi-1 {
  grid-column: 1 / 6;
  grid-row: 1 / 5;
  transform: rotate(-2deg);
}

.gi-2 {
  grid-column: 7 / 12;
  grid-row: 2 / 7;
  transform: rotate(3deg);
  z-index: 15;
}

.gi-3 {
  grid-column: 2 / 5;
  grid-row: 6 / 9;
  transform: rotate(1deg);
}

.gi-4 {
  grid-column: 5 / 9;
  grid-row: 8 / 12;
  transform: rotate(-1.5deg);
}

.gi-5 {
  grid-column: 9 / 13;
  grid-row: 6 / 10;
  transform: rotate(4deg);
}

/* Doodle overlays */
.doodle {
  position: absolute;
  pointer-events: none;
  z-index: 30;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .gallery-collage {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 0 20px;
  }

  .gallery-item {
    transform: rotate(0deg) !important;
    width: 100% !important;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.lightbox img {
  max-height: 85vh;
  max-width: 85vw;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
  z-index: 1001;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 3rem;
  cursor: pointer;
  padding: 20px;
  user-select: none;
  transition: opacity 0.3s;
  z-index: 1001;
}

.lightbox-nav:hover {
  opacity: 0.7;
}

.lightbox-prev {
  left: 10px;
}

.lightbox-next {
  right: 10px;
}

/* FAQ Section */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 20px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.faq-answer {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Map Section */
.map-container {
  width: 100%;
  height: 450px;
  background: #e5e5e5;
  position: relative;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(100%) contrast(1.1) brightness(0.9);
  /* Edgy, moody map */
}


/* Mobile adjustments */
@media (max-width: 768px) {
  .gallery-collage {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 20px;
    align-items: center;
    /* Center initially */
  }

  .gallery-item {
    flex: 0 0 auto;
    width: 85% !important;
    height: 400px;
    /* fixed height for mobile tiles */
    margin-bottom: 20px;
  }

  /* Scrappy look on mobile */
  .gallery-item:nth-child(odd) {
    transform: rotate(-3deg) !important;
    align-self: flex-start;
  }

  .gallery-item:nth-child(even) {
    transform: rotate(2deg) !important;
    align-self: flex-end;
  }
}

/* RSVP Section Styles */
.rsvp-section {
  position: relative;
  background-color: var(--accent);
  /* Solid Rust */
  color: white;
  text-align: center;
  overflow: hidden;
  /* Optional: Slight bottom padding */
  padding-bottom: 80px;
}

/* Add a visual 'tape' or 'attachment' for the RSVP section */
.rsvp-tape {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%) rotate(1deg);
  width: 120px;
  height: 40px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
  z-index: 20;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* CTA rounded pill */
.pill {
  border-radius: 999px;
  padding: .65rem 1.25rem;
  font-weight: 600;
}

/* accessible focus */
a:focus {
  outline: 3px solid rgba(198, 91, 57, 0.16);
  outline-offset: 3px;
}