* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  width: 100%;
  overflow-x: hidden;
}
body {
  font-family: 'Noto Sans JP', 'Noto Sans', sans-serif;
  color: #14284F;
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;   }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent;
  box-shadow: 0 0 0 rgba(0,0,0,0.5);
  z-index: 999;
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.logo {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 36px;           font-weight: bold;
  color: #14284F;
  position: relative;
  left: 0;
  top: 0;
  line-height: 1;
  white-space: nowrap;
  padding-left: 12px;  
}


.nav-menu {
  display: flex;
  gap: 60px;
}
.nav-menu a {
  position: relative;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
    color: transparent;
  background: linear-gradient(to right, #00909E 50%, #14284F 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 0.4s ease, transform 0.4s ease;
}
.nav-menu a:hover {
  background-position: 0 0;
  transform: scale(1.05);
}

.hamburger {
  background: none !important;    flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
    cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 100%;             height: 3px;
  background-color: #14284F;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-menu.open {
  display: flex !important;
  position: absolute;
  top: 100%;
  right: 1rem;
  flex-direction: column;
  background: white;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.nav-menu.open a {
  margin-bottom: 0.5rem;
}
.hamburger.is-active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}
.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

@media screen and (max-width: 1024px) {
  .logo {
    left: 0;
    font-size: 48px;
    padding-left: 10px;
  }
  .nav-menu {
    display: none !important;
  }
  .hamburger {
    display: flex !important;
  }

    .emblem {
    width: 80px;          height: 80px;         font-size: 6px;       bottom: 10px;
    right: 10px;
  }
}

.hero {
  width: 100vw;
  height: 960px;
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 80px;
  margin-top: 80px;

    background-image: 
    linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.3)),
    url("../img/HP-top-1.jpg");
  background-position: center;
  background-size: 90% auto;   background-repeat: no-repeat;
}
.hero-text {
  position: absolute;
  top: 430px;
  left: 200px;
  right: 80px;
  max-width: 500px;
}
.hero h2 {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(28px, 5vw, 60px);
  font-weight: 600;
  color: #ffffff;
  line-height: 2;
  margin: 0;
}

html { scroll-behavior: smooth; }


.smooth {
  position: absolute;
  top: 180px;
  right: 310px;
  clip-path: inset(0 100% 0 0);
  font-size: 4rem;
  font-weight: bold;
  color: #8be4ff;
  transition: clip-path 1.4s cubic-bezier(0.37,0,0.63,1);
  z-index: 10;
}
.smooth.is-animated {
  clip-path: inset(0);
}
  
.hero-mobile {
  display: none !important;
}

  

.services {
  text-align: center;         padding: 60px 20px;         background-color: #f9f9f9;}

.services h3 {
  font-size: 2rem;            margin-bottom: 40px;        color: #14284F;           }

.service-boxes {
  display: flex;              justify-content: center;    flex-wrap: wrap;            gap: 80px;                  max-width: 1000px;          margin: 0 auto;           }

.box {
  background: #fff;           border: 1px solid #ddd;     border-radius: 12px;        padding: 20px;              width: 280px;               box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);   transition: transform 0.3s;}

.box:hover {
  transform: translateY(-5px); }

.box img {
  width: 40px;                margin-bottom: 10px;      }

.box h4 {
  font-size: 1rem;            margin-bottom: 10px;        color: #14284F;           }

.box p {
  font-size: 0.9rem;          color: #27496D;             line-height: 1.5;         }
  

.about {
  position: relative;
  width: 100%;
  height: auto;
  padding: 100px 0 10px;    margin: 0;
}

.about-text-overlay {
  position: absolute;             top: 20%;                       right: 15%;                     background-color: rgba(0, 0, 0, 0.2);   color: #ffffff;                 padding: 30px;                  max-width: 700px;               border-radius: 12px;            font-size: 1.3rem;                line-height: 3.;               z-index: 10;                  }

.about-text-overlay #about-desc {
  line-height: 2.5;
  margin-bottom: 1em;
}

.about-text-overlay #about-desc br {
  display: block;
  margin-bottom: 1em;
}

#about-typing {
  font-size: 2.5rem;
  line-height: 1.2;
}
#about-typing .letter {
  font-size: inherit;
}

@media screen and (max-width: 768px) {

    .hero {
    background-position: center;
    background-size: cover;
  }

    .hero-text {
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: left;                padding: 2rem 1rem 1rem 1.2rem;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
  }

    .hero-text h2 {
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 700;
    max-width: 95vw;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;             word-break: break-word;          letter-spacing: 0.02em;          margin: 0;                       padding-left: 1.5rem;  
  }

    .hero-catchcopy p {
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 500;
    padding: 0 1.2rem;
    text-align: center;
  }


  
    .side-text {
    display: none;
  }

    .emblem {
    right: 50%;
    transform: translateX(50%);
    bottom: 10px;
  }

    .about-text-overlay {
    top: 10%;
    left: 5%;
    right: 5%;
    padding: 20px;
    font-size: 0.95rem;
    max-width: 90%;
  }
}


.about-image-overlay {
  position: relative;
  display: flex;
  justify-content: center;       align-items: center;           height: 1000px;                overflow: hidden;            }

.about-image-overlay img {
  width: 70%;                    height: 100%;
  object-fit: cover;             display: block;
  border-radius: 12px;         }

.about-bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);   width: 70%;                    height: 100%;
  object-fit: cover;
  border-radius: 12px;
  opacity: 0;
  animation: fade 15s infinite;}

