@charset "UTF-8";

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  --color-text: #404040;
  --color-white: #fff;
  --font-en: "Jura", sans-serif;
  --font-jp: "Inter", sans-serif;
  --max-width: 1080px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-jp);
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-white);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s;
}

a:hover {
  opacity: 0.7;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

/* ==========================================================================
   Common Layout
   ========================================================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 4%;
  width: 100%;
}

.section {
  padding: 100px 0;
}

.section-title {
  font-family: var(--font-en);
  font-size: 2.5rem;
  letter-spacing: 0.1em;
  text-align: center;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  display: inline-block;
  padding-bottom: 15px; /* Space for border */
}

/* Section Title Border Animation */
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-text);
  transition: width 1s ease 0.5s; /* Delay to start after title fades in */
}

.section-title.visible::after {
  width: 100%;
}

/* Wrapper to center the inline-block title for the border animation to work relative to text */
.section h2 {
    display: table;
    margin: 0 auto 60px;
}

/* ==========================================================================
   Header
   ========================================================================== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: transparent;
  z-index: 100;
  transition: all 0.4s ease;
  color: var(--color-text);
}

#header.scrolled {
  height: 60px;
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--color-text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
}

.logo {
  font-family: var(--font-en);
  font-size: 1.8rem;
  font-weight: 500;
  transition: font-size 0.4s ease;
}

#header.scrolled .logo {
  font-size: 1.4rem;
}

.pc-nav ul {
  display: flex;
  gap: 40px;
}

.pc-nav li a {
  font-family: var(--font-en);
  font-size: 1rem;
  letter-spacing: 0.05em;
  position: relative;
}

.pc-nav li a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width 0.3s;
}

.pc-nav li a:hover::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  z-index: 101;
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transition: all 0.4s;
}

.hamburger span:nth-child(1) {
  top: 0;
}
.hamburger span:nth-child(2) {
  top: 9px;
}
.hamburger span:nth-child(3) {
  bottom: 0;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  background-color: var(--color-text);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  background-color: var(--color-text);
}

.sp-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 100;
}

.sp-nav.active {
  opacity: 1;
  pointer-events: auto;
}

.sp-nav ul {
  text-align: center;
}

.sp-nav li {
  margin-bottom: 30px;
}

.sp-nav li a {
  font-family: var(--font-en);
  font-size: 1.5rem;
  color: var(--color-text);
}

/* ==========================================================================
   Main Visual
   ========================================================================== */
.mv {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mv-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../img/MV.jpeg");
  background-size: cover;
  background-position: center;
  opacity: 0; /* JS Animation initial state */
  animation: fadeIn 1.5s ease forwards;
}

.mv-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mv-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-white);
  padding: 0 20px;
  opacity: 0; /* JS Animation initial state */
  transform: translateY(-20px);
  animation: fadeInDown 1.5s ease 0.5s forwards; /* Delay reduced to 0.5s */
}

.catch-copy {
  font-family: var(--font-jp); /* Update font to JP for Japanese text */
  font-size: 32px; /* User requested 32px */
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.1em;
  color: var(--color-text); /* User requested black */
  position: relative;
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(148, 217, 223, 0.9), rgba(235, 171, 202, 0.9));
  border-radius: 4px;
}

.catch-copy br {
  display: none;
}

.glitch {
  animation: glitch-anim 2s infinite linear alternate-reverse; /* Shortened from 3s to 2s */
}

@keyframes glitch-anim {
  0% {
    text-shadow: -2px 3px 0 #EBABCA, 2px -3px 0 #94D9DF;
    transform: translate(var(--glitch-translate));
  }
  2% {
    text-shadow: 2px -3px 0 #EBABCA, -2px 3px 0 #94D9DF;
  }
  4%, 100% {  text-shadow: none; transform: none; }
}

/* More aggressive glitch trigger periodically */
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch::before {
  color: #EBABCA;
  z-index: -1;
  animation: glitch-anim-1 1.5s infinite linear alternate-reverse; /* Shortened */
}

.glitch::after {
  color: #94D9DF;
  z-index: -2;
  animation: glitch-anim-2 2s infinite linear alternate-reverse; /* Shortened */
}

@keyframes glitch-anim-1 {
  0% { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 1px); }
  2% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
  4% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 2px); }
  6% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
  8%, 100% { clip-path: none; transform: none; display: none; }
}

@keyframes glitch-anim-2 {
  0% { clip-path: inset(10% 0 60% 0); transform: translate(2px, 1px); }
  2% { clip-path: inset(80% 0 5% 0); transform: translate(-2px, -1px); }
  4% { clip-path: inset(30% 0 20% 0); transform: translate(2px, 2px); }
  6% { clip-path: inset(10% 0 80% 0); transform: translate(-2px, -2px); }
  8%, 100% { clip-path: none; transform: none; display: none; }
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--color-text);
  font-family: var(--font-en);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0; /* JS Animation initial state */
  animation: fadeIn 1s ease 2s forwards; /* Delay 2s */
}

.scroll-down .arrow {
  width: 1px;
  height: 60px;
  background-color: var(--color-text);
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

.scroll-down .arrow::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000; /* Masking visually */
  /* Actually better loop: move a white line down */
  background: transparent;
}

.scroll-down .arrow {
  animation: scrollLoop 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollLoop {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform: scaleY(1);
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* Animations */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.fade-in-up {
  opacity: 0;
  transition: opacity 1s, transform 1s;
  transform: translateY(30px);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   News Section
   ========================================================================== */
.news-list ul {
  padding: 20px;
  border: 1px solid #efefef;
  border-radius: 8px;
}

.news-list .news-date {
  font-size: 14px;
  margin-bottom: 4px;
}

.news-list .news-content {
  font-size: 16px;
}

/* ==========================================================================
   Service Section
   ========================================================================== */
.service-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.service-item {
  text-align: center;
  /* fade-in-up class handles opacity/transform */
}

.service-icon {
  width: max-content;
  height: max-content;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon img {
  width: 120px;
  height: auto;
}

.service-item:nth-child(1) .service-icon img {
  width: 200px;
}

.service-item:nth-child(2) .service-icon {
  height: 100px;
}

.service-text {
  font-size: 0.95rem;
  color: #666;
}

/* ==========================================================================
   Company Section
   ========================================================================== */
.company-content {
  display: flex;
  justify-content: center;
}

.company-img {
  width: 100%;
  max-width: 680px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
  background-color: #f9f9f9;
}

.contact-content {
  text-align: center;
}

.contact-content p {
  margin-bottom: 30px;
  font-size: 14px;
}

.contact-btn {
  display: inline-block;
  padding: 15px 50px;
  background-color: var(--color-text);
  color: var(--color-white);
  font-family: var(--font-en);
  font-size: 1.1rem;
  border-radius: 100px;
  transition: transform 0.3s, background-color 0.3s;
}

.contact-btn:hover {
  background-color: #000;
  transform: translateY(-3px);
  opacity: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--color-text);
  color: var(--color-white);
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  font-family: var(--font-en);
}

.footer .logo {
  margin-bottom: 20px;
}

/* ==========================================================================
   Responsive (SP)
   ========================================================================== */
@media screen and (max-width: 767px) {
  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
  }
  
  /* Service */
  .service-list {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  /* Header */
  .pc-nav {
    display: none;
  }

  .hamburger {
    display: block;
  }

  /* MV */
  .catch-copy {
    font-size: 6vw;
  }

  .catch-copy br {
    display: inline;
  }

  /* Contact */
  .contact-btn {
    padding: 12px 30px;
    font-size: 1rem;
  }
}
