html, body { background-color: #F4EEE5; min-width: 360px; }
html { scroll-behavior: smooth; }
h1, h2, h3, h4 { letter-spacing: 0.1em; }
p, label { letter-spacing: 0.05em; }

/* Subtle Global Paper Stationery Texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(0,0,0,.05) 1px, transparent 1px),
    radial-gradient(circle at 80% 80%, rgba(0,0,0,.05) 1px, transparent 1px);
  background-size: 12px 12px;
  z-index: 50;
}

/* Paper Note Card */
.note-card {
  background: transparent;
  padding: 3.5rem 3.75rem 3.25rem;
  position: relative;
}

/* Filtered paper background — torn/deckled edges */
.note-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: #F5EFE6;
  background-image:
    radial-gradient(ellipse at 15% 12%, rgba(255,255,253,0.7) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 88%, rgba(255,255,253,0.6) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.75) 0%, transparent 38%),
    radial-gradient(ellipse at 50% 100%, rgba(185,178,165,0.04) 0%, transparent 45%),
    repeating-linear-gradient(
      transparent 0px, transparent 33px,
      rgba(140,130,115,0.038) 33px, rgba(140,130,115,0.038) 34px
    );
  border-radius: 3px;
  box-shadow:
    0 2px 4px rgba(100,68,18,0.05),
    0 8px 22px rgba(100,68,18,0.07),
    0 28px 70px rgba(100,68,18,0.08),
    0 56px 110px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 0 90px rgba(255,252,235,0.5);
  filter: url(#paper-tear);
  z-index: 0;
}


/* Polaroid photo */
.polaroid-wrapper {
  position: absolute;
  bottom: -80px;
  right: -40px;
  width: 220px;
  background: #FDF6EC;
  padding: 11px 11px 44px;
  box-shadow: 4px 6px 20px rgba(0,0,0,0.22), 0 1px 4px rgba(0,0,0,0.1);
  transform: rotate(-10deg);
  z-index: 20;
}

.polaroid-wrapper img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  filter: sepia(0.12) saturate(1.1) brightness(0.97);
}

.polaroid-pin {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 15px;
  background: radial-gradient(circle at 38% 35%, #f87171, #dc2626);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.25);
  z-index: 21;
}

.polaroid-pin::after {
  content: '';
  position: absolute;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 18px;
  background: linear-gradient(to bottom, #9ca3af, #6b7280);
  border-radius: 0 0 1px 1px;
}

/* Custom radio buttons — thin black outline */
.form-radio {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid #1a1a1a;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.form-radio:checked {
  border-color: #1a1a1a;
  background-color: #A1B18C;
}
.form-radio:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

/* Editorial drop cap */
.drop-cap::first-letter {
  font-family: 'Great Vibes', cursive;
  font-size: 4.5rem;
  line-height: 0.75;
  float: left;
  margin-right: 0.12em;
  margin-top: 0.08em;
  color: #B89B5E;
}

@keyframes floatEnv {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* Hero blur — less on mobile */
.hero-blur { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
@media (max-width: 767px) {
  .hero-blur { -webkit-backdrop-filter: blur(0.8px); backdrop-filter: blur(0.8px); }
}

/* Scroll fade-in */
.fade-section {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* RSVP button — sliding fill from left */
.btn-slide {
  position: relative;
  overflow: hidden;
}
.btn-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #C4919E;
  transform: translateX(-101%);
  transition: transform 0.35s ease;
  z-index: 0;
}
.btn-slide:hover::before { transform: translateX(0); }
.btn-slide .btn-label {
  position: relative;
  z-index: 1;
  transition: color 0.35s ease;
}
.btn-slide:hover .btn-label { color: #fff; }

/* Input focus warm tint */
.rsvp-input:focus { background-color: rgba(196,145,158,0.05) !important; }

/* Hanging diyas — responsive positioning */
.diya-left  { position: absolute; top: 0; left: 180px; width: 130px; mix-blend-mode: darken; opacity: 1; z-index: 0; transform: scaleX(-1); pointer-events: none; user-select: none; }
.diya-right { position: absolute; top: 0; right: 180px; width: 130px; mix-blend-mode: darken; opacity: 1; z-index: 0; pointer-events: none; user-select: none; }
@media (max-width: 1024px) {
  .diya-left  { left: 40px;  width: 100px; }
  .diya-right { right: 40px; width: 100px; }
}
@media (max-width: 768px) {
  .diya-left  { left: 4px;  width: 72px; }
  .diya-right { right: 4px; width: 72px; }
}

/* On mobile/tablet, polaroid flows below text instead of floating over it */
@media (max-width: 1023px) {
  .polaroid-wrapper {
    position: relative;
    bottom: auto;
    right: auto;
    width: 180px;
    margin: 2.5rem auto 1rem;
    transform: rotate(-4deg);
  }
}

.night-bubble { position: relative; cursor: pointer; }
.night-bubble input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.night-bubble span {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: 2px solid #e4e4e7;
  background: transparent;
  font-family: 'Lato', sans-serif;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #3f3f46;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.night-bubble:hover span {
  border-color: #A1B18C;
}
.night-bubble input:checked + span {
  background: #A1B18C;
  border-color: #A1B18C;
  color: #fff;
}
.night-bubble input:focus-visible + span {
  outline: 2px solid #C876A2;
  outline-offset: 3px;
}
