.header--home {
  min-height: clamp(38rem, 88vh, 60rem);
  align-items: center;
}

.home-hero-content {
  position: relative;
  top: auto;
  left: auto;
  width: min(100%, 86rem);
  min-height: auto;
  padding: clamp(4rem, 9vh, 6.5rem) clamp(1rem, 4vw, 2rem) clamp(2.75rem, 7vh, 4.5rem);
  transform: translateY(7%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.85rem, 2vh, 1.5rem);
  text-align: center;
  border-radius: 0;
}

.header .home-hero-content {
  top: auto;
  left: auto;
}

.home-title {
  font-size: 5.35rem;
  line-height: 1.02;
  margin-top: 0;
  max-width: 100%;
  color: #20130c;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 0.35ch;
  row-gap: 0.08em;
  text-wrap: unset;
}

.home-title__line {
  display: block;
  white-space: nowrap;
}

.home-subtitle {
  font-size: 2.35rem;
  line-height: 1.12;
  margin-top: 0;
  max-width: 100%;
  color: #20130c;
  white-space: normal;
  text-wrap: balance;
}

@media (min-width: 769px) {
  .home-subtitle--primary,
  .home-subtitle--primary + .home-divider,
  .home-subtitle--primary + .home-divider + .home-subtitle {
    transform: translateY(-2.0rem);
  }

  .home-subtitle--primary,
  .home-subtitle--secondary {
    width: min(100%, 90ch);
    max-width: 90ch;
    margin-inline: auto;
  }

  .home-subtitle--secondary {
    text-wrap: unset;
  }
}

.home-divider {
  width: min(100%, 28rem);
  height: 1px;
  margin: 0.15rem auto;
  background: rgba(32, 19, 12, 0.55);
}

.article-text-color-shadow.home-title,
.article-text-color-shadow.home-subtitle,
.article-text-color-shadow.home-contact {
  color: #20130c;
  text-shadow: none;
}

.home-contact {
  font-size: 1.15rem;
  line-height: 1.3;
  margin-top: clamp(0.5rem, 3vh, 1.5rem);
  color: var(--rcqrc-title);
}

.home-logo-wrap {
  width: 100%;
  padding: 1rem 0 3rem;
}

.home-logo {
  width: min(62vw, 22.5rem);
}

.page-home .grid-container {
  grid-template-columns: repeat(2, minmax(0, 38.5rem));
  width: fit-content;
  max-width: min(100%, 77rem);
  margin-inline: auto;
  justify-content: center;
}

.page-home .devstage-video-scene {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(env(safe-area-inset-top, 0px) + 1.25rem)
    calc(env(safe-area-inset-right, 0px) + 1.25rem)
    calc(env(safe-area-inset-bottom, 0px) + 1.5rem)
    calc(env(safe-area-inset-left, 0px) + 1.25rem);
  background:
    radial-gradient(circle at top left, rgba(182, 114, 74, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(10, 8, 7, 0.92), rgba(4, 4, 5, 0.97));
  z-index: calc(var(--rcqrc-z-fullscreen) + 2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 260ms ease,
    visibility 260ms ease;
}

.page-home .devstage-video-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 229, 204, 0.12), transparent 0 22%),
    radial-gradient(circle at 82% 78%, rgba(197, 132, 94, 0.14), transparent 0 24%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.35));
  backdrop-filter: blur(18px);
}

.page-home .devstage-video-scene.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.page-home .devstage-video-scene__layout {
  position: relative;
  display: grid;
  grid-template-columns: min(44vw, 36rem) clamp(10rem, 18vw, 15rem);
  gap: clamp(0.85rem, 1.6vw, 1.4rem);
  width: fit-content;
  max-width: min(100%, 88rem);
  height: min(100%, 94dvh);
  z-index: 1;
  transform: translateY(2rem) scale(0.985);
  opacity: 0;
  transition:
    transform 360ms cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 260ms ease;
}

