/* V3 — Horizontal scroll mode */
html.hx-html,
body.hx-mode {
  height: 100%;
  overflow: hidden;
  max-width: 100%;
}
body.hx-mode {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-height: 100dvh;
}
body.hx-mode .hx-chrome {
  flex: 0 0 auto;
  position: relative;
  z-index: 500;
  background: transparent;
  /* urtefarmasiet-like: soft settle-in + live shift while scrolling */
  --hx-shift: 0px;
  --hx-compact: 0;
  transform: translate3d(0, var(--hx-shift, 0px), 0);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.35s ease;
  will-change: transform;
  animation: hxChromeIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes hxChromeIn {
  from {
    opacity: 0;
    transform: translate3d(0, -16px, 0);
  }
  60% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: translate3d(0, var(--hx-shift, 0px), 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.hx-mode .hx-chrome {
    animation: none;
    transform: none !important;
    transition: none;
  }
}

body.hx-mode .hx-chrome.is-scrolled {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.hx-mode .site-top {
  position: relative;
  top: auto;
  background: transparent;
  border-bottom-color: transparent;
  transition: border-color 0.35s ease, background 0.35s ease;
}
body.hx-mode .hx-chrome.is-scrolled .site-top {
  border-bottom-color: var(--line);
  background: transparent;
}
body.hx-mode .demo-bar {
  position: relative;
  top: auto;
  max-height: 3rem;
  overflow: hidden;
  transition:
    max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease,
    padding 0.35s ease,
    border-color 0.35s ease;
}
body.hx-mode .hx-chrome.is-scrolled .demo-bar {
  max-height: 0;
  opacity: 0;
  border-bottom-width: 0;
  pointer-events: none;
}

/* On the home page the menu lives INSIDE the hero panel itself (see
   .hero-nav in hero.php) instead of the global fixed chrome — that way
   it scrolls away together with the photo using plain native scrolling,
   with no JS keeping a fixed header in sync. The global chrome is not
   needed there, so it's hidden entirely. */
@media (min-width: 1020px) {
  body[data-page="home"].hx-mode .hx-chrome {
    display: none;
  }
}

.hero-nav {
  display: none;
}
@media (min-width: 1020px) {
  .hero-nav {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: transparent;
  }
}
.hero-nav__demo.demo-bar {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.hero-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
}
.hero-nav__track {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 1.85rem;
  flex: 1 1 auto;
  min-width: 0;
}
@media (min-width: 1020px) {
  .hero-nav__track { display: flex; }
}
.hero-nav__link {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.hero-nav__link:hover,
.hero-nav__link.is-active {
  color: #fff;
}
.hero-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  flex-shrink: 0;
}
.hero-nav__logo .logo__mark {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.hero-nav__logo .flame-mark.logo__flame {
  color: #fff !important;
}
.hero-nav__book {
  flex-shrink: 0;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-nav__book:hover {
  background: #fff;
  color: var(--ink);
}

/* Compact logo / row — smooth like Shopify sticky header */
body.hx-mode .site-top__row {
  transition:
    min-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
body.hx-mode .hx-chrome.is-scrolled .site-top__row {
  min-height: 3.35rem;
  padding: 0.4rem 0;
}
body.hx-mode .logo__mark {
  transition:
    width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
body.hx-mode .hx-chrome.is-scrolled .logo__mark {
  width: 2rem;
  height: 2rem;
  transform: scale(0.96);
}
body.hx-mode .logo__name {
  transition: font-size 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
body.hx-mode .hx-chrome.is-scrolled .logo__name {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
}
body.hx-mode .logo__place {
  transition:
    opacity 0.35s ease,
    max-height 0.4s ease,
    margin 0.35s ease;
  max-height: 2rem;
}
body.hx-mode .hx-chrome.is-scrolled .logo__place {
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
}

/* Icon nav gently compresses along with the row */
body.hx-mode .icon-nav__item {
  transition:
    padding 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.2s ease;
}
body.hx-mode .hx-chrome.is-scrolled .icon-nav__item {
  padding: 0.3rem 0.1rem;
}

/* Subtle “float” while scrolling between panels */
body.hx-mode .hx-chrome.is-moving .logo {
  transform: translate3d(0, -1px, 0);
}
body.hx-mode .logo {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-height: 720px) {
  body.hx-mode .icon-nav { display: none !important; }
  body.hx-mode .menu-btn { display: grid; }
}

.hx-scroller {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  /* continuous free horizontal move (wheel-driven), no snap fight */
  scroll-snap-type: none;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  outline: none;
  /* hide native scrollbars */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hx-scroller::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.hx-track {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 100%;
  width: max-content;
  min-height: 100%;
}

/* Let main panels join the horizontal track */
body.hx-mode main#main.page-main--hx {
  display: contents;
}

.hx-panel {
  flex: 0 0 100vw;
  width: 100vw;
  max-width: 100vw;
  height: 100%;
  min-height: 100%;
  /* no inner vertical scroll — wheel always moves page sideways */
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  border-right: 1px solid var(--line);
}
.hx-panel__pad {
  padding: 1.5rem 0 2.5rem;
  min-height: 100%;
  box-sizing: border-box;
}
.hx-panel--tint { background: var(--paper-2); }
.hx-panel--hero { padding: 0; overflow: hidden; }
.hx-panel--hero .hero {
  min-height: 100%;
  height: 100%;
}
.hx-panel--cta {
  padding: 0;
  display: flex;
  align-items: stretch;
}
.hx-panel--cta .cta-band {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 2.5rem 0;
}
.hx-panel--page .page-hero { padding-top: 1.75rem; }
.hx-panel--page .section {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}
.hx-panel--footer {
  background: var(--ink);
  border-right: 0;
  overflow: hidden;
}
.hx-panel--page {
  overflow-y: auto; /* long legal pages only — wheel still hijacked for side scroll */
}
.site-footer--hx {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0 1.5rem;
  margin: 0;
}
.site-footer--hx .footer-marquee { display: none; }

body.hx-mode .section { padding: 1.5rem 0 2rem; }
body.hx-mode .instructor { padding-top: 1.25rem; }
body.hx-mode .atlas {
  padding: 1.5rem 0 2rem;
  border: 0;
  background: transparent;
}
body.hx-mode .instructor-card {
  max-width: 70rem;
  margin: 0 auto;
}

/* Progress scale 0% → 100% (bottom bar, no arrows) */
/* Thin progress line only — no % labels */
.hx-scale {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 800;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
  user-select: none;
}
.hx-scale__track {
  position: relative;
  height: 3px;
  background: rgba(28, 27, 25, 0.1);
  overflow: visible;
}
.hx-scale__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--ink);
  will-change: width;
}
.hx-scale__thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  margin-left: -4px;
  background: var(--ink);
  border: 1.5px solid var(--paper);
  will-change: left;
}
.hx-scale__meta { display: none !important; }

@media (min-width: 1200px) {
  .hx-panel {
    flex-basis: 92vw;
    width: 92vw;
    max-width: 92vw;
  }
  .hx-panel--hero,
  .hx-panel--cta,
  .hx-panel--footer {
    flex-basis: 100vw;
    width: 100vw;
    max-width: 100vw;
  }
}

@media (max-width: 720px) {
  .hx-panel {
    flex-basis: 100vw;
    width: 100vw;
  }
  body.hx-mode .instructor-card { grid-template-columns: 1fr; }
  body.hx-mode .services-grid { grid-template-columns: 1fr; }
  body.hx-mode .trust-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hx-scroller {
    scroll-behavior: auto;
    scroll-snap-type: x proximity;
  }
}
