/*
theme Name: HAYATASTIC DESIGN
Author: ハヤタコウヘイ
Description: original theme
version： 1.0.0
*/

:root {
  --main-color: #f8ed1c;
  --text-color: #000;
}

html {
  scroll-behavior: smooth;
}

* {
  font-family: "M PLUS 1p", sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

h1 {
  font-weight: 900;
}

h2,
h3 {
  font-weight: 800;

  b {
    font-weight: bold;
  }
}

h3 {
  line-height: 1.5;
}

.center {
  text-align: center;
}

.mt50 {
  margin-top: 50px;
}

.relative {
  overflow: hidden;
  position: relative;
}

.bold {
  font-weight: bold;
}

.wp-video {
  margin-bottom: 1em;
}

p {
  line-height: 1.7;

  & + p {
    margin-top: 1em;
  }
  &.works {
    margin-top: 50px;
  }
}

h3#sd-title {
  display: none !important;
}

.flex {
  display: flex;
}

.column {
  flex-direction: column;
}

p.soudan {
  text-align: center;

  span {
    font-weight: bold;
    font-size: 1.25rem;
    text-align: center;
    background: linear-gradient(transparent 70%, var(--main-color) 0%);
    display: inline;
  }
}

.breadcrumbs {
  & > span {
    margin-right: 10px;

    &::after {
      content: "▶";
      color: var(--main-color);
      margin-left: 10px;
    }

    &:last-child {
      &::after {
        display: none;
      }
    }

    a {
      span {
        transition: 0.2s;
      }

      &:hover {
        span {
          text-shadow: 1px 1px 0 var(--main-color);
        }
      }
    }
  }
}

#works,
#blog {
  .breadcrumbs {
    margin-left: 5%;
  }
}

div.movie-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 60px;
  z-index: 1;

  iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

.breadcrumbs {
  margin-bottom: 60px;
}

span.cover {
  background: linear-gradient(
    90deg,
    var(--text-color) 0%,
    var(--text-color) 50%,
    #fff 50%,
    #fff 100%
  );
  width: 400%;
  height: 200%;
  display: block;
  position: absolute;
  top: 0;
  left: -200%;

  &.on {
    animation: slide 1s ease-in-out forwards;

    @keyframes slide {
      0% {
      }

      100% {
        left: 200%;
      }
    }
  }
}

a {
  color: var(--text-color);
  text-decoration: none;

  &.btn {
    background: var(--main-color);
    font-size: 0.9rem;
    padding: 1em 1.25em;
    transition: 0.2s;
    border: 1px solid transparent;
    position: relative;
    margin-top: 30px;
    font-weight: bold;

    &.works {
      margin: auto;
      width: 200px;
      text-align: center;
      justify-content: center;
      align-items: center;
      display: flex;
    }

    &:hover {
      background: none;
      border: 1px solid var(--text-color);
      filter: none;
    }

    &.works::before,
    &.price::before {
      content: "";
      background-size: contain;
      background-repeat: no-repeat;
      margin-right: 10px;
      height: 1.5em;
      aspect-ratio: 1/1;
    }

    &.works::before {
      background-image: url(img/works_icon.png);
    }

    &.price::before {
      background-image: url(img/price_icon.png);
    }
  }
}

