/* Color variables */
:root {
  --wedding-green: #165016;
}

/* Base typography — scale the whole site up for readability */
html {
  font-size: 20px;
}

@media (max-width: 768px) {
  html {
    font-size: 19px;
  }
}

/* Common text styles */
.wedding-text {
  font-family: serif;
  color: var(--wedding-green);
  font-size: 1.05rem;
}

.wedding-text-center {
  font-family: serif;
  color: var(--wedding-green);
  text-align: center;
  font-size: 1.05rem;
}

/* Button styles */
.wedding-button {
  border: 2px solid var(--wedding-green);
  background: transparent;
  padding: 0.5rem 2rem;
  font-family: serif;
  font-size: 1.05rem;
  color: var(--wedding-green);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.wedding-button:hover {
  background-color: var(--wedding-green);
  color: white;
}

.wedding-button-red {
  border: 2px solid #b91c1c;
  background: transparent;
  padding: 0.5rem 2rem;
  font-family: serif;
  color: #b91c1c;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.wedding-button-red:hover {
  background-color: #b91c1c;
  color: white;
}

/* Input styles */
.wedding-input {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--wedding-green);
  outline: none;
  background: transparent;
  padding: 0 0.25rem;
  text-align: center;
  font-family: serif;
  font-size: 1.05rem;
  color: var(--wedding-green);
  text-overflow: ellipsis;
}

.wedding-input::placeholder {
  color: #7a8a7a;
  text-overflow: ellipsis;
}

.wedding-input:focus {
  outline: none;
}

/* Input container with corner lines */
.wedding-input-container {
  position: relative;
}

.wedding-input-container::before,
.wedding-input-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 2px;
  height: 50%;
  background-color: var(--wedding-green);
}

.wedding-input-container::before {
  left: 0;
}

.wedding-input-container::after {
  right: 0;
}

/* Background color */
:root {
  --wedding-cream: #F4F2E5;
}

body {
  background-color: var(--wedding-cream);
}

/* Navigation link styles */
.wedding-nav-link {
  font-family: serif;
  color: var(--wedding-green);
  font-size: 1.1rem;
  padding: 0.4rem 0.5rem;
  border-left: 2px solid transparent;
  transition: border-color 0.15s, background-color 0.15s;
  display: block;
  text-decoration: none;
}

.wedding-nav-link:hover {
  border-left-color: var(--wedding-green);
  background-color: rgba(22, 80, 22, 0.05);
}

.wedding-nav-link.active {
  border-left-color: var(--wedding-green);
  font-weight: bold;
}

/* Content page styles */
.wedding-page-title {
  font-family: serif;
  color: var(--wedding-green);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.wedding-section-title {
  font-family: serif;
  color: var(--wedding-green);
  font-size: 1.35rem;
  font-weight: bold;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.wedding-body-text {
  font-family: serif;
  color: var(--wedding-green);
  line-height: 1.6;
  font-size: 1.05rem;
}

.wedding-event {
  margin-bottom: 0.75rem;
}

.wedding-event-time {
  font-family: serif;
  color: var(--wedding-green);
  font-style: italic;
  font-size: 1rem;
}

/* Sidebar stays fixed in the viewport while the page (header + content)
   scrolls as a single unit — avoids a nested scrollbar on the content area. */
.site-nav {
  position: sticky;
  top: 0;
  height: 100vh;
}

/* --- Mobile hamburger navigation --- */

/* Toggle checkbox and hamburger button are hidden on desktop */
.nav-toggle-checkbox {
  display: none;
}

.hamburger-btn {
  display: none;
}

.nav-backdrop {
  display: none;
}

/* Header row: hamburger (left) / logo (centered) / matching spacer (right),
   so the hamburger never overlaps the logo and the logo stays truly centered
   whether or not the hamburger is visible. */
.header-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

/* Logo in the logged-in header */
.header-logo {
  grid-column: 2;
  justify-self: center;
  max-height: 150px;
}

@media (max-width: 768px) {
  /* Smaller header logo on mobile */
  .header-logo {
    max-height: 100px;
  }

  /* Show hamburger button in the header row, on the left */
  .hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    grid-column: 1;
    justify-self: start;
    align-self: start;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    z-index: 30;
    margin-left: 1rem;
  }

  .hamburger-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--wedding-green);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
  }

  /* Sidebar becomes a slide-in overlay from the left */
  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--wedding-cream);
    border-right: 1px solid var(--wedding-green);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 40;
    width: 16rem;
    overflow-y: auto;
  }

  /* When toggled, slide the nav in */
  .nav-toggle-checkbox:checked ~ div .site-nav {
    transform: translateX(0);
  }

  /* Backdrop behind the open nav */
  .nav-toggle-checkbox:checked ~ div .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 35;
  }

  /* Animate hamburger into an X when open */
  .nav-toggle-checkbox:checked ~ div .hamburger-btn span:nth-child(1),
  .nav-toggle-checkbox:checked ~ .hamburger-btn span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle-checkbox:checked ~ div .hamburger-btn span:nth-child(2),
  .nav-toggle-checkbox:checked ~ .hamburger-btn span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle-checkbox:checked ~ div .hamburger-btn span:nth-child(3),
  .nav-toggle-checkbox:checked ~ .hamburger-btn span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Hide the right spacer on mobile — no fixed sidebar to balance */
  .nav-spacer {
    display: none;
  }
}

/* --- Content page readability --- */

.content-section {
  margin-bottom: 2.25rem;
}

.content-section:last-of-type {
  margin-bottom: 0;
}

/* Left border accent + spacing under section titles */
.content-page .wedding-section-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(22, 80, 22, 0.25);
}

.content-paragraph {
  margin-top: 0;
  margin-bottom: 0.85rem;
  max-width: 60ch;
}

.content-paragraph:last-child {
  margin-bottom: 0;
}

/* Real bulleted lists, comfortably spaced */
.content-list {
  list-style: disc;
  padding-left: 1.4rem;
  margin: 0;
}

.content-list-item {
  margin-bottom: 0.55rem;
  padding-left: 0.25rem;
}

.content-list-item:last-child {
  margin-bottom: 0;
}

.content-list-item::marker {
  color: var(--wedding-green);
}

/* --- Schedule page timeline --- */

.schedule-day {
  margin-bottom: 2.5rem;
}

.schedule-day:last-of-type {
  margin-bottom: 0;
}

.schedule-day-label {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(22, 80, 22, 0.25);
}

/* Vertical rail down the left of each day's events */
.schedule-timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(22, 80, 22, 0.3);
  margin-left: 0.25rem;
}

.schedule-event {
  position: relative;
  padding-bottom: 1.5rem;
}

.schedule-event:last-child {
  padding-bottom: 0;
}

/* Dot marker on the rail for each event */
.schedule-event::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 6px);
  top: 0.4rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--wedding-green);
  border: 2px solid var(--wedding-cream);
}

.schedule-event-time {
  font-family: serif;
  color: var(--wedding-green);
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.schedule-event-title {
  font-family: serif;
  color: var(--wedding-green);
  font-weight: bold;
  font-size: 1.1rem;
  line-height: 1.3;
}

.schedule-event-location {
  font-family: serif;
  color: var(--wedding-green);
  font-size: 1rem;
  margin-top: 0.1rem;
}

.schedule-event-notes {
  font-family: serif;
  color: var(--wedding-green);
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 0.35rem;
  opacity: 0.85;
}

/* --- Fade image edges into the page background --- */
.faded-edges {
  /* Two gradients (horizontal + vertical) intersected so all four
     edges fade to transparent, letting the cream page show through */
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-composite: intersect;
}
