/* ========================================
   HOME / DESKTOP
======================================== */
.page-home {
  display: flex;
  align-items: center;
}

.hero {
  width: 100%;
  max-width: 1120px;
}

.hero-lockup {
  display: inline-block;
  transform: translateY(50px);
}

.hero-kicker {
  margin: 0;
  width: max-content;
  max-width: none;
  font-size: 12px;
  letter-spacing: 0.22em;
  line-height: 1.35;
  opacity: 1;
  transform: translateY(100px);
}

.hero-title {
  margin: -2px 0 0;
  width: max-content;
  max-width: none;
  font-size: clamp(48px, 7.8vw, 108px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.03em;
  transform: translateY(100px);
}

/* 共通の緑帯 */
.hero-line {
  display: inline-block;
  position: relative;
  padding: 4px 14px 4px 6px;
  background: #39ff14;
}

/* 左へ画面外まで伸ばす */
.hero-line::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100vw;
  width: 100vw;
  background: #39ff14;
}

/* 上2行 */
.hero-line--k1,
.hero-line--k2 {
  padding-right: 18px;
}

/* タイトル1行目 */
.hero-line--t1 {
  padding-right: 24px;
}

/* タイトル2行目 */
.hero-line--t2 {
  padding-right: 18px;
}

/* ----------------------------------------
   DESKTOP ONLY:
   タイトル2行を右にも伸ばして一塊化
---------------------------------------- */
@media (min-width: 641px) {
  .hero-title {
    position: relative;
    display: inline-block;
    isolation: isolate;
    padding: 4px 24px 4px 6px;
  }

  .hero-title::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -100vw;
    right: -100vw;
    background: #39ff14;
    z-index: -1;
  }

  .hero-line--t1,
  .hero-line--t2 {
    background: transparent;
    padding: 0;
  }

  .hero-line--t1::before,
  .hero-line--t2::before,
  .hero-line--t1::after,
  .hero-line--t2::after {
    content: none;
  }
}

/* ========================================
   HOME / MOBILE
======================================== */
:root {
  --home-topbar-h: 68px;
}

@media (max-width: 640px) {
  .page.page-home,
  .page-home {
    position: relative;
    display: block;
    width: 100vw !important;
    height: 100dvh;
    min-height: 100dvh !important;
    margin: 0 !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 0 !important;
    overflow: hidden;
  }

  .home-scroll {
    width: 100vw;
    height: 100dvh;
    box-sizing: border-box;
    padding-top: 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scroll-padding-top: 0;
  }

  .hero {
    width: 100vw;
    max-width: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .home-archive {
    display: block;
    position: relative;
    width: 100vw;
    margin: 0 !important;
    padding: 0 !important;
    left: auto;
    z-index: 1;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .hero > .home-archive + .home-archive {
    margin-top: 0 !important;
  }

  .home-archive__visual {
    position: relative;
    display: block;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    color: #000;
    background: #d0d0d0;
  }

  .home-archive__image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(-1 * env(safe-area-inset-bottom)) !important;
    width: 100% !important;
    height: calc(100% + env(safe-area-inset-bottom)) !important;
    display: block;
    object-fit: cover !important;
    filter: blur(4px);
  }

  /* 1枚目 : STOCK */
  .home-archive--stock .home-archive__image {
    object-position: center top !important;
    transform-origin: center top !important;
    transform: scale(1.08) !important;
  }

  .home-archive--stock .home-archive__overlay {
    mix-blend-mode: difference;
    -webkit-mix-blend-mode: difference;
  }

  .home-archive--stock .home-archive__title,
  .home-archive--stock .home-archive__link {
    color: #fff !important;
  }

  .home-archive--stock .home-archive__link::after {
    background: #fff !important;
    opacity: 0.5;
  }

  /* 2枚目 : FULL CUSTOM */
  .home-archive--custom .home-archive__visual {
    background: #b7c9b9;
  }

  .home-archive--custom .home-archive__overlay {
    mix-blend-mode: difference;
    -webkit-mix-blend-mode: difference;
  }

  .home-archive--custom .home-archive__title,
  .home-archive--custom .home-archive__link {
    color: #fff !important;
  }

  .home-archive--custom .home-archive__link::after {
    background: #fff !important;
    opacity: 0.5;
  }

  /* 3枚目 : SOUNDPACK */
  .home-archive--soundpack .home-archive__image {
    object-position: left top !important;
    transform-origin: left top !important;
    transform: scale(1.05) !important;
  }

  /* 4枚目 : SESSION */
  .home-archive--session .home-archive__image {
    object-position: center top !important;
    transform-origin: center top !important;
    transform: scale(1.05) !important;
  }

  .home-archive__overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: min(72vw, 260px);
    text-align: center;
    z-index: 2;
  }

  .home-archive__title {
    margin: 0 0 16px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
  }

  .home-archive__link {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    font-size: 10px;
    letter-spacing: 0.14em;
    line-height: 1;
    border-bottom: 0;
  }

  .home-archive__link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 72px;
    height: 1px;
    background: rgba(0, 0, 0, 0.9);
    transform: translateX(-50%);
    opacity: 0.25;
    animation: viewmoreLineBlink 1.8s ease-in-out infinite;
  }

  @keyframes viewmoreLineBlink {
    0% { opacity: 0; }
    50% { opacity: 0.7; }
    100% { opacity: 0.2; }
  }

  .topbar {
    z-index: 3000;
  }

  .hero-lockup {
    position: fixed !important;
    left: 0;
    bottom: 190px;
    z-index: 30;
    transform: none !important;
    margin-top: 0 !important;
    pointer-events: none;
  }

  .hero-kicker {
    margin: 0;
    width: max-content;
    max-width: none;
    font-size: 13px;
    letter-spacing: 0.1em;
    line-height: 1.28;
    opacity: 1;
  }

  .hero-title {
    margin: 0;
    width: max-content;
    max-width: none;
    font-size: clamp(55px, 15vw, 80px);
    line-height: 0.94;
  }

  .hero-line {
    padding: 3px 10px 3px 4px;
  }

  .hero-line--k1,
  .hero-line--k2 {
    padding-right: 12px;
  }

  .hero-line--t1 {
    padding-right: 16px;
  }

  .hero-line--t2 {
    padding-right: 12px;
  }

  body.is-home .site-logo::before,
  body.is-home .site-logo::after,
  body.is-home .topbar-nav__home::before,
  body.is-home .topbar-nav__home::after {
    content: none !important;
    display: none !important;
  }

  body.is-home .site-logo,
  body.is-home .topbar-nav__home {
    border-bottom: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
  }

  /* ========================================
   HOME / TOPBAR MODE SWITCH
======================================== */

