@import url("https://fonts.googleapis.com/css2?family=Lilita+One&family=Noto+Sans+JP:wght@100..900&display=swap");

:root {
  --mainLogoSize: clamp(3rem, 6vw, 6rem);
}

:root {
  --main-color: #ffd400;
  --main-color-dark: #a38707;
  --sub-color: #000;
  --accent-color: #fff;
  --cb: cubic-bezier(0, 0.69, 0.58, 0.99);
  --mainWidth: min(90%, 1300px);
  --demoWidth: min(90%, 700px);
  --paddindMax5: max(calc((100% - 1300px) / 2), 5%);
}

html {
  scroll-behavior: smooth;
}

.LilitaOne {
  font-family: "Lilita One";
  letter-spacing: 0.06em;
}

/* ヘッダー */
.mainHeader {
  transition: all 0.5s;
}

.mainHeader.hide {
  opacity: 0;
}

.mainLogo {
  position: fixed;
  top: 10vh;
  left: 8%;
  translate: 0 0;
  line-height: 1;
  font-size: var(--mainLogoSize);
  transition: all 0.3s 0.2s;
  z-index: 1000000;
}

.mainLogo.isSmall {
  transform-origin: left top;
  top: 20px;
  left: 20px;
  transform: scale(0.5);
  translate: 0;
}

.mainNav {
  position: fixed;
  bottom: 20px;
  right: 20px;
  text-align: right;
  z-index: 1000000;
}

.mainNav ul {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mainNav a {
  display: block;
}

.navButton {
  padding: 0.5em 1.5em;
}

/* フッター */
.mainFooter {
  background-color: var(--sub-color);
  color: var(--accent-color);
  padding: 80px 0 0;
  /* 下はfooterBottomがあるため0 */
  margin-top: 100px;
}

.mainFooterInner {
  width: var(--mainWidth);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  padding-bottom: 60px;
}

.footerBrand {
  flex: 1;
  min-width: 280px;
}

.footerLogo {
  font-size: 2rem;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.footerLogo a {
  color: var(--main-color);
  text-decoration: none;
  transition: color 0.3s var(--cb);
}

.footerLogo a:hover {
  color: var(--accent-color);
}

.footerDescription {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
}

.footerNav {
  display: flex;
  gap: clamp(40px, 8vw, 100px);
}

.footerNavTitle {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 25px;
  color: var(--main-color);
  position: relative;
  display: inline-block;
}

/* タイトルの下のライン */
.footerNavTitle::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 20px;
  height: 2px;
  background-color: var(--main-color-dark);
}

.footerNavList {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footerNavList li {
  margin-bottom: 12px;
}

.footerNavList a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s var(--cb);
  display: inline-block;
}

.footerNavList a:hover {
  color: var(--main-color);
  transform: translateX(5px);
}

.footerBottom {
  background-color: #111;
  /* サブカラーより少しだけ深い黒 */
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.1em;
  text-align: center;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .mainFooterInner {
    flex-direction: column;
    text-align: center;
  }

  .footerNav {
    justify-content: center;
  }

  .footerNavTitle::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footerNavList a:hover {
    transform: none;
    /* スマホでは横移動なし */
  }
}

main {
  position: relative;
  padding: calc(20rem - 18vw) 0 0;
}

.mainCopy {
  position: absolute;
  top: calc(10vh + (var(--mainLogoSize)));
  left: 8%;
  font-size: calc(var(--mainLogoSize) * 0.4);
}

/* ヒーロー */
.hero {
  padding-bottom: 100px;
}

.heroSliderPath {
  stroke-width: 3;
}

.heroSliderItem {
  aspect-ratio: 37/52;
}

.heroSliderItem .itemInner {
  background: url(../svg/heroSliderItem.svg) center / contain no-repeat;
  width: 100%;
  height: 100%;
  transform-origin: center 0%;
}

.heroSliderNumber {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -20%);
  font-size: 10vw;
  line-height: 1;
  color: var(--accent-color);
  -webkit-text-stroke: 0.25vw #000;
}

@media (max-width:700px) {
  .heroSliderNumber {
    font-size: 18vw;
    -webkit-text-stroke: 0.5vw #000;
  }

}

.heroSliderItem:hover .itemInner {
  animation: yura 0.3s infinite alternate;
}

@keyframes yura {
  50% {
    rotate: 2deg;
  }
}

.heroSliderItem:hover .heroSliderNumber {
  color: var(--accent-color);
}

/* デモ */
.demoItem {
  width: var(--demoWidth);
  margin: 0 auto 100px;
}

