@import url(reset.css);

@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400&family=Noto+Sans+JP:wght@400;500&display=swap");

body {
  font-family: "Josefin Sans", "Noto Sans JP", sans-serif;
  text-transform: uppercase;
  /* text-box: trim-both cap alphabetic; */
}
section {
  padding: max(5vw, 50px) 5vw;
}
p {
  text-align: justify;
  font-family: "Noto Sans JP", sans-serif;
}
section.company dl div dd {
  font-family: "Noto Sans JP", sans-serif;
}
:root {
  --primary-c: #d8273b;
  --secondary-c: #100964;
  --bg-c: #e9eaea;
  --header-h: 80px;
  --icon-sz: 45px;
}
.sp,
.tb {
  display: none;
}
/* @view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: .8s both smoke-down;
}
::view-transition-new(root) {
  animation: .8s both smoke-up;
}
@keyframes smoke-up {
  from {
    filter: blur(20px);
    opacity: 0;
  }
}
@keyframes smoke-down {
  to {
    filter: blur(20px);
    opacity: 0;
  }
} */

/* ========== header ========== */

header {
  position: fixed;
  inset: 0 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  z-index: 100;
  padding-inline: 5vw;
  &::before {
    position: absolute;
    inset: 0;
    content: "";
    background: url(../img/header-bg.webp) center/cover;
    opacity: 0;
    transition: opacity 0.6s;
  }
  > * {
    isolation: isolate;
  }
  .logo {
    width: 180px;
    display: inline-block;
    transition: opacity 0.5s;
    &:hover {
      opacity: 0.6;
    }
    img {
      width: 100%;
    }
  }
  nav {
    --w: 900px;
    position: fixed;
    inset: 0 0 auto;
    translate: 0 -100%;
    transition: translate 0.6s;
    background-color: var(--primary-c);
    padding: calc(max(5vw, 50px) + var(--header-h)) 5vw max(8vw, 60px);
    z-index: -1;
    &:is(.open *) {
      translate: 0;
    }
    ul {
      columns: 2;
      column-gap: 5%;
      margin: 0 auto 3em;
      width: min(100%, var(--w));
      li {
        border-bottom: 1px solid;
        position: relative;
        &:nth-child(1),
        &:nth-child(4) {
          border-top: 1px solid;
        }
        &::before {
          content: "";
          position: absolute;
          inset: auto 0 -1px;
          height: 2px;
          background-color: #999;
          scale: 0 1;
          transition: scale 0.6s;
          transform-origin: right;
        }
        &:hover {
          &::before {
            scale: 1;
            transform-origin: left;
          }
          a {
            translate: 1em;
          }
        }
      }
      a {
        display: inline-block;
        padding: 2em 1em;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-box: trim-both cap alphabetic;
        transition: translate 0.3s;
      }
      span {
        text-box: trim-both cap alphabetic;
        font-size: clamp(1.2em, 1.8vw, 1.8em);
        font-weight: 300;
      }
    }
  }
  .links {
    --links-h: 30px;
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 1.6em;
    width: min(100%, var(--w));
    margin-inline: auto;
    a {
      height: var(--links-h);
      transition: opacity 0.5s;
      display: flex;
      align-items: center;
      &:first-child {
        padding-top: 0.2em;
      }
      &:hover {
        opacity: 0.6;
      }
    }
    img {
      height: 100%;
    }
  }
}

header,
footer {
  .buttons {
    display: flex;
    align-items: center;
    gap: 1em;
    &.sp {
      display: none;
    }
    a {
      display: flex;
      align-items: center;
      height: var(--icon-sz);
      padding: 0.2em 1.4em 0;
      border-radius: 2em;
      gap: 10px;
      transition: opacity 0.5s;
      &:hover {
        opacity: 0.6;
      }
      img {
        width: 20px;
        padding-bottom: 0.3em;
      }
      &:first-child {
        background-color: #000;
      }
      &:nth-child(2) {
        background-color: #fff;
        color: var(--primary-c);
        font-weight: 500;
      }
    }
  }
}

body:has(.main-bg.show) header:not(.open)::before {
  opacity: 1;
}

