*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: #2f2a26;
  background: linear-gradient(180deg, #faf7f2 0%, #efe7dc 100%);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.card {
  width: min(100%, 28rem);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(47, 42, 38, 0.08);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(47, 42, 38, 0.08);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 500;
}

p {
  margin: 0 0 1.5rem;
  line-height: 1.6;
  color: #5c534c;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d8cec2;
  border-radius: 0.65rem;
  font: inherit;
  background: #fff;
}

input[type="password"]:focus {
  outline: 2px solid #b89b7a;
  outline-offset: 2px;
}

button,
.button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.85rem 1.2rem;
  border: none;
  border-radius: 999px;
  background: #7a6248;
  color: #fff;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.button:hover {
  background: #66533d;
}

.error {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  background: #fdecea;
  color: #8a2f2f;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.home-page,
.content-page {
  background: #1a1714;
  color: #fff;
}

.home-page p,
.content-page p {
  color: #fff;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.5rem;
  padding: 1.25rem 7rem 1.25rem 2rem;
  background: linear-gradient(
    180deg,
    rgba(26, 23, 20, 0.92) 0%,
    rgba(26, 23, 20, 0.72) 65%,
    rgba(26, 23, 20, 0) 100%
  );
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.site-nav-link {
  color: #fff;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.site-nav-link:hover,
.site-nav-link.is-active {
  color: #fff;
  border-bottom-color: #fff;
  text-decoration: none;
}

.site-header .sign-out {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  transform: translateY(-50%);
  margin: 0;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #2f2a26 url("/public/background.jpg") center 30% / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 2rem 3rem 2rem 1.5rem;
  background: linear-gradient(
    90deg,
    rgba(26, 23, 20, 0.05) 0%,
    rgba(26, 23, 20, 0.08) 42%,
    rgba(26, 23, 20, 0.35) 50%,
    rgba(26, 23, 20, 0.5) 100%
  );
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(50%, 28rem);
  gap: 1.25rem;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.hero-title {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.hero-date {
  margin: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-venue {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-venue-name,
.hero-venue-location {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-venue-name {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
}

.hero-venue-link {
  margin-top: 0.35rem;
  color: #fff;
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-venue-link:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.sign-out button {
  margin-top: 0;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}

.sign-out button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-rsvp {
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  color: #2f2a26;
}

.hero-rsvp:hover {
  background: #fff;
}

@media (max-width: 768px) {
  .hero-overlay {
    justify-content: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(
      180deg,
      rgba(26, 23, 20, 0.25) 0%,
      rgba(26, 23, 20, 0.45) 100%
    );
  }

  .hero-content {
    width: min(100%, 28rem);
  }

  .site-header {
    padding: 1rem 1.25rem 3.5rem;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .site-header .sign-out {
    top: 1rem;
    right: 1.25rem;
    transform: none;
  }
}

.content-page .page {
  place-items: start center;
  padding: 6rem 2rem 3rem;
}

.content-page .content-card {
  width: min(100%, 42rem);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.content-page h1,
.content-page h2 {
  color: #fff;
}

.content-page .content-section {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 2rem;
}

.content-page .content-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.content-photo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 1.5rem;
  border-radius: 0.5rem;
}

.content-intro {
  font-size: 1.05rem;
}

.content-section {
  margin-top: 2rem;
}

.content-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 500;
}

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

.rsvp-page .card {
  width: min(100%, 36rem);
}

.rsvp-note {
  margin-top: -0.75rem;
  font-size: 0.95rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: #7a6248;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.search-field {
  position: relative;
  margin-bottom: 2rem;
}

input[type="search"],
input[type="text"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d8cec2;
  border-radius: 0.65rem;
  font: inherit;
  background: #fff;
}

input[type="search"]:focus,
input[type="text"]:focus {
  outline: 2px solid #b89b7a;
  outline-offset: 2px;
}

.search-results {
  position: absolute;
  z-index: 2;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #fff;
  border: 1px solid #d8cec2;
  border-radius: 0.75rem;
  box-shadow: 0 16px 32px rgba(47, 42, 38, 0.12);
  max-height: 16rem;
  overflow-y: auto;
}

.search-result {
  margin: 0;
}

.search-result-button {
  width: 100%;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: none;
  border-radius: 0.55rem;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.search-result-button:hover {
  background: #f5efe7;
}

.search-result-added .search-result-button {
  opacity: 0.55;
  cursor: default;
}

.search-result-name {
  display: block;
  font-weight: 600;
}

.search-result-household,
.search-result-status,
.guest-household {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9rem;
  color: #5c534c;
}

.search-result-empty {
  padding: 0.75rem 0.85rem;
  color: #5c534c;
}

.selected-guests h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 500;
}

.empty-party {
  margin: 0 0 1rem;
  color: #5c534c;
}

.selected-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.selected-item {
  padding: 1rem 0;
  border-top: 1px solid #e7ddd1;
}

.selected-item-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 0.75rem;
}

.remove-guest {
  margin-top: 0;
  padding: 0.45rem 0.75rem;
  background: transparent;
  color: #7a6248;
  border: 1px solid #d8cec2;
}

.remove-guest:hover {
  background: #f5efe7;
}

.attending-options {
  margin: 0;
  padding: 0;
  border: 0;
}

.attending-options legend {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.attending-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.guest-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #efe5da;
}

.field-label {
  margin-bottom: 0;
}

.guest-textarea,
.guest-input,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d8cec2;
  border-radius: 0.65rem;
  font: inherit;
  background: #fff;
  resize: vertical;
}

.guest-textarea:focus,
.guest-input:focus,
textarea:focus {
  outline: 2px solid #b89b7a;
  outline-offset: 2px;
}

.cabin-options {
  margin: 0;
  padding: 0;
  border: 0;
}

.cabin-options legend {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.cabin-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.status {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
}

.status-success {
  background: #edf7ed;
  color: #245824;
}

.status-error {
  background: #fdecea;
  color: #8a2f2f;
}