/* ヘッダー */
header {
  height: 60px;
  padding-left: 20px;
  width: 100%;
  position: fixed;
  align-items: center;
  z-index: 1000;
  background-color: #fff;

  nav {
    margin: auto;
    height: 60px;
    width: 100%;

    &.slide {
      justify-content: space-between;
      align-items: center;
      background: #fff;

      h1 {
        a {
          display: flex;
          font-size: 2rem;
          font-weight: 900;
          align-items: center;
          transition: 0.2s;

          &::before {
            content: "";
            background-image: url(img/HAYATASTIC-DESIGN_logo.svg);
            background-repeat: no-repeat;
            background-size: contain;
            width: 1.8em;
            aspect-ratio: 1/1;
            filter: drop-shadow(2px 2px 0px var(--main-color));
          }

          @media (hover: hover) {
            &:hover {
              opacity: 0.7;

              &::before {
                filter: drop-shadow(0 0 0px var(--main-color));
              }
            }
          }
        }
      }
    }

    ul {
      justify-content: space-between;

      li {
        height: 60px;

        a {
          font-size: 1.2rem;
          display: block;
          font-weight: 900;
          height: 60px;
          line-height: 60px;
          padding: 0 20px;
        }

        &::after {
          content: "";
          border-bottom: 2px solid var(--text-color);
          transition: 0.3s;
          margin: auto;
          display: block;
          width: 0;
          height: 1px;
          transform: translateY(-10px);
        }

        @media (hover: hover) {
          &:hover {
            &::after {
              width: 90%;
            }
          }
        }

        &:last-child {
          background: var(--main-color);
        }
      }
    }
  }
}

