/* =========================================================
   AXCEL MODE RECRUIT FES 2027 – main.css
   - レイアウト/アニメ/レスポンシブの基本スタイル
   - 命名は役割ベース（見た目語は避ける）
   ========================================================= */

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: calc(100% + 100px);
  margin: 0;
  background: #000;
  color: #fff;
}

@media (min-width: 1025px) {
  body {
    overflow: hidden;
    font-family: system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  }
}

@media (max-width: 1024px) {
  body {
    overflow-y: auto;
    font-family: 'Noto Sans', sans-serif;
    /* min-height: 100vh; */
  }
}

/* ---------- Tunables（全体調整用変数） ---------- */
@media (min-width: 1025px) {
  :root {
    --header-h: 56px;
    --top-stagger: clamp(10px, 1.6vh, 22px);
    --bottom-stagger: clamp(14px, 2.2vh, 28px);
    --menu-top-h: clamp(86px, 14vh, 170px);
    --menu-bottom-h: clamp(120px, 20vh, 210px);
    --menu-top-offset: clamp(50px, 6vh, 90px);
    --char-rise: 4.2%;
  }
}

@media (max-width: 1024px) {
  :root {
    --menu-btn-w-sp: 42vw;
    --menu-btn-h-sp: clamp(32px, 9vw, 90px);
    --menu-btn-font-sp: clamp(10px, 3.5vw, 25px);
    --icon-size-large-sp: 3vw;
    --icon-size-small-sp: 2.5vw;
  }

  .site.site--sp {
    position: relative;
    overflow-y: auto;
  }
}



/* ---------- Header ---------- */
@media (min-width: 1025px) {
  .l-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: #000;
  }

  .l-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px clamp(12px, 4vw, 30px);
  }

  .c-brand img {
    height: 32px;
    display: block;
  }

  .l-header .c-socials {
    display: flex;
    gap: 10px;
  }

  .l-header .c-socials__item img {
    height: 24px;
    display: block;
    opacity: .9;
    transition: opacity .2s, transform .2s;
  }

  .l-header .c-socials__item:hover img,
  .l-header .c-socials__item:focus-visible img {
    opacity: 1;
    transform: translateY(-1px);
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .l-header {
    height: clamp(85px, 10vh, 110px);
  }
}

@media (max-width: 1024px) {
  .c-socials { display: none; }

  .l-header{
    position: fixed;
    top: 0; left: 0; right: 0;
    height: clamp(50px, 8vh, 80px);
    z-index: 50;
    background: #000;
    display: flex;
    align-items: center;
  }

  .c-brand img {
    width: clamp(250px, 70vw, 500px);
    max-height: 100%;
    padding: 2vh 0 0 4vw;
  }
}


