/*
 * Trails of Africa Elementor visual system.
 * Mirrors the approved prototype while preserving the catalogue markup contracts.
 */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-variable-italic.woff2") format("woff2-variations");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("../fonts/inter-latin-variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("../fonts/inter-latin-variable-italic.woff2") format("woff2-variations");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

html {
  background: #fff;
  color: var(--espresso);
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
  font-family: var(--font-display);
}

/* Enforce safari type pairing site-wide — no alternate families. */
.elementor-heading-title,
.elementor-widget-heading .elementor-heading-title,
.elementor h1,
.elementor h2,
.elementor h3,
.elementor h4,
.elementor h5,
.elementor h6 {
  font-family: var(--font-display) !important;
}

.elementor,
.elementor-widget-text-editor,
.elementor-widget-text-path,
.elementor-button-text,
.elementor-button,
.elementor-nav-menu a,
.elementor-icon-list-text,
.elementor-widget-container {
  font-family: var(--font-body);
}

.elementor-widget-text-editor h1,
.elementor-widget-text-editor h2,
.elementor-widget-text-editor h3,
.elementor-widget-text-editor h4,
.elementor-widget-text-editor h5,
.elementor-widget-text-editor h6 {
  font-family: var(--font-display) !important;
}

body {
  background: #fff;
  color: var(--espresso);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 100%;
  overflow-x: clip;
}

.elementor,
.elementor-element,
.elementor-widget-container,
.elementor-widget-container > * {
  min-width: 0;
  max-width: 100%;
}

::selection {
  background: var(--brass);
  color: var(--espresso);
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
  color: inherit;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  font-weight: 450;
  letter-spacing: -.018em;
  line-height: 1.06;
}

h1 { font-size: clamp(2.9rem, 6.3vw, 6.5rem); }
h2 { font-size: clamp(2.25rem, 4.1vw, 4.4rem); }
h3 { font-size: clamp(1.45rem, 2.2vw, 2rem); }

a {
  color: inherit;
  text-underline-offset: .25em;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brass) 78%, white);
  outline-offset: 3px;
}

.container,
.container-page {
  margin-inline: auto;
  max-width: 82.5rem;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
  width: 100%;
}

.container-wide {
  margin-inline: auto;
  max-width: 95rem;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
  width: 100%;
}

