﻿

section.main {
    width: 100%;
    position: relative;
    padding: 61px 0 50px 0;
    z-index: 2;
    height: 71vh;
}


.main-wrap {
    width: 85%;
    margin: 0 0 0 auto;
    height:100%;
}

.read {
    position: relative;
    width: 90%;
    margin: 25px auto 0;
}


.read dt{
    letter-spacing: 0.05em;
    color: var(--black);
    text-align: center;
    font-size: 1.3em;
}
.svg-container {
            width: 100%;
            max-width: 380px;
            line-height: 0;
            margin: 0;
        }

        svg {
            width: 100%;
            height: 100%;
            overflow: visible;
        }


/**/
#m1 { 
    animation: reveal-width 0.8s ease-out forwards 0s; 
}

/* 2. 「0」：「9」が開き始めた0.5秒後から開始 */
#m2 { 
    animation: reveal-width 0.8s ease-out forwards 0.5s; 
}

/* 3. 黄色いライン：数字がほぼ出揃った1.2秒から描き込み開始 */
#m-path { 
    animation: draw-line-mask 1.5s ease-in-out forwards 1.2s; 
}

/* 4. 「TH」：ラインが描き込まれている途中の2.2秒にフェードイン */
#part-th { 
    animation: fade-in-90th 0.5s ease-out forwards 2.2s; 
}

/* 5. 下のロゴ：最後にすらっと出す（2.7秒から） */
#m-text { 
    animation: reveal-width 1.2s cubic-bezier(0.25, 0.1, 0.25, 1) forwards 2.7s; 
}

/* --- 共通キーフレーム --- */
@keyframes reveal-width { to { width: 850px; } }
@keyframes draw-line-mask { to { stroke-dashoffset: 0; } }
@keyframes fade-in-90th { to { opacity: 1; } }

/* レイアウト等のCSS（変更なし） */
.nagasaki-bus-logo-wrapper {width: 100%;max-width: 130px;margin: 0;}
.nagasaki-bus-svg { width: 100% !important; height: auto !important; display: block; }
.nagasaki-bus-svg image { max-width: none !important; }
/**/

.top_bus {
    position: absolute;
    bottom: 20%;
    width: 66%;
    right: 9%;
}

.top_bus img {
    transform: rotate(12deg);
}

        .garamond-text {
            font-family: 'EB Garamond', serif;
            font-weight: var(--fw-normal);
            fill: rgba(0, 0, 0, 0);
            stroke: var(--black);
            stroke-width: 0.5;
            stroke-dasharray: 1000;
            stroke-dashoffset: 1000;
            letter-spacing: 0.01em;
            animation: drawLine 3s ease-in-out forwards;
        }

        .fill-layer {
            font-family: 'EB Garamond', serif;
            font-weight: var(--fw-normal);
            fill: var(--black);
            opacity: 0;
            letter-spacing: 0.01em;
            animation: fadeIn 0.5s ease-out 2.8s forwards;
        }

        .line1 {font-size: 206px;}
        .line2 {font-size: 54px;letter-spacing: 0.05em;}

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

        @keyframes fadeIn {
            to { opacity: 1; }
        }
.line-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 1;
    height: 100%;
}


.line-container.is-hidden {
    opacity: 0.1;
}

