@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Color Palette - Secret Garden */
  --sage-green: #4F7A5A;
  --sage-deep: #2F5139;
  --sage-light: #CFE2D2;
  --blush-pink: #F2C6C0;
  --rose: #D77F76;
  --lavender-mist: #E7E1F0;
  --cream: #FFFDF8;
  --ivory: #FAF5EC;
  --text-dark: #22302A;
  --text-light: #5F6E65;

  /* Typography */
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;

  /* spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* other */
  --border-radius: 18px;
  --shadow-soft: 0 12px 40px rgba(47, 81, 57, 0.08);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  font-family: var(--font-body);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(242, 198, 192, 0.22), transparent 40%),
    radial-gradient(circle at 100% 30%, rgba(207, 226, 210, 0.35), transparent 45%);
  background-attachment: fixed;
  color: var(--text-dark);
  font-size: 1.02rem;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-dark);
}

p {
  text-align: left;
}

.hero-content p,
footer p,
.center-p p {
  text-align: center;
}

h1 {
  font-size: 4rem;
  margin-bottom: var(--spacing-sm);
}

/* Page Titles */
main > h2 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 2.5rem;
  color: var(--sage-deep);
}

/* Card Headers */
h2 {
  font-size: 2.8rem;
  margin-bottom: var(--spacing-md);
  text-align: center;
  color: var(--sage-green);
}

h3 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  text-align: center;
  color: var(--sage-green);
}

a {
  color: var(--sage-green);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--rose);
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-xl);
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(79, 122, 90, 0.12);
  box-shadow: 0 2px 20px rgba(47, 81, 57, 0.05);
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--sage-deep);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--sage-deep);
  border-bottom-color: var(--blush-pink);
}

.nav-links a.btn,
.nav-links a.btn:hover,
.nav-links a.btn.active {
  color: white;
  border-bottom: none;
  padding: 10px 24px;
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
}

/* Hero Section */
.hero {
  height: 86vh;
  min-height: 560px;
  background-image: url('../assets/manor.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(255, 253, 248, 0) 55%, rgba(255, 253, 248, 1) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  padding: 4rem var(--spacing-xl) 3.5rem;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  max-width: 620px;
  margin: 0 var(--spacing-md);
  box-shadow: 0 24px 60px rgba(47, 81, 57, 0.18);
}

.hero-content h1 {
  color: var(--sage-deep);
  font-size: 4.6rem;
  line-height: 1.05;
}

.hero-content p {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--rose);
  margin-bottom: var(--spacing-sm);
}

.hero-subtitle {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
  display: block;
  margin-bottom: var(--spacing-md);
}

/* Page Layouts */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

.text-center {
  text-align: center;
}

.text-left, .text-left h1, .text-left h2, .text-left h3, .text-left p {
  text-align: left;
}

/* Floral Accent Divider */
.floral-divider {
  width: 150px;
  margin: var(--spacing-lg) auto;
  display: block;
  mix-blend-mode: multiply;
}

.venue-hero-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  margin: var(--spacing-lg) auto 3rem auto;
  max-width: 1000px;
}

.venue-hero-img {
  width: 100%;
  mix-blend-mode: multiply;
}

.venue-hero-img img {
  width: 100%;
  height: auto;
  display: block;
}

.venue-hero-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
}

/* Desktop layout for Venue Hero Card */
@media screen and (min-width: 769px) {
  .venue-hero-card {
    flex-direction: row;
    align-items: stretch;
  }
  
  .venue-hero-img {
    width: 50%;
    display: flex;
  }
  
  .venue-hero-img img {
    height: 100%;
    object-fit: cover;
  }
  
  .venue-hero-content {
    width: 50%;
  }
}

/* Card Style Sections */
.card {
  background: white;
  border-radius: var(--border-radius);
  padding: 2.75rem;
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(79, 122, 90, 0.08);
  border-top: 4px solid var(--blush-pink);
}

/* Button */
.btn {
  display: inline-block;
  padding: 14px 34px;
  background-color: var(--sage-green);
  color: white;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(79, 122, 90, 0.25);
  transition: var(--transition);
}

.btn:hover {
  background-color: var(--rose);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(215, 127, 118, 0.3);
}

/* RSVP Form */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--sage-deep);
}

.form-group input, .form-group select, .form-group textarea {
  padding: 14px 16px;
  border: 1px solid var(--sage-light);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  background-color: var(--ivory);
  transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--sage-green);
  background-color: white;
  box-shadow: 0 0 0 4px rgba(79, 122, 90, 0.12);
}

/* Schedule */
.timeline {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: 1fr 1fr;
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding-top: 0;
  overflow-x: hidden;
  padding-bottom: 20px;
}