/* デモスライダー1 */
.demoSlider1Container {
  border: 10px solid #000;
  background: #eee;
}

.demoSlider1Path {
  stroke-width: 3;
}

.demoSlider1Item img {
  transform-origin: 50% 0%;
  width: 100%;
}
.demoSlider1Item:hover img{
  animation: yura 0.5s infinite;
}

/* デモスライダー2 */
.demoSlider2Item img {
  animation: sway 1s infinite;
}

@keyframes sway {
  50% {
    rotate: -5deg;
  }
}

.section {
  margin: 150px auto;
  scroll-margin-top: 80px;
}

.sectionInner {
  width: var(--mainWidth);
  max-width: 1000px;
  margin: 20px auto;
}

/* .section>*:not(.sliderContainer){
    padding: 0 var(--paddindMax5);
  } */
.sectionHeader {
  /* position: sticky; */
  /* top: calc(100% - 20px); */
  /* transform: translateY(-100%); */
  /* z-index: 100; */
  width: fit-content;
  margin: 0 auto 20px;
}

.sectionHeader h2 {
  font-size: clamp(2rem, -1rem + 8vw, 4rem);

}

.sectionHeader p {
  font-size: 1.6rem;
}

/* デモコード */
.demoCode {
  font-family: system-ui, sans-serif;
  background: var(--sub-color);
  border-radius: 0 0 15px 15px;
  overflow: hidden;
}

.tabHeader {
  display: flex;
  background: var(--main-color-dark);
}

.tabBtn {
  flex: 1;
  padding: 14px 0;
  border: none;
  background: none;
  color: #aaa;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

.tabBtn.is-active {
  color: #fff;
  background: var(--sub-color);
}

.tabPanels {
  position: relative;
}

.tabPanel {
  display: none;
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #e6e6e6;
  background: #0f0f14;
  overflow-x: auto;
}

.tabPanel.is-active {
  display: block;
}

.red {
  color: #ff7b53;
}

.yellow {
  color: #f0f348;
}

/* 使い方 */
.howtouseInner {
  width: var(--mainWidth);
  max-width: 1000px;
  margin: 20px auto;
}

.howtolead {
  font-size: 0.9em;
  color: #555;
}

.howtoList {
  list-style: none;
  padding: 0;
  counter-reset: section;
}

.howtoStepItem {
  margin: 40px 0 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--main-color-dark);
}

.howtoHeader {
  display: flex;
  align-items: center;
  gap: 1.5em;
  margin-bottom: 15px;
  font-weight: bold;
}

.stepBadge {
  display: flex;
  align-items: center;
  gap: 0.3em;
  font-size: 1.3em;
}

.stepBadge::before {
  content: "Step";
}

.stepBadge:after {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--main-color-dark);
  color: var(--accent-color);
  width: 1.8em;
  aspect-ratio: 1;
  counter-increment: section;
  content: counter(section);
  font-size: 1em;
}

.howtoTitle {
  margin: 0;
  font-size: 1.5em;
  font-weight: bold;
}

.howtoDescription {
  margin: 0 0 15px 0;
}

.howtoCapture {
  width: max(60%, 300px);
  margin: 20px 0;
}

.howtoPatternItem {
  border: 10px solid var(--sub-color);
  background-color: #eee;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
}

.howtoPatternItem h4 {
  font-size: 1.5em;
  line-height: 1.7;
  border-bottom: 10px solid var(--main-color);
  width: fit-content;
}

.howtoStepList {
  margin: 0;
  padding: 0 20px;
}

.howtoStepListItem {
  margin: 20px;
}

.howtoStepList h5 {
  font-size: 1em;
  line-height: 1.7;
}

.howtoStepItem section {
  font-size: 0.8em;
  background: #fff;
  width: fit-content;
  padding: 10px 20px;
  border-radius: 15px;
}

.error h6 {
  font-size: 1em;
  line-height: 1.7;
}

.error ul {
  list-style: square;
  padding-left: 2em;
}

.howtoStepItem section h6 {
  color: var(--main-color-dark);
  font-size: 0.9em;
  line-height: 1.7;
}

.codeBlockWrapper {
  margin-bottom: 15px;
}