.nagasaki-bg-line {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
    animation: ani-draw-line 4s ease-out 3s forwards;
}
.blue-stroke {stroke: #00428d;transform: rotate(-49deg);d: path("M -610 450 L 2110 -360");}
.red-stroke  {stroke: #c8161d;d: path("M -1790 110 L 2070 580");}


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


.scroll {
  cursor: pointer;
  position: absolute;
  width: 15%;
  height: 11%;
  bottom: 0;
  margin: auto;
  left: 0;
  right: 0;
  overflow: hidden;
  z-index: 1;
  box-sizing: border-box;
}

.scroll a:before {
  -moz-animation-name: anime1;
  -moz-animation-duration: 5s;
  -moz-animation-timing-function: ease;
  -moz-animation-iteration-count: infinite;
  -webkit-animation-name: anime1;
  -webkit-animation-duration: 5s;
  -webkit-animation-timing-function: ease;
  -webkit-animation-iteration-count: infinite;
  -o-animation-name: anime1;
  -o-animation-duration: 5s;
  -o-animation-timing-function: ease;
  -o-animation-iteration-count: infinite;
  -ms-animation-name: anime1;
  -ms-animation-duration: 5s;
  -ms-animation-timing-function: ease;
  -ms-animation-iteration-count: infinite;
  content: "";
  position: absolute;
  top: 32px;
  height: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: 1px;
  text-align: center;
  z-index: 100;
  display: block;
  overflow: hidden;
}

.scroll a {
  position: absolute;
  margin: 0 auto;
  display: block;
  text-align: center;
  cursor: pointer;
  height: 100%;
  overflow: hidden;
  z-index: 100;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  color: var(--black);
  font-size: 0.9em;
  letter-spacing: 0.08em;
  font-family: var(--en);
  padding: 7px 7px;
  box-sizing: border-box;
  width: 100%;
  font-weight: var(--fw-medium);
}



@-moz-keyframes anime1 {
  0% {
    width: 1px;
    height: 0;
    background-color: none;
  }

  100% {
    width: 1px;
    height: 100%;
    background-color: var(--black);
  }
}

@-webkit-keyframes anime1 {
  0% {
    width: 1px;
    height: 0;
    background-color: none;
  }

  100% {
    width: 1px;
    height: 100%;
    background-color: var(--black);
  }
}

@-o-keyframes anime1 {
  0% {
    width: 1px;
    height: 0;
    background-color: none;
  }

  100% {
    width: 1px;
    height: 100%;
    background-color: var(--black);
  }
}

@-ms-keyframes anime1 {
  0% {
    width: 1px;
    height: 0;
    background-color: none;
  }

  100% {
    width: 1px;
    height: 100%;
    background-color: var(--black);
  }
}



.top__head {
    position: relative;
}

.top__head .jp{
    font-size:0.8em;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--black);
}



.top__head .en {
    color: var(--black);
    font-family: var(--en);
    font-weight: var(
    --fw-normal);
    font-size: 3em;
    letter-spacing: 0.03em;
    line-height: 1.1;
}

section.contents {
    margin: 60px auto 0;
    z-index: 1;
    position: relative;
}

/*news*/

ul.news-list li a span {font-size: 0.8em;font-weight: var(--fw-normal);color: var(--black);}

ul.news-list li {
    border-bottom: 1px solid;
    width: 100%;
    padding: 0 0 10px 0;
}

ul.news-list li a p{
    position:relative;
    padding: 0 11px 0 0;
    color: var(--black);
}

ul.news-list li a:hover p,ul.news-list li a:hover p:after{
    color: var(--blue);
}


ul.news-list li a p:after{
    font-family: "Font Awesome 5 Free";
    content: "\f08e";
    position: absolute;
    right: 0;
    top: 3px;
    font-weight: 900;
    font-size: 12px;
    color: var(--black);
}

ul.news-list {
    gap: 20px;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

button#newsToggleBtn {
    width: 30px;
    height: 30px;
    background: var(--black);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0;
    border-radius: 50%;
    color: var(--white);
    font-size: 25px;
    font-weight: 300;
}

button#newsToggleBtn:before {
    content: "";
    width: 16px;
    height: 1px;
    background: var(--white);
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
}

button#newsToggleBtn:after {
    content: "";
    width: 1px;
    height: 16px;
    background: var(--white);
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
    top:0;
    bottom:0;
    opacity:1;
    
}

button#newsToggleBtn.is-active:after {
    opacity: 0;
}

/* 2件目以降のコンテナ */
#moreNews {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    width: 100%;
}

#moreNews.is-open {
    max-height: 1000px;
    opacity: 1;
    width: 100%;
}

.toggle-btn {
    transition: transform 0.3s ease;
}

.contents-box {
    margin: 0 auto 70px;
    position: relative;
    z-index: 2;
}


/*history*/

#history {
    position: relative;
}

#history .text-wrap {
    display: grid;
    gap: 30px;
}



