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

/* --- Design Tokens --- */
:root {
  --bg-primary: #FAF9F6;      /* Warm soft alabaster */
  --bg-secondary: #F4F2EC;    /* Warm sand */
  --bg-card: #FFFFFF;
  --text-primary: #1A1A1A;    /* Charcoal black */
  --text-secondary: #5A5A5A;  /* Muted grey */
  --text-light: #8C8C8C;
  --accent-gold: #8E7A53;     /* Elegant bronze/gold */
  --accent-gold-hover: #736240;
  --accent-gold-light: #F4EFE6;
  --border-color: rgba(26, 26, 26, 0.08);
  --border-color-focus: rgba(142, 122, 83, 0.5);
  
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: all 0.2s ease;
  
  --site-max-width: 1200px;
  --header-height: 90px;
  --border-radius: 4px;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 1px;
  background-color: var(--accent-gold);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

p.lead {
  font-size: 1.15rem;
  color: var(--text-primary);
}

/* --- Layout Components --- */
.container {
  width: 100%;
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

main {
  flex: 1;
  padding-top: var(--header-height);
  position: relative;
}

.section-padding {
  padding: 6rem 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .venue-grid { grid-template-columns: 2fr 1fr; }
  .venue-intro { grid-column: 1 / -1; }
}

/* --- Header & Navigation --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

header.scrolled {
  height: 70px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.logo span {
  font-weight: 300;
  color: var(--accent-gold);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 400;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-gold);
  transition: var(--transition-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Language Selector Dropdown */
.lang-selector {
  position: relative;
  display: inline-block;
}

.lang-trigger {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition-fast);
}

.lang-trigger:hover {
  border-color: var(--accent-gold);
}

.lang-trigger::after {
  content: '▾';
  font-size: 0.7rem;
  margin-top: 1px;
  transition: var(--transition-fast);
}

.lang-selector.open .lang-trigger::after {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: 120%;
  right: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: var(--border-radius);
  list-style: none;
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-smooth);
  z-index: 1001;
}

.lang-selector.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown li a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lang-dropdown li a:hover {
  background-color: var(--bg-secondary);
  color: var(--accent-gold);
}

.lang-dropdown li.active a {
  color: var(--accent-gold);
  font-weight: 600;
}

.flag {
  display: inline-block;
  width: 18px;
  height: 12px;
  background-size: cover;
  background-position: center;
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Mobile Navigation Hamburger */
.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  z-index: 1100;
}

.burger span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-smooth);
}

.burger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-primary);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  transition: var(--transition-smooth);
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav .nav-links {
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
}

.mobile-nav .nav-links a {
  font-size: 1.25rem;
}

/* --- SPA Sections --- */
.page-section {
  display: none;
  opacity: 0;
  width: 100%;
}

.page-section.active {
  display: block;
  opacity: 1;
  animation: pageFadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background-color: var(--accent-gold);
  color: var(--bg-primary);
}

.btn-outline {
  border-color: var(--text-primary);
  background-color: transparent;
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-gold {
  background-color: var(--accent-gold);
  color: #FFFFFF;
}

.btn-gold:hover {
  background-color: var(--accent-gold-hover);
}

.btn-gold:disabled {
  background-color: var(--accent-gold);
  opacity: 0.6;
  cursor: wait;
}

/* --- Page Specific Styles --- */

/* Hero / Home Page */
.hero-section {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  z-index: 10;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
  display: block;
}

.hero-date {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 2rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

/* Welcome Section */
.welcome-block {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

/* Venue Section */
.venue-intro {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 2rem;
}

.venue-details {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.venue-image-container {
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.04);
}

.venue-image-container img {
  width: 100%;
  object-fit: cover;
  max-height: 700px;
  transition: var(--transition-smooth);
}

.little-venue-img img{
  width: 20rem;
  max-height: 14rem;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.vespa-img-container img {
  width: 100%;
  object-fit: cover;
  max-height: 500px;
  transition: var(--transition-smooth);
  margin-top: 2.5rem;
  margin-bottom: 3rem;
}

.venue-image-container:hover img {
  transform: scale(1.02);
}

.venue-card-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Agenda / Timeline Component */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 4rem auto 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background-color: var(--border-color);
}

.timeline-day {
  margin-bottom: 4rem;
}

.timeline-day-header {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--accent-gold);
  margin-bottom: 2rem;
  position: relative;
  left: -1.2rem;
  background-color: var(--bg-primary);
  display: inline-block;
  padding-right: 1.5rem;
}

.timeline-day-header::before {
  content: '';
  position: absolute;
  left: calc(-0.8rem - 3px);
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-gold);
}

.timeline-event {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-event::before {
  content: '';
  position: absolute;
  left: calc(-2rem - 4px);
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  border: 2px solid var(--accent-gold);
  z-index: 5;
}

.timeline-event:hover::before {
  background-color: var(--accent-gold);
}

.event-time {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 0.3rem;
  letter-spacing: 0.05em;
}

.event-title {
  font-size: 1.25rem;
  font-family: var(--font-sans);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Places to Stay & Bunk Beds */
.places-content {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.bunk-section {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 992px) {
  .bunk-section {
    grid-template-columns: 1.2fr 1fr;
  }
}

.bunk-details {
  background-color: var(--bg-secondary);
  padding: 3rem;
  border-radius: var(--border-radius);
}

.other-lodging-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .other-lodging-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.lodging-card {
  background-color: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.lodging-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  border-color: var(--accent-gold);
}

.lodging-card h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Travel Section card stylings */
.travel-methods {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

.travel-card {
  background-color: var(--bg-card);
  padding: 3rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.travel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--accent-gold);
  opacity: 0;
  transition: var(--transition-fast);
}

.travel-card:hover {
  border-color: rgba(142, 122, 83, 0.2);
}

.travel-card:hover::before {
  opacity: 1;
}

.travel-icon {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  line-height: 1;
}

.travel-icon img {
  height: 1em;
  width: auto;
  display: block;
}

.travel-card h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

/* Registry Section */
.registry-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  background-color: var(--bg-secondary);
  padding: 4rem 3rem;
  border-radius: var(--border-radius);
}

.fountain-img-container img {
  max-width: 100%;
  object-fit: cover;
  max-height: 500px;
  transition: var(--transition-smooth);
  margin-top: 2rem;
}

.registry-accent-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--accent-gold);
}

/* Interactive RSVP Form */
.rsvp-wrapper {
  max-width: 650px;
  margin: 0 auto;
  background-color: var(--bg-card);
  padding: 3.5rem 3rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.02);
}

