:root {
  --white: #FFFFFF; /* Pure White */
  --black: #000000; /* Pure Black */
  --bg: #F0E9CD; /* Light Sand */
  --primary: #5C6A4E; /* Olive Green */
  --primary-dark: #4A553E; /* darker Olive Green */
  --secondary: #DDD5B4; /* Warm Beige */
  --button: #E3C873; /* Soft Yellow */
  --text: #2F2F2F; /* Charcoal */
}

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

body {
  font-family: 'Poppins', Arial, sans-serif;
  background-color: var(--bg); /* average color of the new background image */
  color: var(--text);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden; /* prevent horizontal scroll */
}

a {
  color: var(--primary-dark);
  text-decoration: underline;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary);
  text-decoration: none;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* prevent horizontal scroll */
}

p {
  margin-bottom: 1rem;
}

/* fixed grayscale background that fades in on scroll */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('watercolor_background.png') center/cover no-repeat;
  filter: grayscale(100%);
  opacity: var(--bg-opacity, 0);
  transition: opacity 0.5s ease-out;
  pointer-events: none;
  z-index: -1;
}

.hero {
  position: sticky;
  top: 0;
  min-height: 100vh;
  width: 100%;
  background: url('anne_morten_banner.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: filter 0.5s ease-out, opacity 0.5s ease-out;
  z-index: 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.15));
}

.hero-content {
  position: absolute;
  top: 75%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease-out;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--white);
  border-radius: 12px;
  width: 95%;
  max-width: 600px;
  font-family: 'Alice', serif;
  text-align: center;
}

.hero-content .names {
  font-family: 'Alice', serif;
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: normal;
  margin: 0.5rem 0;
  white-space: nowrap;
}

.hero-content .tagline {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 1rem;
}

.hero-content .meta,
.hero-content .location {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-content p {
  margin: 0;
}

.hero-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  margin: 0.5rem 0;
  width: 100%;
}

section {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1rem;
}

/* Ensure first text box overlays the sticky hero */
body > section:first-of-type {
  position: relative;
  z-index: 1;
}

.invite-text {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin: 0 auto;
  font-family: 'Alice', serif;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.invite-text p {
  margin-bottom: 1rem;
}

h2 {
  color: var(--primary-dark);
  font-weight: 200;
  margin-bottom: 1rem;
}

h3 {
  color: var(--primary);
  font-weight: 100;
  font-size: 1.25rem;
  /*margin-left: 1.5rem;*/
  margin-bottom: 1rem;
}

.program-day {
  margin-bottom: 2rem;
}

.timeline {
  list-style: none;
  padding-left: 1.5rem;
  position: relative;
}

.timeline::before {
  display: none;
}

.timeline-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
}

.timeline-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.timeline-time {
  font-weight: 600;
  color: var(--primary-dark);
}

.sub-steps {
  list-style: disc;
  margin-top: 0.5rem;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  color: var(--text);
}

form {
  background: rgba(221, 213, 180, 0.6);
  backdrop-filter: blur(6px);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

input, textarea, select {
  padding: 0.75rem;
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-size: 1rem;
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  background: var(--button);
  color: var(--primary-dark);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

button:hover {
  background: var(--primary);
  color: #fff;
}

button:disabled {
  background: var(--secondary);
  color: var(--primary-dark);
  cursor: not-allowed;
  opacity: 0.6;
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text);
}

/* Overnatting section indentation */
#overnatting-text {
  margin-left: 1.5rem;
}

.accommodation-list {
  margin-left: 3rem;
  list-style: disc;
}