.figure-box figure {
    position: relative;
    z-index: 3;
    background: #fff;
}

.fig-text {
    position: relative;
    margin: 0 auto;
    line-height: 1;
    color: var(--black);
}

.fig-wrap b {
    display: block;
    margin: 0 auto 10px;
    font-weight: var(--fw-semibold);
    font-size: 1.1em;
    letter-spacing: 0.05em;
}


.figure-box {
    display: flex;
    flex-wrap: wrap;
}

.fig-wrap-y{
    text-align: center;
    margin: auto;
    order: 1;
}

.fig-wrap-y .year {
    display: block;
    font-size: 5em;
    font-weight: var(--fw-normal);

    color: var(--blue);
    text-align: center;
    width: 100%;
    margin: 0 0 2px 0;
    line-height: 1;
    opacity: 0.8;
    font-style: italic;
    letter-spacing: 0;
}

.f02 .fig-wrap-y .year{
    color: var(--red-900);
}

.figure-box figure {
    order: 2;
    margin: 10px auto 20px;
    z-index: 3;
}

.fig-wrap-y small {font-size: 0.9em;text-align: center;display: block;width: 100%;font-family: var(--en);font-weight: 400;font-style: italic;color: var(--black);}

.fig-text p {
    text-align: left;
}

.his-text {
    text-align: center;
    color: var(--black);
    font-weight: var(--fw-medium);
    /* padding: 50px 0; */
    font-size: 1.3em;
}

.his-text b {
    display: block;
    letter-spacing: 0.05em;
    margin: 0 auto 10px;
}

.his-text small.small-text {
    font-family: var(--en);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.01em;
    font-size: 0.9em;
}

.his-line {
    stroke: #ccc;
    stroke-width: 1;
    stroke-dasharray: 3 4;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    animation: flowVertical .5s linear infinite;
}

@keyframes flowVertical {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -7;
    }
}

/* 文字全体のスタイル */
.small-text.js-small-animate {
    display: block;
    visibility: visible;
}

/* 一文字ずつのスタイル */
.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(5px);
    /* font-style: normal; */
    letter-spacing: 1px;
}

/* 出現アニメーション */
@keyframes char-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


#about-logo .figure-box figure {
    margin: 0 auto 40px;
    background: var(--white);
    display: block;
    max-width: 290px;
}


#about-logo .fig-wrap b {
    font-style: italic;
}


/*works*/

#works {background: #000000c2;padding: 70px 0;margin: 0 auto;}

#works .top__head * {
    color: var(--white);
}

#works .fig-wrap {
    display: flex;
    gap: 5px;
}

.lightbox-wrap a {
    display: block;
    border: 1px solid var(--gray);
    overflow: hidden;
    box-sizing: border-box;
}

.lightbox-wrap a:hover img {
    transform: var(--scale-hover);
}

.lightbox-wrap a img {
    transform:scale(1.0);
    transition: var(--duration-scale);
}

.lb-data .lb-close {
    position: relative;
    background: transparent;
}

.lb-data .lb-close:before,
.lb-data .lb-close:after{
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    background: var(--white);
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    z-index: 1;
}

.lb-data .lb-close:after {
    transform: translateY(-50%) rotate(-45deg);
}


@media (min-width: 500px) {
    .line-container {
        top: 90px;
    }

    section.main {
    height: 71vh;
    padding: 120px 0 0 0;
}

    .blue-stroke {
    d: path("M -30 370 L 560 -680");
    transform: rotate(0deg);
}

.red-stroke {
    d: path("M -500 -50 L 1040 220");
}

.nagasaki-bus-logo-wrapper {
    max-width: 170px;
}

.top_bus {
    max-width: 300px;
    bottom: 20%;
    right: 11%;
}
    
/*logo*/
    #about-logo .figure-box figure{
        max-width:500px;
    }

    
}