.about-bg:nth-child(1) { opacity: 1; animation-delay: 0s; }
.about-bg:nth-child(2) { animation-delay: 5s; }
.about-bg:nth-child(3) { animation-delay: 10s; }

.about-mobile {
  display: none;
}

.about-mobile {
  display: none;
}

@media screen and (max-width: 768px) {
  .about {
    display: none !important;         }
  .about-mobile {
    display: block !important;        }

    .about-mobile {
    background-color: #f9f9f9;
    padding: 2rem 1rem;
    box-sizing: border-box;
  }
  .about-mobile-content {
    max-width: 320px;
    margin: 0 auto;
    text-align: left;
    color: #27496D;
    line-height: 1.6;
    font-size: 0.95rem;
  }
  .about-mobile-content h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: #14284F;
    text-align: center;
  }
  .about-mobile-content p {
    margin: 0;
  }
  .about-mobile-content .latin {
  font-family: 'Noto Sans JP', sans-serif;
    font-weight: 600;
    letter-spacing: 0.05em;
  }
}


@keyframes fade {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  30%  { opacity: 1; }
  40%  { opacity: 0; }
  100% { opacity: 0; }
}

@media screen and (max-width: 768px) {
    .about-image-overlay {
    height: 220px;        }
  .about-image-overlay img,
  .about-bg {
    width: 100%;            height: 100%;
    border-radius: 8px;   }
}


.message-section .message-content h2 {
  font-size: 2.5rem;         line-height: 1.2;        }

.message-section .message-content p {
  font-size: 1.4rem;         line-height: 1.6;        }

.message-section .message-content.visible {
  top: auto;                 margin: auto 0;            transform: none;         }

.fade-in-up,
.slide-in-left,
.slide-in-right,
.fade-down {
  opacity: 0;                 transform: translateY(20px);   transition: all 0.8s ease;}

.visible {
  opacity: 1;                 transform: translateY(0); }


.slideshow {
  position: relative;
  width: 100%;
  height: auto;               display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding-top: 80px;        }

.slideshow-items {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 600px;          padding-top: 60px;        }

.item {
  position: absolute;
  width: 100%;
  height: auto;
  opacity: 0;                 transition: opacity 0.5s ease;
  z-index: 0;
  padding-top: 40px;        }

.item.active {
  opacity: 1;                 z-index: 1;
}

.item-image-container {
  position: relative;
  width: 42%;               }

.item-image {
  position: relative;
  width: 100%;
  height: auto;
  opacity: 0;                 object-fit: contain;        transition: opacity .3s ease-out .45s;
}

.item.active .item-image {
  opacity: 1;               }

.item-text {
  flex: 1;
  min-width: 0;               max-width: 100%;            display: flex;
  flex-direction: column;
  justify-content: center;  }



.item-header,
.item-description {
  display: flex;                 flex-wrap: nowrap;             gap: 20px;                        white-space: nowrap;           font-size: clamp(2.0rem, 2.5vw, 2rem);
  color: #00909E;                margin-bottom: 16px;
  line-height: 1.4;
  padding-left: 20px;         }

.vertical-part {
  display: inline-block;         opacity: 0;                    transform: translateY(20px); }

