/*
 * Главная страница 0.5.0.
 * Вместо чередования независимых секций используется одна северная карта:
 * первый экран, тропы проекта, раскрытая история, лесная лавка и ассортимент.
 */

.home-map {
  --home-deep: #030d10;
  --home-night: #07171b;
  --home-blue: #102a33;
  --home-paper: #efe3cc;
  --home-paper-soft: #f6eddd;
  --home-ink: #251e18;
  --home-amber: #d7a34f;
  --home-muted: #aab8b4;
  --home-line: rgb(231 219 196 / 18%);
  --home-season: #a9b9b4;
  --home-season-glow: rgb(169 185 180 / 12%);

  position: relative;
  overflow: clip;
  color: var(--sb-paper-100);
  background: var(--home-deep);
}

/* Сезон меняет только оттенок и небольшой знак — без тяжёлой смены всей сцены. */
.home-map[data-home-season="winter"] {
  --home-season: #b6cdd1;
  --home-season-glow: rgb(182 205 209 / 13%);
}

.home-map[data-home-season="thaw"] {
  --home-season: #9db9aa;
  --home-season-glow: rgb(107 157 133 / 13%);
}

.home-map[data-home-season="white-nights"] {
  --home-season: #e2bd7c;
  --home-season-glow: rgb(226 189 124 / 14%);
}

.home-map[data-home-season="late-summer"] {
  --home-season: #c7aa69;
  --home-season-glow: rgb(199 170 105 / 13%);
}

.home-map[data-home-season="autumn"] {
  --home-season: #b6784d;
  --home-season-glow: rgb(182 120 77 / 14%);
}

/* На главной шапка растворяется в небе, но сохраняет читаемость ссылок. */
body.home .site-header {
  border-color: transparent;
  background: linear-gradient(180deg, rgb(2 10 13 / 70%), rgb(2 10 13 / 38%));
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

body.home .site-header.is-scrolled,
body.home.menu-is-open .site-header {
  border-color: rgb(231 219 196 / 13%);
  background: rgb(3 13 16 / 92%);
}

.home-hero {
  position: relative;
  min-height: max(760px, 100svh);
  overflow: hidden;
  isolation: isolate;
  contain: layout paint;
  background: var(--home-night);
}

.home-hero__backdrop,
.home-hero__shade,
.home-hero__fog,
.home-hero__stars {
  position: absolute;
  pointer-events: none;
}

.home-hero__backdrop {
  z-index: -5;
  inset: 0;
}

.home-hero__backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-hero__shade {
  z-index: -4;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(1 8 11 / 93%) 0%, rgb(1 8 11 / 73%) 39%, rgb(1 8 11 / 19%) 71%, rgb(1 8 11 / 8%) 100%),
    linear-gradient(180deg, rgb(1 8 11 / 9%) 35%, rgb(1 8 11 / 78%) 100%),
    radial-gradient(circle at 66% 43%, var(--home-season-glow), transparent 32%);
}

.home-hero__fog {
  z-index: -2;
  right: -11%;
  bottom: -5%;
  left: -11%;
  height: 62%;
  overflow: hidden;
  opacity: 0.27;
}

.home-hero__fog::before,
.home-hero__fog::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
}

.home-hero__fog::before {
  background: linear-gradient(180deg, var(--home-deep), transparent 26%);
}

.home-hero__fog::after {
  background: linear-gradient(90deg, var(--home-deep), transparent 12%, transparent 88%, var(--home-deep));
}

.home-hero__fog img {
  width: 104%;
  height: 104%;
  margin: -2%;
  object-fit: cover;
  object-position: center bottom;
  animation: home-fog-drift 22s ease-in-out infinite alternate;
}