.page-home .devstage-video-scene.is-open .devstage-video-scene__layout {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.page-home .devstage-video-scene__close {
  position: absolute;
  top: 1rem;
  right: calc(clamp(10rem, 18vw, 15rem) + clamp(1.2rem, 2vw, 1.8rem));
  z-index: 3;
  pointer-events: auto;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(248, 241, 235, 0.24);
  border-radius: 999px;
  background: rgba(16, 10, 8, 0.78);
  color: #f8f1eb;
  font: 700 0.84rem/1 "Manrope", sans-serif;
  letter-spacing: 0.03em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.34);
  transition:
    background 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.page-home .devstage-video-scene__close:hover,
.page-home .devstage-video-scene__close:focus-visible {
  background: rgba(32, 19, 12, 0.92);
  transform: translateY(-1px);
  box-shadow: 0 1.15rem 2.7rem rgba(0, 0, 0, 0.4);
  outline: none;
}

.page-home .devstage-video-scene__stack {
  display: grid;
  gap: clamp(0.85rem, 1.6vw, 1.4rem);
}

.page-home .devstage-video-slot {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(57, 37, 29, 0.9), rgba(20, 15, 12, 0.95));
  box-shadow:
    0 1.25rem 3rem rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(248, 241, 235, 0.12);
  cursor: pointer;
  transition:
    transform 240ms ease,
    box-shadow 240ms ease,
    filter 240ms ease;
}

.page-home .devstage-video-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(248, 241, 235, 0.16);
  pointer-events: none;
  z-index: 2;
}

.page-home .devstage-video-slot--main {
  min-height: min(78dvh, 52rem);
  border-radius: 2rem;
}

.page-home .devstage-video-slot--side {
  min-height: clamp(13rem, 34dvh, 23rem);
  border-radius: 1.4rem;
}

.page-home .devstage-video-slot > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  backface-visibility: hidden;
  transform-origin: top left;
}

.page-home .devstage-video-scene[data-active-scene-group="home-action"] .devstage-video-slot {
  background: #050505;
}

.page-home .devstage-video-scene[data-active-scene-group="home-action"] .devstage-video-slot > video {
  object-fit: contain;
  background: #050505;
}

.page-home .devstage-video-scene[data-active-scene-group="home-setup"] .devstage-video-slot--main {
  background: #050505;
}

.page-home .devstage-video-scene[data-active-scene-group="home-setup"] .devstage-video-slot--main > video {
  object-fit: contain;
  background: #050505;
}

.page-home .devstage-video-slot--main:hover {
  box-shadow:
    0 1.6rem 3.5rem rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(248, 241, 235, 0.18);
}

.page-home .devstage-video-slot--side:hover {
  transform: translateY(-0.25rem) scale(1.015);
  filter: brightness(1.04);
  box-shadow:
    0 1.5rem 3rem rgba(0, 0, 0, 0.44),
    inset 0 0 0 1px rgba(248, 241, 235, 0.18);
}

.page-home .devstage-video-scene__hint {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
  width: min(92vw, 30rem);
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(16, 10, 8, 0.72);
  color: #f3e7de;
  text-align: center;
  font: 600 0.88rem/1.2 "Manrope", sans-serif;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateX(-50%) translateY(0.45rem);
  transition:
    opacity 260ms ease 80ms,
    transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1) 80ms;
  z-index: 1;
}