.vertical-part b {
  display: inline-block;
  opacity: 0;
  transform: translateY(150%);
  transition: none !important; }

@keyframes waveIn {
  0% {
    opacity: 0;
    transform: translateY(150%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.slideshow .item.active .vertical-part {
  opacity: 1;
  transform: translateY(0);
  transition: none;            }

@media screen and (max-width: 768px) {
    .message-section .message-content h2 {
    font-size: 1.3rem; line-height: 1.2;
  }
  .message-section .message-content p {
    font-size: 1rem; line-height: 1.5;
  }
  .message-section .message-content {
    padding: 10px 10px; max-width: 98vw;
  }

    .slideshow { padding-top: 40px; }
  .slideshow-items { min-height: 320px; padding-top: 20px; }
  .item-header, .item-description {
    font-size: 1.1rem; gap: 8px; padding-left: 0;
    white-space: normal; flex-wrap: wrap;
  }
  .item-image-container { width: 90%; margin: 0 auto 16px auto; }
  .item { position: static; padding-top: 20px; }
  .vertical-part { font-size: 1rem; min-width: 0; white-space: normal; }
}








.item.item-row,
.item.item-row-reverse {
  display: flex;                        align-items: center;                  justify-content: space-between;       padding: 40px;                        gap: 40px;                          }
.item.item-row-reverse {
  flex-direction: row-reverse;        }

.controls {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10;
  margin-top: 40px;
}
.controls ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.controls li {
  display: inline-block;
  width: 14px; height: 14px;
  margin: 0 6px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}
.controls li.active {
  background: #27496D;
}

.message-section {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin: 80px 0 40px;
  background-color: #DAE1E7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.message-bg-slide {
  position: absolute;
  width: 100%; height: 100%;
  background-color: #00909E;
  left: 100%;     top: 0;
  z-index: 1;
}
.message-bg-slide.slide-in-from-right {
  animation: slideLeft 1.2s ease-out forwards;
}
@keyframes slideLeft {
  to { left: 0; }
}

.message-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  top: 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease 0.8s, transform 1s ease 0.8s;
}
.message-content.visible {
  opacity: 1;
  transform: translateY(0);
}
.message-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.message-content p {
  font-size: 1.1rem;
  line-height: 1.8;
}

.fade-text {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s, transform 1.2s;
}
.fade-text.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-text.delay.visible {
  transition-delay: 0.5s;
}

.mission-message {
  background-color: #f7f9fb;
  padding: 80px 20px;
  text-align: center;
}
.mission-message p {
  font-size: 1.1rem;
  line-height: 2;
  color: #27496D;
  margin-bottom: 20px;
}
.slideshow-message-text {
  font-size: 1.5rem;
  line-height: 2;
  color: #27496D;
  font-weight: 500;
  text-align: center;
  max-width: 800px;
  margin: 40px auto 0;
}
.slideshow-message-text p {
  margin-bottom: 20px;
}
.slideshow-message-text strong {
  color: #00909E;
  font-weight: bold;
}

@media screen and (max-width: 768px) {
    .item.item-row,
  .item.item-row-reverse {
    flex-direction: column !important;      text-align: center;                      padding: 20px;                           gap: 20px;
  }
    .message-section {
    height: 120px;
    margin: 40px 0 20px;
    padding: 0 4vw;
  }
  .message-content h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }
  .message-content p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  .controls {
    bottom: 4px;
    margin-top: 10px;
  }
  .mission-message {
    padding: 40px 5vw;
  }
  .slideshow-message-text {
    font-size: 1.05rem;
    margin: 20px auto 0;
    max-width: 98vw;
  }
}





 
.projects {
  background-color: #f4f4f4;   padding: 80px 20px;        }

.projects-container {
  display: flex;                flex-wrap: wrap;              gap: 40px;                    max-width: 1100px;
  margin: 0 auto;
  align-items: flex-start;
}

.projects-text {
  flex: 1;
  min-width: 280px;
  max-width: 320px;             text-align: left;             padding-top: 10px;
}
.projects-text h3 {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 50px;
  color: #14284F;
}
.projects-text p {
  margin-bottom: 20px;
  padding-right: 40px;
  font-size: 0.95rem;
  line-height: 2;
  color: #27496D;
}

.project-grid {
  flex: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);   gap: 30px;                min-width: 400px;
  margin-top: 20px;
}

.project-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: hidden;
  text-align: center;
}
.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;          display: block;
}
.project-title {
  background-color: #14284F;
  color: white;
  font-size: 0.95rem;
  padding: 10px;
  font-weight: 500;
}

