:root {
  --color-forest: #1d4e2b;
  --color-olive: #546b3b;
  --color-gold: #b08d57;
  --color-ink: #1a1a1a;
  --color-ivory: #f0ead8;
  --color-cream: #f7f3e8;
  --color-white: #fffdf7;
  --color-border: rgba(26, 26, 26, 0.12);
  --font-display: "Gilda Display", Georgia, "Times New Roman", serif;
  --font-subheading: Optima, Candara, "Segoe UI", sans-serif;
  --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--color-cream);
}

body {
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top, rgba(176, 141, 87, 0.14), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #fbf8ef 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.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;
}

.finder {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.finder__shell {
  width: min(100%, 72rem);
  min-height: calc(100vh - clamp(3rem, 8vw, 6rem));
  min-height: calc(100svh - clamp(3rem, 8vw, 6rem));
  min-height: calc(100dvh - clamp(3rem, 8vw, 6rem));
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.5rem) clamp(0rem, 4vw, 3.5rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 2rem);
}

.finder__progress {
  display: grid;
  gap: 0.85rem;
}

.finder__logo {
  display: block;
  width: clamp(6.25rem, 16vw, 9.5rem);
  height: auto;
  margin: 0 auto clamp(0.25rem, 1.5vw, 0.85rem);
}

.finder__progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(26, 26, 26, 0.58);
  font-family: var(--font-subheading);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.finder__track {
  height: 3px;
  overflow: hidden;
  background: rgba(26, 26, 26, 0.1);
}

.finder__fill {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(29, 78, 43, 0.86), rgba(176, 141, 87, 0.92));
  transition: width 420ms ease;
}

.finder__stage {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: clamp(0.5rem, 4vw, 2rem) 0;
}

.finder__panel {
  width: min(100%, 42rem);
  display: grid;
  justify-items: center;
  gap: 1.35rem;
  text-align: center;
  animation: stageIn 360ms ease both;
}

.finder__panel[data-step="details"] {
  width: min(100%, 48rem);
}

.finder__panel--result {
  width: min(100%, 44rem);
}

.finder__panel[hidden] {
  display: none;
}

.finder__panel.is-back {
  animation-name: stageBackIn;
}

.finder__kicker,
.field__label {
  margin: 0;
  color: var(--color-olive);
  font-family: var(--font-subheading);
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  line-height: 1.45;
  text-transform: uppercase;
}