@media (min-width: 767px) {

 section.main {
    height: 71vh;
    padding: 58px 0 0 0;
}

.read {
    margin: 60px auto 0;
}

.read dt {
    font-size: 1.5em;
}

.svg-container{
    margin: 0;
}

.line1 {
    font-size: 38vw;
}

.line2 {
    font-size: 9.5vw;
}

.nagasaki-bus-logo-wrapper {
    max-width: 250px;
}

.top_bus {
    bottom: 17%;
    max-width: 460px;
}

.blue-stroke {
    d: path("M -330 855 L 1180 -1300");
}

.red-stroke {
    d: path("M -910 -20 L 2420 460");
}

.top__head .en {
    font-size: 3.5em;
}

.top__head .jp {
    font-size: 0.9em;
}

/*news*/
    
ul.news-list li a span {
    font-size: 0.9em;
}

button#newsToggleBtn {
    width: 60px;
    height: 60px;
    font-size: 51px;
}

button#newsToggleBtn:before {
    width: 30px;
}

button#newsToggleBtn:after {
    height: 30px;
}

ul.news-list li a p:after {
    font-size: 17px;
    top: 0;
}

.contents-box{
    margin:0 auto 100px;
}


/*history*/
.fig-wrap-y .year {
    font-size: 10em;
}

.fig-wrap b {
    font-size: 1.4em;
}

.fig-text-wrap {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    margin: -68px 0 0 0;
    z-index: 3;
    position: relative;
}

.fig-wrap-y {
    margin: 0 0 0 0;
}

.fig-text {
    margin: 110px 0 0 40px;
}

svg.his-line-svg {
    overflow: hidden;
}

.his-line {
    stroke-width: 0.5;
    stroke-dasharray: 2 3;
}


@keyframes flowVertical {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -5;
    }
}
/*works*/
#works {
    padding: 100px 0;
}
    
#works .fig-wrap {
    max-width: 650px;
    display: flex;
    gap: 7px;
}

#works .about-wrap > div {
    display: flex;
    justify-content: space-between;
    gap:50px;
}


}
@media (min-width: 991px) {

   .blue-stroke {
    d: path("M -180 940 L 670 -1600");
}

.red-stroke {
    d: path("M -490 40 L 2570 520");
}
    
}



@media (min-width: 1100px) {	

section.main {
    padding: 93px 0 0 0;
    height: 91vh;
}

.read {
    margin: 50px auto 0;
    width: 86%;
}

.read dt {
    font-size: 2em;
    text-align: left;
}

  .read dt {
    position: absolute;
    top: 23%;
    left: 1%;
}

.read dt span {
    display: block;
    /* text-align: center; */
    margin: 14px auto 0;
}

.svg-container {
    max-width: 670px;
}

.line1 {
    font-size: 21vw;
    stroke-width: 1.5;
}

.line2 {
    font-size: 5.5vw;
    stroke-width: 1;
}

.top_bus {
    max-width: 590px;
    right: 7%;
    bottom: 15%;
}

.blue-stroke {
    d: path("M -240 1590 L 980 -1730");
}

.red-stroke {
    d: path("M -10 200 L 1010 420");
}

section.contents {
    margin: 140px auto 0;
}

.top__head {
    display: flex;
    align-items: baseline;
}

.top__head .en {
    font-size: 4em;
    letter-spacing: 0.05em;
}

.top__head .jp {
    margin: 0 0 0 15px;
    font-size: 1.1em;
}

ul.news-list li a span {
    font-size: 1.1em;
}

ul.news-list li a p {
    font-size: 1.3em;
}

.contents-box {
    margin: 0 auto 170px;
}

#history .fig-wrap .figure-box {
    /* width: 57%; */
}

.figure-box figure {
    order: inherit;
    margin: 0;
}

#history .fig-wrap {
    /* display: flex; */
    /* justify-content: space-between; */
    /* align-items: center; */
    position: relative;
}


.fig-wrap-y .year {
    padding: 0 0 0 30px;
    font-size: 12em;
}

.fig-wrap-y small {
    text-align: left;
    font-size: 1.1em;
    padding: 0 0 0 40px;
}

.fig-wrap b {
    font-size: 2.2em;
    line-height: 1.5;
}

.fig-wrap b span {
    display: block;
}