.project-nav {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  gap: 20px;
}
.nav-button {
  background-color: #14284F;
  color: white;
  border: none;
  padding: 10px 24px;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.nav-button:hover {
  background-color: #27496D;
}

@media screen and (max-width: 768px) {
    .projects-container {
    flex-direction: column;       align-items: center;          gap: 24px;
  }
    .projects-text {
    text-align: center;
    max-width: 100%;
    padding-right: 0;
    padding-top: 0;
  }
  .projects-text h3 {
    font-size: 1.25rem;
    margin-bottom: 28px;
  }
  .projects-text p {
    padding-right: 0;
    font-size: 0.92rem;
    margin-bottom: 14px;
  }
    .project-grid {
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
    margin-top: 10px;
    gap: 16px;
  }
    .project-label {
    background-color: #27496D;
    color: white;
    padding: 12px;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 500;
    border-top: 1px solid #ccc;
  }
    .project-nav {
    margin-top: 28px;
    gap: 12px;
  }
}







.contact {
  background-color: #f4f4f4;           background-size: cover;
  background-position: center;
  padding: 100px 20px;
  position: relative;
}
.contact-overlay {
  background-color: rgba(255, 255, 255, 0.9);   max-width: 600px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  text-align: center;
}
.contact h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #14284F;
}
.contact p {
  font-size: 0.95rem;
  margin-bottom: 30px;
  color: #27496D;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
.contact-form button {
  background-color: #14284F;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
.contact-form button:hover {
  background-color: #27496D;
}

@media screen and (max-width: 768px) {
  .contact {
    padding: 40px 6vw;
  }
  .contact-overlay {
    padding: 20px 6vw;
    max-width: 98vw;
  }
  .contact h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }
  .contact-form input,
  .contact-form textarea {
    font-size: 0.96rem;
    padding: 10px;
  }
  .contact-form button {
    width: 100%;
    font-size: 1.05rem;
    padding: 10px 0;
  }
}


button,
input[type="submit"] {
  background-color: #27496D;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
button:hover,
input[type="submit"]:hover {
  background-color: #14284F;
}

h3 {
  font-size: 1.6rem;
  color: white;
  margin-bottom: 20px;
}

.site-footer {
  background-color: #DAE1E7;
  padding: 40px 20px 0;
  font-size: 0.95rem;
  color: #27496D;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #ddd;
}
.footer-contact .email-label {
  font-weight: bold;
  margin-bottom: 5px;
}
.footer-contact .email {
  margin-bottom: 10px;
  color: #27496D;
}
.footer-logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #14284F;
  font-family: 'Noto Sans JP', sans-serif;
}
.footer-links .section-title,
.footer-social .section-title {
  font-weight: bold;
  margin-bottom: 10px;
}
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 6px;
}
.social-icons {
  display: flex;
  gap: 10px;
}
.social-icons img {
  width: 24px;
  height: 24px;
  opacity: 0.8;
  transition: opacity 0.3s;
}
.social-icons img:hover {
  opacity: 1;
}
.footer-bottom {
  width: 100vw;                              background-color: #14284F;
  color: #DAE1E7;
  padding: 16px 10px;
  text-align: center;
  font-size: 0.85rem;
  margin-left: calc(-50vw + 50%);          }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero-text h2 {
  opacity: 0;
  animation: fadeUp 1.8s ease-out 0.6s forwards;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s ease, transform 1.5s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

#about-typing, #about-desc {
  font-family: 'Courier New', monospace;
  white-space: pre-line;
}
.typing-fade {
  opacity: 0;
  transition: opacity 5s ease-in-out;
}
.typing-fade.visible {
  opacity: 1;
}
.letter {
  font-family: 'Courier New', monospace;
  opacity: 0;
  transform: translateY(8px);
  display: inline-block;
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.letter.visible {
  opacity: 1;
  transform: translateY(0);
}


.slide-in-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}
.slide-in-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.contact {
  background-color: #f4f4f4;        background-size: cover;
  background-position: center;
  padding: 100px 20px;
  position: relative;
}
.contact-overlay {
  background-color: rgba(255, 255, 255, 0.9);
  max-width: 650px;
  margin: 0 auto;
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  text-align: center;
}
.contact h3 {
  font-size: 24px;                    font-weight: 700;
  margin-bottom: 20px;
  color: #14284F;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact p {
  font-size: 0.95rem;
  margin-bottom: 30px;
  color: #27496D;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
.contact-form button {
  background-color: #14284F;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
.contact-form button:hover {
  background-color: #27496D;
}

.latin {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  display: inline-block;
  font-size: 1.2em;      }

.sticky-section {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.fade-layer {
  transform: translateY(40px);
  opacity: 0;
  transition: all 1s ease;
}
.fade-layer.visible {
  transform: translateY(0);
  opacity: 1;
}

.emblem {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  animation: spinZ 20s linear infinite;
  pointer-events: none;
  z-index: 1000;
  font-family: 'Noto Sans JP', sans-serif;
}
.emblem span {
  position: absolute;
  left: 50%; top: 50%;
  transform-origin: 0 0;
  font-size: 12px;
  color: #00909E;
  font-weight: bold;
  white-space: pre;
  text-transform: uppercase;
}
@keyframes spinZ {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media screen and (max-width: 768px) {

      .hero-mobile {
    display: none !important;
  }
    .hero {
    display: none !important;
  }
  .hero-mobile {
    display: block !important;
    position: relative;
    width: 100%;
        background:
      linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.3)),
      url("../img/HP-top-1.jpg") center/cover no-repeat;
    padding: 4rem 1rem;
    box-sizing: border-box;
    text-align: center;
        height: 60vh;
    min-height: 300px;
    max-height: 500px;
    background-size: center auto 100%;
  }
    .hero-mobile-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    max-width: 280px;
    margin: 0 auto;
    color: #8be4ff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .hero-mobile-content h2 {
    font-size: clamp(24px, 6vw, 36px);
    line-height: 1.3;
    margin: 0;
  }
  .hero-mobile-content p {
    font-size: 1.rem;
    line-height: 1.6;
    margin: 0;
  }

      .about-desktop {
    display: none !important;
  }
    .about-mobile {
    display: block !important;
    background-color: #f9f9f9;
    padding: 2rem 1rem;
    box-sizing: border-box;
  }
  .about-mobile-content {
    max-width: 320px;
    margin: 0 auto;
    text-align: left;
    color: #27496D;
    line-height: 1.6;
    font-size: 0.95rem;
  }
  .about-mobile-content h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: #14284F;
    text-align: center;
  }
  .about-mobile-content p {
    margin: 0;
  }
  .about-mobile-content .latin {
  font-family: 'Noto Sans JP', sans-serif;
    font-weight: 600;
    letter-spacing: 0.05em;
  }
    .about-mobile .about-background-overlay {
    position: relative;
    height: 300px;
    overflow: hidden;
  }
  .about-mobile .about-bg {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    height: 100%; width: auto;
    object-fit: cover;
    border-radius: 12px;
    opacity: 0;
    animation: fade 15s infinite;
  }
  .about-mobile .about-bg:nth-child(1) { animation-delay: 0s; }
  .about-mobile .about-bg:nth-child(2) { animation-delay: 5s; }
  .about-mobile .about-bg:nth-child(3) { animation-delay: 10s; }

    .slideshow-items {
    position: relative !important;
    height: 35vh;          min-height: 300px;
    overflow: hidden !important;
  }
  .slideshow-items .item {
        position: absolute !important;
    top: 0; left: 0;
    width: 100%; height: 100%;
    padding-top: 0 !important;
    opacity: 0;
    transition: opacity .5s ease !important;
    z-index: 0;
  }
  .slideshow-items .item.active {
        opacity: 1;
    z-index: 1;
  }
    .slideshow-items .item-image-container {
    width: 100% !important;
    margin-bottom: 1rem;
  }
  .slideshow-items .item-text {
    position: absolute;
    bottom: 0.5rem;
    left: 1rem; right: 1rem;
    background: rgba(255,255,255,0.8);
    padding: 1rem;
    border-radius: 6px;
  }
}

