:root {
  --bg: #f6f4ef;
  --surface: #fcfbf8;
  --text: #2f3338;
  --muted: #6d7278;
  --accent: #b48138;
  --accent-strong: #9a6a27;
  --border: #c1975d;
  --shadow: 0 18px 45px rgba(56, 42, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 50% 25%, #faf8f4 0%, var(--bg) 60%);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid #ebe7dd;
  background: rgba(250, 248, 244, 0.9);
  backdrop-filter: blur(8px);
}

.brand {
  justify-self: center;
  font-family: "Times New Roman", serif;
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: 0.03em;
}

.menu-shell {
  position: relative;
  justify-self: start;
}

.menu-trigger {
  border: 1px solid #c7b8a0;
  background: #fffdfa;
  color: #2f3338;
  border-radius: 10px;
  padding: 0.52rem 0.92rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.menu-trigger:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.menu-dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 220px;
  background: #fffdfa;
  border: 1px solid #d8cbb8;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(56, 42, 20, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  overflow: hidden;
}

.menu-shell:hover .menu-dropdown,
.menu-shell:focus-within .menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-dropdown a {
  display: block;
  text-decoration: none;
  color: #2f3338;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  border-bottom: 1px solid #f0e7d8;
}

.menu-dropdown a:last-child {
  border-bottom: none;
}

.menu-dropdown a:hover {
  background: #f8f1e6;
  color: #8d5c1f;
}

.topbar-pad {
  justify-self: end;
  width: 64px;
}

.pill {
  border-radius: 14px;
  border: 2px solid var(--border);
  font-size: 1.08rem;
  font-weight: 600;
  padding: 0.8rem 2rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.pill:hover {
  transform: translateY(-1px);
}

.pill:active {
  transform: translateY(0);
}

.pill.ghost {
  background: #f9f6f0;
  color: #3a3a3a;
}

.pill.solid {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(180, 129, 56, 0.25);
}

.pill.solid:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.hero {
  min-height: calc(100vh - 84px);
  display: grid;
  place-items: center;
  padding: 2.2rem 1rem;
}

.hero-panel {
  width: min(900px, 95vw);
  text-align: center;
  display: grid;
  gap: 1.1rem;
  justify-items: center;
}

.hero-panel h1 {
  margin: 0;
  font-family: "Times New Roman", serif;
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  font-weight: 500;
  line-height: 1.12;
}

.hero-panel p {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #40464d;
}

.inline-capture {
  margin-top: 0.45rem;
  width: min(650px, 100%);
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.inline-capture input {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  font-size: 1.5rem;
  color: var(--text);
  background: #fffdfa;
}

.inline-capture button {
  min-width: 280px;
  font-size: 2rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.small-help {
  color: var(--muted);
  font-size: 0.95rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(22, 25, 29, 0.45);
}

.modal.open {
  display: grid;
}

.modal-card {
  width: min(560px, 96vw);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.3rem 1.2rem 1.2rem;
  position: relative;
}

.modal-card h2 {
  margin: 0;
  font-family: "Times New Roman", serif;
  font-size: 2rem;
}

.modal-subtitle {
  margin: 0.45rem 0 1rem;
  color: var(--muted);
  font-size: 1rem;
}

.close {
  position: absolute;
  top: 0.65rem;
  right: 0.7rem;
  border: none;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  color: #464646;
  cursor: pointer;
}

#leadForm {
  display: grid;
  gap: 0.75rem;
}

#leadForm label,
#leadForm legend {
  font-weight: 600;
  color: #3d434a;
}

#leadForm input[type="text"],
#leadForm input[type="email"] {
  width: 100%;
  border: 1.8px solid #c7c0af;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
}

#leadForm select {
  width: 100%;
  border: 1.8px solid #c7c0af;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  background: #fff;
  color: #2f3338;
}

fieldset {
  border: 1px solid #ddd4c3;
  border-radius: 10px;
  margin: 0.3rem 0;
  padding: 0.75rem 0.85rem;
}

.options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.form-message {
  min-height: 1.35rem;
  margin: 0.25rem 0 0;
  color: #9e1d2e;
}

.form-message.success {
  color: #20744f;
}

.submit {
  width: 100%;
  font-size: 1.05rem;
}

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

@media (max-width: 780px) {
  .brand {
    font-size: 1.95rem;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .hero-panel {
    gap: 0.95rem;
  }

  .inline-capture input {
    font-size: 1.1rem;
    padding: 0.8rem;
  }

  .inline-capture button {
    width: 100%;
    min-width: 0;
    font-size: 1.25rem;
  }
}