/* ---------- App / Screens ---------- */
@media (min-width: 1025px) {
  .site--sp { display: none; }

  .site--pc {
    display: block;
    position: relative;
    width: 100%;
    height: 100dvh;
    min-width: 1025px;
  }

  .screen {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding-top: calc(var(--header-h) + 8px);
  }

  .screen[hidden] {
    display: none;
  }

  /* 背景 */
  .bg {
    position: absolute;
    inset: 0;
    z-index: 0;
  }

  .bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /*音響*/
  .stage_audio {
    position: absolute;
    left: 5%;
    top: 66vh;
    width: 91%;
    height: auto;
    z-index: 16;
  }

  /* ステージ（観客レイヤーのみ） */
  .stage {
    position: absolute;
    left: -1px;
    bottom: -271px;
    width: 100%;
    height: auto;
    z-index: 17;
  }

  .stage__audience {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    bottom: -6vh;
    z-index: 6;
  }

  /* ---------- Intro Logo ---------- */
  .hero-logo {
    position: absolute;
    z-index: 20;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: heroIn .7s ease-out both;
  }

  .hero-logo img {
    width: clamp(480px, 64vw, 1000px);
    height: auto;
    display: block;
  }

  @keyframes heroIn {
    from {
      opacity: 0;
      transform: translate(-50%, -52%) scale(1.03);
    }

    to {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
  }

  /* ---------- Cheers (opening) ---------- */
  .cheer {
    position: absolute;
    z-index: 20;
    height: auto;
    opacity: 0;
    transform: translateY(12px) scale(.98);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .35));
  }

  .cheer--arc {
    left: 0;
    right: 0;
    top: 9.8%;
    max-width: 92%;
    margin: 0 auto;
  }

  .cheer--right {
    right: 6%;
    bottom: 19%;
    width: clamp(220px, 32vw, 640px);
    transform: scaleX(-1);
    transform-origin: right bottom;
  }

  .cheer.show {
    animation: fxPop .9s cubic-bezier(.2, .9, .2, 1) forwards, fxFloat 3s ease-in-out infinite;
  }

  .cheer.hide {
    animation: fadeOut .35s ease forwards;
  }

  /* ---------- Notes (2-frame swap, no float) ---------- */
  .note {
    position: absolute;
    z-index: 12;
    height: auto;
    width: auto;
    opacity: 0;
    /* 2コマは opacity のみで切替（transformは使わない） */
  }

  /* 配置（上部固定） */
  .note--left {
    left: 0%;
    top: 25%;
    width: clamp(150px, 20vw, 200px);
    z-index: 17;
  }

  .note--right {
    right: 3%;
    top: 34%;
    width: clamp(150px, 20vw, 200px);
    z-index: 17;
  }

  /* 2コマ点滅（キャラと同一タイミング・定義を共有） */
  .note.pose-1 {
    animation: blinkA 1.6s steps(1, end) infinite;
  }

  .note.pose-2 {
    animation: blinkB 1.6s steps(1, end) infinite;
  }

  /* ---------- Characters (common 2-frame) ---------- */
  .chars {
    position: absolute;
    inset: 0;
    z-index: 15;
    pointer-events: none;
  }

  .char {
    position: absolute;
    height: auto;
    opacity: 0;
    transform: translate(-50%, 12px) scale(.98);
    transition: opacity .25s ease, transform .25s ease;
  }

  .char.enter{
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }


  .char.pose-1 {
    animation: blinkA 1.6s steps(1, end) infinite;
  }

  .char.pose-2 {
    animation: blinkB 1.6s steps(1, end) infinite;
  }

  /* 個別位置・サイズ（1度だけ指定。切替でサイズ差は出ない） */
  .char--pink {
    --x: 20%;
    left: var(--x);
    bottom: calc(24.5% + var(--char-rise));
    width: clamp(270px, 28vw, 410px);
  }

  .char--green {
    --x: 34%;
    left: var(--x);
    bottom: calc(22.0% + var(--char-rise));
    width: clamp(140px, 15.5vw, 410px);
  }

  .char--red {
    --x: 48%;
    left: var(--x);
    bottom: calc(22.0% + var(--char-rise));
    width: clamp(200px, 15vw, 460px);
  }

  .char--blue {
    --x: 66%;
    left: var(--x);
    bottom: calc(24.0% + var(--char-rise));
    width: clamp(220px, 16.5vw, 460px);
    z-index: 16;
  }

  .char--yellow {
    --x: 77%;
    left: var(--x);
    bottom: calc(26.0% + var(--char-rise));
    width: clamp(240px, 26vw, 420px);
    z-index: 13;
  }

  .char--tama {
    --x: 82%;
    left: var(--x);
    bottom: calc(20% + var(--char-rise));
    width: clamp(110px, 12vw, 220px);
    z-index: 16;
  }

  /* ---------- Menu (top:4 / bottom:6) ---------- */
  .menu {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: grid;
    grid-template-rows: 22% 1fr 28%;
  }

  .menu-top {
    grid-row: 1;
    width: 100%;
    height: var(--menu-top-h);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    justify-items: stretch;
    margin: var(--menu-top-offset) 0 0 0;
    padding-inline: clamp(12px, 3vw, 40px);
  }

  .menu-top .menu__btn {

    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .menu-top .menu__btn img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    transition: transform .25s ease, opacity .25s ease;
    opacity: 0.9;
  }


  .menu-top .menu__btn:nth-child(odd) img {
    transform: translateY(calc(var(--top-stagger) * -1));
  }

  .menu-top .menu__btn:nth-child(even) img {
    transform: translateY(var(--top-stagger));
  }

  .menu-top .menu__btn:nth-child(odd):hover img,
  .menu-top .menu__btn:nth-child(odd):focus-visible img {
    transform: translateY(calc(var(--top-stagger) * -1 - 4px)) scale(1.05);
  }

  .menu-top .menu__btn:nth-child(even):hover img,
  .menu-top .menu__btn:nth-child(even):focus-visible img {
    transform: translateY(calc(var(--top-stagger) - 4px)) scale(1.05);
  }

  /* 上段*/
  .menu-top .menu__btn:nth-child(1) img {  max-width: 100%; }
  .menu-top .menu__btn:nth-child(2) img {  max-width: 110%; }
  .menu-top .menu__btn:nth-child(3) img {  max-width: 92%; }
  .menu-top .menu__btn:nth-child(4) img {  max-width: 82%; }
  .menu-top .menu__btn img{max-width: 90%;}

  .menu-bottom {
    grid-row: 3;
    width: min(96%, 1800px);
    height: var(--menu-bottom-h);
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: end;
    justify-items: center;
    gap: min(1.8vw, 22px);
    margin: 0 auto clamp(6px, 1vh, 14px);
  }

  .menu-bottom .menu__btn {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: end;
    justify-content: center;
  }

  .menu-bottom .menu__btn img {
    max-height: 100%;
    max-width: 98%;
    width: auto;
    height: auto;
    display: block;
    transition: transform .25s ease, opacity .25s ease;
    opacity: 0.9;
  }


  .menu-bottom .menu__btn:nth-child(1) img { max-width: 120%; }
  .menu-bottom .menu__btn:nth-child(2) img { max-width: 120%; }
  .menu-bottom .menu__btn:nth-child(3) img { max-width: 120%; }
  .menu-bottom .menu__btn:nth-child(4) img { max-width: 100%; }
  .menu-bottom .menu__btn:nth-child(5) img { max-width: 120%; }
  .menu-bottom .menu__btn:nth-child(6) img { max-width: 95%; }


  .menu-bottom .menu__btn:nth-child(odd) img {
    transform: translateY(calc(var(--bottom-stagger) * -1));
  }

  .menu-bottom .menu__btn:nth-child(even) img {
    transform: translateY(var(--bottom-stagger));
  }

  .menu-bottom .menu__btn:nth-child(odd):hover img,
  .menu-bottom .menu__btn:nth-child(odd):focus-visible img {
    transform: translateY(calc(var(--bottom-stagger) * -1 - 6px)) scale(1.05);
  }

  .menu-bottom .menu__btn:nth-child(even):hover img,
  .menu-bottom .menu__btn:nth-child(even):focus-visible img {
    transform: translateY(calc(var(--bottom-stagger) - 6px)) scale(1.05);
  }


  @media (max-width: 1400px) {
    .stage__audience {
      bottom: -7vh;
    }
  }

  @media (max-width: 1200px) {
    .stage__audience {
      bottom: -16vh;
    }
  }

  @media (max-width: 1366px){
    .stage_audio{
      top:  68vh;
      left: 4%;
      width: 88%;
    }
    .stage__audience{
      bottom: 8vh;
    }
      .menu-bottom{
      transform: translateY(-3.2vh);
    }
    .note--left{

      top:  20%;
      width: clamp(130px, 14vw, 180px);
    }
    .note--right {
      right: 1%;
      top:   20%;
      width: clamp(130px, 14vw, 180px);
    }
  }



  /* 表示アニメ */
  .menu__btn {
    opacity: 0;
    transform: translateY(12px) scale(.98);
    transition: transform .25s ease, opacity .25s ease;
  }

  .menu__btn.show {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .menu__btn:hover img,
  .menu__btn:focus-visible img {
    transform: translateY(-2px);
  }
}