.hamburger {
  width: var(--icon-sz);
  border-radius: 50%;
  aspect-ratio: 1;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  place-items: center;
  place-content: center;
  position: relative;
  transition: opacity 0.5s;
  @media (any-hover: hover) {
    &:hover {
      opacity: 0.6;
    }
  }
  &::before {
    content: "CLOSE";
    position: absolute;
    inset: auto 0 -1.8em;
    font-size: 12px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
  }
  &:is(.open *)::before {
    opacity: 1;
  }
  span {
    height: 1px;
    width: 40%;
    background-color: var(--primary-c);
    transition-property: translate, rotate, opacity;
    transition-duration: 0.6s;
    &:first-child {
      translate: 0 -3px;
    }
    &:last-child {
      translate: 0 3px;
    }
    &:is(.open *) {
      &:first-child {
        translate: 0 1px;
        rotate: 45deg;
      }
      &:nth-child(2) {
        translate: -100%;
        opacity: 0;
        pointer-events: none;
      }
      &:last-child {
        translate: 0 -1px;
        rotate: -45deg;
      }
    }
  }
}

/* ========== footer ========== */

footer {
  padding: max(5vw, 50px) 5vw 40px;
  background-color: var(--primary-c);
  color: #fff;
  a {
    transition: opacity 0.4s;
    &:hover {
      opacity: 0.6;
    }
  }
  .inner {
    display: flex;
    flex-direction: column;
    width: min(100%, 1100px);
    margin-inline: auto;
    gap: 3em;
  }
  .logo {
    width: max(30%, 230px);
    align-self: center;
  }
  ul {
    display: flex;
  }
  li {
    flex: 1;
    border-left: 1px solid;
    &:last-child {
      border-right: 1px solid;
    }
    a {
      display: flex;
      justify-content: center;
      padding: 0.5em 1em;
    }
  }
  .buttons {
    align-self: center;
  }
  .info {
    padding-block: 2em;
    border-top: 1px solid;
    border-bottom: 1px solid;
    display: flex;
    gap: 1em;
  }
  .contents {
    display: flex;
    flex-direction: column;
    font-family: "Noto Sans JP";
    gap: 1em;
    width: 55%;
    & > p:last-child {
      font-size: 0.9rem;
      line-height: 1.8;
    }
  }
  .note {
    padding: 0.8em 1.4em;
    background-color: #fff;
    color: var(--primary-c);
    line-height: 1.6;
    width: fit-content;
    border-radius: 1em;
    font-size: 1rem;
  }
  .tel {
    font-size: clamp(1.5em, 3vw, 44px);
    a {
      display: flex;
      align-items: baseline;
      gap: 6px;
      font-weight: 300;
    }
    img {
      height: 0.74em;
    }
    p {
      font-size: 0.9rem;
    }
  }
  address {
    display: flex;
    gap: 10px;
    align-items: center;
    img {
      height: calc(clamp(1.7em, 3vw, 44px) * 0.74);
    }
  }
  iframe {
    flex: 1;
    height: auto;
  }
  .links {
    margin-top: -2rem;
    display: flex;
    gap: 1em;
    align-items: baseline;
    img {
      height: 2em;
    }
  }
  .privacy {
    margin-left: auto;
  }
  .copyright {
    align-self: center;
    font-size: 12px;
    text-transform: capitalize;
    font-family: "Noto Sans JP";
  }
}

@media (width < 1024px) {
  footer {
    nav {
      align-self: center;
      width: min(100%, 600px);
    }
    ul {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      row-gap: 2em;
    }
    li {
      &:last-child {
        border-right: none;
      }
      &:first-child,
      &:nth-child(4) {
        border-left: none;
      }
      a {
        padding-block: 0.2em;
      }
    }
  }
}

/* ========== common ========== */

.treat {
  position: absolute;
  pointer-events: none;
  z-index: 50;
  width: max(22%, 140px);
  display: grid;
  &.sp {
    display: none;
  }
  img {
    opacity: 0;
    translate: 50% -50%;
    transition-property: translate, opacity;
    transition-duration: 0.6s;
    transition-timing-function: ease;
    width: 100%;
    grid-area: 1/-1/1/-1;
    &:nth-child(2) {
      transition-delay: 0.2s;
    }
    &:nth-child(3) {
      transition-delay: 0.4s;
    }
  }
  &.show img {
    opacity: 1;
    translate: 0;
  }
}

.movies {
  display: flex;
  gap: max(3vw, 2em);
  figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
    > div {
      position: relative;
      overflow: hidden;
      border-radius: 30px;
    }
  }
  .play-icon {
    width: 16%;
    position: absolute;
    z-index: 2;
    inset: 0;
    margin: auto;
    pointer-events: none;
  }
  button {
    img {
      width: 100%;
      filter: brightness(0.6);
      transition-property: filter, scale;
      transition-duration: 0.3s;
    }
    &:hover {
      img {
        filter: brightness(1);
        scale: 1.07;
      }
    }
  }
}

