/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FAF7F2;
  --bg-card: #FFFFFF;
  --accent: #B8860B;
  --accent-light: #D4A94C;
  --accent-muted: #E8D5A8;
  --text: #3A3A3A;
  --text-light: #777;
  --text-lighter: #AAA;
  --border: #E8E0D4;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 12px;
  --table-wood: #D4C4A8;
  --table-border: #B8A88A;
  --seat-fill: #6B4F3A;
  --seat-cushion: #A0845C;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-light); }

/* ===== Navigation ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,247,242,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
nav a { color: var(--text-light); font-weight: 500; }
nav a:hover, nav a.active { color: var(--accent); }

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  max-width: 700px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}
.hero .subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.hero .details {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.8;
}
.hero .details strong { color: var(--text); }
.divider {
  width: 60px;
  height: 2px;
  background: var(--accent-muted);
  margin: 1.5rem auto;
}

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
}
.section-header h2 {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}
.section-header p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== View Toggle ===== */
.view-toggle {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.view-toggle button {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  color: var(--text-light);
}
.view-toggle button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.view-toggle button:hover:not(.active) {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Tag Filters ===== */
.tag-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 1.5rem;
  margin-bottom: 2rem;
}
.tag-filters button {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 14px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  color: var(--text-light);
}
.tag-filters button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.tag-filters button:hover:not(.active) {
  border-color: var(--accent-light);
  color: var(--accent);
}

/* ===== Seating Chart (SVG) ===== */
.seating-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
  overflow-x: auto;
}
.seating-container svg {
  width: 100%;
  height: auto;
  cursor: default;
}
.seating-container svg .seat-group { cursor: pointer; }
.seating-container svg .seat-group:hover .seat-rect { fill: var(--accent-muted); }
.seating-container svg .seat-group:hover .seat-name { fill: var(--accent); }
.seating-container svg .seat-group.highlighted .seat-rect { fill: var(--accent-muted); }

/* ===== Guest Grid ===== */
.guest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.guest-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  position: relative;
}
.guest-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--accent-muted);
}
.guest-card.celebrating::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: var(--radius) var(--radius) 0 0;
}

.guest-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.guest-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.guest-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guest-card-info h3 {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
  font-family: 'Playfair Display', serif;
}
.guest-card-info .couple-link {
  font-size: 0.82rem;
  color: var(--text-light);
  font-style: italic;
}
.guest-card-info .couple-link a { color: var(--accent); }

.guest-card .bio {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.55;
  margin-bottom: 0.8rem;
}

.guest-card .celebrating-note {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  background: #FDF6E3;
  border-radius: 8px;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.guest-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}
.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #F5F0EB;
  border-radius: 10px;
  font-size: 0.72rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}
.tag:hover { background: var(--accent-muted); color: var(--accent); }

.guest-card .socials {
  display: flex;
  gap: 0.5rem;
}
.social-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F5F0EB;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-size: 0.75rem;
}
.social-icon:hover { background: var(--accent-muted); }
.social-icon svg { width: 14px; height: 14px; fill: var(--text-light); }
.social-icon:hover svg { fill: var(--accent); }

.guest-card .late-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  background: #FFF3CD;
  color: #856404;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  font-weight: 500;
}

.guest-card .host-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  background: var(--accent);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  font-weight: 500;
}

/* Hide view */
.view-hidden { display: none !important; }

/* Card highlight animation (when clicking from seating chart) */
@keyframes cardPulse {
  0% { border-color: var(--accent); box-shadow: 0 0 0 0 rgba(184,134,11,0.3); }
  50% { border-color: var(--accent); box-shadow: 0 0 0 8px rgba(184,134,11,0); }
  100% { border-color: transparent; box-shadow: var(--shadow); }
}
.guest-card.highlighted {
  animation: cardPulse 2s ease-out forwards;
}

/* ===== Menu Section ===== */
.menu-section {
  max-width: 650px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}
.menu-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  text-align: center;
  border: 1px solid var(--border);
}
.menu-card .menu-label {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.menu-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.2rem;
  font-family: 'Playfair Display', serif;
}
.menu-card .menu-subtitle {
  font-size: 0.85rem;
  color: var(--text-lighter);
  margin-bottom: 1.5rem;
}
.menu-course {
  margin-bottom: 1.8rem;
}
.menu-course h4 {
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}
.menu-item {
  margin-bottom: 0.6rem;
}
.menu-item .dish-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
}
.menu-item .dish-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
}
.menu-divider {
  width: 40px;
  height: 1px;
  background: var(--accent-muted);
  margin: 1.5rem auto;
}