.timeline::after {
  content: '';
  grid-row: 1 / 3;
  grid-column: 1 / -1;
  align-self: center;
  height: 2px;
  background-color: var(--sage-light);
  z-index: 0;
}

.timeline-item {
  position: relative;
  background-color: inherit;
  padding: 0 5px;
}

/* Force zig-zag placement */
.timeline-item:nth-child(1) { grid-column: 1; }
.timeline-item:nth-child(2) { grid-column: 2; }
.timeline-item:nth-child(3) { grid-column: 3; }
.timeline-item:nth-child(4) { grid-column: 4; }
.timeline-item:nth-child(5) { grid-column: 5; }
.timeline-item:nth-child(6) { grid-column: 6; }
.timeline-item:nth-child(7) { grid-column: 7; }

/* Top Row (Left items) */
.timeline-item.left {
  grid-row: 1;
  align-self: end;
  padding-bottom: 30px;
}

/* Bottom Row (Right items) */
.timeline-item.right {
  grid-row: 2;
  align-self: start;
  padding-top: 30px;
}

.timeline-content {
  padding: 1.25rem 0.75rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(79, 122, 90, 0.1);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  text-align: center;
}

.timeline-content h3 {
  color: var(--text-dark);
}

.timeline-content:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(215, 127, 118, 0.18);
}

.timeline-item.left::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background-color: var(--sage-green);
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 4px rgba(156, 180, 161, 0.2);
}

.timeline-item.right::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background-color: var(--sage-green);
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 4px rgba(156, 180, 161, 0.2);
}

.timeline-item.left::before {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--sage-light);
  bottom: 0;
  left: 50%;
  height: 30px;
  margin-left: -1px;
  z-index: 0;
  display: block;
}

.timeline-item.right::before {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--sage-light);
  top: 0;
  left: 50%;
  height: 30px;
  margin-left: -1px;
  z-index: 0;
  display: block;
}

.time {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sage-deep);
  background-color: rgba(242, 198, 192, 0.45);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}

/* Fine Dining Menu */
.menu-card {
  background: white;
  border: 1px solid var(--sage-light);
  padding: 6rem 4rem;
  margin: 0 auto var(--spacing-xl) auto;
  max-width: 800px;
  box-shadow: var(--shadow-soft);
  position: relative;
  border-radius: 40px;
  z-index: 1;
}


.menu-card::after {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 20px;
  right: 20px;
  pointer-events: none;
  background-image: 
    url('../assets/menu_corner_tl_user.png'),
    url('../assets/menu_corner_br_user.png');
  background-position: 
    top left,
    bottom right;
  background-repeat: no-repeat;
  background-size: 300px, 300px;
  opacity: 0.95;
  mix-blend-mode: multiply;
  z-index: -1;
  border-radius: 20px;
}

.menu-course {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--sage-green);
  font-size: 1.2rem;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  border-bottom: 1px solid rgba(156, 180, 161, 0.3);
  padding-bottom: 10px;
  display: inline-block;
}

.menu-item {
  margin-bottom: 3rem;
  position: relative;
}

.menu-item:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 1px;
  background-color: var(--sage-light);
  opacity: 0.6;
}

.menu-item-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.menu-item-desc {
  font-style: italic;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem var(--spacing-lg);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  background-color: var(--sage-deep);
  margin-top: var(--spacing-xl);
}

/* Party Page */
.party-intro {
  display: flex;
  align-items: center;
  gap: 2rem;
  text-align: left;
}

.party-intro img {
  width: 180px;
  flex-shrink: 0;
}

.party-intro img.party-art-tall {
  width: auto;
  height: 170px;
}

.party-intro p {
  font-size: 1.15rem;
  margin-bottom: 0;
}

.party-intro h3 {
  text-align: left;
}

.party-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sage-deep);
  background-color: rgba(242, 198, 192, 0.45);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.party-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: var(--spacing-lg);
}

.party-tile {
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(79, 122, 90, 0.08);
  transition: var(--transition);
}

.party-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(215, 127, 118, 0.18);
}

.party-tile h3 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}

.party-tile p {
  text-align: left;
  color: var(--text-light);
}

.party-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background-color: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.party-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--sage-deep);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Personal invites: hide the other guest type's content before scripts run */
html.invite-pending [data-invite],
html[data-invite-type="day"] [data-invite="evening"],
html[data-invite-type="evening"] [data-invite="day"] {
  display: none !important;
}

/* Loading screen while the invitation is fetched from the sheet */
html.invite-loading body {
  overflow: hidden;
}

html.invite-loading body::before {
  content: 'Finding your invitation…';
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 7rem;
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(242, 198, 192, 0.3), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(207, 226, 210, 0.45), transparent 50%);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--sage-deep);
}

