/* Sofia & João — identidade do convite (azul suave / branco / carvão) */

:root {
  --sage: #8aa9b8;
  --sage-dark: #5a7a8a;
  --sage-light: #b8d0dc;
  --rose: #a8b8c4;
  --rose-deep: #6b8494;
  --cream: #f7f9fb;
  --cream-dark: #e8eef2;
  --ink: #1f1f1f;
  --ink-soft: #5c656c;
  --glow: rgba(138, 169, 184, 0.7);
  --mist: #a7c7d7;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
}

.font-display {
  font-family: "Cormorant Garamond", Georgia, serif;
}

/* Hero */
.hero-invite {
  background:
    radial-gradient(ellipse at top left, rgba(167, 199, 215, 0.35), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(168, 184, 196, 0.25), transparent 45%),
    linear-gradient(180deg, #f4f8fa 0%, #ffffff 55%, #f7f9fb 100%);
}

.hero-parallax {
  background-attachment: fixed;
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .hero-parallax {
    background-attachment: scroll;
  }
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(31, 31, 31, 0.15) 0%, rgba(31, 31, 31, 0.45) 55%, rgba(31, 31, 31, 0.72) 100%);
}

.invite-frame {
  box-shadow:
    0 20px 50px rgba(31, 31, 31, 0.12),
    0 0 0 1px rgba(138, 169, 184, 0.25);
}

/* Timeline */
.timeline-line::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--sage), var(--mist));
}

@media (min-width: 768px) {
  .timeline-line::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-dot {
  box-shadow: 0 0 0 6px rgba(138, 169, 184, 0.25);
}

/* Menu fine dining */
.menu-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 251, 0.98)),
    radial-gradient(circle at top, rgba(167, 199, 215, 0.22), transparent 55%);
  border: 1px solid rgba(138, 169, 184, 0.28);
}

.menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(138, 169, 184, 0.5), transparent);
}

/* Table circles */
.table-stage {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.table-core {
  position: absolute;
  inset: 28%;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, #ffffff, #e8eef2 70%);
  border: 2px solid rgba(138, 169, 184, 0.45);
  box-shadow:
    inset 0 0 30px rgba(138, 169, 184, 0.12),
    0 10px 30px rgba(31, 31, 31, 0.08);
  z-index: 2;
  transition: box-shadow 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}

.table-stage.is-highlighted .table-core {
  border-color: var(--sage-dark);
  box-shadow:
    0 0 0 6px rgba(138, 169, 184, 0.28),
    0 0 28px var(--glow),
    inset 0 0 30px rgba(138, 169, 184, 0.18);
  animation: tablePulse 1.6s ease-in-out 3;
}

.seat {
  position: absolute;
  width: 4.5rem;
  transform: translate(-50%, -50%);
  z-index: 3;
  text-align: center;
  transition: transform 0.35s ease;
}

.seat-avatar {
  width: 2.35rem;
  height: 2.35rem;
  margin-inline: auto;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid rgba(138, 169, 184, 0.4);
  color: var(--sage-dark);
  font-size: 0.7rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(31, 31, 31, 0.08);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.seat-name {
  margin-top: 0.25rem;
  font-size: 0.62rem;
  line-height: 1.15;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(138, 169, 184, 0.25);
  border-radius: 0.4rem;
  padding: 0.2rem 0.3rem;
  max-width: 4.6rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.seat.is-highlighted .seat-avatar {
  border-color: var(--sage-dark);
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(138, 169, 184, 0.35), 0 0 18px var(--glow);
  animation: seatGlow 1.2s ease-in-out infinite;
}

.seat.is-highlighted .seat-name {
  color: var(--ink);
  border-color: var(--sage);
  font-weight: 600;
}

@keyframes tablePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes seatGlow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(138, 169, 184, 0.25), 0 0 12px var(--glow); }
  50% { box-shadow: 0 0 0 7px rgba(138, 169, 184, 0.15), 0 0 22px var(--glow); }
}

.search-results {
  max-height: 16rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.search-item:hover,
.search-item:focus {
  background: rgba(138, 169, 184, 0.14);
}

/* Masonry (galeria de convidados) */
.masonry {
  columns: 1;
  column-gap: 1rem;
}

@media (min-width: 640px) {
  .masonry { columns: 2; }
}

@media (min-width: 1024px) {
  .masonry { columns: 3; }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
}

.masonry-item img {
  width: 100%;
  display: block;
  border-radius: 0.85rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.masonry-item:hover img {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(31, 31, 31, 0.12);
}

/* Story albums */
.story-tabs-wrap {
  display: flex;
  justify-content: center;
}

.story-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.35rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(138, 169, 184, 0.28);
  box-shadow: 0 10px 28px rgba(31, 31, 31, 0.05);
}

.story-tab {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.story-tab:hover {
  color: var(--sage-dark);
  background: rgba(138, 169, 184, 0.14);
}

.story-tab.is-active {
  background: var(--sage-dark);
  color: #fff;
  box-shadow: 0 8px 18px rgba(90, 122, 138, 0.28);
}

.story-panel {
  display: none;
  animation: storyFade 0.35s ease;
}

.story-panel.is-active {
  display: block;
}

@keyframes storyFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .story-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .story-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
  }

  .story-card.is-featured {
    grid-column: span 2;
  }
}

.story-card {
  margin: 0;
  overflow: hidden;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 31, 31, 0.06);
  border: 1px solid rgba(138, 169, 184, 0.18);
}

