/* 案A「澄んだ空気」— 白と余白・細い明朝・ゆっくり静かな動き */
:root {
  --bg: #f7fafb;
  --white: #ffffff;
  --ink: #1d2a30;
  --muted: #5f6f75;
  --line: #d9e3e6;
  --mist: #e9f1f3;
  --accent: #1f6f6b;
  --mincho: "Shippori Mincho", "Yu Mincho", serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --latin: "Cormorant Garamond", "Times New Roman", serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --gutter: clamp(20px, 5vw, 72px);
}
@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--gothic);
  font-size: 15px;
  line-height: 2;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }
address { font-style: normal; }

/* ---------- ヘッダー ---------- */
.head {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; padding: 0 var(--gutter);
  transition: background-color .6s var(--ease), box-shadow .6s var(--ease);
}
.head.is-solid { background: rgba(247, 250, 251, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.head-logo img { width: 220px; }
.head-nav { display: flex; gap: 36px; font-family: var(--latin); font-size: 15px; letter-spacing: .2em; }
.head-nav a { position: relative; padding: 4px 0; }
.head-nav a::after, .line-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease);
}
.head-nav a:hover::after, .head-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.menu-btn { display: none; }

/* ---------- 最初の画面 ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: grid; grid-template-columns: 42% 58%; align-items: center;
  padding-top: 76px;
}
.hero-text { padding: 0 var(--gutter); position: relative; z-index: 2; }
.hero-catch {
  font-family: var(--mincho); font-size: clamp(24px, 2.3vw, 40px); line-height: 1.75; letter-spacing: .08em;
  white-space: nowrap;
}
.hero-en { margin: 28px 0 0; font-family: var(--latin); font-size: 17px; color: var(--muted); letter-spacing: .12em; }
.hero-photo { position: relative; height: calc(100svh - 76px - 48px); margin-right: var(--gutter); overflow: hidden; border-radius: 2px; }
.hero-slides img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 2.4s var(--ease);
}
.hero-slides img.is-on { opacity: 1; }
/* 最初の写真は最初から見せたまま、ほんの少し引いていくだけ（透明から出さない） */
.hero-slides img:first-child { animation: settle 9s var(--ease) both; }
@keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }
.slide-pause {
  position: absolute; right: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.7); background: rgba(29,42,48,.28); cursor: pointer;
  display: grid; place-items: center;
}
.slide-pause span { width: 10px; height: 12px; border-left: 2px solid #fff; border-right: 2px solid #fff; }
.slide-pause[aria-pressed="true"] span { width: 0; height: 0; border: 0; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.hero-scroll {
  position: absolute; left: var(--gutter); bottom: 32px; font-family: var(--latin); font-size: 12px; letter-spacing: .3em; color: var(--muted);
  padding-left: 64px;
}
.hero-scroll::before { content: ""; position: absolute; left: 0; top: 50%; width: 48px; height: 1px; background: var(--line); }
.hero-scroll::after { content: ""; position: absolute; left: 0; top: 50%; width: 48px; height: 1px; background: var(--accent); transform-origin: left; animation: line 2.8s var(--ease) infinite; }
@keyframes line { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

/* ---------- 共通 ---------- */
.ttl { word-break: auto-phrase; text-wrap: balance; font-family: var(--mincho); font-size: clamp(22px, 2.4vw, 32px); line-height: 1.7; letter-spacing: .08em; }
.label { font-family: var(--latin); font-size: 15px; letter-spacing: .3em; color: var(--accent); margin: 0 0 32px; }
.line-link { position: relative; display: inline-block; padding: 6px 28px 6px 0; font-size: 14px; color: var(--accent); }
.line-link::before { content: "→"; position: absolute; right: 0; top: 6px; transition: transform .6s var(--ease); }
.line-link:hover::before { transform: translateX(6px); }
.line-link::after { transform: scaleX(1); opacity: .35; }
.line-link:hover::after { animation: redraw .9s var(--ease); }
@keyframes redraw { 0% { transform: scaleX(0); transform-origin: left; } 100% { transform: scaleX(1); transform-origin: left; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  min-width: 240px; height: 58px; padding: 0 32px; border: 1px solid var(--ink);
  font-size: 14px; letter-spacing: .2em; position: relative; overflow: hidden; isolation: isolate;
  transition: color .6s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); z-index: -1; }
.btn:hover { color: var(--white); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }

/* ---------- お知らせ ---------- */
.news { padding: 120px var(--gutter) 40px; max-width: 1080px; margin: 0 auto; }
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-list li { border-bottom: 1px solid var(--line); }
.news-list a { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 22px 8px; transition: background-color .6s var(--ease); }
.news-list a:hover { background: var(--white); }
.news-list time { font-family: var(--latin); font-size: 16px; color: var(--muted); letter-spacing: .1em; }

/* ---------- ミッション ---------- */
.mission {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 7vw, 120px); align-items: center;
  max-width: 1240px; margin: 0 auto; padding: 140px var(--gutter);
}
.mission-text .ttl { margin-bottom: 40px; }
.mission-text p { margin: 0 0 20px; color: var(--muted); }
.mission-text .line-link { margin-bottom: 44px; }
.mission-photo { aspect-ratio: 1; background: var(--mist); }
.mission-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 写真の帯（ゆっくり動く写真＋白い札） ---------- */
.panel { position: relative; padding: 0 var(--gutter); margin: 0 0 140px; }
.panel-photo { height: min(78vh, 720px); overflow: hidden; }
.panel-photo img { width: 100%; height: 118%; object-fit: cover; }
.panel-card {
  position: relative; width: min(560px, 100%); margin: -160px 0 0 auto; margin-right: clamp(0px, 6vw, 96px);
  background: var(--white); padding: clamp(32px, 4vw, 56px);
}
.panel.is-right .panel-card { margin-left: clamp(0px, 6vw, 96px); margin-right: auto; }
.panel-card .ttl { margin-bottom: 24px; }
.panel-card p { margin: 0; color: var(--muted); }

/* ---------- 事業 ---------- */
.biz { max-width: 1240px; margin: 0 auto; padding: 40px var(--gutter) 140px; text-align: center; }
.biz-list { list-style: none; margin: 0 0 64px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 32px; text-align: left; }
.biz-list figure { aspect-ratio: 4 / 3; overflow: hidden; background: var(--mist); }
.biz-list img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.biz-list a:hover img { transform: scale(1.05); }
.biz-list h3 { font-family: var(--mincho); font-size: 18px; margin-top: 18px; letter-spacing: .08em; }

/* ---------- 採用 ---------- */
.recruit { display: grid; grid-template-columns: 1fr 1fr; background: var(--white); }
.recruit-photo { overflow: hidden; min-height: 560px; }
.recruit-photo img { width: 100%; height: 100%; object-fit: cover; }
.recruit-text { padding: clamp(48px, 7vw, 120px) var(--gutter); align-self: center; }
.recruit-text .ttl { margin-bottom: 32px; }
.recruit-text p { color: var(--muted); margin: 0 0 32px; }
.recruit-text .recruit-call { font-family: var(--mincho); font-size: 22px; color: var(--ink); letter-spacing: .1em; margin-bottom: 40px; }

/* ---------- 4つの入口 ---------- */
.links { display: grid; grid-template-columns: repeat(4, 1fr); }
.links a { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; color: var(--white); }
.links img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.links a::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(18,30,34,.72), rgba(18,30,34,.08) 60%); }
.links a:hover img { transform: scale(1.06); }
.links h3, .links p { position: absolute; left: 28px; right: 28px; z-index: 2; margin: 0; }
.links h3 { bottom: 64px; font-family: var(--latin); font-weight: 400; font-size: 30px; letter-spacing: .16em; }
.links p { bottom: 28px; font-size: 13px; line-height: 1.6; }

