.contactPage .siteShell {
  min-height: 100vh;
}

.contactPage .mobileNav {
  display: none;
  position: relative;
}

.contactPage .mobileNav summary {
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  list-style: none;
}

.contactPage .mobileNav summary::-webkit-details-marker {
  display: none;
}

.contactPage .mobileNav summary span {
  display: block;
  width: 21px;
  height: 2px;
  border-radius: 2px;
  background: var(--heritage-green);
}

.contactPage .mobileNav nav {
  position: absolute;
  top: 52px;
  right: 0;
  min-width: 220px;
  padding: 8px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(27, 38, 33, 0.16);
}

.contactPage .mobileNav nav a {
  display: block;
  padding: 11px 13px;
  border-radius: 8px;
  color: #36423d;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.contactPage .mobileNav nav a:hover,
.contactPage .mobileNav nav a:focus-visible {
  background: var(--paper);
  color: var(--heritage-green);
}

.contactPageHero .introContent {
  min-height: 300px;
  padding-bottom: 62px;
}

.contactSection {
  padding: 72px 0 82px;
  scroll-margin-top: 96px;
  background: var(--paper-soft);
  border-top: 1px solid rgba(35, 50, 44, 0.08);
}

.contactGrid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
  align-items: start;
  gap: 54px;
}

.contactIntro {
  padding-top: 10px;
}

.contactIntro h2 {
  max-width: 520px;
  margin: 0;
  color: var(--heritage-green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4.5vw, 3.55rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.contactIntro > p:not(.eyebrow) {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted-copy);
  font-size: 0.98rem;
}

.contactNote {
  margin-top: 26px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid #23322c;
  border-radius: 12px;
  background: #23322c;
  color: #d9e0dc;
  font-size: 0.82rem;
}

.contactNote svg {
  width: 19px;
  min-width: 19px;
  margin-top: 1px;
  color: #e0a47e;
}

.contactForm {
  padding: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(27, 38, 33, 0.07);
}

.contactField {
  display: grid;
  gap: 8px;
  color: #26332d;
  font-size: 0.83rem;
  font-weight: 750;
}

.contactField span {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.contactField span::after {
  content: "*";
  color: var(--copper);
}

.contactField input,
.contactField textarea {
  width: 100%;
  border: 1px solid #cfd4d0;
  border-radius: 10px;
  outline: none;
  background: #fbfbf9;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.contactField input {
  height: 48px;
  padding: 0 13px;
}

.contactField textarea {
  min-height: 150px;
  padding: 12px 13px;
  line-height: 1.5;
  resize: vertical;
}

.contactField input:focus,
.contactField textarea:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(184, 115, 74, 0.14);
}

.contactField input::placeholder,
.contactField textarea::placeholder {
  color: #919995;
}

.contactMessageField,
.contactActions,
.contactStatus {
  grid-column: 1 / -1;
}

.contactActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.contactActions p {
  max-width: 430px;
  margin: 0;
  color: var(--muted-copy);
  font-size: 0.72rem;
}

.contactSubmit {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 10px;
  background: var(--copper);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(184, 115, 74, 0.2);
}

.contactSubmit:hover {
  background: #a9623e;
}

.contactSubmit:focus-visible {
  outline: 3px solid rgba(184, 115, 74, 0.28);
  outline-offset: 3px;
}

.contactSubmit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.contactSubmit svg {
  width: 17px;
}

.contactStatus {
  margin: -2px 0 0;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 0.82rem;
}

.contactStatus[hidden] {
  display: none;
}

.contactStatus[data-state="success"] {
  background: #e7f1ea;
  color: #285c42;
}

.contactStatus[data-state="error"] {
  background: #f8e9e5;
  color: #813a2f;
}

/* The sent-message pop-up (#contactConfirmation) uses the shared event card
   dialog styles from /assets/event-card-actions.css so it matches the report
   and share pop-ups on the diary. */

.formTrap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 900px) {
  .contactPage .desktopNav {
    display: none;
  }

  .contactPage .mobileNav {
    display: block;
  }
}

@media (max-width: 840px) {
  .contactGrid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contactForm {
    grid-template-columns: 1fr;
  }

  .contactMessageField,
  .contactActions,
  .contactStatus {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .contactSection {
    padding: 54px 0 60px;
  }

  .contactForm {
    padding: 20px;
  }

  .contactActions {
    align-items: stretch;
    flex-direction: column;
  }

  .contactSubmit {
    width: 100%;
  }
}

/* Dark theme overrides for the contact page (shared tokens handle the rest). */
html[data-theme="dark"] .contactSection{border-top-color:rgba(255,255,255,.06)}
html[data-theme="dark"] .contactForm{box-shadow:0 12px 34px rgba(0,0,0,.45)}
html[data-theme="dark"] .contactField{color:#c6cdc7}
html[data-theme="dark"] .contactField input,html[data-theme="dark"] .contactField textarea{background:var(--field);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .contactField input::placeholder,html[data-theme="dark"] .contactField textarea::placeholder{color:#7f8984}
html[data-theme="dark"] .contactStatus[data-state="success"]{background:rgba(40,92,66,.28);color:#bfe3cc}
html[data-theme="dark"] .contactStatus[data-state="error"]{background:rgba(129,58,47,.3);color:#f0b0a6}