@media (max-width: 1024px) {
  .site--pc {
    display: none;
  }
  .site--sp {
    display: block;
  }
    /* ---------- Background ---------- */
  .bg.bg--sp {
    position: absolute;
    inset: 0;
    height: auto;
    z-index: 0;
  }
  .bg--sp img {
    width: 100%;
    object-fit: cover;
    object-position: center top;
  }

  /* ---------- Hero Logo ---------- */
  .hero-logo.hero-logo--sp {
    position: relative;
    text-align: center;
    margin-top: clamp(55%, 33vh, 70%);
  }
  .hero-logo--sp img {
    width: 60vw;
  }

  /* ---------- Menu ---------- */
  .menu.menu--sp {
    position: relative;
    margin-top: 2vh;
  }
  .menu--sp .menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4vw;
    width: 90%;
    margin: 0 auto;
  }
  .menu--sp .menu__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--menu-btn-w-sp);
    height: var(--menu-btn-h-sp);
    font-size: var(--menu-btn-font-sp);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: transform 0.1s ease, filter 0.1s ease;
    transform: translateY(0);
  }

  .menu--sp .menu__btn:active {
    transform: translateY(2px);
    filter: brightness(0.9);
  }

  /* Colors */
  .menu__btn--torisetsu  { background: #EEA1BC; color: #000; }
  .menu__btn--staff      { background: #FFF100; color: #000; }
  .menu__btn--system     { background: #C5E7FA; color: #000; }
  .menu__btn--recruit    { background: #EEA1BC; color: #000; }
  .menu__btn--business   { background: #FFF100; color: #000; }
  .menu__btn--workstyle  { background: #C5E7FA; color: #000; }
  .menu__btn--office     { background: #EEA1BC; color: #000; }
  .menu__btn--company    { background: #FFF100; color: #000; }
  .menu__btn--afterjoin  { background: #C5E7FA; color: #000; }
  .menu__btn--entry      { background: #D61518; color: #fff; }

  /* Button icons */
  .menu--sp .menu__btn::after {
    content: "";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
  }
  .menu__btn--torisetsu::after,
  .menu__btn--recruit::after,
  .menu__btn--afterjoin::after {
    width: var(--icon-size-large-sp);
    height: var(--icon-size-large-sp);
    background-image: url('../../images/common/cursor_logo_01_sp.png');
  }
  .menu__btn--staff::after,
  .menu__btn--system::after,
  .menu__btn--business::after,
  .menu__btn--workstyle::after,
  .menu__btn--office::after,
  .menu__btn--company::after {
    width: var(--icon-size-small-sp);
    height: var(--icon-size-small-sp);
    background-image: url('../../images/common/fotter_logo_external_01_sp.png');
  }
  .menu__btn--entry::after {
    width: var(--icon-size-large-sp);
    height: var(--icon-size-large-sp);
    background-image: url('../../images/common/cursor_logo_02_sp.png');
  }

}


/* ---------- Footer ---------- */

@media (min-width: 1025px) {
  .c-socials { display: none; }

  .l-footer {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 6px;
      z-index: 40;
      text-align: center;
      pointer-events: none;
  }

  .l-footer small {
    font-size: 12px;
    opacity: .9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .7);
  }
}

@media (max-width: 1024px) {
  .l-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    text-align: center;
    z-index: 10;
    padding: 10px 0;
  }


  .l-footer .c-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 2vw;
    margin-bottom: clamp(5px, 4vh, 15px);
  }

  .l-footer .c-socials__item img {
    height: clamp(20px, 3vh, 30px);
    width: auto;
    display: block;
    opacity: .9;
    transition: opacity .2s, transform .2s;
  }

  .l-footer .c-socials__item:hover img,
  .l-footer .c-socials__item:focus-visible img {
    opacity: 1;
    transform: translateY(-1px);
  }

  .l-footer small {
    font-size: clamp(8px, 2vw, 9px);
    line-height: 1.4;
    letter-spacing: 0.1em;
    color: #fff;
    display: block;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .l-footer .c-socials__item img {
    height: clamp(25px, 4vh, 40px);
  }
}

/* ---------- Common Animations ---------- */


@media (min-width: 1025px) {
  .char{
    opacity: 0;
    transform: translate(-50%, 12px) scale(.98);
    transition: opacity .25s ease, transform .25s ease; /* ボタンと同じ質感 */
  }
  .char.enter{
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }

  .is-fading-out {
    animation: fadeOut .6s ease forwards;
  }

  .is-fading-in {
    animation: fadeIn .6s ease forwards;
  }


  .char.pose-1, .char.pose-2 {
    animation: none; opacity: 0;
  }

  .char.enter.pose-1 {
    animation: blinkA 1.6s steps(1,end) infinite;
  }

  .char.enter.pose-2 {
    animation: blinkB 1.6s steps(1,end) infinite;
  }



  @keyframes fadeOut {
    to {
      opacity: 0;
    }
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  @keyframes fxPop {
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes fxFloat {

    0%,
    100% {
      transform: translateY(0);
    }

    50% {
      transform: translateY(-8px);
    }
  }

  /* 2コマ切替（stepsで完全にON/OFF） */
  @keyframes blinkA {

    0%,
    49% {
      opacity: 1;
    }

    50%,
    100% {
      opacity: 0;
    }
  }

  @keyframes blinkB {

    0%,
    49% {
      opacity: 0;
    }

    50%,
    100% {
      opacity: 1;
    }
  }

  @keyframes wobble {

    0%,
    100% {
      transform: translateX(0) translateY(0) rotate(0);
    }

    50% {
      transform: translateY(-2px) rotate(-0.4deg);
    }
  }
}