/* --- Variables & Reset --- */
:root {
  --color-bg: #000000;
  --color-accent: #c5a059;
  --color-fg: #ffffff;
  --color-fg-gray: #d1d1d1;
  --color-border: #444444;

  /* font */
  --font-family-base: 'Noto Serif JP', 'Yu Mincho', 'YuMincho', 'Hiragino Mincho ProN', 'MS PMincho', serif;
  --font-size-base: clamp(0.75rem, 0.186rem + 1.17vw, 1.125rem);
  --line-height-base: 1.8;
  --transition-base: 0.4s ease;
}

* {
  font-family: var(--font-family-base);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-autospace: normal;
  line-break: strict;
  overflow-wrap: anywhere;
  word-break: normal;
}

body {
  background-color: var(--color-bg);
  color: var(--color-fg);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-fg);
  transition: opacity var(--transition-base);
  text-decoration: none;
}

a:link, a:visited, a:active {
  overflow: hidden;
  outline: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* --- Layout Components --- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}
.container.animation.animated {
  animation: fadeIn 0.8s ease forwards;
}

.section-wrapper {
  padding: 60px 0; /* Mobile padding */
  position: relative;
}

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

.bg-color {
  background: var(--color-bg);
}

/* --- Animation Components --- */
.animation {
  opacity: 0;
}
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-1em);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Hero --- */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}

.hero-brand {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.25em;
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-brand img {
  width: 40px;
}

.hero-brand > span {
  white-space: normal;
  width: calc(100% - 40px);
}

.hero-brand > span > span {
  display: inline-block;
  overflow-wrap: break-word;
}

.hero-video-wrapper {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video-wrapper::before,
.hero-video-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
}

.hero-video-wrapper::before {
  background: rgb(0 0 0 / 0.75);
  z-index: 1;
}

.hero-video-wrapper::after {
  z-index: 2;
  background: url(../images/hero_video_overlay.webp) repeat 0 0;
  background-size: 4px;
}

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

.hero-logo {
  width: min(50%, 320px); /* Slightly larger on mobile */
  margin: 5% auto;
}

.main-copy {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  margin-bottom: 20px;
  margin-left: 1em;
}

.main-copy > span {
  animation: fadeIn 0.8s ease forwards;
}
.main-copy > span:nth-of-type(1) {
  animation-delay: 0.5s;
}
.main-copy > span:nth-of-type(2) {
  animation-delay: 1.5s;
}
.main-copy > span:nth-of-type(3) {
  animation-delay: 2.5s;
}

.sub-copy {
  font-family: 'Montserrat', sans-serif;
  font-weight: 200;
  color: var(--color-accent);
  letter-spacing: 0.4em;
  font-size: 0.75rem;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 4s;
}

.hero-logo {
  animation: fadeIn 1s ease forwards;
  animation-delay: 4.1s;
}

.sub-copy, .hero-logo {
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.scroll-indicator-line {
  width: 1px;
  height: 56px;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.scroll-indicator-line::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  transform: scaleY(0);
  animation: scroll-indicator 1.6s ease-in-out infinite;
}

@keyframes scroll-indicator {
  0% { transform: scaleY(0); opacity: 0; transform-origin: top; }
  10% { opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; transform-origin: top; }
  61% { transform-origin: bottom; }
  100% { transform: scaleY(0); opacity: 0; transform-origin: bottom; }
}

/* --- Concept --- */
.concept {
  margin-top: 100vh;
  position: relative;
}

.section-title-bold {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.5em;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.section-title-bold.animation.animated {
  animation: fadeInDown 0.8s ease forwards;
}

.divider {
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  margin: 0 auto 40px;
}

.concept-lead {
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  margin-bottom: 30px;
  font-weight: 500;
}

.concept-description {
  font-size: 0.95rem;
  color: var(--color-fg-gray);
  font-weight: 300;
  line-height: 2.2;
  margin-bottom: 3em;
}

/* --- Services (Grid) --- */
.services {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--color-bg);
}

.grid-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

#service-01.grid-item { background-image: url('../images/img_services_01.webp'); }
#service-02.grid-item { background-image: url('../images/img_services_02.webp'); }
#service-03.grid-item { background-image: url('../images/img_services_03.webp'); }
#service-04.grid-item { background-image: url('../images/img_services_04.webp'); }
#service-05.grid-item { background-image: url('../images/img_services_05.webp'); }
#service-06.grid-item { background-image: url('../images/img_services_06.webp'); }

.services .grid-item.animation.animated {
  animation: fadeIn 0.8s ease forwards;
}

.item-bg {
  width: 100%;
  height: 100%;
  transition: transform 0.8s ease, filter 0.8s ease;
  filter: grayscale(30%);
}

.item-overlay {
  position: absolute;
  inset: 0;
  padding: 12%;
  opacity: 1; /* Keep visible on touch or use JS for tap */
  transition: opacity 0.5s ease;
}

.item-overlay-inner {
  background: rgb(0 0 0 / 0.75);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-shadow: 0 0 10px rgb(0 0 0 / 1);
}

.item-overlay h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 5px;
}

.item-overlay p {
  font-size: 0.8rem;
  text-align: center;
}

/* --- Process --- */
.process {
  background: var(--color-bg);
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 40px;
}

.step-num-bold {
  font-family: 'Montserrat', 'Helvetica Neue', 'Helvetica', 'Arial', 'Hiragino Sans', 'Meiryo', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--color-accent);
  margin-bottom: 15px;
  display: block;
  text-transform: uppercase;
}