.story-card-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  min-height: 0;
  overflow: hidden;
}

.story-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.4s ease;
}

.story-card.is-featured img {
  aspect-ratio: 16 / 10;
}

@media (max-width: 1023px) {
  .story-card.is-featured img {
    aspect-ratio: 4 / 5;
  }
}

.story-card:hover img {
  transform: scale(1.04);
  filter: brightness(1.03);
}

/* Nav */
.site-nav {
  backdrop-filter: blur(14px);
  background: rgba(247, 249, 251, 0.78);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-nav.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(138, 169, 184, 0.22);
  box-shadow: 0 10px 30px rgba(31, 31, 31, 0.05);
}

.nav-brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
}

.nav-desktop {
  gap: 0.15rem;
  padding: 0.3rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(138, 169, 184, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.nav-link:hover {
  color: var(--sage-dark);
  background: rgba(138, 169, 184, 0.12);
}

.nav-link.is-active {
  color: #fff;
  background: var(--sage-dark);
  box-shadow: 0 6px 16px rgba(90, 122, 138, 0.28);
}

.nav-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-left: 0.1rem;
  border-radius: 9999px;
  color: var(--ink-soft);
  text-decoration: none;
  opacity: 0.55;
  transition: opacity 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.nav-lock:hover {
  opacity: 1;
  color: var(--sage-dark);
  background: rgba(138, 169, 184, 0.14);
}

.nav-lock-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(138, 169, 184, 0.35);
  background: rgba(255, 255, 255, 0.7);
  color: var(--sage-dark);
  opacity: 0.7;
  box-shadow: 0 1px 2px rgba(31, 31, 31, 0.04);
  backdrop-filter: blur(8px);
  transition: opacity 0.25s ease, background 0.25s ease;
}

.nav-lock-mobile:hover {
  opacity: 1;
  background: rgba(138, 169, 184, 0.12);
}

/* Hamburger */
.menu-toggle-icon {
  display: flex;
  width: 1.1rem;
  flex-direction: column;
  gap: 0.28rem;
}

.menu-toggle-icon span {
  display: block;
  height: 1.5px;
  width: 100%;
  border-radius: 99px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(1) {
  transform: translateY(0.34rem) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(3) {
  transform: translateY(-0.34rem) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  transition: max-height 0.4s ease, opacity 0.3s ease, border-color 0.3s ease;
}

.mobile-menu.is-open {
  max-height: 28rem;
  opacity: 1;
  pointer-events: auto;
  border-bottom-color: rgba(138, 169, 184, 0.22);
  box-shadow: 0 18px 40px rgba(31, 31, 31, 0.08);
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1.1rem 1.25rem;
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.9rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.mobile-link span {
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--sage-dark);
}

.mobile-link:hover,
.mobile-link.is-active {
  background: rgba(138, 169, 184, 0.12);
  color: var(--sage-dark);
}

.upload-zone {
  border: 2px dashed rgba(138, 169, 184, 0.45);
  background: rgba(255, 255, 255, 0.65);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.upload-zone.is-dragover {
  border-color: var(--sage-dark);
  background: rgba(138, 169, 184, 0.12);
}

.section-wash {
  background:
    radial-gradient(ellipse at top left, rgba(167, 199, 215, 0.18), transparent 45%),
    radial-gradient(ellipse at bottom right, rgba(168, 184, 196, 0.16), transparent 45%),
    var(--cream);
}

.location-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(138, 169, 184, 0.28);
}

button.btn,
.btn,
.search-item,
.story-tab,
.mobile-link,
.menu-toggle {
  min-height: 44px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