/* Все звёзды собраны в одном фоне и требуют только одной CSS-анимации. */
.home-hero__stars {
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 9% 15%, #f9e9c4 0 1px, transparent 1.8px),
    radial-gradient(circle at 29% 23%, #f9e9c4 0 1.2px, transparent 2px),
    radial-gradient(circle at 52% 11%, #f9e9c4 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 76% 21%, #f9e9c4 0 1px, transparent 1.8px),
    radial-gradient(circle at 91% 13%, #f9e9c4 0 0.8px, transparent 1.6px);
  filter: drop-shadow(0 0 5px rgb(255 217 145 / 60%));
  opacity: 0.34;
  animation: home-stars-breathe 5.4s ease-in-out infinite alternate;
}

.home-hero__layout {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: max(760px, 100svh);
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.7fr);
  align-items: center;
  gap: 24px;
  padding-block: calc(var(--sb-header-height) + 76px) 112px;
}

.home-hero__content {
  position: relative;
  z-index: 3;
  max-width: 790px;
}

.home-hero__content .eyebrow {
  max-width: 360px;
  color: var(--home-amber);
}

.home-hero__content h1 {
  max-width: 740px;
  font-size: clamp(4.75rem, 8.6vw, 8rem);
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.home-hero__promise {
  max-width: 570px;
  margin-top: clamp(30px, 4vw, 46px);
  color: rgb(239 232 215 / 86%);
  font-size: clamp(1.125rem, 1.5vw, 1.35rem);
  line-height: 1.65;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px clamp(28px, 4vw, 58px);
  margin-top: 36px;
}

.home-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-block: 9px;
  color: var(--home-amber);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}

.home-arrow-link span {
  font-size: 1.15rem;
  font-weight: 400;
  transition: transform 200ms var(--sb-ease-out);
}

.home-arrow-link:hover span,
.home-arrow-link:focus-visible span {
  transform: translateX(5px);
}

.home-hero__flight {
  position: relative;
  z-index: 2;
  width: min(100%, 570px);
  margin-top: 18px;
  place-self: center end;
  isolation: isolate;
  transform-origin: 52% 42%;
  animation: home-owl-float 7.2s ease-in-out infinite;
}

.home-hero__flight img {
  position: relative;
  z-index: 1;
  width: 100%;
}

.home-hero__flight::after {
  position: absolute;
  z-index: 0;
  top: 86.3%;
  left: 49.4%;
  width: 23%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 221 151 / 64%) 0%, rgb(240 163 60 / 27%) 35%, transparent 72%);
  content: "";
  transform: translate3d(-50%, -50%, 0);
  animation: home-lantern-glow 3.4s ease-in-out infinite;
}

.home-season-note {
  position: absolute;
  right: 32px;
  bottom: 38px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: rgb(230 224 210 / 64%);
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.home-season-note span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--home-season);
  box-shadow: 0 0 13px var(--home-season);
}

