/* =========================================================
   HQ Background: Layout
   key: header-axis
   name: Header｜Axisブランドヘッダー
   group: partial
   type: layout
   layer: header
   ========================================================= */

/* =========================================================
   Axis Header
   ========================================================= */

.p-axis-header {
  --axis-symbol-top: 10%;
  --axis-name-bottom: 24%;

  --axis-symbol-width: 78px;
  --axis-wordmark-width: 360px;
  --axis-name-size: 22px;

  position: relative;
  min-height: 100svh;
  background-color: #1f2f53;
  overflow: hidden;
}

/* パターン（回転＋拡張） */
.p-axis-header::before {
  content: "";
  position: absolute;
  inset: -50%;
  z-index: 0;

  background: linear-gradient(
    to right,
    #c28f4b 0%,
    #e0b96e 50%,
    #c28f4b 100%
  );
  opacity: 0.90;

  -webkit-mask-image: url("../../../site/assets/img/karamatsu-pattern-45.svg");
  mask-image: url("../../../site/assets/img/karamatsu-pattern-45.svg");

  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;

  -webkit-mask-size: 32px 28px;
  mask-size: 32px 28px;

  transform: rotate(45deg);
  pointer-events: none;
}

/* 光のにじみ */
.p-axis-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;

  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(224, 185, 110, 0.18) 0%,
      rgba(224, 185, 110, 0.07) 26%,
      rgba(224, 185, 110, 0) 58%
    );

  pointer-events: none;
}

/* コンテンツ層 */
.p-axis-header__inner {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  padding: 0 24px;
}

/* ロゴ群 */
.p-axis-header__logo {
  display: contents;
}

/* 黒SVG → 白化 */
.p-axis-header__symbol,
.p-axis-header__wordmark {
  display: block;
  height: auto;
}

/* Symbol：上部の神紋 */
.p-axis-header__symbol {
  position: absolute;
  left: 50%;
  top: var(--axis-symbol-top);

  width: var(--axis-symbol-width);

  filter:
    invert(1)
    sepia(0.26)
    saturate(1.8)
    drop-shadow(0 0 12px rgba(224, 185, 110, 0.56))
    drop-shadow(0 0 34px rgba(224, 185, 110, 0.24));
}

/* Wordmark：画面中央に固定 */
.p-axis-header__wordmark {
  position: absolute;
  left: 50%;
  top: 50%;

  width: var(--axis-wordmark-width);
  max-width: 84vw;

  filter:
    invert(1)
    drop-shadow(0 0 1px rgba(196, 82, 92, 0.68))
    drop-shadow(0 0 18px rgba(196, 82, 92, 0.22));
}

/* 店名：下部の土台 */
.p-axis-header__name {
  position: absolute;
  left: 50%;
  bottom: var(--axis-name-bottom);

  margin: 0;

  color: #fff;
  font-size: var(--axis-name-size);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.20em;
  white-space: nowrap;

  text-shadow:
    0 0 12px rgba(224, 185, 110, 0.48),
    0 0 30px rgba(224, 185, 110, 0.22);
}

/* =========================================================
   Axis Header Motion
   FirstLook
   ========================================================= */

.p-axis-header__symbol {
  opacity: 0;
  transform: translate(-50%, -28px) scale(0.82);
  animation: axisSymbolIn 2800ms cubic-bezier(0.16, 1, 0.3, 1) 180ms forwards;
}

.p-axis-header__wordmark {
  opacity: 0;
  transform: translate(-50%, calc(-50% + 28px)) scale(0.88);
  animation: axisWordmarkIn 3000ms cubic-bezier(0.16, 1, 0.3, 1) 1800ms forwards;
}

.p-axis-header__name {
  opacity: 0;
  transform: translate(-50%, 24px);
  animation: axisNameIn 2600ms cubic-bezier(0.16, 1, 0.3, 1) 1550ms forwards;
}

@keyframes axisSymbolIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -28px) scale(0.82);
    filter:
      invert(1)
      blur(2px)
      sepia(0)
      saturate(1)
      drop-shadow(0 0 0 rgba(224, 185, 110, 0));
  }

  42% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
    filter:
      invert(1)
      blur(0)
      sepia(0.26)
      saturate(1.8)
      drop-shadow(0 0 12px rgba(224, 185, 110, 0.56))
      drop-shadow(0 0 34px rgba(224, 185, 110, 0.24));
  }
}

@keyframes axisWordmarkIn {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 18px)) scale(0.94);
    filter:
      invert(1)
      blur(1px)
      drop-shadow(0 0 0 rgba(196, 82, 92, 0));
  }

  48% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter:
      invert(1)
      blur(0)
      drop-shadow(0 0 1px rgba(196, 82, 92, 0.68))
      drop-shadow(0 0 18px rgba(196, 82, 92, 0.22));
  }
}

@keyframes axisNameIn {
  0% {
    opacity: 0;
    transform: translate(-50%, 24px);
    text-shadow:
      0 0 0 rgba(224, 185, 110, 0),
      0 0 0 rgba(224, 185, 110, 0);
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: translate(-50%, 0);
    text-shadow:
      0 0 12px rgba(224, 185, 110, 0.48),
      0 0 30px rgba(224, 185, 110, 0.22);
  }
}

/* 動きを減らす設定の人には止める */
@media (prefers-reduced-motion: reduce) {
  .p-axis-header__symbol {
    opacity: 1;
    animation: none;
    transform: translate(-50%, 0) scale(1);
  }

  .p-axis-header__wordmark {
    opacity: 1;
    animation: none;
    transform: translate(-50%, -50%) scale(1);
  }

  .p-axis-header__name {
    opacity: 1;
    animation: none;
    transform: translate(-50%, 0);
  }
}