/* ---------- フッター ---------- */
.foot { padding: 96px var(--gutter) 120px; text-align: center; color: var(--muted); font-size: 13px; }
.foot-logo { width: 240px; margin: 0 auto 28px; }
.foot address { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin-bottom: 36px; }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; font-family: var(--latin); font-size: 14px; letter-spacing: .2em; color: var(--ink); margin-bottom: 40px; }
.copy { margin: 0; font-size: 11px; letter-spacing: .1em; }

/* ---------- デザイン案の切り替え（確認用） ---------- */
.switch {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 4px;
  padding: 6px 6px 6px 14px; border-radius: 999px; white-space: nowrap; background: rgba(29,42,48,.86); color: #fff; font-size: 12px; letter-spacing: .08em;
}
.switch span { margin-right: 6px; }
.switch a { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 500; }
.switch a[aria-current] { background: #fff; color: var(--ink); }

/* ---------- 動き（JSが有効で、動きを減らす設定でない時だけ） ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .rv { opacity: 0; transform: translateY(24px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
  .js .rv.is-in { opacity: 1; transform: none; }
  .js .ch { display: inline-block; opacity: 0; transform: translateY(.5em); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); transition-delay: calc(var(--i) * 45ms); }
  .js .is-in .ch, .js .is-in.ch, .js [data-split].is-in .ch { opacity: 1; transform: none; }
  /* 最初の見出しは透明から出さない：薄く見えている所から浮かぶ */
  .js .hero-catch .ch { opacity: .25; }
  .js .hero-catch.is-in .ch { opacity: 1; }
  /* 幕が開くように現れる写真（枠は固定・中身を transform で動かす） */
  .js .mask { overflow: hidden; }
  .js .mask img { transform: translateY(101%); transition: transform 1.6s var(--ease); }
  .js .mask.is-in img { transform: none; }
  .js .mask::after { content: none; }

  /* スクロールに合わせて写真がゆっくり動く（対応ブラウザだけ。非対応は止まったまま） */
  @supports (animation-timeline: view()) {
    .panel-photo img, .recruit-photo img {
      animation: drift linear both; animation-timeline: view(); animation-range: cover;
    }
    @keyframes drift { from { transform: translateY(-9%); } to { transform: translateY(0); } }
    .recruit-photo img { height: 115%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slides img:first-child, .hero-scroll::after { animation: none; }
  .hero-slides img { transition: none; }
}

/* ---------- スマホ ---------- */
@media (max-width: 899px) {
  body { font-size: 14px; }
  .head { height: 64px; }
  .head-logo img { width: 180px; }
  .menu-btn {
    display: grid; align-content: center; gap: 7px; width: 44px; height: 44px; padding: 0 10px;
    border: 0; background: none; cursor: pointer; position: relative; z-index: 2;
  }
  .menu-btn span { height: 1px; background: var(--ink); transition: transform .5s var(--ease); }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(20deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-20deg); }
  .head-nav {
    position: fixed; inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
    background: var(--bg); font-size: 22px; visibility: hidden; opacity: 0; transition: opacity .5s var(--ease), visibility .5s;
  }
  .head-nav.is-open { visibility: visible; opacity: 1; }
  .hero { grid-template-columns: 1fr; align-content: start; padding-top: 64px; min-height: auto; }
  .hero-photo { order: -1; height: 62svh; margin: 0; border-radius: 0; }
  .hero-text { padding: 36px 20px 0; }
  .hero-catch { font-size: clamp(22px, 6.6vw, 30px); }
  .hero-en { font-size: 14px; margin-top: 16px; }
  .hero-scroll { display: none; }
  .news { padding: 64px 20px 24px; }
  .news-list a { grid-template-columns: 1fr; gap: 4px; padding: 18px 4px; }
  .mission { grid-template-columns: 1fr; padding: 80px 20px; }
  .mission-photo { order: -1; width: 72%; }
  .panel { padding: 0; margin-bottom: 72px; }
  .panel-photo { height: 52vh; }
  .panel-card, .panel.is-right .panel-card { margin: -64px 20px 0; width: auto; padding: 32px 24px; }
  .biz { padding: 24px 20px 80px; }
  .biz-list { grid-template-columns: 1fr 1fr; gap: 28px 14px; }
  .biz-list h3 { font-size: 14px; margin-top: 10px; }
  .recruit { grid-template-columns: 1fr; }
  .recruit-photo { min-height: 0; height: 48vh; }
  .recruit-text { padding: 56px 20px 72px; }
  .links { grid-template-columns: 1fr 1fr; }
  .links h3 { font-size: 22px; bottom: 54px; left: 16px; }
  .links p { left: 16px; right: 12px; bottom: 16px; font-size: 11px; }
  .foot { padding: 64px 20px 96px; }
  .switch { bottom: 12px; }
}