.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  .inner {
    width: min(90%, 900px);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1em;
    button {
      align-self: end;
      img {
        width: 30px;
      }
    }
  }
  &.open {
    opacity: 1;
    pointer-events: auto;
  }
  iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
  }
}

@media (width < 768px) {
  :root {
    font-size: 0.8em;
    --header-h: 60px;
  }
  footer {
    margin-bottom: 50px;
    .info {
      flex-direction: column;
      width: min(100%, 400px);
      align-self: center;
    }
    .contents {
      width: 100%;
    }
    .note {
      order: 1;
      padding: 0.6em 1em 0.8em;
      font-size: 13px;
    }
    iframe {
      width: 100%;
      aspect-ratio: 16/9;
      order: -1;
    }
    address {
      order: -1;
    }
    .links {
      width: min(100%, 400px);
      align-self: center;
      align-items: start;
    }
  }

  .movies {
    flex-direction: column;
    figure {
      gap: 10px;
      > div {
        border-radius: 1.2em;
      }
    }
  }

  .fix-cta {
    display: block;
    background-color: #000;
    color: #fff;
    position: fixed;
    inset: auto 0 0;
    z-index: 50;
    padding-inline: 5vw;
    font-family: "Noto Sans JP", sans-serif;
    .button-area {
      position: relative;
      &::before {
        position: absolute;
        content: "";
        inset: 0 3px 0 auto;
        margin-block: auto;
        width: 10px;
        height: 10px;
        border-right: 1px solid;
        border-bottom: 1px solid;
        clip-path: polygon(100% 0, 100% 100%, 0 100%);
        rotate: 45deg;
        translate: 0 -30%;
        transition-property: rotate, translate;
        transition-duration: 0.5s;
        pointer-events: none;
      }
    }
    &.open-cta {
      .button-area::before {
        rotate: 225deg;
        translate: 0 30%;
      }
      .toggle {
        grid-template-rows: 1fr;
      }
    }
    button {
      padding-block: 1.6em;
      width: 100%;
      text-align: center;
      text-box: trim-both cap alphabetic;
    }
    .toggle {
      display: grid;
      grid-template-rows: 0fr;
      transition: grid-template-rows 0.5s;
      > div {
        overflow: hidden;
        > * {
          border-top: 1px solid #666;
          padding-block: 1rem;
        }
        > a {
          font-size: 16px;
          display: flex;
          align-items: center;
          justify-content: center;
          gap: 0.5em;
          img {
            width: 20px;
          }
        }
      }
    }
    .tel {
      text-align: center;
      font-size: 2.6em;
      display: flex;
      flex-direction: column;
      > span {
        font-size: 1rem;
        text-box: trim-end cap alphabetic;
      }
      a {
        display: flex;
        align-items: baseline;
        gap: 6px;
        font-weight: 300;
        justify-content: center;
      }
      img {
        height: 0.74em;
      }
      p {
        font-size: 0.9rem;
        text-align: center;
      }
    }
  }

}

@media (width < 640px) {
  header {
    --icon-sz: 40px;
    justify-content: center;
    .buttons {
      &:not(.sp) {
        position: fixed;
        inset: calc((var(--header-h) - var(--icon-sz)) / 2) 5vw auto auto;
        z-index: 200;
        a {
          display: none;
        }
        .hamburger {
          width: var(--icon-sz);
        }
      }
      &.sp {
        display: flex;
        justify-content: center;
        a {
          display: flex;
        }
      }
    }
    nav {
      height: 100dvh;
      bottom: 0;
      display: grid;
      place-items: center;
      place-content: center;
      gap: 3em;
      padding-block: 2em 0;
      ul {
        columns: 1;
        margin-bottom: 0;
        li {
          &:nth-child(4) {
            border-top: none;
          }
          &.pc {
            display: none;
          }
          &.sp {
            display: block;
          }
        }
        a {
          font-size: 14.4px;
          padding: 1.4em 0 1.2em;
          justify-content: center;
        }
        span {
          display: none;
        }
      }
    }
    .links {
      justify-content: stretch;
      margin: 0;
      a:first-child {
        order: 1;
        margin-left: auto;
      }
    }
  }

  .treat img {
    transition-duration: 0.5s;
  }
}

@media (width < 460px) {
  footer {
    padding-bottom: 1em;
    ul {
      grid-template-columns: repeat(2, 1fr);
    }
    li {
      &:nth-child(odd) {
        border-left: none;
      }
      &:nth-child(even) {
        border-left: 1px solid;
      }
    }

    .copyright {
      font-size: 10.8px;
    }
  }
}