.home-hero__continue {
  position: absolute;
  z-index: 4;
  bottom: 32px;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: rgb(230 224 210 / 64%);
  font-size: 0.625rem;
  font-weight: 680;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.home-hero__continue span {
  color: var(--home-amber);
  font-size: 1.35rem;
  line-height: 0.8;
}

.home-hero.is-ambient-paused .home-hero__fog img,
.home-hero.is-ambient-paused .home-hero__stars,
.home-hero.is-ambient-paused .home-hero__flight,
.home-hero.is-ambient-paused .home-hero__flight::after {
  animation-play-state: paused;
}

/* Маршрут — не меню из карточек, а открытая композиция с общей линией пути. */
.home-path {
  position: relative;
  z-index: 2;
  min-height: 900px;
  padding-block: clamp(104px, 12vw, 178px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 76% 28%, rgb(37 83 82 / 23%), transparent 26%),
    radial-gradient(circle at 17% 74%, rgb(151 102 53 / 12%), transparent 24%),
    linear-gradient(180deg, var(--home-deep), #07191c 54%, #061315);
}

.home-path::before,
.home-path::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.home-path::before {
  top: -1px;
  right: 0;
  left: 0;
  height: 190px;
  background: linear-gradient(180deg, rgb(3 13 16 / 92%), transparent);
}

.home-path::after {
  right: -6%;
  bottom: -18%;
  width: 50%;
  aspect-ratio: 1.8;
  border: 1px solid rgb(181 210 207 / 7%);
  border-radius: 50%;
  box-shadow: 0 0 0 58px rgb(181 210 207 / 2.2%), 0 0 0 116px rgb(181 210 207 / 1.5%);
  transform: rotate(-8deg);
}

.home-path__inner {
  position: relative;
  min-height: 670px;
}

.home-path__intro {
  position: relative;
  z-index: 2;
  width: min(610px, 55%);
}

.home-path__intro h2 {
  max-width: 600px;
  font-size: clamp(3rem, 5.6vw, 5rem);
}

.home-path__intro > p:last-child {
  max-width: 540px;
  margin-top: 26px;
  color: var(--home-muted);
  font-size: 1.0625rem;
}

.home-path__points {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 104px clamp(110px, 15vw, 230px);
  margin-top: 88px;
}

.home-waypoint {
  position: relative;
  display: grid;
  max-width: 370px;
  align-content: start;
  padding-left: 34px;
  color: var(--sb-paper-100);
  text-decoration: none;
}

.home-waypoint--world,
.home-waypoint--shop {
  justify-self: end;
}

.home-waypoint--world {
  margin-top: -152px;
}

.home-waypoint--about {
  margin-left: 10%;
}

.home-waypoint--shop {
  margin-top: -38px;
}

.home-waypoint__mark {
  position: absolute;
  top: 8px;
  left: 0;
  width: 13px;
  height: 13px;
  border: 1px solid var(--home-amber);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgb(215 163 79 / 6%);
}

.home-waypoint__mark::after {
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: var(--home-amber);
  content: "";
  opacity: 0.5;
  transition: opacity 180ms ease, transform 180ms var(--sb-ease-out);
}

.home-waypoint strong {
  font-family: var(--sb-font-display);
  font-size: clamp(2.15rem, 3vw, 3rem);
  font-weight: 550;
  line-height: 1;
}

.home-waypoint small {
  max-width: 330px;
  margin-top: 13px;
  color: #aab6b2;
  font-size: 0.875rem;
  line-height: 1.65;
}

.home-waypoint em {
  margin-top: 19px;
  color: var(--home-amber);
  font-size: 0.6875rem;
  font-style: normal;
  font-weight: 760;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.home-waypoint:hover .home-waypoint__mark::after,
.home-waypoint:focus-visible .home-waypoint__mark::after {
  opacity: 1;
  transform: scale(1.35);
}

.home-waypoint:hover strong,
.home-waypoint:focus-visible strong {
  color: #f2d49a;
}

.home-path__trail {
  position: absolute;
  z-index: 1;
  inset: 136px 0 0;
  width: 100%;
  height: calc(100% - 70px);
  overflow: visible;
  pointer-events: none;
}

.home-path__trail path {
  fill: none;
  stroke: rgb(203 176 119 / 23%);
  stroke-width: 1.25;
  stroke-dasharray: 3 9;
  vector-effect: non-scaling-stroke;
}

/* Ведущая сказка выглядит как раскрытая находка на пути, а не как UI-карточка. */
.home-story {
  position: relative;
  z-index: 3;
  padding-block: clamp(92px, 11vw, 160px);
  isolation: isolate;
  background:
    radial-gradient(circle at 15% 42%, rgb(217 163 79 / 9%), transparent 28%),
    linear-gradient(180deg, #061315, #08171a 78%, var(--home-deep));
}

.home-story::before {
  position: absolute;
  z-index: -1;
  inset: 12% -11% 8% -10%;
  background: rgb(239 227 204 / 97%);
  box-shadow: 0 34px 90px rgb(0 0 0 / 32%);
  clip-path: polygon(0.5% 8%, 17% 2%, 49.5% 6%, 66% 1%, 99% 7%, 98% 92%, 73% 98%, 51% 94%, 31% 99%, 1% 91%);
  content: "";
  transform: rotate(-0.15deg);
}

.home-story__spread {
  position: relative;
  display: grid;
  min-height: 600px;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: clamp(38px, 6vw, 90px);
}

.home-story__spread::after {
  position: absolute;
  z-index: 2;
  top: 9%;
  bottom: 8%;
  left: 53.5%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgb(69 50 31 / 18%) 18%, rgb(69 50 31 / 18%) 82%, transparent);
  box-shadow: 8px 0 18px rgb(71 49 27 / 7%);
  content: "";
  pointer-events: none;
}

.home-story__visual {
  position: relative;
  z-index: 1;
  margin-left: -4vw;
  overflow: hidden;
  background: #261d18;
  box-shadow: 0 24px 48px rgb(62 38 18 / 20%);
  clip-path: polygon(3% 4%, 96% 1%, 100% 94%, 7% 100%, 0 80%);
  transform: rotate(-0.6deg);
}

.home-story__visual picture {
  height: 100%;
}

.home-story__visual img {
  width: 100%;
  min-height: 520px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  transition: transform 900ms var(--sb-ease-out);
}

.home-story__visual:hover img {
  transform: scale(1.018);
}

.home-story__page {
  position: relative;
  z-index: 3;
  padding: clamp(34px, 5vw, 72px) clamp(14px, 3vw, 48px) clamp(34px, 5vw, 72px) 0;
  color: var(--home-ink);
}

.home-story__page::after {
  position: absolute;
  right: 4%;
  bottom: 4%;
  width: 140px;
  height: 68px;
  border-bottom: 1px solid rgb(101 67 36 / 20%);
  border-radius: 50%;
  content: "";
  transform: rotate(-9deg);
}

.home-story__page h2 {
  max-width: 570px;
  font-size: clamp(3.4rem, 6vw, 5.75rem);
  line-height: 0.98;
}

.home-story__excerpt {
  max-width: 590px;
  margin-top: 28px;
  color: #55493e;
  font-family: var(--sb-font-display);
  font-size: clamp(1.25rem, 1.75vw, 1.52rem);
  line-height: 1.55;
}

.home-story__page .meta-list {
  margin-top: 28px;
}

.home-story__button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  padding: 13px 22px;
  border: 1px solid #192d31;
  border-radius: 5px;
  color: var(--home-paper-soft);
  background: #12272c;
  box-shadow: 0 8px 20px rgb(26 44 45 / 17%);
  font-family: var(--sb-font-display);
  font-size: 1.15rem;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms var(--sb-ease-out);
}

.home-story__button:hover,
.home-story__button:focus-visible {
  background: #1b383d;
  transform: translateY(-2px);
}

.home-story__character {
  display: block;
  width: fit-content;
  margin-top: 22px;
  color: #744b2f;
  font-size: 0.75rem;
  font-weight: 720;
  letter-spacing: 0.045em;
  text-decoration: none;
}

/* Лавка занимает всю ширину: лес становится продолжением карты. */
.home-shop {
  --home-foliage-open-duration: 2600ms;
  --home-foliage-close-duration: 2100ms;

  position: relative;
  z-index: 2;
  padding-top: clamp(96px, 10vw, 150px);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgb(42 89 79 / 18%), transparent 30%),
    var(--home-deep);
}

.home-shop__heading {
  position: relative;
  z-index: 7;
  max-width: 1200px;
  padding-bottom: clamp(42px, 6vw, 82px);
}

.home-shop__heading h2 {
  max-width: 850px;
  font-size: clamp(3.2rem, 6vw, 5.5rem);
}

.home-shop__heading > p:last-child {
  max-width: 680px;
  margin-top: 25px;
  color: #aab6b2;
  font-size: 1.0625rem;
}

.shop-gate {
  position: relative;
}

.shop-gate__scene {
  position: relative;
  width: 100%;
  min-height: 640px;
  aspect-ratio: 1672 / 941;
  overflow: clip;
  isolation: isolate;
  contain: layout paint;
  background: #050e10;
}

.shop-gate__scene::after {
  position: absolute;
  z-index: 5;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(3 13 16 / 32%), transparent 27%, transparent 69%, rgb(3 13 16 / 63%)),
    linear-gradient(90deg, rgb(3 13 16 / 35%), transparent 22%, transparent 78%, rgb(3 13 16 / 35%));
  content: "";
  pointer-events: none;
}

