:root {
  --ivory: #f8f3e8;
  --ivory-soft: #fffaf0;
  --green: #143d2d;
  --green-soft: #1f5a43;
  --gold: #b59a5b;
  --gold-soft: #dfcf9f;
  --ink: #1d2520;
  --muted: #657067;
  --danger: #9b2d24;
  --line: rgba(20, 61, 45, 0.18);
  --shadow: 0 18px 50px rgba(20, 61, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: 100%;
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 84svh;
  display: grid;
  align-items: center;
  padding: clamp(28px, 6vw, 72px);
  overflow: hidden;
  isolation: isolate;
  background-color: #050914;
  background-image:
    linear-gradient(
      90deg,
      rgba(5, 9, 20, 0.9) 0%,
      rgba(5, 9, 20, 0.76) 34%,
      rgba(5, 9, 20, 0.28) 66%,
      rgba(5, 9, 20, 0.58) 100%
    ),
    url("assets/wedding-rsvp-background-clean.webp");
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position: center bottom;
  border-bottom: 1px solid rgba(223, 207, 159, 0.24);
}

.hero__content {
  width: min(100%, 720px);
  color: var(--ivory-soft);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--green);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3.2rem, 14vw, 7.8rem);
}

h2 {
  font-size: clamp(2rem, 8vw, 3.7rem);
}

.hero h1 {
  color: var(--ivory-soft);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 34px 0 0;
}

.event-grid div {
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(223, 207, 159, 0.32);
  border-radius: 8px;
  background: rgba(5, 9, 20, 0.58);
  backdrop-filter: blur(8px);
}

.event-grid span {
  display: block;
  color: var(--gold-soft);
  font-family: Arial, sans-serif;
  font-size: 0.82rem;
}

.event-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--ivory-soft);
  font-size: clamp(1rem, 2.5vw, 1.28rem);
  line-height: 1.2;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(181, 154, 91, 0.45);
  outline-offset: 2px;
}

.button--primary {
  background: var(--green);
  color: var(--ivory-soft);
}

.button--secondary {
  border-color: var(--green);
  background: transparent;
  color: var(--green);
}

.hero .button--primary {
  border-color: rgba(248, 243, 232, 0.18);
  background: var(--ivory-soft);
  color: var(--green);
  text-shadow: none;
}

.hero .button--secondary {
  border-color: rgba(248, 243, 232, 0.72);
  background: rgba(5, 9, 20, 0.28);
  color: var(--ivory-soft);
  text-shadow: none;
}

.rsvp-section {
  width: min(100%, 1120px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 76px);
  padding: clamp(40px, 8vw, 86px) 20px;
}

.section-heading {
  align-self: start;
  position: sticky;
  top: 24px;
}

.section-heading p:last-child {
  max-width: 420px;
  margin: 18px 0 0;
  color: var(--muted);
}

.rsvp-form {
  width: 100%;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ivory-soft);
  box-shadow: var(--shadow);
}

.field {
  margin: 0 0 18px;
}

label,
legend {
  display: block;
  margin: 0 0 8px;
  color: var(--green);
  font-family: Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  padding: 12px 14px;
}

.field-error,
.form-status {
  margin: 8px 0 0;
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
}

.field-error {
  min-height: 1.2em;
  color: var(--danger);
}

.submit-button {
  width: 100%;
}

.form-status {
  min-height: 1.4em;
  color: var(--green);
  font-weight: 700;
}

.form-status.is-error {
  color: var(--danger);
}

@media (max-width: 760px) {
  .hero {
    min-height: 94svh;
    align-items: end;
    padding: 28px 16px 34px;
    background-image:
      linear-gradient(
        180deg,
        rgba(5, 9, 20, 0.08) 0%,
        rgba(5, 9, 20, 0.16) 36%,
        rgba(5, 9, 20, 0.84) 70%,
        rgba(5, 9, 20, 0.96) 100%
      ),
      url("assets/wedding-rsvp-background-clean.webp");
    background-size: cover;
    background-position: center bottom;
  }

  .event-grid,
  .rsvp-section {
    grid-template-columns: 1fr;
  }

  .event-grid div {
    min-height: 82px;
  }

  .rsvp-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .section-heading {
    position: static;
  }

  .button {
    width: 100%;
  }
}