.container-narrow,
.editorial {
  margin-inline: auto;
  max-width: 53.75rem;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.section {
  padding-block: var(--section);
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.tone-cream,
.tone-light,
.section--cream {
  background: var(--stone);
}

.tone-deep,
.section--deep {
  background: var(--clay);
  color: var(--ivory);
}

.eyebrow,
.tour-single__kicker,
.swt-content-page__eyebrow {
  color: var(--acacia);
  display: inline-flex;
  font-family: var(--font-body);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .22em;
  line-height: 1.25;
  text-transform: uppercase;
}

.eyebrow--light,
.tone-deep .eyebrow {
  color: var(--savanna);
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.65;
  max-width: 44rem;
}

.btn,
.elementor-button,
button[type="submit"] {
  align-items: center;
  border: 1px solid transparent;
  border-radius: .25rem;
  display: inline-flex;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  justify-content: center;
  letter-spacing: .04em;
  min-height: 3rem;
  padding: .75rem 1.25rem;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.btn:hover,
.elementor-button:hover,
button[type="submit"]:hover {
  transform: translateY(-1px);
}

.btn--primary,
.btn--dark,
.elementor-button,
button[type="submit"] {
  background: var(--clay);
  color: var(--ivory);
}

.btn--primary:hover,
.btn--dark:hover,
.elementor-button:hover,
button[type="submit"]:hover {
  background: var(--espresso);
  color: var(--ivory);
}

.btn--outline,
.btn--ghost {
  background: transparent;
  border-color: var(--espresso);
  color: var(--espresso);
}

.btn--ghost-light {
  background: transparent;
  border-color: color-mix(in srgb, var(--ivory) 55%, transparent);
  color: var(--ivory);
}

/* Elementor owns the full canvas, without inherited page gaps. */
.elementor-page main,
.elementor-page .site-main,
.elementor-widget-swt-content-page .elementor-widget-container,
.elementor-widget-swt-dynamic-view .elementor-widget-container {
  margin: 0;
  max-width: none;
  padding: 0;
}

.elementor-element .elementor-widget-container > :first-child { margin-top: 0; }
.elementor-element .elementor-widget-container > :last-child { margin-bottom: 0; }

/* Reference homepage: full-bleed Trails of Africa sections inside Elementor. */
body.reference-home .elementor-widget[class*="elementor-widget-swt-"] > .elementor-widget-container,
body.reference-home .e-con.reference-home > .e-con-inner {
  margin: 0;
  max-width: none;
  padding: 0;
}

body.reference-home .e-con.reference-home {
  --padding-block-start: 0;
  --padding-block-end: 0;
  --padding-inline-start: 0;
  --padding-inline-end: 0;
  gap: 0;
}

/* Header and navigation */
.utility-bar {
  background: var(--stone);
  border-bottom: 1px solid color-mix(in srgb, var(--sand) 70%, transparent);
  color: var(--espresso);
  min-height: 2.25rem;
}

.utility-bar,
.utility-bar a {
  font-size: .75rem;
  letter-spacing: .02em;
}

.site-header,
.site-header.is-sticky {
  background: color-mix(in srgb, var(--ivory) 94%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--sand) 76%, transparent);
  box-shadow: 0 8px 24px -20px rgba(44, 36, 27, .45);
  color: var(--espresso);
  min-height: 4.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.primary-nav > ul > li > a,
.site-header__actions a,
.site-header__actions button {
  color: var(--espresso);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.primary-nav > ul > li > a:hover,
.primary-nav > ul > li.current-menu-item > a,
.primary-nav > ul > li.current-menu-ancestor > a {
  color: var(--clay);
}

.mega-panel {
  background: var(--ivory);
  border-color: var(--sand);
  box-shadow: var(--shadow);
}

.mega-panel a:hover { color: var(--clay); }

.nav-drawer {
  background: var(--ivory);
  color: var(--espresso);
}

/* Search overlay */
.search-panel,
.search-overlay {
  background: color-mix(in srgb, var(--ivory) 98%, transparent);
  color: var(--espresso);
}

.search-panel input[type="search"],
.search-overlay input[type="search"] {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--sand);
  border-radius: 0;
  color: var(--espresso);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 4rem);
}

/* Heroes */
.home-hero,
.page-hero,
.inner-hero,
.tour-single__hero,
.swt-content-hero {
  background: var(--espresso);
  color: var(--ivory);
}

.home-hero,
.swt-content-hero {
  min-height: clamp(35rem, 75vh, 52rem);
  overflow: hidden;
  position: relative;
}

.swt-content-hero {
  align-items: center;
  display: flex;
}

.home-hero::after,
.page-hero::after,
.inner-hero::after,
.tour-single__hero::after,
.swt-content-hero::after {
  background: linear-gradient(90deg, rgba(29, 22, 16, .78) 0%, rgba(29, 22, 16, .35) 50%, rgba(29, 22, 16, .08) 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.home-hero__content,
.page-hero__content,
.tour-single__hero-content,
.swt-content-hero__content {
  max-width: 100%;
  position: relative;
  z-index: 2;
}

.home-hero h1,
.page-hero h1,
.inner-hero h1,
.tour-single__hero h1,
.swt-content-hero h1 {
  color: var(--ivory);
  max-width: 12ch;
  overflow-wrap: normal;
}

.home-hero .lede,
.hero .lede,
.page-hero .lede,
.tour-single__hero .lede,
.swt-content-hero .lede {
  color: rgba(250, 246, 239, .88);
}

.page-hero,
.inner-hero,
.swt-content-hero--compact {
  min-height: clamp(24rem, 42vh, 32rem);
}

.swt-content-hero__image,
.page-hero__image,
.tour-single__hero-image,
.swt-archive-hero__image {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

/* Cards */
.service-card-grid,
.swt-card-grid {
  display: grid;
  gap: clamp(1.25rem, 2.6vw, 2rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.tour-card,
.swt-content-card,
.holiday-card,
.article-card {
  background: color-mix(in srgb, white 72%, var(--ivory));
  border: 1px solid color-mix(in srgb, var(--sand) 75%, transparent);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px -1px rgba(44, 36, 27, .05), 0 10px 30px -24px rgba(44, 36, 27, .32);
  color: var(--espresso);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.service-card,
.swt-content-card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.service-card:hover,
.tour-card:hover,
.swt-content-card:hover,
.holiday-card:hover,
.article-card:hover {
  border-color: var(--brass);
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

.tour-card__media,
.holiday-card__media,
.swt-content-card__media {
  aspect-ratio: 4 / 5;
  background: var(--stone);
  overflow: hidden;
}

.tour-card img,
.holiday-card img,
.swt-content-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(.16, 1, .3, 1);
  width: 100%;
}

.tour-card:hover img,
.holiday-card:hover img,
.swt-content-card:hover img { transform: scale(1.04); }

/* Editable content-page widget */
.swt-content-page {
  background: var(--ivory);
}

.swt-content-page__body {
  display: grid;
  gap: clamp(3rem, 6vw, 6rem);
}

.swt-content-page__prose {
  color: var(--espresso);
  font-size: 1.0625rem;
  line-height: 1.75;
  max-width: 48rem;
}

.swt-content-page__prose > * + * { margin-top: 1.1em; }
.swt-content-page__prose h2 { margin-top: 1.8em; }
.swt-content-page__prose h3 { margin-top: 1.5em; }

.swt-content-page__section {
  border-top: 1px solid var(--sand);
  padding-top: clamp(2rem, 4vw, 3.5rem);
}

.swt-content-page__section-grid {
  align-items: start;
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
}

.swt-content-page__section:nth-child(even) .swt-content-page__section-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
}

.swt-content-page__section-media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
}

.swt-content-page__section-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.swt-content-page__actions,
.cluster {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

/* Elementor editorial-section widget */
.swt-editorial-section {
  background: var(--ivory);
  color: var(--espresso);
  padding-block: var(--section);
}

.swt-editorial-section--stone { background: var(--stone); }
.swt-editorial-section--clay { background: var(--clay); color: var(--ivory); }
.swt-editorial-section--bush { background: var(--bush); color: var(--ivory); }
.swt-editorial-section--clay .eyebrow,
.swt-editorial-section--bush .eyebrow { color: var(--savanna); }

.swt-editorial-section__layout {
  align-items: center;
  display: grid;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.swt-editorial-section--split-left .swt-editorial-section__layout,
.swt-editorial-section--split-right .swt-editorial-section__layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.swt-editorial-section--split-right .swt-editorial-section__media { order: 2; }
.swt-editorial-section--split-right .swt-editorial-section__content { order: 1; }

.swt-editorial-section__content {
  max-width: 48rem;
}

.swt-editorial-section__heading { margin-block: .8rem 1.2rem; }
.swt-editorial-section__body { font-size: 1.0625rem; line-height: 1.75; }
.swt-editorial-section__body > * + * { margin-top: 1em; }

.swt-editorial-section__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.swt-editorial-section__media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.swt-editorial-section__cards {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.swt-content-card {
  display: block;
  padding: 0;
  text-decoration: none;
}

.swt-content-card__content { padding: clamp(1.35rem, 2.5vw, 2rem); }
.swt-content-card__content h3 { margin-block: .65rem .8rem; }
.swt-content-card__link { color: var(--clay); display: inline-block; font-weight: 600; margin-top: .8rem; }

/* Catalogue and filters */
.filter-layout {
  align-items: start;
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
}

.filters {
  background: var(--stone);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 7rem;
}

.filters fieldset,
.filter-group {
  border-color: color-mix(in srgb, var(--sand) 75%, transparent);
}

.filters input,
.filters select,
.results-toolbar select,
.mobile-filter-bar select,
.cvt-form input,
.cvt-form select,
.cvt-form textarea,
.commercial-form input,
.commercial-form select,
.commercial-form textarea {
  background: var(--ivory);
  border: 1px solid var(--sand);
  border-radius: .25rem;
  color: var(--espresso);
  min-height: 3rem;
}

.tour-results {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.tour-results--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tour-results--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.chip,
.tour-single__chips span {
  background: color-mix(in srgb, var(--savanna) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--brass) 48%, transparent);
  border-radius: 999px;
  color: var(--espresso);
  font-size: .75rem;
  padding: .35rem .7rem;
}

/* Safari detail */
.tour-single__toc {
  background: color-mix(in srgb, var(--ivory) 96%, transparent);
  border-block: 1px solid var(--sand);
}

.tour-single__layout {
  gap: clamp(2.5rem, 6vw, 6rem);
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
}

.tour-single__fact,
.tour-single__block,
.tour-single__rail > * {
  border-color: var(--sand);
}

.tour-single details {
  border-bottom: 1px solid var(--sand);
}

.tour-single summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

/* Forms */
.cvt-shell,
.commercial-form,
.swt-form-shell {
  background: color-mix(in srgb, white 72%, var(--ivory));
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.cvt-form fieldset,
.commercial-form fieldset { border-color: var(--sand); }

/* Footer */
.site-footer {
  background: var(--espresso);
  color: var(--ivory);
}

.site-footer a { color: color-mix(in srgb, var(--ivory) 82%, var(--savanna)); }
.site-footer a:hover { color: var(--brass); }
.site-footer__watermark,
.footer-positioning {
  color: color-mix(in srgb, var(--savanna) 62%, transparent);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 5rem);
  font-style: italic;
}

@media (max-width: 1100px) {
  .service-card-grid,
  .swt-card-grid,
  .tour-results--cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .filter-layout { grid-template-columns: minmax(14rem, 16rem) minmax(0, 1fr); }
}

@media (max-width: 782px) {
  h1 { font-size: clamp(2.45rem, 11vw, 3.75rem); }
  h2 { font-size: clamp(2rem, 9vw, 3.2rem); }

  .section { padding-block: clamp(4rem, 14vw, 6rem); }

  .service-card-grid,
  .swt-card-grid,
  .tour-results,
  .tour-results--cols-2,
  .tour-results--cols-3,
  .filter-layout,
  .tour-single__layout,
  .swt-content-page__section-grid,
  .swt-content-page__section:nth-child(even) .swt-content-page__section-grid {
    grid-template-columns: 1fr;
  }

  .swt-editorial-section--split-left .swt-editorial-section__layout,
  .swt-editorial-section--split-right .swt-editorial-section__layout {
    grid-template-columns: 1fr;
  }

  .swt-editorial-section--split-right .swt-editorial-section__media,
  .swt-editorial-section--split-right .swt-editorial-section__content { order: initial; }

  .filters {
    position: static;
  }

  .hero,
  .home-hero {
    min-height: 44rem;
  }

  .swt-content-hero,
  .swt-content-hero--compact {
    min-height: 30rem;
  }

  .hero,
  .home-hero,
  .page-hero,
  .inner-hero,
  .tour-single__hero,
  .swt-content-hero {
    max-width: 100%;
    overflow: hidden;
  }

  .hero-slide .container-wide,
  .home-hero__content,
  .page-hero__content,
  .tour-single__hero-content,
  .swt-content-hero__content {
    max-width: 100%;
    min-width: 0;
    padding-inline: 1.25rem;
    width: 100%;
  }

  .hero h1,
  .hero h2,
  .home-hero h1,
  .page-hero h1,
  .inner-hero h1,
  .tour-single__hero h1,
  .swt-content-hero h1 {
    font-size: clamp(2.45rem, 11vw, 3.5rem);
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
  }

  .hero .lede,
  .home-hero .lede,
  .page-hero .lede,
  .tour-single__hero .lede,
  .swt-content-hero .lede {
    font-size: 1rem;
    max-width: 100%;
  }

  .hero__actions,
  .home-hero__actions,
  .swt-content-hero .cluster {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn,
  .home-hero__actions .btn,
  .swt-content-hero .cluster .btn {
    max-width: 100%;
    white-space: normal;
    width: 100%;
  }

  .nav-shell {
    gap: .75rem;
    max-width: 100%;
    overflow: hidden;
  }

  .site-header .brand {
    max-width: 7.5rem;
    min-width: 0;
  }

  .site-header .brand .custom-logo {
    height: auto;
    max-width: 7.5rem !important;
    width: auto !important;
  }

  .nav-actions {
    flex: 0 0 auto;
    gap: .4rem;
  }

  .nav-actions [data-search-open] {
    display: none;
  }

  .home-hero::after,
  .page-hero::after,
  .inner-hero::after,
  .tour-single__hero::after,
  .swt-content-hero::after {
    background: linear-gradient(0deg, rgba(29, 22, 16, .82), rgba(29, 22, 16, .12) 78%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
