/* Invitation page additions, built on top of /css/styles.css */

/* --- Hero layout: stack cards vertically, hero-card always on top --- */
main.hero {
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
#hero-card {
  order: -1;
  position: relative;
  z-index: 1;
}

/* --- Event accordion --- */
.event-header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0;
  background: transparent;
  border: none;
  font: inherit;
  color: var(--cream);
  cursor: pointer;
  text-align: center;
}
.event-header:hover,
.event-header:focus-visible {
  color: var(--gold);
  outline: none;
}
.event-header h3 {
  margin: 0;
  line-height: 1.4;
}
.event-toggle {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(255, 244, 230, 0.08);
  color: var(--gold);
  transition:
    transform 0.2s,
    background 0.2s;
  flex-shrink: 0;
}
.event-header[aria-expanded="false"] .event-toggle {
  color: var(--cream);
}
.event-header[aria-expanded="true"] h3 {
  color: var(--gold);
}
.event-header[aria-expanded="true"] .event-toggle {
  transform: rotate(180deg);
  background: rgba(255, 195, 107, 0.15);
  color: var(--gold);
}
.event-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.35s ease,
    opacity 0.3s ease,
    padding 0.35s ease;
  padding: 0 0.5rem;
}
.event-panel.open {
  max-height: 800px;
  opacity: 1;
  padding: 1.25rem 0.5rem 0.5rem;
}
.event-panel p {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
}
.event-panel .map-link,
.event-panel .flyer-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--gold);
  transition: border-color 0.2s;
}
.event-panel .map-link:hover,
.event-panel .map-link:focus-visible {
  outline: none;
}
.event-panel .map-link svg {
  vertical-align: middle;
  margin-right: 0.35rem;
}

/* --- Greeting block --- */
.greeting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1.5rem;
  padding: 1.25rem 1rem;
  border-radius: 14px;
  background: rgba(255, 244, 230, 0.07);
  border: 1px solid var(--card-border);
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}
.greeting.show {
  opacity: 1;
  transform: translateY(0);
}
.greeting-headshot {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.greeting-text {
  text-align: center;
}
.greeting-name {
  margin: 0;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--cream);
}
.greeting-message {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.5;
}

/* --- Video embed --- */
.greeting-video {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16 / 9;
  margin-top: 0.35rem;
}
.greeting-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .event-panel,
  .greeting,
  .event-toggle {
    transition: none;
  }
}

/* --- Mobile spacing --- */
@media (max-width: 480px) {
  .card {
    padding: 2rem 1.25rem;
  }
  .event {
    padding: 1.5rem 0;
  }
}

/* --- Floating action buttons --- */
body.has-fab {
  padding-bottom: 4.5rem;
}
.fab-stack {
  position: fixed;
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.7rem;
}
.fab {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: #2a1505;
  cursor: pointer;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.35),
    0 12px 28px -10px rgba(255, 122, 61, 0.7);
  transition:
    transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.2s;
}
.fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 16px 32px -8px rgba(255, 122, 61, 0.8);
}
.fab:active {
  transform: scale(0.96);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.35),
    0 8px 18px -8px rgba(255, 122, 61, 0.7);
}
.fab[hidden] {
  display: none;
}
@media (max-width: 480px) {
  .fab-stack {
    right: calc(1rem + env(safe-area-inset-right, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    gap: 1.3rem;
  }
  .fab {
    width: 50px;
    height: 50px;
  }
}

/* --- QR modal --- */
.qr-modal[hidden] {
  display: none;
}
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 6, 20, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.qr-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 2rem 1.5rem 1.75rem;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  text-align: center;
  animation: qr-modal-in 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes qr-modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.qr-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  background: rgba(255, 244, 230, 0.08);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.qr-modal-close:hover,
.qr-modal-close:focus-visible {
  background: rgba(255, 195, 107, 0.18);
  color: var(--gold);
  outline: none;
}
.qr-modal-dialog h2 {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  color: var(--cream);
}
.qr-modal-code {
  background: #fff;
  border-radius: 12px;
  padding: 0.9rem;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
}
.qr-modal-code svg {
  display: block;
  width: 100%;
  height: auto;
}
.qr-modal-url {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
}
@media (prefers-reduced-motion: reduce) {
  .qr-modal-dialog {
    animation: none;
  }
}

.event details {
  cursor: pointer;
  line-height: 2rem;
}