body.is-home .topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  isolation: isolate;
  background: transparent !important;
  backdrop-filter: none !important;
}

body.is-home .topbar > * {
  position: relative;
  z-index: 3;
}

/* 通常時だけ difference */
body.is-home:not(.drawer-open):not(.drawer-closing) .topbar {
  mix-blend-mode: difference !important;
  -webkit-mix-blend-mode: difference !important;
}

body.is-home:not(.drawer-open):not(.drawer-closing) .site-logo,
body.is-home:not(.drawer-open):not(.drawer-closing) .topbar-nav a,
body.is-home:not(.drawer-open):not(.drawer-closing) .menu-button {
  color: #fff !important;
}

body.is-home:not(.drawer-open):not(.drawer-closing) .menu-button span {
  background: #fff !important;
}

/* topbar のグレー板だけ */
body.is-home .topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #d0d0d0;
  transform: translateX(100%);
  transition: transform 0.45s ease;
  z-index: 1;
  pointer-events: none;
}

/* 開いている時だけ右から左へ */
body.is-home.drawer-open .topbar::before {
  transform: translateX(0);
}

/* 閉じる途中も黒文字維持 */
body.is-home:is(.drawer-open, .drawer-closing) .topbar {
  mix-blend-mode: normal !important;
  -webkit-mix-blend-mode: normal !important;
}

body.is-home:is(.drawer-open, .drawer-closing) .site-logo,
body.is-home:is(.drawer-open, .drawer-closing) .topbar-nav a,
body.is-home:is(.drawer-open, .drawer-closing) .menu-button {
  color: #000 !important;
}

body.is-home:is(.drawer-open, .drawer-closing) .menu-button span {
  background: #000 !important;
}

/* 緑帯は開いている時だけ */
body.is-home .site-logo {
  display: inline-block !important;
  position: relative !important;
  padding: 0 2px !important;
  background-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 50%,
    #39ff14 50%,
    #39ff14 74%,
    transparent 74%,
    transparent 100%
  ) !important;
  background-repeat: no-repeat !important;
  background-position: 100% 0 !important;
  background-size: 0% 100% !important;
  transition: background-size 0.28s ease !important;
}

body.is-home:not(.drawer-open):not(.drawer-closing) .site-logo {
  background-size: 0% 100% !important;
}

body.is-home.drawer-open .site-logo {
  background-size: 100% 100% !important;
}


.hero-lockup {
  display: none !important;
}
}