section {
  scroll-margin-top: 60px; /* headerの高さ */

  &#about,
  &#skills,
  &#works,
  &#contact,
  &#detail,
  &#price,
  &#blog {
    h2 {
      font-size: 2.5rem;
      text-align: center;
      margin-bottom: 0.5em;
      line-height: 1;
      display: flex;
      flex-direction: column;

      span {
        font-size: 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 10px;

        &::before {
          content: "";
          width: 100px;
          border: 2px solid var(--text-color);
          margin-bottom: 10px;
        }
      }
    }

    .cat-ttl {
      font-size: 1.5rem;
      margin-bottom: 20px;
      text-align: center;
      font-weight: bold;

      span {
        font-size: 0.9rem;
      }
    }

    div.container {
      max-width: 1200px;
      margin: auto;
      margin-bottom: 150px;
      padding: 0 50px;

      div.content {
        &:first-child {
          width: 40%;
          max-width: 300px;
          margin-right: 8%;
        }

        &:last-child {
          flex: 1;
        }

        ul {
          margin: 50px 0;
          display: flex;

          li {
            &:first-child {
              margin-right: 5%;
            }
          }
        }
      }
    }
  }

  &#skills,
  &#works,
  &#detail,
  &#price,
  &#blog {
    h2 {
      span {
        &::before {
          border: 2px solid var(--main-color);
        }
      }
    }

    h3 {
      font-size: 1.5rem;
      margin-bottom: 20px;
    }
  }

  &#about,
  &#contact,
  &#works,
  &#price {
    padding-bottom: 100px;
  }

  &#price {
    padding-top: 100px;

    h2 {
      margin-bottom: -50px;
    }

    & > div {
      padding-top: 150px;

      h3 {
        text-align: center;
      }

      &#web {
        padding-top: 100px;
      }
    }

    table {
      margin: auto;
      min-width: 600px;
      border: 1px solid var(--text-color);

      @media (width <=500px) {
        min-width: auto;
      }

      th {
        background-color: var(--main-color);
        font-weight: bold;
      }

      th,
      td {
        padding: 1rem;
        border: 1px solid var(--text-color);
      }
    }
  }

  &#detail {
    padding: 100px 5%;

    article {
      max-width: 800px;
      margin: auto;

      h2 {
        font-size: 2rem;
        margin-bottom: 20px;
        line-height: 1.5;

        &::after {
          display: none;
        }
      }

      div.content {
        figure {
          margin-bottom: 1em;
        }
      }

      h3 {
        margin-top: 1em;
        text-align: left;
        margin-bottom: 10px;
      }

      p {
        &.category {
          text-align: center;
          margin-bottom: 60px;

          a {
            background: var(--main-color);
            padding: 2px 10px;
            transition: 0.2s;

            &:hover {
              opacity: 0.7;
              background: none;
            }
          }
        }

        img {
          display: block;
          margin: 30px auto 60px;
          max-width: 640px;
          border: 1px solid var(--text-color);
          max-width: 500px;

          &.vertical {
            max-width: 400px;
            height: auto;
          }
        }
      }

      div.content {
        margin: auto;

        a {
          transition: 0.2s;

          img {
            margin-bottom: 30px;
          }

          &:hover {
            opacity: 0.7;
          }
        }

        p {
          &.b {
            font-size: 1.2em;
            border-bottom: 2px solid var(--main-color);
            display: inline-block;
          }

          b {
            letter-spacing: 1px;

            &.marker {
              background: linear-gradient(
                transparent 50%,
                var(--main-color) 0%
              );
            }
          }

          &.prism_title {
            font-size: 1.1em;
            padding: 5px 20px;
            background: #eee;
            margin: 0;
            border-radius: 3px;

            &.css {
              &::before {
                content: "\f38b";
                font-family: "font awesome 5 brands";
                font-weight: 900;
                color: blue;
                margin-right: 5px;
              }
            }

            &.html {
              &::before {
                content: "\f13b";
                font-family: "font awesome 5 brands";
                font-weight: 900;
                color: orange;
                margin-right: 5px;
              }
            }

            &.php {
              &::before {
                content: "\f457";
                font-family: "font awesome 5 brands";
                font-weight: 900;
                color: green;
                margin-right: 5px;
              }
            }
          }
        }

        ul {
          margin-bottom: 30px;

          li {
            &::before {
              content: "●";
              margin-right: 5px;
              color: var(--main-color);
            }
          }
        }

        a {
          background: var(--main-color);
          padding: 0;
          transition: 0.2s;

          &:hover {
            background: none;
          }
        }
      }

      table {
        width: 100%;
        margin-bottom: 30px;
        margin-top: 30px;

        tr {
          td {
            padding: 10px;
            border: 1px solid;
            font-size: 0.9em;
          }
        }
      }
    }
  }

  &#about,
  &#contact {
    h2 {
      &::after {
        border: 2px solid var(--text-color);
      }
    }
  }

  &#works,
  &#blog {
    &.sub {
      padding-top: 100px;

      h2::after {
        top: 105%;
      }

      nav {
        padding: 0 10px;

        ul {
          display: flex;
          justify-content: center;
          margin: 60px 0;

          li {
            margin: 0 5px;
          }
        }
      }
    }

    div.content {
      ul {
        display: flex;
        flex-wrap: wrap;

        li {
          width: 33.3%;
          padding: 0 2%;
          text-align: center;
          margin-bottom: 30px;

          a {
            display: flex;
            flex-direction: column;

            .work-title {
              padding: 2px 10px;
              transition: 0.2s;
              margin-top: 10px;
            }

            img {
              transition: 0.2s;
              border: 1px solid var(--text-color);
            }
          }

          &:hover {
            a {
              span {
                text-shadow: 1px 1px 0 var(--main-color);
              }

              img {
                opacity: 0.7;
              }
            }
          }
        }
      }

      p {
        text-align: center;

        &.view-more {
          margin-top: 30px;
        }
      }
    }
  }

  &#works {
    max-width: 1800px;
    margin: auto;
  }

  &#contact {
    background: var(--main-color);
    padding-top: 100px;

    p {
      text-align: center;
      font-weight: bold;
      margin-bottom: 60px;
    }

    ul {
      display: flex;
      justify-content: center;

      li {
        margin: 0 20px;

        a {
          transition: 0.2s;

          &:hover {
            opacity: 0.7;
          }
        }
      }
    }
  }

  &#hero {
    width: 100%;
    position: relative;
    overflow: hidden;
    height: 100vh;
    margin-bottom: 200px;

    .title-content {
      margin-left: 65px;
      margin-top: 65px;

      p.main-title {
        font-size: 4.5rem;
        line-height: 1.2;
        font-weight: 900;

        span {
          font-size: 0.5em;
          line-height: 1;
        }
      }

      p.catch {
        .br-span {
          font-size: 1.5rem;
          font-weight: 700;
          line-height: 1.5;
        }
      }
    }

    h2 {
      position: absolute;
      width: 90%;
      max-width: 900px;
      right: -2%;
      bottom: 2%;

      svg {
        line-height: 1.9;
        font-weight: 600;

        g {
          line-height: 1.9;
          font-weight: 600;

          tspan {
            font-weight: 600;
            font-family: "M PLUS 1p", sans-serif;
          }

          text {
            stroke-width: 1;
            opacity: 0;
            stroke: transparent;
            stroke-linecap: square;
            fill: transparent;
            line-height: 1.9;
            font-weight: 600;
            font-family: "M PLUS 1p" !important;
          }
        }
      }

      &.on {
        svg {
          g {
            text {
              animation: stroke 3s ease-in-out forwards;
              animation-delay: 0.5s;
              stroke-dasharray: 2000;
              stroke-dashoffset: 2000;
              stroke: #fff;
            }
          }
        }
      }
    }

    div.yellow-bg {
      width: 100%;
      position: absolute;
      background: var(--main-color);
      top: 0;
      left: 7%;
      height: 95%;
      z-index: -1000;
    }
  }

  &#about {
    padding-bottom: 150px;
    padding-right: 20px;
    padding-left: 20px;

    .wrap {
      max-width: 1200px;
      background: var(--main-color);
      margin: auto;
      padding: 100px 5% 125px;

      .content-wrap {
        gap: 7%;
        margin-top: 30px;

        .profile-photo {
          width: 80%;
          max-width: 400px;
        }

        .content {
          h3 {
            font-size: 1.5rem;
            margin-bottom: 20px;

            span.sub-title {
              font-size: 1rem;
            }
          }

          .sns-link {
            margin-top: 30px;
            gap: 1em;

            a {
              text-decoration: underline;
            }
          }
        }
      }
    }

    @media (max-width: 1300px) {
      .wrap {
        .content-wrap {
          gap: 50px 7%;
        }
      }

      @media (max-width: 1100px) {
        .wrap {
          .content-wrap {
            flex-direction: column;
            align-items: center;

            .content {
              max-width: 800px;

              h3 {
                text-align: center;
              }
            }
          }
        }
      }
    }
  }

  &#skills {
    h2 {
      margin-bottom: 50px;
    }
  }
}

