Я использую стандартную сборку веб-пакетов с переменными и миксинами S CSS. По какой-то причине я не могу переопределить стили в медиа-запросе в одном разделе на этом сайте, если я не разместил тот же медиа-запрос в предыдущем разделе, где использовались точки останова. Вот мой код:
_variables.s css
$sm-screen: 576px;
$md-screen: 768px;
$lg-screen: 992px;
$xl-screen: 1200px;
_mixins.s css
@mixin sm-screen {
@media screen and (min-width: #{$sm-screen}) {
@content;
}
}
@mixin md-screen {
@media screen and (min-width: #{$md-screen}) {
@content;
}
}
@mixin lg-screen {
@media screen and (min-width: #{$lg-screen}) {
@content;
}
}
@mixin xl-screen {
@media screen and (min-width: #{$xl-screen}) {
@content;
}
}
@mixin screen-size($screen) {
@media screen and (min-width: $screen) {
@content;
}
}
main.s css (куда импортируются файлы)
@import "/base/variables";
@import "/base/mixins";
@import "home";
_home.s css (вот где проблемы)
// ————————————————————————————————————————————————————————————
// HERO SECTION
// ————————————————————————————————————————————————————————————
#hero-section {
.hero-heading {
font-size: 2rem;
}
@include sm-screen {
.hero-heading {
font-size: 5rem;
}
}
@include lg-screen {
.hero-heading {
font-size: 6.5rem;
}
}
@include xl-screen {
.hero-heading {
font-size: 6.5rem;
}
}
}
... и, как и следовало ожидать, размер шрифта корректно переопределяется: 
// ————————————————————————————————————————————————————————————
// INTRO SECTION (where things get buggy)
// ————————————————————————————————————————————————————————————
#intro-section {
.icon-group {
list-style: none;
padding: 0;
margin-bottom: 50px;
}
@include md-screen {
.icon-group {
display: grid;
grid-template-columns: repeat(2, 1fr);
max-width: 600px;
margin-left: auto;
margin-right: auto;
position: relative;
}
}
@include xl-screen {
.icon-group {
display: flex;
max-width: none;
justify-content: center;
}
}
}
Когда я использую те же миксины в этом разделе, средняя точка останова переопределяет точку останова xl: 
Вот кикер:
Когда я добавляю среднюю точку останова к коду HERO SECTION
, тогда точки останова работают как положено в INTRO SECTION
:
// ————————————————————————————————————————————————————————————
// HERO SECTION
// ————————————————————————————————————————————————————————————
#hero-section {
.hero-heading {
font-size: 2rem;
}
@include sm-screen {
.hero-heading {
font-size: 5rem;
}
}
@include md-screen {
.hero-heading {
font-size: 5rem;
}
}
@include lg-screen {
.hero-heading {
font-size: 6.5rem;
}
}
@include xl-screen {
.hero-heading {
font-size: 6.5rem;
}
}
}
// ————————————————————————————————————————————————————————————
// INTRO SECTION
// ————————————————————————————————————————————————————————————
#intro-section {
.icon-group {
list-style: none;
padding: 0;
margin-bottom: 50px;
}
@include md-screen {
.icon-group {
display: grid;
grid-template-columns: repeat(2, 1fr);
max-width: 600px;
margin-left: auto;
margin-right: auto;
position: relative;
}
}
@include xl-screen {
.icon-group {
display: flex;
max-width: none;
justify-content: center;
}
}
}