@keyframes fade {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  30%  { opacity: 1; }
  40%  { opacity: 0; }
  100% { opacity: 0; }
}

@media screen and (max-width: 768px) {
  .emblem {
    position: fixed !important;      bottom: 5px     !important;      right: 5px      !important;      width: 80px     !important;      height: 80px    !important;      font-size: 6px  !important;      pointer-events: none;          }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (max-width: 768px) {
  .hero-mobile-content h2,
  .hero-mobile-content p {
    opacity: 0;                   transform: translateY(20px);
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
  }

    .hero-mobile-content h2 {
    animation-name: fadeInUp;
    animation-duration: 0.8s;
    animation-delay: 0.3s;
  }

    .hero-mobile-content p {
    animation-name: fadeInUp;
    animation-duration: 0.8s;
    animation-delay: 0.7s;
  }
}

.contact-mobile {
  display: none !important;
}

@media screen and (max-width: 768px) {
  .contact {
    display: none !important;
  }
  .contact-mobile {
    display: block !important;
    padding: 2rem 1rem;
    background-color: #f4f4f4;
  }

  .contact-mobile-content {
    max-width: 320px;
    margin: 0 auto;
    text-align: center;
    background: rgba(255,255,255,0.9);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  }

  .contact-mobile-content h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #14284F;
  }

  .contact-mobile-content .contact-form input,
  .contact-mobile-content .contact-form textarea {
    font-size: 1rem;
    padding: 10px;
    margin-bottom: 12px;
  }

  .contact-mobile-content .contact-form button {
    width: 100%;
    font-size: 1rem;
    padding: 12px 0;
  }
}