.process-card.animation.animated {
  animation: fadeIn 0.6s ease forwards;
}

.process-card h4 {
  font-weight: 500;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.process-card p {
  font-size: 0.85rem;
  color: var(--color-fg-gray);
  line-height: 2;
  text-align: justify;
}

/* --- Info --- */
.info {
  padding: 60px 0;
  background: url('../images/bg_info.webp') center/cover no-repeat;
}

.flex-info {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.info-box.animation.animated {
  animation: fadeIn 0.8s ease forwards;
}

.company-list {
  margin-top: 30px;
  text-align: left;
}

.company-list dt {
  font-family: 'Montserrat', 'Helvetica Neue', 'Helvetica', 'Arial', 'Hiragino Sans', 'Meiryo', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-top: 20px;
}

.company-list dd {
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
  padding: 5px 0 8px;
}

/* --- Contact & Buttons --- */
.btn-tel {
  display: inline-block;
  margin: 40px auto;
  padding: 18px 40px;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  font-family: 'Montserrat', 'Helvetica Neue', 'Helvetica', 'Arial', 'Hiragino Sans', 'Meiryo', sans-serif;
  letter-spacing: 0.3em;
  transition: var(--transition-base);
}

.btn-tel span {
  vertical-align: middle;
}

.form-modal-open {
  display: inline-block;
  padding: 18px 40px;
  border: none;
  background: var(--color-accent);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: var(--transition-base);
  color: var(--color-fg);
}

/* --- Form Modal Base --- */
.form-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.form-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.form-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.form-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 95%;
  height: 90%;
  max-height: 90vh;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.96) translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.form-modal.is-open .form-modal__dialog {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.form-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-modal__body {
  flex: 1;
  overflow: hidden;
  padding: 52px 12px 16px;
}

.form-modal__iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.form-modal__notice {
  background: rgb(0 0 0 / 0.8);
  position: fixed;
  bottom: 8px;
  left: 8px;
  right: 8px;
  width: calc(100% - 16px);
  padding: 1em;
  font-size: 0.75rem;
  line-height: 1.4;
}

/* --- Access --- */
.access {
  background: url('../images/bg_access.webp') center/cover no-repeat;
}

.map-wrapper iframe {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
}

/* --- Footer --- */
footer {
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--color-fg-gray);
  font-weight: 400;
  position: relative;
  background: var(--color-bg);
}

.footer-sns {
  padding: 32px 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer-sns img {
  width: 40px;
}

.copyright a {
  padding: 0.5em;
  color: var(--color-fg-gray);
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.35);
  background: rgb(0 0 0 / 0.55);
  color: var(--color-fg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  line-height: 1.1;
  opacity: 0;
  transition: all 0.35s ease;
  z-index: 999;
}

.back-to-top.is-visible {
  opacity: 1;
}

/* --- Helpers --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Media Queries (min-width: 769px) --- */
@media (min-width: 769px) {
  .section-wrapper {
    padding: 96px 0;
  }

  .hero-logo {
    width: min(50%, 320px);
  }

  .sub-copy {
    letter-spacing: 0.6em;
    font-size: 0.8rem;
    text-transform: uppercase;
  }

  .section-title-bold {
    font-size: 1.4rem;
    text-transform: uppercase;
  }

  .concept-lead {
    font-size: 1.5rem;
  }

  .concept-description {
    line-height: 2.5;
  }

  .services {
    grid-template-columns: repeat(3, 1fr);
  }

  #service-02.grid-item, #service-05.grid-item {
    animation-delay: 0.3s;
  }

  #service-03.grid-item, #service-06.grid-item {
    animation-delay: 0.6s;
  }

  .process-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin-top: 60px;
  }

  .process-card:nth-of-type(2).animation.animated {
    animation-delay: 0.5s;
  }
  
  .process-card:nth-of-type(3).animation.animated {
    animation-delay: 1s;
  }

  .info {
    padding: 100px 0;
  }

  .flex-info {
    flex-direction: row;
    gap: 80px;
    justify-content: center;
  }

  .info-box {
    flex: 1;
  }

  .contact .concept-lead br {
    display: none;
  }

  .btn-tel {
    pointer-events: none;
  }

  .btn-tel,
  .form-modal-open {
    padding: 18px 60px;
  }

  .form-modal__dialog {
    max-width: 800px;
  }

  .form-modal__body {
    padding: 52px 20px 20px;
  }

  .copyright br {
    display: none;
  }
}

/* --- Media Queries (any-hover: hover) --- */
@media (any-hover: hover) {
  a:hover {
    cursor: pointer;
    opacity: 0.7;
  }

  .item-overlay {
    opacity: 0;
    padding: 0;
  }

  .grid-item:hover .item-bg {
    transform: scale(1.05);
    filter: grayscale(0%);
  }
  

  .grid-item:hover .item-overlay {
    opacity: 1;
  }

  .btn-tel:hover {
    opacity: 0.8;
    background: var(--color-accent);
    color: #000;
  }

  .form-modal-open:hover {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--color-accent);
    color: var(--color-accent);
  }

  .form-modal__close:hover {
    background: #111;
    color: #fff;
    border-color: #111;
  }

  .back-to-top:hover {
    border-color: var(--color-accent);
    background: rgba(0, 0, 0, 0.72);
  }
}

/* --- Media Queries (prefers-reduced-motion: reduce) --- */
@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }

  .form-modal,
  .form-modal__dialog {
    transition-duration: 0.1s;
    transform: none !important;
  }
}