/* --- Fonts --- */

@font-face {
  font-family: 'Hamburg Hand';
  src: url('../fonts/bn-hamburghandlight.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Hamburg Hand';
  src: url('../fonts/bn-hamburghand.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Hamburg Hand';
  src: url('../fonts/bn-hamburghandmedium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Hamburg Hand';
  src: url('../fonts/bn-hamburghandbold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Hamburg Hand';
  src: url('../fonts/bn-hamburghandblack.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Feu de Camp Timber';
  src: url('../fonts/feudecamp-timber-webfont.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Feu de Camp Timber Outlined';
  src: url('../fonts/feudecamp-timberoutlined-webfont.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Feu de Camp Whisper';
  src: url('../fonts/feudecamp-whisper-webfont.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Feu de Camp Whisper Outlined';
  src: url('../fonts/feudecamp-whisperoutlined-webfont.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Color variables */
:root {
  --wedding-green: #165016;
  --font-hand: 'Hamburg Hand', serif;
}

/* Base typography — scale the whole site up for readability */
html {
  font-size: 20px;
  font-family: var(--font-hand);
  font-weight: 700;
}

/* Form controls don't inherit fonts by default */
button, input, textarea, select {
  font-weight: inherit;
}

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

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

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

/* Button styles */
.wedding-button {
  border: 2px solid var(--wedding-green);
  border-radius: 16px;
  background: transparent;
  padding: 0.5rem 2rem;
  font-family: var(--font-hand);
  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;
  border-radius: 16px;
  background: transparent;
  padding: 0.5rem 2rem;
  font-family: var(--font-hand);
  color: #b91c1c;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

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

/* Segmented choice control — a bordered box of options where the
   selected one is filled in. Replaces bare radio buttons; the real
   radio input stays in the DOM (hidden) so forms submit unchanged. */
.wedding-segmented {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1px;
}

.wedding-segmented label {
  position: relative;
  margin: -1px; /* collapse adjacent segment borders into a single line */
  cursor: pointer;
}

.wedding-segmented input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

.wedding-segmented .segment {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  padding: 0.4rem 1.5rem;
  border: 2px solid var(--wedding-green);
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--wedding-green);
  transition: background-color 0.2s, color 0.2s;
  user-select: none;
  -webkit-user-select: none;
}

/* Round the outer corners of the group */
.wedding-segmented label:first-child .segment {
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.wedding-segmented label:last-child .segment {
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.wedding-segmented label:hover .segment {
  background-color: rgba(22, 80, 22, 0.08);
}

.wedding-segmented input:checked + .segment {
  background-color: var(--wedding-green);
  color: white;
}

.wedding-segmented input:focus-visible + .segment {
  outline: 2px dashed var(--wedding-green);
  outline-offset: 3px;
}

/* Compact variant for numeric options like party size */
.wedding-segmented-compact .segment {
  min-width: 2.9rem;
  padding: 0.4rem 0;
}

/* On narrow screens the wider groups (party size, meals) can't fit on
   one line, and a wrapped bar breaks the corner rounding and shared
   borders — so render each option as its own rounded chip instead. */
@media (max-width: 639px) {
  .wedding-segmented {
    gap: 8px;
  }

  .wedding-segmented label {
    margin: 0;
  }

  .wedding-segmented .segment {
    border-radius: 16px;
  }
}

/* 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: var(--font-hand);
  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: var(--font-hand);
  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: var(--font-hand);
  color: var(--wedding-green);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

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

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

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

.wedding-event-time {
  font-family: 'Feu de Camp Whisper', serif;
  color: var(--wedding-green);
  font-weight: normal;
  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.
   Stretches with the content row but never beyond one viewport, so it can't
   force short pages taller than the screen. */
.site-nav {
  position: sticky;
  top: 0;
  max-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: 'Feu de Camp Whisper', serif;
  color: var(--wedding-green);
  font-weight: normal;
  font-size: 1.2rem;
  margin-bottom: 0.15rem;
}

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

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

.schedule-event-notes {
  font-family: 'Feu de Camp Whisper', serif;
  color: var(--wedding-green);
  font-weight: normal;
  font-size: 0.9rem;
  margin-top: 0.35rem;
  opacity: 0.85;
}

.schedule-event-attire {
  font-family: 'Feu de Camp Whisper', 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;
}