html.invite-loading body::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2001;
  width: 48px;
  height: 48px;
  margin: -48px 0 0 -24px;
  border-radius: 50%;
  border: 3px solid var(--sage-light);
  border-top-color: var(--rose);
  animation: invite-spin 0.9s linear infinite;
}

@keyframes invite-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  html.invite-loading body::after { animation-duration: 3s; }
}

.invite-error {
  background-color: rgba(242, 198, 192, 0.45);
  color: var(--sage-deep);
  text-align: center;
  padding: 0.9rem var(--spacing-md);
  font-size: 0.95rem;
}

.invite-error a {
  color: var(--sage-deep);
  text-decoration: underline;
}

.btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.hero-guests {
  display: block;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--rose);
  margin-bottom: var(--spacing-sm);
}

.hero-guests::before {
  content: 'Dear ';
}

/* RSVP guests */
.rsvp-for {
  text-align: center;
  margin-bottom: var(--spacing-sm);
}

.rsvp-for p {
  text-align: center;
  font-size: 1.1rem;
}

.rsvp-guest {
  border: 1px solid var(--sage-light);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  text-align: left;
}

.rsvp-guest legend {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--sage-deep);
  padding: 0 0.5rem;
}

.rsvp-guest + .rsvp-guest {
  margin-top: var(--spacing-md);
}

.rsvp-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.rsvp-choice label {
  flex: 1 1 160px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 14px;
  border: 1px solid var(--sage-light);
  border-radius: 999px;
  background-color: var(--ivory);
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.rsvp-choice label:has(input:checked) {
  background-color: var(--sage-green);
  border-color: var(--sage-green);
  color: white;
}

.rsvp-choice input {
  accent-color: var(--sage-deep);
}

.rsvp-dietary {
  margin-top: var(--spacing-md);
}

/* RSVP Deadline */
.rsvp-deadline {
  margin: -1rem auto 2.5rem;
  text-align: center;
}

.rsvp-deadline-date {
  display: block;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 2.4rem;
  color: var(--rose);
  line-height: 1.2;
}

.rsvp-deadline p {
  text-align: center;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* Gifts Page */
.gifts-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.gifts-signoff {
  text-align: center;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--rose);
  margin-top: var(--spacing-lg);
}

.party-photos {
  background: linear-gradient(135deg, white 55%, rgba(242, 198, 192, 0.35));
}

@media screen and (max-width: 640px) {
  .party-intro { flex-direction: column; text-align: center; }
  .party-intro h3 { text-align: center; }
  .party-photos { flex-direction: column-reverse; }
  .party-intro img { width: 150px; }
  .party-intro img.party-art-tall { height: 140px; }
}

footer p:first-child {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.6rem;
  color: white;
  margin-bottom: 0.5rem;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--cream);
    padding: var(--spacing-md) 0;
    text-align: center;
    border-bottom: 1px solid rgba(156, 180, 161, 0.2);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .navbar {
    padding: var(--spacing-md);
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  main > h2 { font-size: 2.8rem; }
  .hero-content { padding: 3rem 1.5rem 2.5rem; }
  .hero-content h1 { font-size: 3rem; }
  .card { padding: 1.75rem; }

  /* Hide the menu's corner flowers on phones */
  .menu-card { padding: 3rem 1.5rem; border-radius: 28px; }
  .menu-card::after { display: none; }
  .menu-item:last-child { margin-bottom: 0; }
  .menu-item-desc br { display: none; }
  
}

/* Tablet / Smaller Desktop Responsive Timeline */
@media screen and (max-width: 1100px) {
  .timeline {
    display: flex;
    flex-direction: column;
    padding-top: 0;
    overflow-x: visible;
    max-width: 500px;
  }
  .timeline::after {
    position: absolute;
    height: 100%;
    width: 2px;
    top: 0;
    bottom: auto;
    left: 31px;
    right: auto;
    margin: 0;
  }
  .timeline-item { width: 100%; padding: 15px 25px 15px 70px; }
  .timeline-item.left, .timeline-item.right {
    padding-bottom: 15px;
    padding-top: 15px;
    align-self: auto;
  }
  .timeline-item.left::after, .timeline-item.right::after {
    top: 45px;
    bottom: auto;
    left: 25px;
    transform: none;
  }
  .timeline-item.left::before, .timeline-item.right::before {
    display: none;
  }
  .timeline-content::before {
    content: '';
    display: block !important;
    position: absolute;
    left: -38px;
    top: 36px;
    width: 38px;
    height: 2px;
    background-color: var(--sage-light);
    z-index: 0;
  }
}
