/* ==========================================================================
   Utilities
   ========================================================================== */

.nowrap {
  white-space: nowrap;
}

/* ==========================================================================
   Base
   ========================================================================== */

body {
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.875;
  color: var(--color-black);
  background-color: var(--color-white);
  font-feature-settings: "palt" 1;
}

/* メインコンテンツは右側のナビ分の余白を確保 */
main {
  margin-right: var(--nav-width);
  position: relative;
  overflow-x: clip;
}

.section {
  position: relative;
  padding: 0 var(--section-padding-x);
}

.container {
  max-width: var(--content-inner);
  margin: 0 auto;
}

/* ==========================================================================
   Section Title (英＋日)
   ========================================================================== */

.section-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}

.section-title--center {
  align-items: center;
  text-align: center;
}

.section-title__en {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.32px;
  color: var(--color-black);
}

.section-title__en::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-orange);
}

.section-title__en--white {
  color: var(--color-white);
}

.section-title__jp {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 40px;
  line-height: 60px;
  letter-spacing: 1.6px;
  color: var(--color-black);
}

.section-title__jp--white {
  color: var(--color-white);
}

.section-title__jp--lg {
  font-size: 32px;
  line-height: 50px;
  letter-spacing: 1.28px;
}

/* ==========================================================================
   Buttons / CTA
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 400px;
  max-width: 100%;
  height: 70px;
  border-radius: var(--radius-lg);
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.32px;
  color: var(--color-white);
  text-align: center;
  transition: opacity 0.2s ease;
}

.button:hover {
  opacity: 0.85;
}

.button--orange {
  background-color: var(--color-orange);
}

.button--gradient {
  background-color: var(--color-orange);
  box-shadow: var(--shadow-cta);
}

.button--wide {
  width: 340px;
}

/* ==========================================================================
   Sidebar Nav (右側固定縦書きナビ)
   ========================================================================== */

.side-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--nav-width);
  height: 100vh;
  background-color: var(--color-white);
  border-left: 1px solid var(--color-gray-100);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 110px;
}

.side-nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

.side-nav__item {
  position: relative;
}

.side-nav__link {
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.14;
  color: var(--color-black);
  font-feature-settings: "vert" 1;
  text-align: center;
  display: inline-block;
  padding: 8px 14px;
  transition: opacity 0.2s ease;
}

.side-nav__link:hover {
  opacity: 0.6;
}

.side-nav__entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  padding: 20px 10px;
  background-color: var(--color-orange);
  border-radius: var(--radius-lg);
}

.side-nav__entry-link {
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.14;
  color: var(--color-white);
  font-feature-settings: "vert" 1;
}

/* メニュー内ロゴ・フッターはPCでは非表示（SP開メニュー専用） */
.side-nav__logo,
.side-nav__foot {
  display: none;
}

.side-nav__indicator {
  position: fixed;
  top: 110px;
  right: var(--nav-width);
  width: 5px;
  height: 48px;
  background-color: var(--color-red);
  z-index: 101;
  opacity: 0;
}

.side-nav__indicator.is-ready {
  opacity: 1;
}

/* ==========================================================================
   Header Logo (左上)
   ========================================================================== */

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo__img {
  width: 254px;
  height: 40px;
  object-fit: contain;
}

.site-logo__sub {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.24px;
  color: var(--color-black);
  white-space: nowrap;
}

/* ==========================================================================
   Footer (ENTRY エリア・全ページ共通)
   ========================================================================== */

.footer {
  position: relative;
  padding: 0;
}

.footer__inner {
  position: relative;
  height: 660px;
  max-width: var(--content-inner);
  margin: 0 auto 0 0;
  background-color: #464840;
  border-top-right-radius: var(--radius-xl);
  padding: 100px var(--section-padding-x) 60px;
  color: var(--color-white);
  overflow: hidden;
}