#history .fig-wrap:nth-child(even) {
    flex-direction: row-reverse;
}

#history .fig-wrap:nth-child(even) .fig-text{left: 0;width: 100%;}

.fig-wrap:nth-child(even) .year {
    text-align: right;
    padding: 0 30px 0 0;
}

.fig-wrap:nth-child(even) .figure-box small {
    text-align: right;
    padding: 0 40px 0 0;
}

.his-text b {
    font-size: 1.5em;
    margin: 0 auto 10px;
}

.his-text small.small-text {
    font-size: 1.1em;
}

    #history .fig-wrap.f02 {
    display: flex;
    flex-wrap: wrap;
    flex-flow: column-reverse;
}

#history .fig-wrap.f02 .fig-text-wrap {flex-direction: row;margin: 0 0 0 0;}

#history .fig-wrap.f02 .fig-text-wrap .fig-text {
    margin: 0 40px 0 0;
}

#history .fig-wrap.f02 .figure-box {
    justify-content: end;
}

#history .fig-wrap.f02 .fig-wrap-y.pc {
    display: flex !important;
    flex-wrap: wrap;
    flex-direction: column-reverse;
    margin: 50px 0 -50px 0;
}

#history .fig-wrap.f02 .fig-wrap-y small.small-text {
    text-align: right;
}

.his-line {
    stroke-width: 0.3;
    stroke-dasharray: 2 2;
}


@keyframes flowVertical {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -4;
    }
}

    
#about-logo .fig-text {
    max-width: 400px;
    margin: 20px auto 0;
}

/*works*/
#works {
    /* padding: 110px 0; */
}

}

@media (min-width: 1200px) {
      .scroll {
        height: 14%;
        bottom: -70px;
    }
    .scroll a {
    }
    
    .scroll a:before {
        top: 40px;
    }
    
  .read dt {
    position: absolute;
    top: 26%;
    left: 1%;
}

.read dt span {
    display: block;
    text-align: left;
    margin: 14px auto 0;
}

    .svg-container g:first-child {
    transform: translate(0%, 11%);
}
    
/*works*/
 #works .fig-wrap {
    max-width: 660px;
}   
    
}

@media (min-width: 1499px) {
.line1 {
    font-size: 320px;
    stroke-width: 1px;
}

.line2 {
    font-size: 90px;
    stroke-width: 1px;
}

section.main {
    height: 100vh;
}

.line-container {
    top: 0;
}

    
.read {
    margin: 90px auto 0;
    width: 86%;
}

.nagasaki-bus-logo-wrapper {
    max-width: 300px;
}

.top_bus {
    max-width: 720px;
    right: 12%;
}

.read dt {
    left: 5%;
    top: 59%;
}

.blue-stroke {
    d: path("M 60 560 L 430 -72");
    stroke-width: 3px;
}

.red-stroke {
    d: path("M -10 310 L 1730 560");
    stroke-width: 3px;
}


.scroll {
    bottom: 0;
}

#history .text-wrap {
    /* gap: 130px; */
}

.top__head .en {
    font-size: 5.5em;
}

.top__head .jp {
    font-size: 1.2em;
}

.fig-wrap-y .year {
    font-size: 11em;
    /* margin: -80px 0 0 0; */
}

.fig-wrap b {
    font-size: 2.5em;
}


#history .fig-wrap.f02 .fig-wrap-y.pc {
    margin: 90px 0 -50px 0;
}

.his-text small.small-text {
    font-size: 1.5em;
}

.his-text b {
    font-size: 1.8em;
    margin: 0 auto 20px;
}


#about-logo .fig-text {
    max-width: 450px;
}
    
}

@media (min-width: 1699px) {

  .read dt {
    position: absolute;
    top: 42%;
    left: 8%;
}

    .svg-container g:first-child {
    transform: translate(0%, 10%);
}

.svg-container g:last-child {
    transform: translate(30%, 43%);
}

    .blue-stroke {
    d: path("M 70 560 L 430 -72");
    stroke-width: 3px;
}

.red-stroke {
    d: path("M -10 280 L 1430 510");
    stroke-width: 3px;
}

}

