:root {
  --brand: #9140e5;
  --brand-dark: #741fc9;
  --brand-magenta: #bc20b8;
  --lavender: #eee5f9;
  --lavender-soft: #f8f4fc;
  --ink: #0f0a14;
  --ink-purple: #2d1a41;
  --muted: #56585e;
  --line: #e0e0e0;
  --white: #ffffff;
  --max-width: 1180px;
  --shadow: 0 16px 45px rgba(45, 26, 65, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Lato", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }
a { color: inherit; }
button, input { font: inherit; }

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

.site-header {
  position: relative;
  z-index: 20;
  width: min(var(--max-width), calc(100% - 48px));
  min-height: 112px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background: var(--white);
}

.brand {
  flex: 0 0 auto;
  display: block;
  width: 124px;
  height: 88px;
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 34px);
}

.site-nav a {
  position: relative;
  padding: 10px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-nav a:hover,
.site-nav a.active { color: var(--brand-dark); }

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-nav .nav-cta {
  padding: 12px 20px;
  border-radius: 6px;
  background: var(--brand);
  color: var(--white);
  font-weight: 700;
}

.site-nav .nav-cta:hover { color: var(--white); background: var(--brand-dark); }

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-button > span:not(.sr-only) {
  display: block;
  width: 23px;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}

main { overflow: hidden; }

.finder-shell {
  position: relative;
  min-height: 790px;
  padding: 104px 24px 0;
  background:
    linear-gradient(90deg, rgba(15, 10, 20, 0.72) 0%, rgba(15, 10, 20, 0.42) 46%, rgba(15, 10, 20, 0.16) 100%),
    url("./assets/lunahs-hero.jpg") center 52% / cover no-repeat;
}

.hero-copy {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.eyebrow.light { color: #ead9ff; }

h1, h2, h3 {
  margin-top: 0;
  font-family: "Lato", Arial, sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(46px, 5.6vw, 72px);
  letter-spacing: -0.025em;
}

.lead {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
}

.filters {
  width: min(1100px, 100%);
  margin: 74px auto -116px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.journey-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 34px;
  padding: 4px;
  border-radius: 8px;
  background: var(--lavender);
}

.mode-button {
  min-width: 152px;
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-purple);
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.mode-button span { margin-right: 6px; }

.mode-button.active {
  background: var(--white);
  color: var(--brand-dark);
  box-shadow: 0 3px 12px rgba(45, 26, 65, 0.12);
}

.mode-button:focus-visible { outline: 3px solid rgba(145, 64, 229, 0.28); outline-offset: 2px; }
.mode-panel[hidden] { display: none; }

.filter-heading {
  max-width: 660px;
  margin-bottom: 34px;
}

.filter-heading h2 {
  margin-bottom: 8px;
  color: var(--ink-purple);
  font-size: clamp(30px, 4vw, 42px);
}

.filter-heading > p:last-child { margin: 0; color: var(--muted); }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

fieldset + fieldset {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding: 0;
  color: var(--ink-purple);
  font-size: 16px;
  font-weight: 700;
}

legend span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lavender);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.period-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.type-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.africa-interest-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.choice-grid label { cursor: pointer; }
.choice-grid input { position: absolute; opacity: 0; pointer-events: none; }

.choice-grid label > span {
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.choice-grid small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.choice-grid input:checked + span {
  border-color: var(--brand);
  background: var(--lavender-soft);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.choice-grid input:focus-visible + span { outline: 3px solid rgba(145, 64, 229, 0.26); outline-offset: 2px; }
.choice-grid label:hover > span { border-color: var(--brand); transform: translateY(-1px); }

.form-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 34px;
}

.primary-button,
.cta-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-button:hover,
.cta-button:hover { background: var(--brand-dark); transform: translateY(-1px); }

.text-button {
  border: 0;
  background: transparent;
  color: var(--ink-purple);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.form-hint { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.form-hint.error { color: #b42318; font-weight: 700; }

.results-section {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 190px auto 96px;
  scroll-margin-top: 24px;
}

.results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 44px;
  margin-bottom: 30px;
}

.results-heading h2,
.personal-cta h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 4vw, 50px);
  letter-spacing: -0.02em;
}

.results-heading > p { max-width: 410px; margin: 0; color: var(--muted); }

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.destination-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(45, 26, 65, 0.07);
  animation: card-in 360ms both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-visual {
  position: relative;
  min-height: 188px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 16px;
  background-position: center;
  background-size: cover;
}

.card-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 10, 20, 0.45));
}

.destination-icon,
.match-badge { position: relative; z-index: 1; }

.destination-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  font-size: 22px;
}