.shop-gate__house {
  position: absolute;
  z-index: 0;
  inset: 0;
}

.shop-gate__house img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.shop-gate__door {
  position: absolute;
  z-index: 8;
  top: 43%;
  left: 47.1%;
  width: 9.4%;
  height: 27%;
  border-radius: 6px 6px 18px 18px;
  text-decoration: none;
}

.shop-gate__door-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.shop-gate__door-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-gate__door::before {
  position: absolute;
  z-index: 2;
  inset: -8px;
  border: 1px solid transparent;
  border-radius: 9px 9px 21px 21px;
  background: transparent;
  content: "";
  transition: border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.shop-gate__door span {
  position: absolute;
  z-index: 3;
  top: calc(100% + 17px);
  left: 50%;
  width: max-content;
  padding: 8px 13px;
  border: 1px solid rgb(228 181 101 / 49%);
  border-radius: 999px;
  color: var(--home-deep);
  background: #ddb263;
  font-size: 0.6875rem;
  font-weight: 760;
  opacity: 0;
  transform: translate3d(-50%, 7px, 0);
  transition: opacity 180ms ease, transform 180ms var(--sb-ease-out);
}

.shop-gate__door:hover::before,
.shop-gate__door:focus-visible::before,
.shop-gate.is-door-open .shop-gate__door::before {
  border-color: rgb(255 218 150 / 81%);
  background: rgb(255 186 72 / 7%);
  box-shadow: 0 0 34px rgb(255 183 73 / 18%);
}

.shop-gate__door:hover span,
.shop-gate__door:focus-visible span {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.shop-gate.is-door-ready .shop-gate__door:hover .shop-gate__door-image,
.shop-gate.is-door-ready .shop-gate__door:focus-visible .shop-gate__door-image,
.shop-gate.is-door-open .shop-gate__door-image {
  opacity: 1;
}

.shop-gate__curtain {
  position: absolute;
  z-index: 4;
  top: 50%;
  height: 164%;
  aspect-ratio: 2 / 3;
  pointer-events: none;
  transition-property: transform;
  transition-duration: var(--home-foliage-close-duration);
  transition-timing-function: cubic-bezier(0.4, 0, 0.25, 1);
  user-select: none;
}

.shop-gate__curtain img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.shop-gate__curtain--left {
  left: -16%;
  transform: translate3d(15%, -50%, 0) scale(1.05);
  transform-origin: left center;
}

.shop-gate__curtain--right {
  right: -16%;
  transform: translate3d(-15%, -50%, 0) scale(1.05);
  transform-origin: right center;
}

.shop-gate.is-revealed .shop-gate__curtain {
  transition-duration: var(--home-foliage-open-duration);
}

.shop-gate.is-revealed .shop-gate__curtain--left {
  transform: translate3d(-28%, -50%, 0) scale(1.19);
}

.shop-gate.is-revealed .shop-gate__curtain--right {
  transform: translate3d(28%, -50%, 0) scale(1.19);
}

.home-shop__mobile-entry {
  display: none;
}

/* Ассортимент и происхождение живут на одном листе: важное идёт первым. */
.home-goods {
  position: relative;
  z-index: 4;
  padding-block: clamp(102px, 11vw, 164px) clamp(88px, 10vw, 142px);
  color: var(--home-ink);
  background:
    radial-gradient(circle at 86% 12%, rgb(170 118 58 / 8%), transparent 25%),
    linear-gradient(180deg, var(--home-paper-soft), var(--home-paper));
}

.home-goods::before {
  position: absolute;
  top: -68px;
  right: -3%;
  left: -3%;
  height: 90px;
  background: var(--home-paper-soft);
  clip-path: polygon(0 60%, 9% 46%, 22% 62%, 37% 38%, 54% 55%, 71% 34%, 86% 51%, 100% 28%, 100% 100%, 0 100%);
  content: "";
}

.home-goods__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  align-items: end;
  gap: 54px;
  margin-bottom: clamp(44px, 6vw, 76px);
}

.home-goods__heading h2 {
  max-width: 680px;
}

.home-goods__heading > p:last-of-type {
  max-width: 620px;
  margin: 0;
  color: #5c5145;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.home-goods__all {
  width: fit-content;
  margin-top: 18px;
  color: #754b2c;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-decoration: none;
}

.home-goods__products {
  min-height: 220px;
}

.home-goods__empty {
  padding-block: 34px;
  border-top: 1px solid rgb(50 40 29 / 15%);
  border-bottom: 1px solid rgb(50 40 29 / 15%);
  color: #675b4d;
}

.home-origin {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(50px, 8vw, 116px);
  margin-top: clamp(78px, 10vw, 132px);
  padding-top: clamp(54px, 7vw, 88px);
  border-top: 1px solid rgb(52 42 30 / 18%);
}

.home-origin h2 {
  font-size: clamp(2.8rem, 4.6vw, 4rem);
}

.home-origin > div:last-child {
  max-width: 680px;
  padding-top: 7px;
  color: #554a3e;
  font-size: 1.0625rem;
}

.home-origin a {
  display: inline-flex;
  gap: 10px;
  margin-top: 25px;
  color: #754b2c;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-decoration: none;
}

/* Reveal включается JS только после создания observer: при ошибке JS контент виден. */
html.home-reveal-ready [data-home-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 700ms ease, transform 850ms var(--sb-ease-out);
}

html.home-reveal-ready [data-home-reveal].is-home-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@keyframes home-fog-drift {
  from {
    transform: translate3d(-1.1%, 0, 0) scale(1.025);
  }

  to {
    transform: translate3d(1.1%, -1%, 0) scale(1.045);
  }
}

@keyframes home-stars-breathe {
  from {
    opacity: 0.25;
  }

  to {
    opacity: 0.72;
  }
}

@keyframes home-owl-float {
  0%,
  100% {
    transform: translate3d(0, -4px, 0) rotate(-0.4deg);
  }

  50% {
    transform: translate3d(0, 8px, 0) rotate(0.55deg);
  }
}

@keyframes home-lantern-glow {
  0%,
  100% {
    opacity: 0.56;
    transform: translate3d(-50%, -50%, 0) scale(0.92);
  }

  50% {
    opacity: 0.94;
    transform: translate3d(-50%, -50%, 0) scale(1.07);
  }
}

html[data-motion="reduced"] .home-hero__fog img,
html[data-motion="reduced"] .home-hero__stars,
html[data-motion="reduced"] .home-hero__flight,
html[data-motion="reduced"] .home-hero__flight::after {
  animation: none;
}

html[data-motion="reduced"] .shop-gate__curtain--left {
  transform: translate3d(-28%, -50%, 0) scale(1.19);
}

html[data-motion="reduced"] .shop-gate__curtain--right {
  transform: translate3d(28%, -50%, 0) scale(1.19);
}

html[data-motion="reduced"].home-reveal-ready [data-home-reveal] {
  opacity: 1;
  transform: none;
}

/* Firefox: сохраняем заметное размытие шапки, но уменьшаем радиус фильтра.
 * Движение полноэкранного тумана отключается — это самый дорогой слой сцены. */
@supports (-moz-appearance: none) {
  body.home .site-header {
    background: rgb(3 13 16 / 72%);
    -webkit-backdrop-filter: blur(3px) saturate(108%);
    backdrop-filter: blur(3px) saturate(108%);
  }

  .home-hero__fog img {
    animation: none;
  }
}

@media (min-width: 1600px) {
  .home-hero__flight {
    width: min(100%, 620px);
  }

  .home-story__visual {
    margin-left: -6vw;
  }
}

@media (max-width: 1120px) {
  .home-hero__layout {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 0.55fr);
  }

  .home-hero__flight {
    width: 450px;
  }

  .home-story__spread {
    grid-template-columns: 1fr 0.85fr;
  }

  .home-story__spread::after {
    left: 54.1%;
  }

  .shop-gate__scene {
    min-height: 560px;
  }
}