/* ===== Drinks Section ===== */
.drinks-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}
.drinks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}
.drink-category {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.drink-category h3 {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.drink-category h4 {
  font-size: 0.7rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-lighter);
  margin: 0.8rem 0 0.4rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}
.drink-item {
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}
.drink-item .drink-name {
  font-weight: 600;
  color: var(--text);
}
.drink-item .drink-desc {
  color: var(--text-light);
  font-size: 0.82rem;
}
.drinks-note {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-light);
}
.drinks-note a { font-weight: 500; }

/* ===== Profile Modal ===== */
.profile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 500;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 1rem;
}
.profile-overlay.visible {
  display: flex;
}

.profile-modal {
  background: var(--bg-card);
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 60px rgba(0,0,0,0.3);
  position: relative;
  animation: profileSlideIn 0.3s ease-out;
}

@keyframes profileSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0,0,0,0.3);
  color: white;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}
.profile-close:hover { background: rgba(0,0,0,0.5); }

.profile-photo-wrap {
  width: 100%;
  aspect-ratio: 1;
  max-height: 380px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  position: relative;
}

.profile-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-photo-fallback {
  font-size: 5rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.profile-body {
  padding: 1.5rem;
}

.profile-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}

.profile-couple {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 0.5rem;
}
.profile-couple a { color: var(--accent); font-style: normal; font-weight: 500; }

.profile-note {
  display: inline-block;
  font-size: 0.78rem;
  background: #FFF3CD;
  color: #856404;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.profile-celebrating {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  background: #FDF6E3;
  border-radius: 10px;
  margin-bottom: 0.8rem;
}

.profile-bio {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0.8rem 0;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.profile-tags .tag { font-size: 0.78rem; }

.profile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.profile-social-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: #F5F0EB;
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--text-light);
  transition: all 0.2s;
  text-decoration: none;
}
.profile-social-link:hover {
  background: var(--accent-muted);
  color: var(--accent);
}
.profile-social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.profile-edit-btn {
  margin-top: 0.8rem;
  padding: 0.4rem 1rem;
  background: var(--accent-muted);
  color: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
}

.profile-nav {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border);
}

.profile-nav-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.3rem 0;
  font-weight: 500;
  transition: opacity 0.2s;
}
.profile-nav-btn:hover { opacity: 0.7; }

@media (max-width: 600px) {
  .profile-modal { max-width: 100%; border-radius: 12px; }
  .profile-photo-wrap { max-height: 300px; }
  .profile-body h2 { font-size: 1.3rem; }
}

/* ===== Edit Mode ===== */
.edit-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  transition: transform 0.2s;
}
.edit-fab:hover { transform: scale(1.1); }

.edit-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  justify-content: center;
  align-items: center;
}
.edit-modal-overlay.visible { display: flex; }

.edit-modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
.edit-modal h3 {
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
}
.edit-modal label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 0.3rem;
  margin-top: 0.8rem;
}
.edit-modal input, .edit-modal textarea, .edit-modal select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  background: var(--bg);
}
.edit-modal textarea { resize: vertical; min-height: 80px; }
.edit-modal .btn-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.2rem;
}
.edit-modal button {
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  transition: opacity 0.2s;
}
.edit-modal .btn-save { background: var(--accent); color: white; }
.edit-modal .btn-cancel { background: var(--border); color: var(--text); }
.edit-modal .btn-remove { background: #E74C3C; color: white; margin-left: auto; }

/* Password prompt */
.password-modal {
  text-align: center;
}
.password-modal input {
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: 2px;
}
.password-modal .btn-row { justify-content: center; }

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-lighter);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1rem; }
  nav { gap: 1rem; font-size: 0.75rem; }
  .guest-grid { grid-template-columns: 1fr; padding: 0 1rem 2rem; }
  .menu-card { padding: 1.5rem; }
  .drinks-grid { grid-template-columns: 1fr; }
  .seating-container { padding: 0 0.5rem; }
}