.page-home .devstage-video-scene.is-open .devstage-video-scene__hint {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.page-home .devstage-video-scene__pool {
  display: none;
}

body.fullscreen-video-open.page-home {
  overflow: hidden;
}

@media (min-width: 1024px) and (max-width: 1440px) {
  .home-title {
    font-size: 4.65rem;
  }

  .home-subtitle {
    font-size: 2.05rem;
    max-width: 100%;
  }
}

@media (max-width: 1100px) {
  .header--home {
    min-height: clamp(36rem, 86vh, 54rem);
  }

  .home-hero-content {
    width: min(100%, 64rem);
    transform: translateY(6%);
  }

  .home-title {
    font-size: 4rem;
  }

  .home-subtitle {
    font-size: 1.8rem;
    max-width: 34ch;
  }

  .home-divider {
    width: min(100%, 24rem);
  }

  .home-contact {
    font-size: 1rem;
  }

  .home-logo {
    width: min(48vw, 17rem);
  }
}

@media (max-width: 768px) {
  .header--home {
    min-height: clamp(34rem, 84vh, 46rem);
  }

  .home-hero-content {
    width: min(100%, 38rem);
    padding: 4.25rem 1rem 2.75rem;
    gap: 0.75rem;
    transform: translateY(5%);
  }

  .home-title {
    font-size: 2.75rem;
    line-height: 1.05;
    row-gap: 0.12em;
  }

  .home-logo-wrap {
    padding: 0.6rem 0 1.5rem;
  }

  .home-logo {
    width: min(42vw, 12rem);
  }

  .home-subtitle {
    font-size: 1.45rem;
    max-width: 29ch;
    white-space: normal;
    text-wrap: balance;
  }

  .home-divider {
    width: min(100%, 20rem);
  }

  .home-contact {
    font-size: 0.92rem;
    margin-top: 0.35rem;
  }

  .article-text-color-shadow.home-title,
  .article-text-color-shadow.home-subtitle,
  .article-text-color-shadow.home-contact {
    color: #20130c;
    text-shadow: none;
  }

  .page-home .grid-container {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .page-home .devstage-video-scene {
    padding:
      calc(env(safe-area-inset-top, 0px) + 0.85rem)
      calc(env(safe-area-inset-right, 0px) + 0.85rem)
      calc(env(safe-area-inset-bottom, 0px) + 1.1rem)
      calc(env(safe-area-inset-left, 0px) + 0.85rem);
  }

  .page-home .devstage-video-scene__layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    width: min(100%, 34rem);
    height: min(100%, 92dvh);
  }

  .page-home .devstage-video-scene__close {
    top: 0.8rem;
    right: 0.8rem;
    min-height: 2.5rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.76rem;
  }

  .page-home .devstage-video-scene__stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
    margin-top: clamp(0rem, 1vh, 0rem);
  }

  .page-home .devstage-video-slot--main {
    min-height: min(69.3dvh, 46.2rem);
    max-width: none;
    justify-self: stretch;
    border-radius: 1.5rem;
  }

  .page-home .devstage-video-slot--side {
    min-height: clamp(10rem, 24dvh, 14rem);
    border-radius: 1.1rem;
  }

  .page-home .devstage-video-slot--side:hover {
    transform: none;
    filter: none;
  }

  .page-home .devstage-video-scene__hint {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .header--home {
    min-height: clamp(31rem, 82vh, 42rem);
  }

  .home-hero-content {
    width: 100%;
    padding: 3.75rem 0.75rem 2rem;
    gap: 0.55rem;
    transform: translateY(4%);
  }

  .home-title {
    font-size: 1.9rem;
    line-height: 1.08;
  }

  .home-logo-wrap {
    padding: 0.4rem 0 1rem;
  }

  .home-logo {
    width: min(44vw, 8.75rem);
  }

  .home-subtitle {
    font-size: 1.18rem;
    line-height: 1.16;
    max-width: 29ch;
  }

  .home-divider {
    width: min(100%, 16rem);
    margin: 0.05rem auto;
  }

  .home-contact {
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .article-text-color-shadow.home-title,
  .article-text-color-shadow.home-subtitle,
  .article-text-color-shadow.home-contact {
    color: #20130c;
    text-shadow: none;
  }

  .page-home .devstage-video-scene__layout {
    width: 100%;
  }

  .page-home .devstage-video-scene__close {
    top: 0.7rem;
    right: 0.7rem;
    min-height: 2.35rem;
    padding: 0.6rem 0.82rem;
    font-size: 0.72rem;
  }

  .page-home .devstage-video-slot--main {
    min-height: min(63.8dvh, 37.4rem);
    max-width: none;
    justify-self: stretch;
  }

  .page-home .devstage-video-slot--side {
    min-height: clamp(8.5rem, 21dvh, 11rem);
  }

  .page-home .devstage-video-scene__hint {
    width: min(92vw, 22rem);
    padding: 0.7rem 0.85rem;
  }
}