.rsvp-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.rsvp-intro h3 {
  margin-bottom: 0.5rem;
}

.form-group {
  margin-bottom: 2rem;
}

.form-row {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 576px) {
  .form-row-2 { grid-template-columns: repeat(2, 1fr); }
}

label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.required-star {
  color: #C01818;
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 3px var(--border-color-focus);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%231a1a1a' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 1.2rem) center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Conditional Logic Fade In */
.conditional-field {
  display: none;
  margin-top: 1.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent-gold-light);
  animation: formSlideDown 0.3s ease forwards;
}

@keyframes formSlideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Checkbox Grid */
.checkbox-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.checkbox-label:hover input ~ .custom-checkbox {
  border-color: var(--accent-gold);
}

.checkbox-label input:checked ~ .custom-checkbox {
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.custom-checkbox::after {
  content: '';
  display: none;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checkbox-label input:checked ~ .custom-checkbox::after {
  display: block;
}

.form-group-note {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.4rem;
  font-weight: 300;
}

.rsvp-submit-container {
  margin-top: 3rem;
}

.rsvp-submit-container button {
  width: 100%;
}

/* Form Validation Styles */
.form-group.has-error .form-control {
  border-color: #C01818;
}

.form-error-msg {
  display: none;
  font-size: 0.8rem;
  color: #C01818;
  margin-top: 0.4rem;
}

.form-group.has-error .form-error-msg {
  display: block;
}

.rsvp-submit-error {
  font-size: 0.9rem;
  color: #C01818;
  margin-top: 1rem;
}

.rsvp-submit-error:empty {
  display: none;
}

/* Form Success State */
.rsvp-success {
  display: none;
  text-align: center;
  padding: 3rem 0;
  animation: pageFadeIn 0.5s ease forwards;
}

.rsvp-success-icon {
  font-size: 3rem;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
}

.rsvp-success h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

/* Custom Interactive Map Component */
.map-outer-container {
  margin-top: 4rem;
}

.map-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.02);
}

.map-iframe-container {
  position: relative;
  width: 100%;
  height: 400px;
  background-color: var(--bg-secondary);
}

.map-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.2) contrast(1.1);
}

.map-info-banner {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  background-color: var(--bg-card);
}

@media (min-width: 768px) {
  .map-info-banner {
    flex-direction: row;
    align-items: center;
  }
}

.map-address-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.map-address-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 300;
}

/* --- Footer --- */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.footer-logo span {
  font-weight: 300;
  color: var(--accent-gold);
}

.footer-nav {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.footer-nav a:hover {
  color: var(--accent-gold);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

/* --- Responsive Adaptations --- */
@media (max-width: 767px) {
  header {
    height: 70px;
  }
  
  .desktop-nav {
    display: none;
  }
  
  .burger {
    display: flex;
  }
  
  .section-padding {
    padding: 4rem 0;
  }
  
  .hero-actions {
    flex-direction: column;
    padding: 0 2rem;
  }
  
  .timeline {
    padding-left: 1.5rem;
  }
  
  .timeline-day-header {
    left: -1.5rem;
  }
  
  .timeline-event::before {
    left: calc(-1.5rem - 4px);
  }
  
  .bunk-details {
    padding: 2rem;
  }
  
  .rsvp-wrapper {
    padding: 2rem 1.5rem;
  }
}
