/* Dark theme for steppemind — active when <html> has class "sm-dark".
   Warm charcoal surfaces so the brand sand (#ceb19c) and rose (#f1345d) keep
   their character. Photos and text over photos are left untouched. */

html.sm-dark {
  color-scheme: dark;
  --dk-pinstripe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cg fill='%23ecdecd' fill-opacity='.075'%3E%3Crect x='3' y='0' width='1' height='1'/%3E%3Crect x='2' y='1' width='1' height='1'/%3E%3Crect x='1' y='2' width='1' height='1'/%3E%3Crect x='0' y='3' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E");
  --dk-bg: #171513;
  --dk-surface: #201d1a;
  --dk-surface-2: #2a2622;
  --dk-border: #3b3630;
  --dk-text: #bdb5ac;
  --dk-heading: #eee8e1;
  --dk-muted: #8f877e;

  /* Avada theme options (these feed most elements) */
  --bg_color: var(--dk-bg);
  --content_bg_color: var(--dk-bg);
  --archive_header_bg_color: var(--dk-bg);
  --body_typography-color: var(--dk-text);
  --h1_typography-color: var(--dk-heading);
  --h2_typography-color: var(--dk-heading);
  --h3_typography-color: var(--dk-heading);
  --h4_typography-color: var(--dk-heading);
  --h5_typography-color: var(--dk-heading);
  --h6_typography-color: var(--dk-heading);
  --link_color: var(--dk-heading);
  --checklist_text_color: var(--dk-text);
  --content_box_body_color: var(--dk-text);
  --content_box_title_color: var(--dk-heading);
  --counter_box_body_color: var(--dk-text);
  --accordian_inactive_color: var(--dk-heading);
  --faq_accordian_inactive_color: var(--dk-heading);
  --faq_accordion_title_typography-color: var(--dk-heading);
  --faq_accordion_content_typography-color: var(--dk-text);
  --header_bg_color: var(--dk-bg);
  --header_sticky_bg_color: var(--dk-bg);
  --header_top_sub_bg_color: var(--dk-surface);
  --copyright_bg_color: var(--dk-bg);
  --copyright_border_color: var(--dk-border);
  --copyright_text_color: var(--dk-muted);
  --form_bg_color: var(--dk-surface);
  --form_border_color: var(--dk-border);
  --form_focus_border_color: #ceb19c;
  --form_text_color: var(--dk-heading);
  --sep_color: var(--dk-border);
  --dates_box_color: var(--dk-surface-2);
  --danger_bg_color: var(--dk-surface);
  --info_bg_color: var(--dk-surface);
  --awb-popup-background-color: var(--dk-surface);
  --image_rollover_text_color: var(--dk-heading);
  --es_title_color: var(--dk-heading);
  --es_caption_color: var(--dk-text);
  --blog_element_load_more_posts_button_bg_color: var(--dk-surface-2);
  --blog_element_load_more_posts_button_text_color: var(--dk-heading);
  --blog_element_load_more_posts_hover_button_bg_color: var(--dk-border);
  --blog_element_load_more_posts_hover_button_text_color: var(--dk-heading);
  --awb-title-color: var(--dk-heading);
  --awb-content-color: var(--dk-text);
  /* Site custom colour "charcoal" (#36454f) is used for text, labels, form text */
  --awb-custom_color_1: var(--dk-text);
}

html.sm-dark,
html.sm-dark body,
html.sm-dark #boxed-wrapper,
html.sm-dark #wrapper,
html.sm-dark #main,
html.sm-dark .fusion-footer-widget-area,
html.sm-dark .fusion-footer-copyright-area {
  background-color: var(--dk-bg) !important;
}
html.sm-dark body { color: var(--dk-text); }

/* Sections/columns built with light palette backgrounds (inline Avada vars).
   Containers with a photo background keep their image; only the colour swaps. */