.field__required,
.finder__required-note {
  color: rgba(26, 26, 26, 0.46);
  font-family: var(--font-subheading);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.field__required::before {
  content: " / ";
  color: rgba(26, 26, 26, 0.28);
}

.finder__required-note {
  margin: -0.85rem 0 0;
}

.finder__title,
.finder__question,
.finder__result-title {
  margin: 0;
  color: var(--color-forest);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
}

.finder__title,
.finder__question {
  max-width: 15ch;
  font-size: clamp(1.9rem, 4.8vw, 3.1rem);
  line-height: 1.02;
}

.finder__result-title {
  max-width: 14ch;
  font-size: clamp(2.45rem, 6.5vw, 4.1rem);
  line-height: 1.02;
}

.finder__intro,
.finder__helper,
.finder__event-meta,
.finder__result-copy {
  margin: 0;
  max-width: 42rem;
  color: rgba(26, 26, 26, 0.72);
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.7;
}

.finder__event-meta {
  color: rgba(26, 26, 26, 0.64);
  font-family: var(--font-subheading);
  font-size: clamp(0.86rem, 1.8vw, 1rem);
  letter-spacing: 0.08em;
  line-height: 1.55;
}

.finder__helper {
  max-width: 38rem;
}

.finder__fields {
  width: min(100%, 42rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  text-align: left;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field:last-child,
.field--wide {
  grid-column: 1 / -1;
  width: min(100%, 42rem);
  text-align: left;
}

.field__input {
  width: 100%;
  min-height: 3.4rem;
  border: 1px solid rgba(29, 78, 43, 0.16);
  border-radius: 0;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 10px 24px rgba(26, 26, 26, 0.05);
  color: var(--color-ink);
  font-size: 1rem;
  line-height: 1.4;
  outline: none;
  padding: 0.95rem 1rem;
  transition: border-color 240ms ease, background 240ms ease, box-shadow 240ms ease;
}

.field__textarea {
  min-height: 9rem;
  resize: vertical;
}

.field__input:focus {
  border-color: rgba(176, 141, 87, 0.68);
  background: rgba(255, 253, 247, 0.98);
  box-shadow: 0 16px 34px rgba(26, 26, 26, 0.08);
}

.field__input[aria-invalid="true"] {
  border-color: rgba(176, 71, 57, 0.72);
}

.field__helper,
.field__error,
.finder__error,
.finder__submit-error {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.field__helper {
  color: rgba(26, 26, 26, 0.56);
}

.field__error,
.finder__error,
.finder__submit-error {
  color: #8a3327;
}

.finder__error:empty,
.finder__submit-error:empty,
.field__error:empty {
  display: none;
}

.finder__options {
  width: min(100%, 38rem);
  display: grid;
  gap: 1rem;
}

.finder__option {
  width: 100%;
  border: 1px solid rgba(29, 78, 43, 0.14);
  border-radius: 0;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 10px 24px rgba(26, 26, 26, 0.05);
  color: var(--color-ink);
  padding: 1.1rem 1.15rem;
  text-align: left;
  transition: transform 240ms ease, border-color 240ms ease, background 240ms ease, box-shadow 240ms ease;
}

.finder__option:hover,
.finder__option:focus-visible {
  border-color: rgba(176, 141, 87, 0.56);
  background: rgba(176, 141, 87, 0.1);
  box-shadow: 0 16px 34px rgba(26, 26, 26, 0.08);
  outline: none;
  transform: translateY(-2px);
}

.finder__option.is-selected {
  border-color: rgba(176, 141, 87, 0.72);
  background:
    linear-gradient(180deg, rgba(176, 141, 87, 0.18), rgba(176, 141, 87, 0.06)),
    rgba(255, 253, 247, 0.96);
  box-shadow: 0 18px 36px rgba(26, 26, 26, 0.1);
}

.finder__option-title {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--font-subheading);
  font-size: 0.96rem;
  letter-spacing: 0.06em;
  line-height: 1.45;
  text-transform: uppercase;
}

.finder__result-copy {
  display: grid;
  gap: 1rem;
  max-width: 38rem;
}

.finder__result-copy p {
  margin: 0;
}

.finder__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  padding-top: clamp(1rem, 3vw, 1.35rem);
}

.finder__submit-error {
  flex: 1 1 16rem;
  text-align: center;
}

.button {
  min-height: 3rem;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0.88rem 1.25rem;
  font-family: var(--font-subheading);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background 240ms ease, border-color 240ms ease, color 240ms ease, opacity 240ms ease, transform 240ms ease;
}

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

.button--primary {
  border-color: rgba(176, 141, 87, 0.8);
  background: var(--color-gold);
  color: var(--color-white);
  margin-left: auto;
}

.button--primary:hover,
.button--primary:focus-visible {
  background: #9f7d47;
  border-color: #9f7d47;
}

.button--ghost {
  border-color: rgba(29, 78, 43, 0.24);
  background: transparent;
  color: var(--color-forest);
}

.button--ghost:hover,
.button--ghost:focus-visible {
  border-color: rgba(29, 78, 43, 0.42);
  background: rgba(29, 78, 43, 0.06);
  color: var(--color-forest);
}

.button:disabled {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
}

@keyframes stageIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stageBackIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .finder__shell {
    min-height: calc(100vh - 3rem);
    min-height: calc(100svh - 3rem);
    min-height: calc(100dvh - 3rem);
  }

  .finder__progress-copy,
  .finder__footer {
    align-items: stretch;
  }

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

  .finder__footer {
    flex-direction: column;
    justify-content: flex-start;
  }

  #next-button {
    order: 1;
    margin-left: 0;
  }

  #back-button {
    order: 2;
  }

  .finder__submit-error {
    order: 3;
  }

  .button,
  .finder__submit-error {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
