*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
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; }
a { text-decoration: none; color: inherit; }

/* 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; }

/* 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); transition: opacity .4s ease, transform .4s ease; display: flex; align-items: center; justify-content: space-between; padding: 16px; cursor: pointer; user-select: none; }
#bottom-nav.is-visible { opacity: 1; transform: translateY(0); }
#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; background: rgba(0,0,0,0); visibility: hidden; pointer-events: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background-color .3s ease, visibility .3s; }
#nav-modal.is-open { background: rgba(0,0,0,.3); 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; transform: translateY(40px) scaleY(.85); opacity: 0; transform-origin: center bottom; transition: transform .35s ease, opacity .35s ease; }
#nav-modal.is-open #nav-modal-inner { transform: translateY(0) scaleY(1); opacity: 1; }
#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; }

@media (max-width: 768px) {
  #bottom-nav { width: 80%; }
  #nav-modal-inner { width: 90vw; padding: 32px 20px; }
}

main { padding: 120px 0 80px; max-width: 1000px; margin: 0 auto; }

/* Section Heading */
.section-heading { text-align: center; margin: 60px 0 30px; }
section:first-of-type .section-heading { margin-top: 50px; }
.section-heading h2 { font-size: 22px; font-weight: 700; letter-spacing: .05em; }
.section-heading .en { display: block; font-size: 10px; letter-spacing: .2em; color: #999; margin-top: 4px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 60px; font-size: 12px; letter-spacing: .05em; color: #333; transition: opacity .2s; }
.back-link:hover { opacity: .6; }
.back-link img { height: 10px; width: auto; }

/* Message */
.message-text { max-width: 1000px; margin: 0 auto 40px; font-size: 14px; line-height: 1.8; color: #333; text-align: center; }
.message-text:not(.message-text--en) { font-size: 17px; }
.message-text p { margin-bottom: 7px; }
.message-text .message-date { text-align: center; margin-bottom: 4px; }
.message-text .message-sign { text-align: center; margin-top: 15px; margin-bottom: 4px; }
.message-text--en { color: #555; opacity: .7; margin-top: 20px; margin-bottom: 0px; font-size: 12px; }
.message-text--en p { margin-bottom: 4px; }

.message-gallery { display: flex; flex-direction: column; gap: 16px; margin: 40px auto 0; }
.gallery-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.gallery-box { flex: 0 0 calc((100% - 32px) / 3); aspect-ratio: 4/3; background: #ccc; border-radius: 8px; overflow: hidden; }
.gallery-box img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Profile Timeline */
.timeline { max-width: 640px; margin: 0 auto 50px; }
.timeline-item { display: flex; align-items: center; gap: 24px; position: relative; padding: 22px 0; }
.timeline-year { flex: 0 0 60px; text-align: right; font-weight: 700; font-size: 15px; }
.timeline-line { flex: 0 0 24px; display: flex; justify-content: center; align-items: center; align-self: stretch; position: relative; }
.timeline-line::before { content: ''; position: absolute; top: -22px; bottom: -22px; left: 50%; width: 1px; background: #ddd; }
.timeline-item:first-child .timeline-line::before { top: 50%; }
.timeline-item:last-child .timeline-line::before { bottom: 50%; }
.timeline-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #5cc2cf; background: #fff; position: relative; z-index: 1; }
.timeline-event { flex: 1; font-size: 15px; line-height: 2; color: #333; }

.works-heading { max-width: 640px; margin: 40px auto 16px; font-size: 14px; font-weight: 700; }
.works-list { max-width: 640px; margin: 0 auto; list-style: none; font-size: 15px; line-height: 2; color: #555; }

@media (max-width: 768px) {
  .gallery-box { flex: 0 0 calc((100% - 16px) / 2); }
  .gallery-row { row-gap: 16px; }
}

/* Footer */
#footer { background: #fff; padding: 60px 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-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; }

@media (max-width: 768px) {
  header { padding: 14px 20px; justify-content: space-between; align-items: center; }
  .header-logo { height: 60px; top: 14px; }

  /* Nav Modal Cards */
  .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; }
  main { padding-top: 90px; padding-left: clamp(20px, 5vw, 80px); padding-right: clamp(20px, 5vw, 80px); }
}

@media (max-width: 480px) {
  main { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 768px) {
  #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; }
}
