@layer reset, base, components, utilities;

@layer base {
  html {
    scroll-behavior: smooth;
    @media (768px <= width) {
      font-size: min(calc(100vw / 118), 10px);
    }
    @media (width < 768px) {
      font-size: calc(100vw / 37.5);
    }
  }

  body {
    font-family: var(--font-main);
    font-size: 1.6rem;
    font-optical-sizing: auto;
    font-feature-settings: "palt";
    line-height: 1.6;
    background: var(--pink);
    color: #fff;
    @media (width < 768px) {
      font-size: 1.4rem;
    }
  }
}

@layer components {
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .attention-list > li,
  .attention-text {
    padding-left: 1em;
    text-indent: -1em;
    position: relative;
    > * {
      text-indent: 0;
    }
    &::before{
      content: "※";
      width: 1em;
      display: inline-block;
      text-indent: 0;
    }
  }
  .title-heart {
    color: var(--pink);
    .text {
      display: flex;
      align-items: center;
      gap: 16px;
      font-weight: var(--fw-bold);
      font-family: var(--font-en);
      letter-spacing: 0.05em;
      @media (768px <= width) {
        font-size: 2rem;
      }
      @media (width < 768px) {
        font-size: 1.6rem;
      }
      &::before, &::after {
        content: "";
        display: block;
        background: url('../img/heart.svg') no-repeat;
        width: 14px;
        height: 11px;
      }
    }
    .jp {
      display: block;
      line-height: 1.2;
      font-weight: var(--fw-bold);
      margin-top: 10px;
      @media (768px <= width) {
        font-size: 3.4rem;
      }
      @media (width < 768px) {
        margin-top: 20px;
        font-size: 2.4rem;
      }
    }
    &.is-center {
      .text {
        justify-content: center;
      }
    }
  }
  .title-ribbon {
    background: #fff;
    border-radius: 80px;
    text-align: center;
    padding: 20px 0 16px;
    position: relative;
    box-shadow: var(--shadow-highlight);
    @media (width < 768px) {
      padding: 14px 0 10px;
    }
    &::before, &::after {
      content: "";
      position: absolute;
      background: url('../img/ribbon.svg') no-repeat center;
      width: 60px;
      height: 53px;
      top: 50%;
      transform: translateY(-50%);
      @media (width < 768px) {
        width: 28px;
        height: 24px;
        background-size: contain;
      }
    }
    &::before{
      left: 80px;
      @media (width < 768px) {
        left: 40px;
      }
    }
    &::after {
      right: 80px;
      @media (width < 768px) {
        right: 40px;
      }
    }
    span {
      display: block;
      color: var(--pink);
      font-weight: var(--fw-bold);
      @media (768px <= width) {
        font-size: 4.4rem;
      }
      @media (width < 768px) {
        font-size: 2.6rem;
      }
      &.en {
        font-family: var(--font-en);
        letter-spacing: 0.05em;
        font-weight: 900;
        letter-spacing: 0.05em;
        @media (768px <= width) {
          font-size: 1.4rem;
        }
        @media (width < 768px) {
          font-size: 1.2rem;
        }
      }
    }
  }
  .sns-link {
    display: block;
    background: #fff;
    border-radius: 50px;
    width: 46px;
    height: 46px;
    display: grid;
    place-content: center;
    transition: var(--transition);
    &:hover {
      scale: 1.08;
    }
  }
  .loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
  }

  .loading.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  /* ゲージコンテナ */
  .loading-gauge {
    width: 300px;
    @media (width < 768px) {
      width: 80vw;
      max-width: 300px;
    }
  }

  .gauge-container {
    position: relative;
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: visible;
  }

  /* ゲージの進捗バー */
  .gauge-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff69b4, #ff1493);
    border-radius: 10px;
    width: 0;
    transition: width 0.1s linear;
  }

  /* ハートアイコン */
  .gauge-heart {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    color: #ff1493;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: left 0.1s linear;
    animation: heartbeat 0.6s ease-in-out infinite;
  }

  @keyframes heartbeat {
    0%, 100% {
      transform: translate(-50%, -50%) scale(1);
    }
    50% {
      transform: translate(-50%, -50%) scale(1.15);
    }
  }

  .mv {
    width: 100%;
    img {
      width: 100%;
    }
  }

  header {
    background: var(--white);
    color: var(--pink);
    border-radius: 50px;
    transition: var(--transition);
    display: none;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    width: 96%;
    z-index: 100;
    opacity: 0;
    box-shadow: var(--shadow-highlight);
    @media (768px <= width) {
      padding: 20px 60px;
    }
    @media (width < 768px) {
      padding: 15px 30px;
    }
    &.is-fixed {
      position: fixed;
      top: 20px;
      left: 0;
      right: 0;
      z-index: 100;
      display: flex;
      transform: translateY(-130%);
      opacity: 0;
      &:not(.is-hidden) {
        transform: translateY(0);
        opacity: 1;
      }
    }
    &.is-hidden {
      transform: translateY(-130%);
    }
    h1 {
      @media (768px <= width) {
        width: 140px;
      }
      @media (width < 768px) {
        width: 100px;
      }
      img {
        width: 100%;
      }
    }
    .toggle-btn {
      width: 44px;
      height: 44px;
      background: var(--pink);
      border-radius: 50%;
      display: flex;
      flex-direction: column;
      gap: 5px;
      justify-content: center;
      align-items: center;
      cursor: pointer;
      @media (768px <= width) {
        display: none;
      }
      span {
        width: 50%;
        height: 2px;
        background: var(--white);
        border-radius: 4px;
        transition: var(--transition);
      }
    }
    nav {
      @media (width < 768px) {
        display: block;
        position: fixed;
        top: 140px;
        background: var(--white);
        width: 70%;
        left: 50%;
        transform: translateX(-50%);
        padding: 30px;
        border-radius: 20px;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        pointer-events: none;
      }
      ul {
        @media (768px <= width) {
          display: flex;
          align-items: center;
          gap: 20px;
        }
        li {
          @media (width < 768px) {
            + li {
              margin-top: 20px;
              padding-top: 20px;
              border-top: 1px solid var(--pink);
              position: relative;
              &::before {
                content: '';
                position: absolute;
                background: var(--pink-02);
                width: 5px;
                height: 5px;
                border-radius: 5px;
                left: 0;
                top: -3px;
              }
              &::after {
                content: '';
                position: absolute;
                background: var(--pink-02);
                width: 5px;
                height: 5px;
                border-radius: 5px;
                right: 0;
                top: -3px;
              }
            }
          }
          &.sns {
            display: flex;
            gap: 10px;
            justify-content: center;
            @media (768px <= width) {
              margin-left: 20px;
            }
            @media (width < 768px) {
              a {
                margin: 0;
              }
            }
          }
        }
      }
    }
    a {
      font-weight: var(--fw-bold);
      display: block;
      transition: var(--transition);
      @media (768px <= width) {
        font-size: 2rem;
      }
      @media (width < 768px) {
        font-size: 1.8rem;
        text-align: center;
      }
      &:hover {
        scale: 1.08;
      }
    }
    .sns-link {
      background: var(--pink);
      @media (width < 768px) {
        margin: 0 auto;
      }
      img {
        filter: invert(1) brightness(100);
      }
    }
    &.is-fixed.is-active {
      @media (width < 768px) {
        ~ main::before,
        ~ footer::before {
          content: '';
          position: fixed;
          top: 0;
          left: 0;
          width: 100vw;
          height: 100vh;
          background: var(--bg-overlay);
          backdrop-filter: blur(3px);
          z-index: 50;
          opacity: 1;
          transition: var(--transition);
          pointer-events: auto;
          cursor: pointer;
        }
      }
      .toggle-btn {
        span {
          transition: var(--transition);
          margin-left: 15px;
          &:nth-child(1) {
            transform: rotate(45deg) translateY(10px);
          }
          &:nth-child(2) {
            opacity: 0;
          }
          &:nth-child(3) {
            transform: rotate(-45deg) translateY(-10px);
          }
        }
      }
      nav {
        @media (width < 768px) {
          opacity: 1;
          visibility: visible;
          pointer-events: auto;
          z-index: 1;
        }
      }
    }
  }

  .overview {
    position: relative;
    overflow: hidden;
    @media (768px <= width) {
      padding: 300px 0 120px;
    }
    @media (width < 768px) {
      padding: 120px 0 60px;
    }
    &::before {
      content: "";
      position: absolute;
      z-index: -1;
      background: url('../img/overview-bg.webp') center top repeat-y;
      background-size: 33.4% auto;
      width: 300%;
      aspect-ratio: 1 / 1;
      border-radius: 50%;
      left: 50%;
      top: 80px;
      transform: translateX(-50%);
      @media (width < 768px) {
        background: url('../img/overview-bg-sp.webp') center top;
        top: 40px;
        width: 500%;
      }
    }
    .overview-inner {
      position: relative;
      margin: 0 auto;
      @media (768px <= width) {
        width: 1000px;
        max-width: 80%;
      }
      @media (width < 768px) {
        max-width: 90%;
      }
      .character-box {
        position: absolute;
        z-index: 2;
        @media (768px <= width) {
          max-width: 26vw;
        }
        @media (width < 768px) {
          width: 90%;
          max-width: 350px;
        }
        img {
          width: 100%;
        }
        &:nth-of-type(1) {
          @media (768px <= width) {
            top: -110px;
            left: 50%;
            transform: translateX(calc(-100% - min(24vw, 330px)));
          }
          @media (width < 768px) {
            top: -60px;
            left: 50%;
            transform: translateX(-50%);
          }
        }
        &:nth-of-type(2) {
          @media (768px <= width) {
            top: -80px;
            left: 50%;
            transform: translateX(min(24vw, 290px));
          }
        }
        &:nth-of-type(4) {
          @media (768px <= width) {
            bottom: -70px;
            left: 50%;
            transform: translateX(calc(-100% - min(24vw, 320px)));
          }
          @media (width < 768px) {
            bottom: -60px;
            left: 50%;
            transform: translateX(-50%);
          }
        }
        &:nth-of-type(5) {
          @media (768px <= width) {
            bottom: -60px;
            left: 50%;
            transform: translateX(min(24vw, 320px));
          }
        }
      }
    }
    h2 {
      margin: 0 auto;
      text-align: center;
      @media (768px <= width) {
        max-width: 80%;
      }
      img {
        width: 100%;
      }
    }
    .box-white {
      background: #fff;
      margin: 0 auto;
      box-shadow: var(--shadow-highlight);
      @media (768px <= width) {
        padding: 80px 40px;
        border-radius: 50px;
      }
      @media (width < 768px) {
        padding: 60px 30px;
        border-radius: 20px;
      }
      &.is-main {
        background: url('../img/overview-bg-02.webp') center;
        max-width: 100%;
        @media (768px <= width) {
          width: 1000px;
        }
        @media (width < 768px) {
          background-size: 64px;
        }
        .main-text {
          text-align: center;
          @media (768px <= width) {
            font-size: 2rem;
          }
          @media (width < 768px) {
            font-size: 1.4rem;
          }
          @media (width < 768px) {
            margin-top: 20px;
          }
        }
        p {
          text-align: center;
          font-weight: var(--fw-bold);
          letter-spacing: .1em;
          span {
            padding: 6px 10px;
            background: linear-gradient(90deg, var(--pink-02), var(--pink-02)) no-repeat center bottom;
            line-height: 3;
            -webkit-box-decoration-break: clone;
            box-decoration-break: clone;
            @media (width < 768px) {
              line-height: 2.6;
              padding: 2px 8px;
            }
          }
          + p {
            margin-top: 20px;
          }
        }
      }
      &.is-sub {
        @media (768px <= width) {
          width: 700px;
          max-width: 66%;
          margin: 80px auto 0;
          padding: 50px;
        }
        @media (width < 768px) {
          max-width: 90%;
          margin: 100px auto 0;
          padding: 40px;
        }
        .title-heart {
          .text {
            font-family: var(--font-main);
          }
        }
        .main-text {
          color: var(--pink);
          @media (768px <= width) {
            margin-top: 20px;
            font-size: 3rem;
            text-align: center;
          }
          @media (width < 768px) {
            margin-top: 10px;
            font-size: 2rem;
          }
        }
        p {
          color: var(--gold);
          font-weight: var(--fw-bold);
          line-height: 1.8;
          @media (768px <= width) {
            text-align: center;
            font-size: 1.8rem;
          }
          @media (width < 768px) {
            font-size: 1.4rem;
          }
          + p {
            margin-top: 20px;
          }
        }
      }
    }
  }

  .highlight {
    background: url('../img/highlight-bg.webp') center;
    position: relative;
    z-index: 1;
    @media (width < 768px) {
      background-size: 70px;
    }
    &::before{
      content: '';
      background: url('../img/highlight-bg-top.webp') center top repeat-x;
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      z-index: -1;
      @media (width < 768px) {
        height: 40px;
        background-size: auto 100%;
      }
    }
    &::after{
      content: '';
      background: linear-gradient(0deg, #F79DC4 23.56%, rgba(247, 157, 196, 0.00) 100%);
      position: absolute;
      width: 100%;
      height: 65px;
      bottom: 0;
      left: 0;
    }
    .inner {
      margin: 0 auto;
      @media (768px <= width) {
        width: 80%;
        max-width: 1000px;
        padding: 200px 0 80px;
      }
      @media (width < 768px) {
        width: 90%;
        padding: 80px 0;
      }
    }
    .highlight-area{
      display: flex;
      flex-direction: column;
      @media (768px <= width) {
        margin-top: 80px;
        gap: 60px;
      }
      @media (width < 768px) {
        margin-top: 40px;
        gap: 60px;
      }
    }
    .highlight-box {
      background: var(--white);
      border-radius: 20px;
      box-shadow: var(--shadow-highlight);
      position: relative;
      box-sizing: border-box;
      @media (768px <= width) {
        padding: 60px;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
      @media (width < 768px) {
        padding: 40px 26px;
      }
      .character-box {
        position: absolute;
        @media (768px <= width) {
          max-width: 16vw;
        }
        @media (width < 768px) {
          max-width: 30vw;
        }
        img {
          width: 100%;
        }
      }
      .text-box {
        @media (768px <= width) {
          width: 50%;
        }
      }
      .title-heart {
        .text {
          @media (width < 768px) {
            justify-content: center;
          }
        }
      }
      .text-area {
        color: var(--pink, #EE92BA);
        font-weight: var(--fw-bold);
        line-height: 2;
        @media (768px <= width) {
          margin-top: 20px;
          font-size: 1.6rem;
        }
        @media (width < 768px) {
          line-height: 1.8;
          margin-top: 10px;
        }
      }
      .img-box {
        border-radius: 10px;
        overflow: hidden;
        @media (768px <= width) {
          width: 46%;
        }
        @media (width < 768px) {
          margin-top: 20px;
        }
        img {
          width: 100%;
        }
      }
      &:nth-of-type(odd) {
        .character-box {
          @media (768px <= width) {
            bottom: min(-2vw, -20px);
            left: 50%;
            transform: translateX(min(32vw, 420px));
          }
          @media (width < 768px) {
            bottom: min(-4vw, -40px);
            right: -4vw;
          }
        }
        @media (768px <= width) {
          flex-direction: row;
          .text-box {
            text-align: left;
          }
        }
      }
      &:nth-of-type(even) {
        .character-box {
          @media (768px <= width) {
            bottom: min(-2vw, -20px);
            left: 50%;
            transform: translateX(calc(-100% - min(33vw, 420px)));
          }
          @media (width < 768px) {
            bottom: min(-4vw, -40px);
            left: -4vw;
          }
        }
        @media (768px <= width) {
          flex-direction: row-reverse;
        }
      }
      &:nth-of-type(1) .character-box {
        @media (width < 768px) {
          bottom: min(-3vw, -30px);
          right: -6vw;
        }
      }
      &:nth-of-type(2) .character-box {
        @media (width < 768px) {
          max-width: 33vw;
        }
      }
      &:nth-of-type(3) .character-box {
        @media (768px <= width) {
          bottom: min(-3vw, -30px);
          transform: translateX(min(31vw, 390px));
        }
        @media (width < 768px) {
          max-width: 33vw;
        }
      }
    }
    .comingsoon {
      margin: 60px auto 0;
      max-width: 60%;
      text-align: center;
      @media (width < 768px) {
        max-width: 80%;
      }
      img {
        width: 100%;
      }
    }
  }

  .information {
    background: url('../img/information-bg.webp') center;
    position: relative;
    z-index: 1;
    &::before{
      content: '';
      background: url('../img/information-bg-top.webp') center top repeat-x;
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      z-index: -1;
    }
    .inner {
      margin: 0 auto;
      @media (768px <= width) {
        width: 80%;
        max-width: 1000px;
        padding: 160px 0 140px;
      }
      @media (width < 768px) {
        width: 90%;
        padding: 80px 0;
      }
    }
    .outline-box {
      background: var(--white);
      color: var(--pink);
      position: relative;
      box-shadow: var(--shadow-highlight);
      @media (768px <= width) {
        margin-top: 50px;
        border-radius: 50px;
        padding: 60px 80px;
      }
      @media (width < 768px) {
        margin-top: 40px;
        border-radius: 20px;
        padding: 40px 20px;
      }
      dl {
        font-weight: var(--fw-bold);
        @media (768px <= width) {
          display: grid;
          grid-template-columns: 20% 1fr;
          font-size: 1.8rem;
        }
        > * {
          position: relative;
          @media (768px <= width) {
            padding: 30px 0;
          }
        }
        > dt {
          &:nth-of-type(n+2) {
            border-top: 1px solid var(--pink-02);
            position: relative;
            &::before {
              content: '';
              position: absolute;
              background: var(--pink-02);
              width: 5px;
              height: 5px;
              border-radius: 5px;
              left: 0;
              top: -3px;
            }
            @media (width < 768px) {
              &::after {
                content: '';
                position: absolute;
                background: var(--pink-02);
                width: 5px;
                height: 5px;
                border-radius: 5px;
                right: 0;
                top: -3px;
              }
            }
          }
        }
        > dd {
          @media (width < 768px) {
            font-weight: 400;
            margin-top: 10px;
          }
          &:nth-of-type(n+2) {
            @media (768px <= width) {
              border-top: 1px solid var(--pink-02);
              position: relative;
              &::after {
                content: '';
                position: absolute;
                background: var(--pink-02);
                width: 5px;
                height: 5px;
                border-radius: 5px;
                right: 0;
                top: -3px;
              }
            }
          }
          + dt {
            @media (width < 768px) {
              margin-top: 20px;
              padding-top: 20px;
            }
          }
        }
        .attention-text {
          font-weight: 500;
          @media (768px <= width) {
            font-size: 1.4rem;
          }
          @media (width < 768px) {
            font-weight: 400;
            margin-top: 10px;
            font-size: 1.2rem;
          }
        }
      }
      .character-box {
        position: absolute;
        @media (768px <= width) {
          max-width: 18vw;
        }
        @media (width < 768px) {
          width: 50vw;
          max-width: 185px;
        }
        img {
          width: 100%;
        }
        @media (768px <= width) {
          &:nth-of-type(1) {
            left: -40px;
            bottom: -40px;
          }
          &:nth-of-type(2) {
            right: -40px;
            bottom: -40px;
          }
        }
        @media (width < 768px) {
          right: -10px;
          bottom: -40px;
        }
      }
    }
  }

  footer {
    background: var(--pink);
    @media (768px <= width) {
      padding: 50px 0 20px;
    }
    @media (width < 768px) {
      padding: 40px 0 20px;
    }
    .footer-main {
      width: fit-content;
      margin: 0 auto;
      @media (768px <= width) {
        display: grid;
        grid-template-columns: auto 1fr;
        justify-content: center;
        gap: 80px;
      }
    }
    .logo {
      width: 320px;
      max-width: 90%;
      margin: 0 auto;
      img {
        width: 100%;
      }
    }
    .sns-box {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 40px;
      font-weight: var(--fw-bold);
      text-align: center;
      @media (width < 768px) {
        display: flex;
        margin: 30px auto 0;
        gap: 20px;
        justify-content: center;
      }
      > * {
        display: flex;
        flex-direction: column;
        gap: 10px;
      }
      p {
        font-size: 1.1rem;
        display: flex;
        gap: 5px;
        justify-content: center;
        &::before, &::after {
          display: block;
        }
        &::before{
          content: "\\";
        }
        &::after {
          content: "/";
        }
      }
      h4 {
        font-family: var(--font-en);
        letter-spacing: 0.05em;
        @media (768px <= width) {
          font-size: 1.6rem;
        }
      }
      .sns-icon {
        display: flex;
        justify-content: center;
        gap: 10px;
      }
    }
    small {
      display: block;
      text-align: center;
      font-weight: 400;
      @media (768px <= width) {
        margin-top: 60px;
        font-size: 1.1rem;
      }
      @media (width < 768px) {
        margin-top: 30px;
        font-size: 1rem;
      }
    }
  }
}

@layer utilities {
  @media (768px <= width) {
    .sp { display: none !important; }
  }
  @media (width < 768px) {
    .pc { display: none !important; }
  }
}