br.mobile-only {
  display: none;
}

@media screen and (max-width: 768px) {
  br.mobile-only {
    display: block;   }
}

.contact {
  display: block;           }
.contact-mobile {
  display: none;            }
br.tablet-only {
  display: none;            }
.hamburger {
  display: none;            }

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .logo {
    left: 0;
    font-size: 56px;       padding-left: 15px;
  }
  .nav-menu {
    display: flex !important;
    gap: 40px;
  }
  .hamburger {
    display: none !important;
  }

    .hero {
    padding: 60px 40px;
    background-size: cover;
    background-position: center;
    flex-direction: column;
    align-items: center;
  }
  .hero-text {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -40%);
    text-align: center;
    max-width: 80%;
  }
  .hero-text h2 {
    font-size: clamp(48px, 5vw, 65px);
    line-height: 1.3;
  }
  .hero-catchcopy .smooth {
    position: absolute;
    top: 650px;
    left: 220px;
    font-size: 2.5rem;
    line-height: 1.3;
    text-align: center;
  }

    .service-boxes {
    gap: 60px;
  }
  .box {
    width: 240px;
  }

    .item {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .item.item-row {
    flex-direction: column-reverse !important;    }
  .item.item-row-reverse {
    flex-direction: column !important;            }
  .item-image-container {
    width: 80%;
    margin-bottom: 1.5rem;
  }
  .item-text {
    width: 90%;
    max-width: 600px;
    margin: 0 auto 2rem;
  }
  .item-header .vertical-part b,
  .item-description .vertical-part b {
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    line-height: 1.4;
  }
  .item-header,
  .item-description {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    white-space: normal !important;
  }

    .slideshow {
    margin-bottom: 5rem;
  }
  .slideshow .controls {
    position: static !important;
    margin: 2rem auto 0;
    transform: none !important;
    text-align: center;
    width: 100%;
  }

    br.tablet-only {
    display: block;
  }
}

@media screen and (max-width: 768px) {
    .contact .contact-overlay {
    display: none !important;
  }
  .contact-mobile {
    display: block !important;
  }

    .hamburger {
    display: block;
  }
  .nav-menu {
    display: none !important;
  }

    br.tablet-only {
    display: none;
  }
}

@media screen and (min-width: 768px) {
    .logo {
    font-size: 75px;
  }
    .hamburger {
    display: none !important;
  }
}

@media screen and (max-width: 768px) {
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 24px;
    height: 18px;
    background: none !important;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    outline: none;
  }

  .hamburger span {
    display: block;
    width: 100%;                height: 3px;
    background-color: #14284F;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
}

@media screen and (max-width: 1534px) {
  .item {
    flex-direction: column !important;       text-align: center;
    padding: 20px 16px;
  }

  .item-image-container {
    max-width: 100%;
    display: flex;
    justify-content: center;
  }

  .item-image {
    max-width: 90%;
    height: auto;
  }

  .item-header,
  .item-description {
    font-size: clamp(18px, 2.2vw, 24px);      display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3em;
  }
}