*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; overflow-x: hidden; }
body { font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif; font-feature-settings: "palt" 1; font-kerning: normal; text-rendering: optimizeLegibility; color: #333; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
video { width: 100%; height: 100%; object-fit: cover; }
.mv-video { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.mv { background: #111; }

/* Header */
header { position: fixed; top: 0; left: 0; width: 100%; z-index: 100; display: flex; justify-content: flex-end; align-items: center; padding: 35px clamp(20px, 5vw, 80px); transition: background .3s, box-shadow .3s, transform .4s ease; }
header.hidden { transform: translateY(-100%); }
.header-logo { display: block; height: 65px; position: fixed; top: 10px; left: clamp(20px, 5vw, 80px); z-index: 101; transition: opacity .4s ease; }
.header-logo.is-hidden { opacity: 0; pointer-events: none; }
header nav ul { display: flex; list-style: none; gap: 32px; }
header nav ul li a { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: #333; transition: opacity .2s; }
header nav ul li a:hover { opacity: .6; }

/* Section Heading */
.section-heading h2 { font-size: 22px; font-weight: 700; letter-spacing: .05em; line-height: 1.2; }
.section-heading .en { display: block; font-size: 10px; letter-spacing: .2em; color: #999; margin-top: 4px; }

/* Hero */
#hero { width: 100%; height: 100vh; position: relative; }
.hero-identity { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 30px; z-index: 200; pointer-events: none; }
.hero-logo { display: block; height: clamp(70px, 16vw, 400px); }
.hero-catch { font-size: clamp(32px, 4vw, 160px); font-weight: 700; line-height: 1.3; color: #000; margin: 0; letter-spacing: .02em; text-align: left; width: fit-content; }
.hero-catch-ja { white-space: nowrap; }
.hero-catch-en { display: block; font-size: 16px; font-weight: 700; letter-spacing: .05em; margin-top: 8px; color: #000; text-align: center; }
#hero p { color: #000; position: relative; z-index: 2; }

/* Video */
#video { background: transparent; padding: 80px clamp(20px, 5vw, 80px) 60px; position: relative; }
#video::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 200px; background: linear-gradient(to bottom, transparent, #fff); pointer-events: none; z-index: 0; }
.video-inner { position: relative; z-index: 1; }
.video-inner { max-width: 1440px; margin: 0 auto; }
.video-player { position: relative; width: 62%; margin: 0 auto 20px; aspect-ratio: 16/9; background: #000 url('https://img.youtube.com/vi/hJ6Y8PAOUk8/maxresdefault.jpg') center/cover no-repeat; overflow: hidden; cursor: pointer; }
.video-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,.28); border: 0.5px solid #fff; appearance: none; -webkit-appearance: none; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .2s; pointer-events: none; }
.video-player:hover .video-play-btn { background: rgba(255,255,255,.45); }
.video-play-btn svg { width: 28px; height: 28px; fill: #fff; }

/* Video Modal */
#yt-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0); visibility: hidden; pointer-events: none; transition: background-color .3s ease, visibility .3s; }
#yt-modal.is-open { background: rgba(255,255,255,.8); visibility: visible; pointer-events: auto; }
#yt-modal-inner { position: relative; width: 70.4vw; max-width: 880px; aspect-ratio: 16/9; background: #000; transform: scale(.95); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
#yt-modal.is-open #yt-modal-inner { transform: scale(1); opacity: 1; }
#yt-modal-player { position: absolute; inset: 0; width: 100%; height: 100%; }
#yt-modal-player iframe { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; border: none !important; }
#yt-modal-close { position: absolute; top: -45px; right: 0; background: none; border: none; cursor: pointer; color: #333; display: flex; flex-direction: column; align-items: center; gap: 5px; transition: opacity .2s; }
#yt-modal-close:hover { opacity: .65; }
.yt-modal-close-circle { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #333; display: flex; align-items: center; justify-content: center; }
.yt-modal-close-circle svg { width: 20px; height: 20px; }
.yt-modal-close-circle line { stroke: #333; stroke-width: 1; }
.yt-modal-close-label { font-size: 11px; letter-spacing: .2em; }
.topics-desc { width: 62%; margin: 0 auto 64px; }
.topics-desc .label { font-size: 17px; font-weight: 700; letter-spacing: .05em; line-height: 1.2; color: #555; margin-bottom: 6px; text-align: center; }
.topics-desc p { font-size: 12px; line-height: 2; color: #555; }

/* Topics */
#topics { background: #fff; padding: 60px clamp(20px, 5vw, 80px) 100px; }
.topics-inner { max-width: 1440px; margin: 0 auto; }
.topics-cards-heading { margin: 0 auto 24px; text-align: center; }
.topics-grid { width: 90%; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.topics-card { display: flex; align-items: flex-start; gap: 16px; cursor: pointer; }
.topics-card .card-thumb { width: 40%; flex: 0 0 40%; height: 200px; min-height: 200px; max-height: 200px; background: rgba(92, 194, 207, 0.2); object-fit: cover; display: block; border-radius: 10px; transition: opacity .2s; }
.topics-card .card-thumb--wide { object-fit: contain; }
.topics-card .card-thumb--placeholder { display: flex; align-items: center; justify-content: center; }
.topics-card .card-thumb--placeholder img { width: 50%; height: 50%; object-fit: contain; display: block; }
.topics-card:hover .card-thumb { opacity: .8; }
.topics-card .card-text { flex: 1; }
.topics-card .card-date { font-size: 10px; color: #999; margin-bottom: 6px; }
.topics-card .card-title { font-size: 12px; line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.topics-more { display: flex; justify-content: center; margin-top: 40px; }

/* Works */
#works { background: #fff; padding: 80px clamp(20px, 5vw, 80px); }
#works .works-inner { max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; }
.works-heading { text-align: center; width: 100%; }
.works-slider-area { display: flex; align-items: center; gap: 10px; width: 80%; max-width: 1440px; margin: 0 auto; }
.btn-view-more { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 230px; height: 61px; border: 1px solid #333; font-size: 10px; letter-spacing: .05em; transition: background .2s, color .2s; }
.btn-view-more:hover { background: #333; color: #fff; }
.btn-view-more img { height: 10px; width: auto; }
.btn-view-more:hover img { filter: brightness(0) invert(1); }
/* 矢印ボタンは既定で非表示（PCはドラッグ／トラックパッドでスライドできるため）。
   SPだけ両サイドに表示し、スワイプできることが伝わるようにする（.sp-only） */
.slider-btn { flex: 0 0 32px; width: 32px; height: 32px; border: 1px solid #333; background: #fff; cursor: pointer; display: none; align-items: center; justify-content: center; font-size: 11px; transition: background .2s, color .2s; }
.slider-btn:hover { background: #333; color: #fff; }
.sp-only { display: none; }
/* 表示しきれない件数（4件目以降）になったら、ドラッグ／スワイプ／矢印で
   横にスライドできるようにする（カードサイズ自体は変えない）。 */
.works-slider-wrapper {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  cursor: grab;
}
.works-slider-wrapper::-webkit-scrollbar { display: none; }
.works-slider-wrapper.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.works-slider { display: flex; justify-content: center; gap: 56px 40px; }
/* 表示しきれない件数のときは中央寄せをやめる（先頭からスクロールできるようにするため） */
.works-slider.is-overflowing { justify-content: flex-start; }
.works-slide { display: block; flex: 0 0 calc(26.667% - 8px); aspect-ratio: 3549 / 5016; background: rgba(92, 194, 207, 0.2); border-radius: 10px; overflow: hidden; transition: opacity .2s; cursor: pointer; }
.works-slide img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.works-slide img.is-placeholder { width: 50%; height: 50%; object-fit: contain; margin: 25%; }
.works-slide:hover { opacity: .8; }

/* Sticky Cards */
#news { background: #fff; }
.sticky-card-wrapper { position: relative; height: calc(100vh - 241px); min-height: 480px; max-height: 500px; display: flex; align-items: center; justify-content: center; }
#contact { height: 100vh; }
.sticky-card { width: 80%; max-width: 1024px; height: 470px; border-radius: 20px; cursor: pointer; transform-origin: top center; will-change: transform, opacity; transform: translateZ(0); backface-visibility: hidden; }
.sticky-card-inner { width: 100%; height: 100%; border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr; }
.sticky-card__media { grid-area: 1 / 1 / -1 / -1; }
.sticky-card .section-heading { grid-area: 1 / 1 / -1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: center; justify-self: center; padding: 20px 20px 20px 100px; z-index: 1; }
.sticky-card .section-heading h2 { font-size: 26px; }
.message-card-sign { margin-top: 24px; }
.message-card-sign p { margin: 0; font-size: 16px; font-weight: 700; color: #333; line-height: 1.7; text-align: center; }
.company-card-gallery { display: flex; gap: 12px; margin-top: 24px; }
.company-card-box { width: 91px; height: 91px; flex-shrink: 0; background: #ccc; border-radius: 6px; overflow: hidden; }
.company-card-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
#news-card    .sticky-card__media { background: url('../image/pc_card01.png') center/contain no-repeat; }
#company-card .sticky-card__media { background: url('../image/pc_card01.png') center/contain no-repeat; }
#recruit-card .sticky-card__media { background: url('../image/pc_card01.png') center/contain no-repeat; }
#contact-card .sticky-card__media { background: url('../image/pc_card01.png') center/contain no-repeat; }
/* Hero video - fixed background */
#hero { position: relative; }
.hero-video { position: fixed; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; pointer-events: none; }
.hero-video--sp { display: none; }

/* Footer */
#footer { background: #fff; padding: 30px clamp(20px, 5vw, 80px) 30px; text-align: center; }
.footer-inner { max-width: 1440px; margin: 0 auto; }
.footer-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 30px; }
.footer-logo-name { font-size: 14px; font-weight: 700; letter-spacing: .15em; line-height: 1.4; }
.footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 30px; list-style: none; margin-bottom: 20px; }
.footer-nav a { font-size: 10px; letter-spacing: .12em; color: #333; transition: opacity .2s; }
.footer-nav a:hover { opacity: .6; }
.footer-social { display: flex; justify-content: center; align-items: center; gap: 20px; margin-bottom: 10px; }
.footer-social a { color: #333; transition: opacity .2s; }
.footer-social a:hover { opacity: .6; }
.footer-privacy { margin-bottom: 12px; }
.footer-privacy a { font-size: 10px; letter-spacing: .12em; color: #333; transition: opacity .2s; }
.footer-privacy a:hover { opacity: .6; }
.footer-copy { font-size: 10px; color: #aaa; letter-spacing: .05em; }

/* Bottom Nav */
#bottom-nav { position: fixed; bottom: 20px; left: 0; right: 0; margin: 0 auto; width: min(80vw, 900px); z-index: 200; background: rgba(255,255,255,.95); box-shadow: 0 8px 32px rgba(0,0,0,.18); border-radius: 16px; opacity: 0; transform: translateY(30px); display: flex; align-items: center; justify-content: space-between; padding: 16px; cursor: pointer; user-select: none; }
#bottom-nav * { pointer-events: none; }
#bottom-nav-label { font-size: 14px; letter-spacing: .15em; color: #333; font-weight: 700; }
#nav-modal-open { background: none; border: none; cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; opacity: .6; transition: opacity .2s; }
#nav-modal-open:hover { opacity: 1; }
#nav-modal-open img { width: 6px; height: auto; transform: rotate(-90deg); filter: brightness(0); }

/* Nav Modal - Bottom Sheet */
#nav-modal { position: fixed; inset: 0; z-index: 198; display: flex; align-items: center; justify-content: center; padding-bottom: 0; background: rgba(0,0,0,0); visibility: hidden; pointer-events: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#nav-modal.is-open { visibility: visible; pointer-events: auto; }
#nav-modal-inner { background: #fff; border-radius: 16px; padding: 40px 32px; width: 80vw; max-width: 900px; overflow-y: auto; position: relative; }
#nav-modal-close { position: absolute; top: 16px; right: 16px; background: none; border: 1px solid #ccc; border-radius: 50%; width: 36px; height: 36px; font-size: 14px; cursor: pointer; color: #333; display: flex; align-items: center; justify-content: center; transition: background .2s; }
#nav-modal-close:hover { background: #f5f5f5; }
.nav-modal-title { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-align: center; margin-bottom: 20px; color: #333; }
.nav-modal-grid { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 12px; height: 380px; }
.nav-modal-card { border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.1); display: flex; align-items: center; text-decoration: none; transition: opacity .2s; }
.nav-modal-card:hover { opacity: .85; }
.nav-modal-card img { height: 45%; width: auto; margin-left: 24px; flex-shrink: 0; }
.nav-modal-card-label { flex: 1; text-align: center; }
.nav-modal-card-label .ja { display: block; font-size: 20px; font-weight: 700; letter-spacing: .05em; color: #333; }
.nav-modal-card-label .en { display: block; font-size: 11px; letter-spacing: .15em; margin-top: 6px; color: #999; }

/* Fade-in */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.is-visible { opacity: 1; transform: translateY(0); }

/* ===== Mobile ===== */
@media (max-width: 768px) {
  header { padding: 14px 20px; justify-content: space-between; align-items: center; }
  .header-logo { height: 65px; top: 14px; }
  #yt-modal-inner { width: 95%; }
  .nav-modal-card img,
  .nav-modal-card-label { display: none; }
  .nav-modal-card { background-size: cover; background-position: center; }
  .nav-modal-card--news { background-image: url('../image/sp_card01.png'); }
  .nav-modal-card--company { background-image: url('../image/sp_card02.png'); }
  .nav-modal-card--recruit { background-image: url('../image/sp_card03.png'); }
  .nav-modal-card--contact { background-image: url('../image/sp_card04.png'); }
  header nav {
    position: fixed; top: 0; right: 0; width: 240px; height: 100vh;
    background: rgba(255,255,255,.98); box-shadow: -4px 0 20px rgba(0,0,0,.1);
    padding: 80px 32px 40px; z-index: 150;
    opacity: 0; visibility: hidden; transform: translateX(24px);
    transition: opacity .35s ease, transform .35s ease, visibility .35s;
  }
  header nav.open { opacity: 1; visibility: visible; transform: translateX(0); }
  header nav ul { flex-direction: column; gap: 24px; }
  header nav ul li a { font-size: 13px; }

  #hero { height: 60vh; }
  .hero-video--pc { display: none; }
  .hero-video--sp { display: block; }
  .hero-identity {
    left: 50%; top: 40%; transform: translate(-50%, -50%);
    flex-direction: column; align-items: center; gap: 16px; width: 90%; text-align: center;
  }
  .hero-logo { height: clamp(70px, 16vw, 130px); }
  .hero-catch { text-align: center; }
  .hero-catch-en { font-size: 13px; }

  #video { padding: 60px 20px 40px; }
  .video-player { width: 100%; }
  .topics-desc { width: 100%; margin-bottom: 40px; }

  #topics { padding: 40px 20px 60px; }
  .topics-grid { width: 100%; grid-template-columns: 1fr; gap: 20px; }
  .topics-card { gap: 16px; }
  .topics-card .card-date { font-size: 9px; }
  .topics-card .card-title { font-size: 10px; }

  #works { padding: 60px 20px; }
  .works-slider-area { width: 100%; gap: 8px; }
  .works-slider { justify-content: flex-start; }
  .works-slide { flex: 0 0 100%; }
  .slider-btn { flex: 0 0 28px; width: 28px; height: 28px; font-size: 10px; color: #333; }
  .sp-only { display: flex; }
  .btn-view-more { width: 200px; height: 52px; }

  .sticky-card-wrapper { height: 75vh; min-height: 320px; max-height: 700px; }
  #contact { height: 75vh; min-height: 320px; max-height: 700px; }
  .sticky-card { width: 90%; height: 60vh; }
  #news-card    .sticky-card__media { background: url('../image/sp_card01.png') center/contain no-repeat; }
  #company-card .sticky-card__media { background: url('../image/sp_card02.png') center/contain no-repeat; }
  #recruit-card .sticky-card__media { background: url('../image/sp_card03.png') center/contain no-repeat; }
  #contact-card .sticky-card__media { background: url('../image/sp_card04.png') center/contain no-repeat; }
  #news-card    .section-heading,
  #company-card .section-heading,
  #recruit-card .section-heading,
  #contact-card .section-heading { display: none; }

  #footer { padding: 40px 20px 24px; }
  .footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 14px 16px; }
  .footer-copy { font-size: 9px; }

  #bottom-nav { width: 80%; }
  #nav-modal-inner { width: 90vw; padding: 32px 20px; }
}

/* ===== Content Modal ===== */
.m-overlay { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0); visibility: hidden; pointer-events: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.m-overlay.is-open { visibility: visible; pointer-events: auto; }
.m-dialog { background: #fff; border-radius: 16px; width: min(90vw, 860px); max-height: 85vh; overflow-y: auto; position: relative; padding: 48px 40px 40px; }
.m-close { position: absolute; top: 16px; right: 16px; background: none; border: 1px solid #ccc; border-radius: 50%; width: 36px; height: 36px; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; color: #333; }
.m-close:hover { background: #f5f5f5; }
.m-item { opacity: 0; transform: translateY(10px); }
@media (max-width: 768px) { .m-dialog { padding: 40px 20px 32px; } }