@media (max-width: 900px) {
  body.home .site-header {
    background: rgb(3 13 16 / 88%);
  }

  .home-hero,
  .home-hero__layout {
    min-height: max(740px, 100svh);
  }

  .home-hero__backdrop img {
    object-position: center 58%;
  }

  .home-hero__shade {
    background:
      linear-gradient(180deg, rgb(1 8 11 / 28%), rgb(1 8 11 / 65%) 49%, rgb(1 8 11 / 96%) 91%),
      radial-gradient(circle at 68% 28%, var(--home-season-glow), transparent 34%);
  }

  .home-hero__fog {
    right: -24%;
    bottom: 0;
    left: -24%;
    height: 53%;
  }

  .home-hero__layout {
    grid-template-columns: 1fr;
    align-content: end;
    padding-block: calc(var(--sb-header-height) + 86px) 92px;
  }

  .home-hero__content {
    max-width: 720px;
  }

  .home-hero__content h1 {
    max-width: 660px;
    font-size: clamp(4.2rem, 13vw, 6.6rem);
  }

  .home-hero__flight {
    position: absolute;
    top: 10%;
    right: -4%;
    width: min(48vw, 390px);
    opacity: 0.87;
  }

  .home-season-note {
    inset: calc(var(--sb-header-height) + 24px) auto auto 18px;
  }

  .home-path {
    min-height: auto;
  }

  .home-path__intro {
    width: min(680px, 88%);
  }

  .home-path__points {
    gap: 82px 74px;
  }

  .home-waypoint--world {
    margin-top: -80px;
  }

  .home-waypoint--about {
    margin-left: 0;
  }

  .home-story::before {
    top: 6%;
    bottom: 4%;
  }

  .home-story__spread {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .home-story__spread::after {
    display: none;
  }

  .home-story__visual {
    width: min(100%, 760px);
    margin: 0 auto;
  }

  .home-story__visual img {
    min-height: 0;
  }

  .home-story__page {
    width: min(720px, 100%);
    padding: 42px 28px 68px;
    margin-inline: auto;
  }

  .shop-gate__scene {
    min-height: 0;
    aspect-ratio: 2 / 3;
  }

  .shop-gate__door {
    top: 44%;
    left: 43.5%;
    width: 19.5%;
    height: 25%;
  }

  .shop-gate__curtain {
    height: 132%;
  }

  .shop-gate__curtain--left {
    left: -29%;
    transform: translate3d(19%, -50%, 0) scale(1.03);
  }

  .shop-gate__curtain--right {
    right: -29%;
    transform: translate3d(-19%, -50%, 0) scale(1.03);
  }

  .shop-gate.is-revealed .shop-gate__curtain--left,
  html[data-motion="reduced"] .shop-gate__curtain--left {
    transform: translate3d(-37%, -50%, 0) scale(1.16);
  }

  .shop-gate.is-revealed .shop-gate__curtain--right,
  html[data-motion="reduced"] .shop-gate__curtain--right {
    transform: translate3d(37%, -50%, 0) scale(1.16);
  }

  .home-goods__heading,
  .home-origin {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .home-goods__heading > p:last-of-type {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 700px) {
  .home-hero__content h1 {
    line-height: 0.9;
  }

  .home-path {
    padding-block: 92px 116px;
  }

  .home-path__intro {
    width: 100%;
  }

  .home-path__points {
    display: grid;
    gap: 54px;
    padding-left: 22px;
    margin-top: 68px;
  }

  .home-path__points::before {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 5px;
    border-left: 1px dashed rgb(203 176 119 / 27%);
    content: "";
  }

  .home-waypoint,
  .home-waypoint--world,
  .home-waypoint--about,
  .home-waypoint--shop {
    max-width: 440px;
    justify-self: start;
    margin: 0;
  }

  .home-path__trail {
    display: none;
  }

  .home-story::before {
    right: -18%;
    left: -18%;
  }

  .home-story__page {
    padding-inline: 12px;
  }

  .home-shop__heading h2 {
    font-size: clamp(2.8rem, 11vw, 4rem);
  }
}

@media (max-width: 620px) {
  .home-hero__layout {
    padding-bottom: 78px;
  }

  .home-hero__content .eyebrow {
    max-width: 250px;
    margin-bottom: 14px;
  }

  .home-hero__content h1 {
    max-width: 520px;
    font-size: clamp(3.75rem, 18vw, 5.2rem);
  }

  .home-hero__promise {
    max-width: 95%;
    margin-top: 23px;
    font-size: 1.0625rem;
  }

  .home-hero__actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-top: 23px;
  }

  .home-hero__flight {
    top: 12%;
    right: -12%;
    width: 62vw;
    opacity: 0.76;
  }

  .home-hero__continue {
    bottom: 19px;
  }

  .home-season-note {
    max-width: 210px;
    font-size: 0.58rem;
  }

  .home-path__intro h2 {
    font-size: clamp(2.75rem, 12vw, 3.8rem);
  }

  .home-story {
    padding-block: 80px 96px;
  }

  .home-story::before {
    top: 4%;
    bottom: 3%;
    clip-path: polygon(0 4%, 54% 0, 100% 4%, 98% 96%, 45% 100%, 0 95%);
  }

  .home-story__visual {
    width: calc(100% + 20px);
    margin-left: -10px;
    clip-path: polygon(2% 3%, 98% 0, 100% 95%, 4% 100%, 0 84%);
  }

  .home-story__page h2 {
    font-size: clamp(3rem, 15vw, 4.35rem);
  }

  .home-story__excerpt {
    font-size: 1.2rem;
  }

  .home-story__button {
    width: 100%;
    justify-content: center;
  }

  .home-shop {
    padding-top: 82px;
  }

  .home-shop__heading {
    padding-bottom: 36px;
  }

  .shop-gate__door span {
    display: none;
  }

  .home-shop__mobile-entry {
    display: inline-flex;
    width: calc(100% - 36px);
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 22px 18px 0;
    border: 1px solid rgb(222 177 99 / 58%);
    border-radius: 4px;
    color: var(--home-paper-soft);
    background: rgb(222 177 99 / 8%);
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .home-goods::before {
    top: -44px;
    height: 58px;
  }

  .home-goods__heading h2,
  .home-origin h2 {
    font-size: clamp(2.65rem, 12vw, 3.6rem);
  }
}

@media (max-width: 380px) {
  .home-hero__content h1 {
    font-size: 3.55rem;
  }

  .home-waypoint {
    padding-left: 30px;
  }

  .home-story__page {
    padding-inline: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) .home-hero__fog img,
  html:not([data-motion="full"]) .home-hero__stars,
  html:not([data-motion="full"]) .home-hero__flight,
  html:not([data-motion="full"]) .home-hero__flight::after {
    animation: none;
  }

  html:not([data-motion="full"]).home-reveal-ready [data-home-reveal] {
    opacity: 1;
    transform: none;
  }
}