.footer__title {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__catch {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 32px;
  line-height: 50px;
  letter-spacing: 1.28px;
  color: var(--color-white);
}

.footer__cta {
  position: absolute;
  top: 100px;
  right: var(--section-padding-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 400px;
}

.footer__tel-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

.footer__tel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__tel-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.footer__tel-num {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: 0.72px;
  color: var(--color-white);
  white-space: nowrap;
}

.footer__tel-hours {
  font-size: 12px;
  letter-spacing: 0.24px;
  color: var(--color-white);
  text-align: center;
}

.footer__divider {
  width: 100%;
  height: 1px;
  background-color: var(--color-white);
  opacity: 0.1;
}

.footer__divider--mid {
  position: absolute;
  top: 442px;
  left: 0;
  right: 0;
  width: 100%;
}

.footer__bottom {
  position: absolute;
  bottom: 60px;
  left: var(--section-padding-x);
  right: var(--section-padding-x);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.footer__logo {
  width: auto;
  height: 56px;
  margin-bottom: 0;
}

.footer__brand-name {
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.footer__address {
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0.28px;
}

.footer__copyright {
  position: absolute;
  bottom: 10px;
  right: 70px;
  font-size: 12px;
  letter-spacing: 0.24px;
  text-align: right;
}

.footer__policy {
  position: absolute;
  top: 328px;
  left: var(--section-padding-x);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.24px;
  color: var(--color-white);
}

.footer__policy-arrow {
  width: 12px;
  height: 8px;
  fill: var(--color-white);
}

.footer__pagetop {
  position: absolute;
  top: 570px;
  right: 75px;
  width: 50px;
  height: 50px;
  border: 1px solid var(--color-gray-300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: opacity 0.2s ease;
}

.footer__pagetop:hover {
  opacity: 0.7;
}

.footer__pagetop-arrow {
  width: 12px;
  height: 8px;
  transform: rotate(-90deg);
  fill: var(--color-white);
}

/* ==========================================================================
   Utility / Decoration
   ========================================================================== */

.blob {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.blob.is-revealed {
  opacity: 1;
}

.deco-bg-text {
  position: absolute;
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--color-gray-200);
  letter-spacing: 5.12px;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* ==========================================================================
   Hamburger Menu (Tablet/Mobile only)
   ========================================================================== */

.hamburger {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-red);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  z-index: 200;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.hamburger__line {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.is-open .hamburger__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.is-open .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger.is-open .hamburger__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.side-nav__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.side-nav__overlay.is-open {
  opacity: 1;
}

/* ==========================================================================
   Narrow desktop: 右サイドレールの文字を縮小 (1024〜1279px)
   ========================================================================== */

@media (min-width: 1024px) and (max-width: 1279px) {
  .side-nav__list {
    gap: 36px;
  }

  .side-nav__link {
    font-size: 12px;
    padding: 6px 10px;
  }

  .side-nav__entry-link {
    font-size: 12px;
  }
}

/* ==========================================================================
   Tablet (max 1023px)
   ========================================================================== */

@media (max-width: 1023px) {
  main {
    margin-right: 0;
  }

  .hamburger {
    display: flex;
  }

  /* オーバーレイは不要（フルスクリーン白メニュー） */
  .side-nav__overlay {
    display: none;
  }

  /* Side nav: フルスクリーン白メニュー（Figma 95:1593準拠） */
  .side-nav {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    border-left: none;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 50px;
    overflow-y: auto;
  }

  .side-nav.is-open {
    transform: translateY(0);
    opacity: 1;
  }

  /* メニュー内ロゴ（左上） */
  .side-nav__logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    position: absolute;
    top: 14px;
    left: 20px;
  }

  .side-nav__logo img {
    width: 200px;
    height: auto;
  }

  .side-nav__logo-sub {
    font-family: var(--font-en);
    font-size: 12px;
    letter-spacing: 0.24px;
    color: var(--color-black);
  }

  /* 中央ナビ */
  .side-nav__list {
    gap: 0;
    padding: 0;
    width: auto;
    align-items: center;
  }

  .side-nav__item {
    width: auto;
  }

  .side-nav__link {
    writing-mode: horizontal-tb;
    font-family: var(--font-en), var(--font-jp);
    font-weight: 500;
    font-size: 16px;
    line-height: 80px;
    color: var(--color-black);
    text-align: center;
    display: block;
    padding: 0;
    border-bottom: none;
    font-feature-settings: normal;
  }

  /* PC用の赤エントリーボックスはメニュー内で非表示 */
  .side-nav__entry {
    display: none;
  }

  /* メニュー下部：エントリーボタン＋電話 */
  .side-nav__foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
  }

  .side-nav__entry-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 310px;
    height: 60px;
    border-radius: 50px;
    background-color: var(--color-orange);
    box-shadow: var(--shadow-cta);
    font-family: var(--font-jp);
    font-weight: 700;
    font-size: 14px;
    color: var(--color-white);
    text-align: center;
  }

  .side-nav__tel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .side-nav__tel-num {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-en);
    font-weight: 500;
    font-size: 36px;
    color: var(--color-red);
    white-space: nowrap;
  }

  .side-nav__tel-icon {
    width: 32px;
    height: 32px;
    fill: var(--color-red);
  }

  .side-nav__tel-hours {
    font-size: 12px;
    color: var(--color-black);
    text-align: center;
  }

  .side-nav__indicator {
    display: none;
  }

  /* ハンバーガー：白80x80ボックス(右上,bottom-left丸) → 開で× */
  .hamburger {
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 0 0 0 20px;
    background-color: var(--color-white);
    z-index: 250;
  }

  .hamburger__line {
    background-color: var(--color-black);
    width: 24px;
  }

  .hamburger.is-open {
    background-color: transparent;
  }

  .hamburger.is-open .hamburger__line {
    background-color: var(--color-black);
  }

  /* Section padding adjustments */
  :root {
    --section-padding-x: 32px;
  }

  /* Footer adjustments */
  .footer__inner {
    max-width: 100%;
    padding: 80px 32px 60px;
    height: auto;
    min-height: 600px;
  }

  .footer__cta {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 40px auto 0;
  }

  .footer__divider--mid {
    top: auto;
    bottom: 200px;
  }

  .footer__bottom {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 60px;
  }

  .footer__copyright {
    position: relative;
    margin-top: 16px;
    text-align: left;
  }

  .footer__policy {
    position: relative;
    top: auto;
    left: auto;
    margin-top: 40px;
  }

  .footer__pagetop {
    top: auto;
    bottom: 24px;
    right: 24px;
  }
}

/* ==========================================================================
   Mobile (max 767px)
   ========================================================================== */

@media (max-width: 767px) {
  body {
    font-size: 16px;
    line-height: 1.7;
  }

  :root {
    --section-padding-x: 20px;
  }

  .section-title__jp {
    font-size: 28px;
    line-height: 1.4;
    letter-spacing: 1px;
  }

  .section-title__jp--lg {
    font-size: 24px;
    line-height: 1.5;
  }

  .section-title__en {
    font-size: 14px;
  }

  /* Buttons */
  .button {
    width: 100%;
    max-width: 320px;
    height: 60px;
    font-size: 15px;
  }

  .button--wide {
    width: 100%;
    max-width: 320px;
  }

  /* Logo size in hero */
  .site-logo__img {
    width: 180px;
    height: auto;
  }

  /* Footer - SP version per Figma 93:1030 */
  .footer__inner {
    padding: 60px 20px 40px;
    border-top-right-radius: 60px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer__title {
    width: 100%;
    align-items: flex-start;
    margin-bottom: 20px;
    order: 1;
  }

  .footer__catch {
    font-size: 20px;
    line-height: 30px;
    letter-spacing: 0.4px;
    text-align: left;
  }

  .footer__cta {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    margin: 0 auto;
    width: 100%;
    max-width: 310px;
    gap: 24px;
    order: 2;
    align-items: center;
    text-align: center;
  }

  .footer__tel-block {
    align-items: center;
    text-align: center;
  }

  .footer__tel-num {
    font-size: 30px;
    letter-spacing: 0;
  }

  .footer__tel-hours {
    font-size: 12px;
  }

  .footer__cta .button {
    width: 100%;
    max-width: 310px;
    height: 60px;
  }

  /* Hide internal divider in CTA block on SP */
  .footer__cta .footer__divider {
    display: none;
  }

  .footer__policy {
    position: relative;
    top: auto;
    left: auto;
    margin: 24px auto 0;
    justify-content: center;
    order: 3;
  }

  .footer__divider--mid {
    position: relative;
    top: auto;
    bottom: auto;
    margin: 50px 0 40px;
    width: 100%;
    order: 4;
  }

  .footer__bottom {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    order: 5;
  }

  .footer__brand {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
  }

  .footer__logo {
    width: auto;
    height: 24px;
    margin-bottom: 0;
  }

  .footer__brand-name {
    font-size: 16px;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }

  .footer__address {
    font-size: 14px;
    line-height: 24px;
    text-align: center;
  }

  .footer__copyright {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 60px;
    text-align: center;
    width: 100%;
    order: 6;
  }

  .footer__pagetop {
    display: none;
  }
}

/* SP専用要素はPC/タブレットで非表示 */
br.sp-only {
  display: none;
}

/* PC専用の改行はSPで無効化 */
@media (max-width: 767px) {
  br.pc-only {
    display: none;
  }

  br.sp-only {
    display: inline;
  }

  /* 日本語の文節単位できれいに折り返す（対応ブラウザのみ／非対応は通常折返し） */
  p,
  li,
  dd,
  h1,
  h2,
  h3,
  .section-title__jp,
  .mv__lead,
  .message__card-body,
  .message__heading,
  .about-slider__body,
  .environment__lead,
  .env-card__body,
  .recruit__lead {
    line-break: strict;
    word-break: auto-phrase;
  }
}

/* Prevent horizontal scroll globally */
html,
body {
  overflow-x: clip;
}

body.is-menu-open {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
}