footer {
  background: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;

  small {
    margin: auto;
    color: #ffffff;
    text-align: center;
  }
}

.pricingtable {
  max-width: 900px;
  margin: 50px auto 0 !important;
  padding: 0 !important;

  .column-item-data {
    padding: 10px !important;
  }
}

.flat {
  .column {
    width: 30% !important;
    box-shadow: none;
    border: 1px solid var(--text-color);
    margin: 0 1% 60px !important;

    .column-item {
      background: none;
      color: var(--text-color);
      font-family: "M PLUS 1p", sans-serif;

      span.price-value {
        font-size: 2rem;
        color: var(--text-color);
      }

      a.pricingtable-button {
        display: none;
      }
    }

    .column-item-header {
      padding: 20px;
      background: var(--main-color);

      span.pricingtable-header-name {
        font-size: 1.5rem;
      }
    }
  }
}

/* HTML: <div class="loader"></div> */
.loader {
  width: 120px;
  height: 22px;
  border-radius: 20px;
  color: #514b82;
  border: 2px solid;
  position: relative;
  z-index: 20000;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: out 1s forwards;
}

.loader::before {
  content: "";
  position: absolute;
  margin: 2px;
  inset: 0 100% 0 0;
  border-radius: inherit;
  background: currentColor;
  animation: l6 1s forwards;
}

@keyframes l6 {
  100% {
    inset: 0;
  }
}

.screen {
  width: 100vw;
  height: 100vh;
  background-color: #fff;
  z-index: 10000;
  position: fixed;
  animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes out {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.wp-video-shortcode video,
video.wp-video-shortcode {
  height: auto;
}

.stroke-animate {
  fill: transparent;
  stroke: black;
  stroke-width: 2px;
  stroke-dasharray: none;
  stroke-dashoffset: 3000;
  animation: draw-stroke 2s ease forwards;
  opacity: 1;
}

@keyframes draw-stroke {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes stroke {
  0% {
    fill: transparent;
  }
  10% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
    fill: transparent;
  }
}
