/*
 * Our own additions on top of the Webflow stylesheet (webflow.css).
 * Keep this file small; prefer fixing things in components.
 */

/* Fixed nav (was an inline <style> in the Webflow head). */
.nav_component {
  position: fixed;
}

/* ---- Fade-up on scroll (driven by /assets/js/site.js) ----
 * Only hidden when JS runs (w-mod-js is set by the inline head script),
 * so content is never invisible if scripts fail. */
.w-mod-js [data-fade-up]:not([data-fade-up='stagger']),
.w-mod-js [data-fade-up='stagger'] > * {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}
.w-mod-js [data-fade-up].is-visible:not([data-fade-up='stagger']),
.w-mod-js [data-fade-up='stagger'].is-visible > * {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .w-mod-js [data-fade-up]:not([data-fade-up='stagger']),
  .w-mod-js [data-fade-up='stagger'] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Article body rendered from Markdown ----
 * Webflow wrapped images in <figure>; Markdown gives <p><img></p>. Match the figure look. */
.rich-text_blog-article p:has(> img:only-child) {
  margin-top: 0;
  margin-bottom: 2rem;
  text-align: center;
}
.rich-text_blog-article img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

/* Tables: same look as Webflow's Finsweet "fs-table" classes (see webflow.css). */
.rich-text_blog-article table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color--border-dark);
  border-radius: 1rem;
  overflow: hidden;
}
.rich-text_blog-article thead {
  background-color: #f3f3f3;
}
.rich-text_blog-article th,
.rich-text_blog-article td {
  border: 0;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  padding: 8px;
  vertical-align: top;
}
.rich-text_blog-article th {
  background-color: var(--color--surface-secondary);
}
.rich-text_blog-article tr > :last-child {
  border-right: 0;
}
.rich-text_blog-article tbody tr:last-child > * {
  border-bottom: 0;
}
@media screen and (max-width: 767px) {
  .rich-text_blog-article table {
    display: block;
    overflow-x: auto;
  }
}

/* ---- Component state animations (were Webflow interactions; behaviour in ui.js) ---------------- */
/* Dropdown chevron turns when the dropdown is open. */
.w-dropdown-toggle .dropdown-chevron {
  transition: rotate 0.3s ease;
}
.w-dropdown-toggle.w--open .dropdown-chevron {
  rotate: 180deg;
}
/* Hamburger icon becomes a cross while the mobile menu is open. Opening: lines move in 0.4 s and turn in
   0.6 s; closing: move in 0.6 s, turn in 0.4 s, then the middle line comes back. */
.menu-icon_line.is-top,
.menu-icon_line.is-bottom {
  transition:
    translate 0.6s cubic-bezier(0.86, 0, 0.07, 1),
    rotate 0.4s cubic-bezier(0.86, 0, 0.07, 1),
    background-color 0.25s ease;
}
.menu-icon_line.is-middle {
  width: 100%;
  transition:
    width 0.2s cubic-bezier(0.86, 0, 0.07, 1) 0.4s,
    background-color 0.25s ease;
}
.w-nav-button.w--open .menu-icon_line.is-top,
.w-nav-button.w--open .menu-icon_line.is-bottom {
  transition:
    translate 0.4s cubic-bezier(0.86, 0, 0.07, 1),
    rotate 0.6s cubic-bezier(0.86, 0, 0.07, 1),
    background-color 0.25s ease;
}
.w-nav-button.w--open .menu-icon_line.is-top {
  translate: 0 6px;
  rotate: -45deg;
}
.w-nav-button.w--open .menu-icon_line.is-bottom {
  translate: 0 -6px;
  rotate: 45deg;
}
.w-nav-button.w--open .menu-icon_line.is-middle {
  width: 0;
  transition:
    width 0.2s cubic-bezier(0.86, 0, 0.07, 1),
    background-color 0.25s ease;
}
/* In-page links (e.g. #contact-form-wrapper) scroll smoothly and stop below the fixed nav bar. */
html {
  scroll-behavior: smooth;
}
[id] {
  scroll-margin-top: 6rem;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .w-dropdown-toggle .dropdown-chevron,
  .menu-icon_line {
    transition: none !important;
  }
}
/* Lightbox controls are <button>s here (were <div>s): keep Webflow's look. */
.w-lightbox-control,
.w-lightbox-item {
  padding: 0;
  font: inherit;
}