.codeBlock {
  display: block;
  background: var(--sub-color);
  color: var(--accent-color);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ジェネレーター */
.generator {
  position: relative;
  min-height: 95vh;
  margin: 0 auto;
}

.generator .sectionHeader {
  position: static;
  transform: unset;
}

.generatorWidth {
  width: var(--mainWidth);
  margin: 0 auto;
  border-radius: 25px;
  overflow: hidden;
}

.generatorInner {
  background: var(--main-color-dark);
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 2rem;
}

@media (max-width: 768px) {
  .generatorInner {
    grid-template-columns: 1fr;
  }
}

.generator h3 {
  font-size: 2rem;
  margin: 0.5em 0;
  text-align: center;
  color: var(--main-color);
}

.gen-controls {
  background-color: var(--sub-color);
  color: var(--accent-color);
  border-radius: 15px;
  overflow-y: auto;
  max-height: 85vh;
}

.generator details {
  padding: 0.5em 0 0;
}

.generator details:not(.generator details:last-child) {
  border-bottom: 4px solid var(--main-color-dark);
}

.generator summary {
  font-weight: bold;
  cursor: pointer;
  padding: 0.3em 0.9em;
}

.generator label {
  font-size: 0.7rem;
  padding: 0.7em 2em 0.7em 2.5em;
  font-weight: 700;
  display: block;
}

.generator label:nth-child(odd) {
  background-color: rgb(85, 65, 0);
}

.generator label:not(.generator label:last-child) {
  /* border-bottom: 1px solid var(--main-color-dark); */
}

.generator .group {
  margin-top: 10px;
}

.generator input,
.generator textarea,
.generator select {
  width: 100%;
  border: 2px solid var(--main-color);
  border-radius: 8px;
  padding: 0.1em 0.2em;
  font-size: 0.8rem;
}

.unit-field {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.generator .checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  white-space: nowrap;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

.unit-field input[type="number"] {
  flex-grow: 1;
}

.unit-field input[type="text"] {
  width: 40px;
}

.generator input:focus,
.generator textarea:focus {
  outline: none;
  border-color: var(--sub-color);
}

.preview {
  width: 100%;
  min-height: 300px;
  background: #fff;
  border: 2px solid var(--main-color-dark);
  border-radius: 12px;
}

.copy-btn {
  background: #777;
  color: #fff;
  border: none;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--main-color-dark);
}

.copy-btn:active {
  transform: translateY(1px);
}

.generatorLead {
  position: absolute;
  top: 0;
  right: var(--paddindMax5);
  margin: 10px 20px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: bold;
}

@media (max-width: 768px) {
  .generatorLead {
    display: none;
  }
}

.generatorLead .btn {
  font-size: 1rem;
}

/* オプション一覧 */
.optionsTableContainer {
  width: var(--mainWidth);
  overflow-x: auto;
  margin: 1rem auto;
}

.optionsTable {
  width: max(100%, 800px);
  font-size: 14px;
  border-collapse: collapse;
}

.optionsTable th,
.optionsTable td {
  border: 1px solid var(--sub-color);
  padding: 8px 10px;
}

.optionsTable th {
  background: var(--sub-color);
  color: var(--accent-color);
  text-align: left;
}

/* background: var(--sub-color);
  color: var(--accent-color);
  
  .optionsTable td:first-child {
  } */



/* ディスクリプション */

.descriptionContainer {
  width: var(--mainWidth);
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.descriptionContainer ul {
  list-style-type: disc;
  margin: 20px;
}


/* スライダー共通 */
.sliderContainer {
  position: relative;
}

.sliderContainer a:hover {
  color: inherit;
}

/* 指 */
.pointer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  filter: drop-shadow(0 0 30px #fff) drop-shadow(0 0 3px #fff);
  pointer-events: none;
  transform-origin: center 150%;
}

.pointer.isShow {
  animation: swipe 1s both 3 ease-out, fade 0.5s 3s both;
}

@keyframes swipe {
  0% {
    transform: rotate(-10deg) translateX(-50px);
  }

  60% {
    opacity: 1;
  }

  100% {
    transform: rotate(20deg) translateX(50px);
    opacity: 0;
  }
}

@keyframes fade {
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* スクロールバー */
/* Firefox only */
@-moz-document url-prefix() {
  .scrollWrap {
    scrollbar-width: thin;
    scrollbar-color: #888 #f0f0f0;
  }
}

/* Chrome / Edge / Safari */
.scrollWrap::-webkit-scrollbar {
  width: 8px;
}

.scrollWrap.scrollWrapRow::-webkit-scrollbar {
  height: 8px;
}

.scrollWrap::-webkit-scrollbar-track {
  padding: 5px;
  background: var(--main-color-dark);
}

.scrollWrap::-webkit-scrollbar-thumb {
  background: var(--sub-color);
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3);
}

@media(max-width:768px) {
  .howtoStepList {
    padding: 0;
  }

  .howtoStepListItem {
    margin: 20px 0;
  }
}