html.sm-dark [style*="--awb-background-color:var(--awb-color1)"],
html.sm-dark [style*="--awb-background-color:#ffffff"],
html.sm-dark [style*="--awb-background-color:#fff;"],
html.sm-dark [style*="--awb-bg-color:var(--awb-color1)"] {
  --awb-background-color: var(--dk-bg) !important;
  --awb-bg-color: var(--dk-bg) !important;
}
html.sm-dark [style*="--awb-background-color:var(--awb-color2)"],
html.sm-dark [style*="--awb-background-color:#ebebeb"],
html.sm-dark [style*="--awb-background-color:#f2f2f2"],
html.sm-dark [style*="--awb-background-color:#f0fbf9"] {
  --awb-background-color: var(--dk-surface) !important;
}
html.sm-dark [style*="--awb-bg-color-hover:var(--awb-color1)"] { --awb-bg-color-hover: var(--dk-surface) !important; }

/* Text set to the palette's dark greys / black → light equivalents */
html.sm-dark [style*="--awb-text-color:var(--awb-color8)"],
html.sm-dark [style*="--awb-text-color:var(--awb-color7)"] { --awb-text-color: var(--dk-heading) !important; }
html.sm-dark [style*="--awb-text-color:var(--awb-color6)"] { --awb-text-color: var(--dk-text) !important; }
html.sm-dark [style*="--awb-sep-color:var(--awb-color6)"] { --awb-sep-color: var(--dk-border) !important; }
html.sm-dark [style*="--awb-tooltip-background-color:var(--awb-color8)"] { --awb-tooltip-background-color: var(--dk-surface-2) !important; }
html.sm-dark [style*="--awb-mobile-trigger-color:var(--awb-color8)"] { --awb-mobile-trigger-color: var(--dk-heading) !important; }

/* Header: logo is dark artwork on transparent — lift it to white.
   The home header floats over the slider with a translucent white bar. */
html.sm-dark .fusion-tb-header [style*="--awb-background-color:rgba(255,255,255"] {
  --awb-background-color: rgba(23, 21, 19, 0.55) !important;
}
html.sm-dark .fusion-tb-header .fusion-logo img,
html.sm-dark .fusion-tb-header .fusion-imageframe img[src*="nltext"],
html.sm-dark .fusion-tb-header .fusion-imageframe img[src*="nlogo"],
html.sm-dark .fusion-tb-header .fusion-imageframe img[src*="ns_logo"] {
  filter: brightness(0) invert(0.93);
}
@media (max-width: 1024px) {
  html.sm-dark .fusion-tb-header .fusion-sticky-container,
  html.sm-dark .fusion-tb-header .fusion-fullwidth.fusion-sticky-transition {
    background-color: rgba(23, 21, 19, 0.92) !important;
  }
}

/* Menus */
html.sm-dark .awb-menu__sub-ul,
html.sm-dark .awb-menu__main-ul_column .awb-menu__sub-ul { background-color: var(--dk-surface) !important; }
html.sm-dark .awb-menu_mobile-dropdown .awb-menu__main-ul,
html.sm-dark .awb-menu--mobile-open .awb-menu__main-ul { background-color: var(--dk-surface) !important; }

/* Forms */
html.sm-dark input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
html.sm-dark select,
html.sm-dark textarea {
  background-color: var(--dk-surface) !important;
  color: var(--dk-heading) !important;
  border-color: var(--dk-border) !important;
}
html.sm-dark ::placeholder { color: var(--dk-muted) !important; }
html.sm-dark .fusion-form {
  --awb-form-bg-color: var(--dk-surface);
  --awb-form-text-color: var(--dk-heading);
  --awb-form-border-color: var(--dk-border);
  --awb-form-placeholder-color: var(--dk-muted);
  --awb-form-focus-border-color: #ceb19c;
}
html.sm-dark .fusion-form .fusion-form-field label,
html.sm-dark .fusion-form .fusion-form-label-wrapper { color: var(--dk-heading); }

/* Cards, boxes, rules */
html.sm-dark hr,
html.sm-dark .fusion-separator .fusion-separator-border,
html.sm-dark .fusion-sep-clear + .fusion-separator { border-color: var(--dk-border) !important; }
html.sm-dark .fusion-content-boxes .content-box-column .col,
html.sm-dark .fusion-flip-box .flip-box-front { background-color: var(--dk-surface); }
html.sm-dark .fusion-alert:not(.alert-success):not(.error) { background-color: var(--dk-surface) !important; color: var(--dk-text) !important; }

/* Images: soften very bright photos a touch; keep logos/icons crisp */
html.sm-dark #main img:not([src$=".png"]):not([src$=".svg"]) { filter: brightness(0.94); }

