/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--body-size);
  color: var(--body-colour);
  line-height: 1.6;
  min-height: 100vh;
  background-color: #fffef9;
}

/* Background decorations */
.bg-decoration {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  background-repeat: no-repeat;
  background-size: contain;
}

.bg-top-right {
  top: 0;
  right: 0;
  width: 450px;
  height: 640px;
  background-image: var(--bg-top-right);
  background-position: top right;
  z-index: 101;
}

.bg-bottom-left {
  bottom: 0;
  left: 0;
  width: 790px;
  height: 480px;
  background-image: var(--bg-bottom-left);
  background-position: bottom left;
}

/* Site wrapper - flexbox layout */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top navigation */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
}

.topnav-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

/* Navigation menu */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 0.5rem;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: block;
  padding: 0.5rem 1rem;
  font-family: var(--menu-font);
  font-size: var(--menu-size);
  color: var(--menu-colour);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--menu-hover-colour);
  background-color: rgba(122, 0, 0, 0.05);
}

/* Menu toggle button - hidden on desktop */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--accent-colour);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--menu-colour);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger animation when open */
.topnav.is-open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.topnav.is-open .hamburger span:nth-child(2) {
  opacity: 0;
}

.topnav.is-open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Main content area */
.content {
  margin-top: 70px; /* Account for fixed top nav height */
  padding: 3rem 2rem;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 70px);
}

.content > * {
  text-align: center;
  width: 100%;
  max-width: 700px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--headings-font);
  color: var(--headings-colour);
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: var(--headings-size);
}

h2 {
  font-size: calc(var(--headings-size) * 0.85);
}

h3 {
  font-size: calc(var(--headings-size) * 0.7);
}

p {
  margin-bottom: 1rem;
}

/* Lists - center the list block while keeping text left-aligned */
ul, ol {
  display: inline-block;
  text-align: left;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Links */
a {
  color: var(--links-colour);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--links-hover-colour);
}

/* Hero section (home page) */
.hero {
  text-align: center;
  padding: 4rem 2rem;
}

.hero-names {
  font-family: var(--hero-font);
  font-size: var(--hero-size);
  color: var(--hero-colour);
  font-weight: 400;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-names-image {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.hero-invite {
  font-family: var(--invite-font);
  font-size: var(--invite-size);
  color: var(--invite-colour);
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.hero-date {
  font-family: var(--headings-font);
  font-size: 1.5rem;
  color: var(--headings-colour);
  font-weight: 300;
  margin-bottom: 2rem;
}

.hero-date-image {
  max-width: 50%;
  height: auto;
  margin-bottom: 2rem;
}

.hero-intro {
  max-width: 700px;
  margin: 0 auto;
  font-family: var(--intro-font);
  font-size: var(--intro-size);
  color: var(--intro-colour);
}

/* Page content */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--accent-colour);
}

.page-title {
  margin-bottom: 0.5rem;
}

.page-content {
  line-height: 1.8;
}

/* Placeholder sections */
.placeholder {
  background: rgba(151, 56, 16, 0.05);
  border: 2px dashed var(--accent-colour);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

.placeholder p {
  margin-bottom: 0;
  color: var(--body-colour);
  opacity: 0.8;
}

/* Mobile styles */
@media (max-width: 767px) {
  .topnav {
    position: static;
  }

  .menu-toggle {
    display: flex;
  }

  .topnav-content {
    flex-wrap: wrap;
    padding: 1rem;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-top: 1rem;
    gap: 0;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    text-align: center;
  }

  .content {
    margin-top: 0;
    padding: 2rem 1.5rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero-names {
    font-size: calc(var(--hero-size) * 0.7);
  }

  .hero-date {
    font-size: 1.2rem;
  }

  .bg-top-right {
    width: 180px;
    height: 255px;
  }

  .bg-bottom-left {
    width: 300px;
    height: 190px;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
  .topnav-content {
    padding: 1rem 1.5rem;
  }

  .content {
    padding: 2rem;
  }
}