.match-badge {
  padding: 7px 9px;
  border-radius: 4px;
  background: var(--brand);
  color: var(--white);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-body { flex: 1; display: flex; flex-direction: column; padding: 24px; }
.card-body h3 { margin-bottom: 0; color: var(--ink-purple); font-size: 25px; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0 14px; }

.card-tags span {
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--lavender);
  color: var(--ink-purple);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-reason { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.card-link { margin-top: auto; color: var(--brand-dark); font-size: 13px; font-weight: 900; text-decoration: none; }
.card-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.personal-cta {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto 96px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 56px;
  padding: clamp(38px, 5vw, 64px);
  border-radius: 8px;
  background: var(--ink-purple);
  color: var(--white);
}

.personal-cta p:not(.eyebrow) {
  max-width: 740px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.8);
}

.personal-cta .cta-button { background: var(--brand); white-space: nowrap; }

footer {
  padding: 64px 24px 28px;
  background: var(--ink);
  color: var(--white);
}

.footer-inner,
.footer-legal {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.footer-brand img {
  width: 140px;
  height: 94px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.footer-brand p,
.footer-partner span { margin: 10px 0 0; color: rgba(255, 255, 255, 0.65); font-size: 13px; }

.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact p { margin: 0 0 8px; font-weight: 700; }
.footer-contact a { color: rgba(255, 255, 255, 0.78); font-size: 14px; text-decoration: none; }
.footer-contact a:hover { color: var(--white); }

.footer-partner img { display: block; width: min(250px, 100%); height: auto; margin-top: 18px; }

.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

@media (max-width: 980px) {
  .site-header { min-height: 92px; }
  .brand { width: 108px; height: 72px; }
  .menu-button { display: block; }
  .site-nav {
    position: fixed;
    inset: 92px 0 auto;
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 28px;
    background: var(--white);
    box-shadow: 0 18px 30px rgba(45, 26, 65, 0.12);
    opacity: 0;
    transition: max-height 220ms ease, opacity 180ms ease, padding 220ms ease;
  }
  .site-nav.open { max-height: 520px; padding-top: 18px; padding-bottom: 28px; opacity: 1; }
  .site-nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }
  .site-nav .nav-cta { margin-top: 14px; padding: 13px 18px; text-align: center; }
  .menu-button[aria-expanded="true"] > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-button[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
  .menu-button[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .period-grid, .type-grid, .africa-interest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .personal-cta { grid-template-columns: 1fr; }
  .cta-button { width: fit-content; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-partner { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .site-header { width: calc(100% - 28px); min-height: 82px; }
  .brand { width: 96px; height: 68px; }
  .site-nav { top: 82px; }
  .finder-shell { min-height: 900px; padding: 74px 14px 0; background-position: 56% center; }
  h1 { font-size: 43px; }
  .lead { font-size: 16px; }
  .filters { margin-top: 54px; margin-bottom: -92px; padding: 26px 15px; }
  .filter-heading { margin-bottom: 28px; }
  .journey-switch { width: 100%; margin-bottom: 28px; }
  .mode-button { min-width: 0; padding: 9px 10px; font-size: 13px; }
  fieldset + fieldset { margin-top: 24px; padding-top: 24px; }
  .choice-grid,
  .period-grid,
  .type-grid,
  .africa-interest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice-grid label > span { min-height: 60px; padding: 10px; font-size: 12px; }
  .type-grid label:last-child { grid-column: span 2; }
  .africa-interest-grid label:last-child { grid-column: span 2; }
  .form-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .primary-button { width: 100%; }
  .results-section { width: calc(100% - 28px); margin-top: 148px; margin-bottom: 64px; }
  .results-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .results-grid { grid-template-columns: 1fr; }
  .destination-card { min-height: 410px; }
  .personal-cta { width: calc(100% - 28px); margin-bottom: 64px; padding: 34px 22px; }
  .cta-button { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; gap: 34px; }
  .footer-partner { grid-column: auto; }
  .footer-legal { align-items: flex-start; flex-direction: column; gap: 8px; }
}

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