/* Light decorative textures (near-white paper/line art): dropped in dark mode so
   these sections share the exact page background instead of a grey-tinted slab. */
html.sm-dark :is([data-bg*="intro-bg2"], [data-bg*="booking-bg"], [data-bg*="services-bg3"], [data-bg*="stylist-bg"]),
html.sm-dark :is([style*="intro-bg2"], [style*="booking-bg"], [style*="services-bg3"], [style*="stylist-bg"]) {
  --awb-background-color: var(--dk-bg) !important;
  background-color: var(--dk-bg) !important;
  background-image: none !important;
}

/* Header bar + dropdowns */
html.sm-dark .fusion-tb-header .fusion-fullwidth {
  --awb-background-color: rgba(23, 21, 19, 0.82) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
html.sm-dark .awb-menu {
  --awb-submenu-bg: var(--dk-surface) !important;
  --awb-submenu-color: var(--dk-text) !important;
  --awb-submenu-sep-color: var(--dk-border) !important;
  --awb-submenu-active-bg: var(--dk-surface-2) !important;
  --awb-submenu-active-color: #ceb19c !important;
  --awb-mobile-bg: var(--dk-surface) !important;
  --awb-mobile-color: var(--dk-text) !important;
  --awb-mobile-sep-color: var(--dk-border) !important;
}

/* Blog / post grids */
html.sm-dark .fusion-post-wrapper,
html.sm-dark .fusion-post-content-wrapper {
  background-color: var(--dk-surface) !important;
  border-color: var(--dk-border) !important;
}

/* Sand-coloured contact/footer bands → deep warm cocoa; white curve matches page */
html.sm-dark .fusion-fullwidth[style*="--awb-background-color:var(--awb-color3)"] {
  --awb-background-color: #2e2621 !important;
}
html.sm-dark img[src*="footer-curve"] { filter: brightness(0.088) sepia(0.25); }

/* Forms that set charcoal borders inline: keep borders subtle */
html.sm-dark [style*="--awb-form-border-color:var(--awb-custom_color_1)"] {
  --awb-form-border-color: var(--dk-border) !important;
  --awb-form-focus-border-color: #ceb19c !important;
  --awb-form-label-color: var(--dk-heading) !important;
  --awb-form-text-color: var(--dk-heading) !important;
}

/* Tabs, quotes */
html.sm-dark .fusion-tabs .nav-tabs .tab-link,
html.sm-dark .fusion-tabs .nav-tabs li .tab-link { background-color: var(--dk-surface-2) !important; color: var(--dk-text) !important; border-color: var(--dk-border) !important; }
html.sm-dark .fusion-tabs .nav-tabs li.active .tab-link,
html.sm-dark .fusion-tabs .nav-tabs li .tab-link:hover { background-color: var(--dk-surface) !important; color: var(--dk-heading) !important; }
html.sm-dark .fusion-tabs .tab-content .tab-pane,
html.sm-dark .fusion-tabs .tab-content { background-color: var(--dk-surface) !important; border-color: var(--dk-border) !important; }
html.sm-dark blockquote { background-color: var(--dk-surface) !important; color: var(--dk-text) !important; border-color: #ceb19c !important; }

/* Frosted white text panels over photos → frosted dark panels */
html.sm-dark [style*="--awb-bg-color:rgba(255,255,255,0.3"],
html.sm-dark [style*="--awb-bg-color:rgba(255,255,255,0.4"] { --awb-bg-color: rgba(23, 21, 19, 0.55) !important; }
html.sm-dark [style*="--awb-bg-color:rgba(255,255,255,0.7"],
html.sm-dark [style*="--awb-bg-color:rgba(255,255,255,0.9"] { --awb-bg-color: rgba(23, 21, 19, 0.82) !important; }

/* Deep teal / charcoal accents hardcoded in content → lighter tints for contrast */
html.sm-dark [style*="--awb-text-color:#00605f"], html.sm-dark [style*="color:#00605f"] { color: #7fbcb8 !important; --awb-text-color: #7fbcb8 !important; }
html.sm-dark [style*="color:#35454f"], html.sm-dark [style*="color: #35454f"],
html.sm-dark [style*="color:#1c2d23"], html.sm-dark [style*="color:#44544a"] { color: var(--dk-text) !important; }

/* Default buttons ("Learn more", "Read more", "View all posts", form submit):
   the light #cec3b7 fill glares on dark — use a soft sand-tinted outline instead,
   filling with sand on hover. Custom buttons (date pills etc.) set their own vars. */
html.sm-dark {
  --button_gradient_top_color: rgba(206, 177, 156, 0.10);
  --button_gradient_bottom_color: rgba(206, 177, 156, 0.10);
  --button_gradient_top_color_hover: #ceb19c;
  --button_gradient_bottom_color_hover: #ceb19c;
  --button_accent_color: #e2cfc0;
  --button_accent_hover_color: #1d1916;
  --button_border_color: rgba(206, 177, 156, 0.55);
  --button_border_hover_color: #ceb19c;
}
html.sm-dark .fusion-button.button-default {
  border: 1px solid var(--button_border_color) !important;
}
html.sm-dark .fusion-button.button-default:hover,
html.sm-dark .fusion-button.button-default:focus-visible {
  border-color: var(--button_border_hover_color) !important;
}

/* Section divider ornament (dark artwork) → creamy sand. The PNG's alpha is used
   as a mask over a solid colour, so the shape stays exact. */
html.sm-dark img[src*="/2024/10/divider.png"] {
  object-position: -9999px 0;
  background-color: #e2cfb8;
  -webkit-mask: url("/wp-content/uploads/2024/10/divider.png") center / contain no-repeat;
  mask: url("/wp-content/uploads/2024/10/divider.png") center / contain no-repeat;
}
/* Small swirl logo used as a section ornament in content ("Our Priority" etc.) */
html.sm-dark #main img[data-orig-src*="/2024/11/ns_logo.png"],
html.sm-dark #main img[src*="/2024/11/ns_logo.png"] {
  object-position: -9999px 0;
  background-color: #e2cfb8;
  -webkit-mask: url("/wp-content/uploads/2024/11/ns_logo.png") center / contain no-repeat;
  mask: url("/wp-content/uploads/2024/11/ns_logo.png") center / contain no-repeat;
}

/* "Our Priority" section: the light paper texture (fine diagonal pinstripes, torn top
   edge) is hidden in dark mode — redraw the pinstripes in CSS with a faint light line,
   over the same 692px band at the bottom, fading in at the top like the torn edge. */
html.sm-dark [data-bg*="services-bg3"] { position: relative; isolation: isolate; }
html.sm-dark [data-bg*="services-bg3"]::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(100%, 692px);
  pointer-events: none;
  /* A 4×4 px tile with a one-pixel "/" diagonal: every repeat is pixel-identical, so the
     stripes stay even (a fractional repeating-linear-gradient aliased into bands). */
  background: var(--dk-pinstripe) 0 0 / 4px 4px repeat;
  /* fade in at the top, and out into the next section at the bottom */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 70px, #000 calc(100% - 160px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 70px, #000 calc(100% - 160px), transparent 100%);
}

/* Welcome section under the slider: pinstripes edge to edge, no fades (replaces the
   light-mode curve drawn in fixes.css) */
html.sm-dark [data-bg*="intro-bg2"]::before {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: auto;
  aspect-ratio: auto;
  transform: none;
  background: var(--dk-pinstripe) 0 0 / 4px 4px repeat;
  -webkit-mask-image: none;
  mask-image: none;
}

/* Home "Mongolia in Brief" band: the default dark button (10% sand tint) vanished on the bright photo —
   give it a solid dark backing there */
html.sm-dark a.fusion-button.button-9[href="/mongolia-in-brief/"] {
  background: rgba(23, 21, 19, 0.82) !important;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-color: rgba(226, 207, 192, 0.7) !important;
}
html.sm-dark a.fusion-button.button-9[href="/mongolia-in-brief/"] .fusion-button-text { color: #eee8e1 !important; }
html.sm-dark a.fusion-button.button-9[href="/mongolia-in-brief/"]:hover { background: #ceb19c !important; border-color: #ceb19c !important; }
html.sm-dark a.fusion-button.button-9[href="/mongolia-in-brief/"]:hover .fusion-button-text { color: #1d1916 !important; }
