/* ---------------------------------------------------------------------------
   Custom styling layered on top of Tailwind: the falling-leaves canvas, photo
   frames with leaf-corner ornaments, the FAQ accordion, buttons and subtle,
   tasteful animations.
--------------------------------------------------------------------------- */

:root {
  --terracotta: #c65d3b;
  --terracotta-dark: #b85c38;
  --cream: #fdf8f0;
  --taupe: #a89a8c;
  --gold: #c9a24b;
  --brown: #3e2c23;
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--cream);
}

/* ----------------------------- Falling leaves ---------------------------- */
.leaves-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ------------------------------- Buttons --------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 2px;
  background-color: var(--terracotta);
  color: var(--cream);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 14px 30px -16px rgba(198, 93, 59, 0.8);
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-primary:hover {
  background-color: var(--terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -16px rgba(184, 92, 56, 0.85);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:disabled,
.btn-primary[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ----------------------------- Hero overlay ------------------------------ */
.hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(62, 44, 35, 0.55) 0%,
    rgba(62, 44, 35, 0.28) 38%,
    rgba(62, 44, 35, 0.62) 100%
  );
}

/* ----------------------- Photo frames + leaf corners --------------------- */
.photo-frame {
  position: relative;
  padding: 0.6rem;
  background: #fff;
  border: 1px solid rgba(168, 154, 140, 0.45);
  border-radius: 2px;
  box-shadow: 0 22px 48px -28px rgba(62, 44, 35, 0.55);
}
.photo-frame__inner {
  overflow: hidden;
  border-radius: 1px;
}
.photo-frame img {
  transition: transform 1.4s ease;
}
.photo-frame:hover img {
  transform: scale(1.045);
}

.leaf-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  color: var(--gold);
  opacity: 0.7;
  pointer-events: none;
}
.leaf-corner svg {
  width: 100%;
  height: 100%;
}
.leaf-corner--tl {
  top: -12px;
  left: -12px;
}
.leaf-corner--tr {
  top: -12px;
  right: -12px;
  transform: scaleX(-1);
}
.leaf-corner--bl {
  bottom: -12px;
  left: -12px;
  transform: scaleY(-1);
}
.leaf-corner--br {
  bottom: -12px;
  right: -12px;
  transform: scale(-1, -1);
}

/* ------------------------------ Ornaments -------------------------------- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}
.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: 56px;
  background: linear-gradient(90deg, transparent, rgba(198, 93, 59, 0.55));
}
.divider::after {
  background: linear-gradient(90deg, rgba(198, 93, 59, 0.55), transparent);
}

.ornament-rule {
  height: 1px;
  width: 48px;
  background: linear-gradient(90deg, var(--terracotta), transparent);
}

/* ------------------------------ RSVP cards ------------------------------- */
.rsvp-card {
  border: 1px solid rgba(168, 154, 140, 0.35);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(2px);
  border-radius: 3px;
  padding: 2rem 1.75rem;
  box-shadow: 0 26px 55px -34px rgba(62, 44, 35, 0.55);
}
@media (min-width: 640px) {
  .rsvp-card {
    padding: 2.5rem;
  }
}

/* ----------------------------- Map placeholder --------------------------- */
.map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border: 1px dashed rgba(168, 154, 140, 0.7);
  border-radius: 2px;
  background: repeating-linear-gradient(
    45deg,
    rgba(168, 154, 140, 0.06),
    rgba(168, 154, 140, 0.06) 12px,
    transparent 12px,
    transparent 24px
  );
  color: rgba(62, 44, 35, 0.45);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ------------------------------- Accordion ------------------------------- */
details.faq {
  border-bottom: 1px solid rgba(168, 154, 140, 0.35);
}
details.faq:last-child {
  border-bottom: none;
}
details.faq summary {
  cursor: pointer;
  list-style: none;
}
details.faq summary::-webkit-details-marker {
  display: none;
}
details.faq .faq-icon {
  transition: transform 0.3s ease;
}
details.faq[open] .faq-icon {
  transform: rotate(45deg);
}

/* ------------------------- HTMX request indicator ------------------------ */
.htmx-indicator {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* ----------------------- Subtle, tasteful animations --------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hero-fade {
  opacity: 0;
  animation: heroFade 1.1s ease forwards;
}
.hero-fade-1 {
  animation-delay: 0.15s;
}
.hero-fade-2 {
  animation-delay: 0.35s;
}
.hero-fade-3 {
  animation-delay: 0.55s;
}
@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.animate-rise {
  animation: rise 0.5s ease forwards;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------- Respect reduced-motion settings ------------------ */
@media (prefers-reduced-motion: reduce) {
  .leaves-canvas {
    display: none;
  }
  .reveal,
  .hero-fade,
  .animate-rise {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .photo-frame:hover img {
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}