Почему это?!
РЕДАКТИРОВАТЬ:
Вот мои целые файлы _home.scss
и _variables.scss
. Когда я закомментирую все HERO SECTION
, все остальное работает нормально. В HERO SECTION
должна быть ошибка, но я ее просто не ловлю.
_variables.s css
// ————————————————————————————————————————————————————————————
// COLORS
// ————————————————————————————————————————————————————————————
$grey-01: #181F2C;
$grey-02: #70849f;
$grey-03: #E0E5EE;
$blue-01: #A0AFC3;
$green-01: #0C7C25;
$green-01-hover: darken($green-01, 8%);
// ————————————————————————————————————————————————————————————
// GENERAL
// ————————————————————————————————————————————————————————————
$dur: 0.25s;
$skew: 32;
// ————————————————————————————————————————————————————————————
// BREAKPOINTS
// ————————————————————————————————————————————————————————————
$sm-screen: 576px;
$md-screen: 768px;
$lg-screen: 992px;
$xl-screen: 1200px;
_home.s css
body.home {
// ————————————————————————————————————————————————————————————
// HERO SECTION
// ————————————————————————————————————————————————————————————
#hero-section {
min-height: 100vh;
overflow: hidden;
display: flex;
justify-content: stretch;
.left-side,
.right-side {
width: 50%;
overflow: hidden;
position: relative;
background: $grey-01;
flex-grow: 1;
will-change: width;
transition: width $dur ease;
&.tap-active {
width: 150%;
.hero-content {
visibility: visible;
opacity: 1;
margin: 0 #{$skew}vh;
}
.hero-img {
opacity: 0.12;
background-color: $grey-01;
}
}
}
.hero-content {
opacity: 0;
visibility: hidden;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
color: white;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
transform: skew(#{$skew}deg);
transition: all $dur ease;
margin: 0 #{$skew}vh;
width: calc(100vw - 10%);
}
.hero-heading {
font-size: 22vw;
text-align: center;
line-height: 0.9;
.h-underline {
background: none;
}
}
.hero-btn {
margin-top: 30px;
@media screen and (max-width: $lg-screen - 1px) {
&.btn-disabled {
pointer-events: none;
}
}
}
.hero-img {
background: transparent center center/cover no-repeat;
background-blend-mode: luminosity;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
transform: skew(#{$skew}deg);
transition: all $dur ease;
}
.left-side {
transform: skew(-#{$skew}deg);
margin-left: -#{$skew}vh;
margin-right: 1px;
.hero-content {
right: -#{$skew}vh;
margin: 0 #{$skew}vh 0 0;
}
.hero-btn {
margin-bottom: 20vh;
}
.hero-img {
right: -#{$skew}vh;
}
}
.right-side {
transform: skew(-#{$skew}deg);
margin-right: -#{$skew}vh;
margin-left: 1px;
.hero-content {
left: -#{$skew}vh;
}
.hero-heading {
margin-top: 20vh;
}
.hero-img {
left: -#{$skew}vh;
}
}
@include sm-screen {
.hero-heading {
font-size: 5rem;
}
}
@include lg-screen {
.left-side,
.right-side {
.hero-content {
margin: 0;
}
&:hover {
width: 70%;
.hero-content {
visibility: visible;
opacity: 1;
margin: 0 #{$skew}vh;
width: 50vw;
}
.hero-img {
opacity: 0.12;
background-color: $grey-01;
}
}
}
.left-side {
.hero-content {
margin-left: -#{$skew}vh;
}
.hero-btn {
margin-bottom: 0;
}
}
.right-side {
.hero-heading {
margin-top: 0;
}
}
}
@include xl-screen {
.hero-heading {
font-size: 6.5rem;
}
}
}
// ————————————————————————————————————————————————————————————
// CLIENT LOGOS
// ————————————————————————————————————————————————————————————
#client-logos {
padding: 15px 0;
position: relative;
&:before,
&:after {
content: '';
display: block;
position: absolute;
height: 100%;
width: 25%;
max-width: 100px;
top: 0;
z-index: 1;
pointer-events: none;
}
&:before {
left: 0;
background: linear-gradient(to right, white, white 15%, rgba(white, 0));
}
&:after {
right: 0;
background: linear-gradient(to left, white, white 15%, rgba(white, 0));
}
.glide__slides {
align-items: center;
}
.glide__slide {
display: flex;
align-items: center;
justify-content: center;
}
.client-logo {
display: block;
max-width: 100%;
max-height: 15vw;
}
@include screen-size(800px) {
padding: 25px 0;
.client-logo {
max-height: 70px;
max-width: 125px;
}
}
}
// ————————————————————————————————————————————————————————————
// INTRO SECTION
// ————————————————————————————————————————————————————————————
#intro-section {
background: $grey-01 center center/cover no-repeat;
padding: 60px 0;
color: white;
text-align: center;
.intro-heading {
margin-bottom: 30px;
}
.intro-text {
margin-bottom: 40px;
}
.icon-group {
list-style: none;
padding: 0;
margin-bottom: 50px;
}
.icon-wrapper {
display: block;
padding-top: 75px;
background: center top/65px no-repeat;
margin-bottom: 25px;
position: relative;
&:not(:last-of-type):after {
content: '';
display: block;
background: $blue-01;
opacity: 0.6;
width: 45px;
height: 1px;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0;
}
&:last-of-type {
margin-bottom: 0;
.icon-heading {
padding-bottom: 0;
}
}
.icon-heading {
padding-bottom: 25px;
}
}
@include md-screen {
.icon-group {
display: grid;
grid-template-columns: repeat(2, 1fr);
max-width: 600px;
margin-left: auto;
margin-right: auto;
position: relative;
&:before,
&:after {
content: '';
display: block;
background: $blue-01;
opacity: 0.6;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
&:before {
width: 1px;
height: 80%;
}
&:after {
width: 80%;
height: 1px;
}
}
.icon-wrapper {
margin: 30px;
&:not(:last-of-type):after {
display: none;
}
.icon-heading {
padding: 0;
}
}
}
@include xl-screen {
.icon-group {
display: flex;
max-width: none;
justify-content: center;
&:before,
&:after {
display: none;
}
}
.icon-wrapper {
margin: 0;
padding-right: 60px;
padding-left: 60px;
&:not(:last-of-type):after {
display: block;
height: 45px;
width: 1px;
left: 100%;
bottom: 50%;
transform: translate(0, 50%);
}
}
}
}
// ————————————————————————————————————————————————————————————
// FEATURED VIDEO
// ————————————————————————————————————————————————————————————
#featured-video {
position: relative;
.video-poster {
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
z-index: 4;
@include flex-center;
text-align: center;
// background: url(../assets/images/video-poster.jpg) center bottom/cover no-repeat $orange-01;
}
.fancy-title {
display: none;
}
h2 {
display: none;
}
.play-video-btn {
// @extend .btn-text;
cursor: pointer;
position: relative;
display: inline-flex;
flex-direction: column;
align-items: center;
font-size: 1rem;
margin-top: 26px;
&:before {
content: "";
width: 0px;
height: 0px;
border-top: 14px solid transparent;
border-bottom: 14px solid transparent;
border-left: 26px solid white;
margin-bottom: 32px;
margin-right: -9px;
}
&:after {
content: "";
position: absolute;
width: 75px;
height: 75px;
border-radius: 50%;
border: 2px solid white;
transition: all 0.2s ease;
top: -27px;
left: 50%;
transform: translateX(-50%);
}
&:hover,
&:focus {
&:after {
transform: translateX(-50%) scale(1.1);
}
}
}
@include sm-screen {
h2 {
display: block;
color: white;
font-size: 10vw;
margin-bottom: 5%;
}
}
@include md-screen {
.fancy-title {
display: inline-block;
}
}
@include xl-screen {
h2 {
font-size: 8rem;
}
}
}
}