/* 正本：photo-20261008/figma-latest。共通部品の補正はページ内に限定。 */
.photo-page button {
  font-family: inherit;
}

/* ---------- タイトル帯：縦に流れる写真の列（Figma FV比較案E 1181:2950、1920×820 基準） ---------- */
/* .l-hero の余白は使わない（page-layout.css との読み込み順に依存しないよう2クラスで指定） */
.l-hero.photo-fv {
  --fv-col: clamp(calc(160 * var(--pc-unit, 1px)), calc(14.583333 * var(--vw, 1vw)), calc(280 * var(--pc-unit, 1px)));
  --fv-gap: clamp(calc(12 * var(--pc-unit, 1px)), calc(1.25 * var(--vw, 1vw)), calc(24 * var(--pc-unit, 1px)));
  --fv-duration: 50s;
  /* 下端の弧（Figma「区切りA｜要所」PC 1386:27693 1920×88／SP 1386:27694 375×32）。
     帯を弧の高さだけ下の区間へ重ね、写真ごと弧の形に切り抜く */
  --fv-arc: clamp(calc(32 * var(--pc-unit, 1px)), calc(4.583333 * var(--vw, 1vw)), calc(88 * var(--pc-unit, 1px)));
  position: relative;
  z-index: 1;
  height: calc(clamp(calc(520 * var(--pc-unit, 1px)), calc(42.708333 * var(--vw, 1vw)), calc(820 * var(--pc-unit, 1px))) + var(--fv-arc));
  margin-bottom: calc(var(--fv-arc) * -1);
  padding: 0;
  overflow: hidden;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--fv-arc) + calc(1 * var(--pc-unit, 1px))) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1920 88' preserveAspectRatio='none'%3E%3Cpath d='M0 88C640-29.333 1280-29.333 1920 88V0H0Z'/%3E%3C/svg%3E") bottom / 100% var(--fv-arc) no-repeat;
}
/* PCは固定ヘッダーの裏まで写真の列を流す。main の padding-top（104px）を打ち消し、同じ分だけ帯を伸ばす。 */
@media (min-width: 768px) {
  .l-hero.photo-fv {
    height: calc(clamp(calc(520 * var(--pc-unit, 1px)), calc(42.708333 * var(--vw, 1vw)), calc(820 * var(--pc-unit, 1px))) + var(--fv-arc) + 104px);
    margin-top: -104px;
    padding-top: 104px;
  }
}
.photo-fv-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: calc(100% - var(--fv-arc));
}
/* 見出し：カタカナ（白・900）の右下に、手書き英字 Photo Gallery（白・8°右上がり）を重ねる。
   英字は Splash 書体を読み込まず、Figma 1472:35513 の書き出し（759×269 を2倍）を画像で置く。
   位置と大きさはカタカナの文字サイズ基準（Figma 1920：カタカナ 84px を x120、英字をカタカナから x+342・y-10）。
   .l-hero h1 の余白・文字指定より優先させる */
.photo-fv .photo-fv-title {
  position: absolute;
  top: 55.5%;
  /* 左端：画面幅に応じて 32〜120px。1920 より広い画面では、右端から 1800px（Figma 1920 の x120）を保ち、
     右へ寄る写真の列との間隔を Figma のまま保つ（2026-10-14、stg の指摘「左端に寄りすぎ」） */
  left: max(clamp(calc(32 * var(--pc-unit, 1px)), calc(6.25 * var(--vw, 1vw)), calc(120 * var(--pc-unit, 1px))), calc(100% - calc(1800 * var(--pc-unit, 1px))));
  margin: 0;
  color: #fff;
  font-size: clamp(calc(40 * var(--pc-unit, 1px)), calc(4.375 * var(--vw, 1vw)), calc(84 * var(--pc-unit, 1px)));
  translate: 0 -50%;
}
.photo-fv-jp {
  display: block;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.photo-fv-en {
  display: block;
  width: 9.036em;
  height: auto;
  margin: -1.324em 0 0 4.07em;
}
/* 写真の列は右へ傾ける。傾けても帯の上下に隙間が出ないよう列を帯より長く伸ばし、
   左下へ寄る分だけ右へずらして英字との間を保つ */
.photo-fv-columns {
  position: absolute;
  top: -30%;
  right: calc(clamp(calc(16 * var(--pc-unit, 1px)), calc(1.666667 * var(--vw, 1vw)), calc(32 * var(--pc-unit, 1px))) - calc(3 * var(--vw, 1vw)));
  bottom: -30%;
  display: flex;
  gap: var(--fv-gap);
  rotate: 12deg;
}
.photo-fv-column {
  width: var(--fv-col);
}
/* 同じ5枚を2周分並べ、末尾にも隙間を足して、ちょうど半分ずらすと継ぎ目なく戻る */
.photo-fv-track {
  display: flex;
  flex-direction: column;
  gap: var(--fv-gap);
  padding-bottom: var(--fv-gap);
  animation: photo-fv-up var(--fv-duration) linear infinite;
  animation-delay: calc(var(--start) * var(--fv-duration) * -1);
  will-change: transform;
}
.photo-fv-track.is-down {
  animation-name: photo-fv-down;
}
.photo-fv-track img {
  width: 100%;
  height: auto;
  aspect-ratio: 280 / 360;
  object-fit: cover;
  border-radius: calc(16 * var(--pc-unit, 1px));
}
@keyframes photo-fv-up {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}
@keyframes photo-fv-down {
  from {
    transform: translateY(-50%);
  }
  to {
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .photo-fv-track {
    animation-play-state: paused;
  }
}
.photo-gallery-section {
  padding-top: calc(96 * var(--pc-unit, 1px));
  padding-bottom: calc(140 * var(--pc-unit, 1px));
}
.photo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: calc(12 * var(--pc-unit, 1px));
  margin-bottom: calc(48 * var(--pc-unit, 1px));
}
.photo-filters button {
  height: calc(48 * var(--pc-unit, 1px));
  padding: 0 calc(28 * var(--pc-unit, 1px));
  border: 0;
  border-radius: calc(99 * var(--pc-unit, 1px));
  box-shadow: inset 0 0 0 calc(2 * var(--pc-unit, 1px)) var(--orange);
  background: #fff;
  color: var(--orange);
  font-size: max(14px, calc(17 * var(--pc-unit, 1px)));
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
}
.photo-filters button[aria-pressed='true'] {
  background: var(--orange);
  color: #fff;
}
.photo-page button:focus-visible {
  outline: calc(3 * var(--pc-unit, 1px)) solid var(--orange);
  outline-offset: calc(4 * var(--pc-unit, 1px));
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: calc(36 * var(--pc-unit, 1px)) calc(24 * var(--pc-unit, 1px));
  margin: 0;
  padding: 0;
  list-style: none;
}
.photo-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  text-align: left;
  cursor: zoom-in;
}
.photo-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: calc(24 * var(--pc-unit, 1px));
}
.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}
/* 拡大の目印：右下の角に白い丸と虫眼鏡。写真の邪魔をしない控えめな色にする */
.photo-card-zoom {
  position: absolute;
  right: calc(12 * var(--pc-unit, 1px));
  bottom: calc(12 * var(--pc-unit, 1px));
  display: grid;
  place-items: center;
  width: calc(40 * var(--pc-unit, 1px));
  height: calc(40 * var(--pc-unit, 1px));
  border-radius: 50%;
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 calc(2 * var(--pc-unit, 1px)) calc(8 * var(--pc-unit, 1px)) rgb(0 0 0 / 0.12);
  color: var(--ink);
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}
@media (hover: hover) {
  .photo-card:hover img {
    transform: scale(1.04);
  }
  .photo-card:hover .photo-card-zoom {
    color: var(--orange);
    transform: scale(1.08);
  }
}
.photo-card:active .photo-card-zoom {
  transform: scale(0.92);
}
.photo-card-title {
  display: block;
  margin-top: calc(14 * var(--pc-unit, 1px));
  font-size: max(14px, calc(18 * var(--pc-unit, 1px)));
  font-weight: 700;
  line-height: max(20.22222222px, calc(26 * var(--pc-unit, 1px)));
}
.photo-more-row {
  display: flex;
  justify-content: center;
  margin-top: calc(48 * var(--pc-unit, 1px));
}
.photo-more {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(18 * var(--pc-unit, 1px));
  height: calc(64 * var(--pc-unit, 1px));
  padding: 0 calc(12 * var(--pc-unit, 1px)) 0 calc(40 * var(--pc-unit, 1px));
  border: 0;
  border-radius: calc(99 * var(--pc-unit, 1px));
  box-shadow: inset 0 0 0 calc(2 * var(--pc-unit, 1px)) var(--orange);
  background: #fff;
  color: var(--orange);
  font-size: max(14px, calc(18 * var(--pc-unit, 1px)));
  font-weight: 700;
  cursor: pointer;
}
.photo-more > span {
  display: grid;
  place-items: center;
  width: calc(44 * var(--pc-unit, 1px));
  height: calc(44 * var(--pc-unit, 1px));
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
}
.photo-empty {
  display: grid;
  place-items: center;
  max-width: calc(680 * var(--pc-unit, 1px));
  min-height: calc(120 * var(--pc-unit, 1px));
  margin: 0 auto;
  padding: calc(24 * var(--pc-unit, 1px));
  border-radius: calc(24 * var(--pc-unit, 1px));
  background: var(--band);
  color: var(--ink);
  font-size: max(14px, calc(20 * var(--pc-unit, 1px)));
}
/* インスタのカード：ヘッダーのインスタ案内（global.css の .instagram-card）と同じ作り */
.photo-instagram-section {
  padding: 0 0 calc(140 * var(--pc-unit, 1px));
  background: #fff;
}
/* あわせて見る（黄）から会社見学の帯（橙）へ白を挟まずにつなぐ */
.lower-page .photo-page + .visit-band {
  margin-top: 0;
}
.photo-instagram-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(32 * var(--pc-unit, 1px));
  width: min(calc(1080 * var(--pc-unit, 1px)), 100%);
  min-height: calc(320 * var(--pc-unit, 1px));
  margin-inline: auto;
  padding: calc(56 * var(--pc-unit, 1px)) calc(64 * var(--pc-unit, 1px));
  overflow: hidden;
  border-radius: calc(32 * var(--pc-unit, 1px));
  background: #42342b;
  color: #fff;
}
.photo-instagram-card::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.68), rgb(0 0 0 / 0.48));
}
.photo-instagram-track {
  position: absolute;
  z-index: -2;
  inset: 0 auto 0 0;
  display: flex;
  width: max-content;
  animation: photo-instagram-loop 60s linear infinite;
}
.photo-instagram-group {
  display: flex;
  gap: calc(8 * var(--pc-unit, 1px));
  padding-right: calc(8 * var(--pc-unit, 1px));
}
.photo-instagram-group img {
  flex: none;
  width: calc(260 * var(--pc-unit, 1px));
  height: 100%;
  object-fit: cover;
}
.photo-instagram-copy h2 {
  margin: 0 0 calc(24 * var(--pc-unit, 1px));
  font-size: calc(22 * var(--pc-unit, 1px));
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0.05em;
}
.photo-instagram-brand {
  display: grid;
  grid-template-columns: calc(48 * var(--pc-unit, 1px)) auto;
  align-items: center;
  column-gap: calc(16 * var(--pc-unit, 1px));
  margin: 0;
}
.photo-instagram-brand svg {
  grid-column: 1;
  grid-row: 2;
}
.photo-instagram-brand span {
  grid-column: 2;
  grid-row: 1;
  font-size: max(13px, calc(13 * var(--pc-unit, 1px)));
  font-weight: 600;
  letter-spacing: 0.06em;
}
.photo-instagram-brand strong {
  grid-column: 2;
  grid-row: 2;
  font-size: calc(48 * var(--pc-unit, 1px));
  line-height: 1.2;
  letter-spacing: -0.03em;
}
/* カード全体を押せるように、リンクの当たり判定をカードいっぱいに広げる */
.photo-instagram-link {
  flex: none;
  color: inherit;
}
.photo-instagram-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.photo-instagram-link:focus-visible {
  outline: none;
}
.photo-instagram-link:focus-visible::after {
  outline: calc(3 * var(--pc-unit, 1px)) solid var(--orange);
  outline-offset: calc(4 * var(--pc-unit, 1px));
}
.photo-instagram-arrow {
  display: grid;
  place-items: center;
  width: calc(64 * var(--pc-unit, 1px));
  height: calc(64 * var(--pc-unit, 1px));
  border: calc(1 * var(--pc-unit, 1px)) solid rgb(255 255 255 / 0.7);
  border-radius: 50%;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}
.photo-instagram-card:has(.photo-instagram-link:is(:hover, :focus-visible)) .photo-instagram-arrow {
  background: #fff;
  color: var(--orange);
}
@keyframes photo-instagram-loop {
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .photo-instagram-track {
    animation: none;
  }
}
@media (max-width: 767.98px) {
  .photo-instagram-section {
    padding-bottom: 72px;
  }
  .photo-instagram-card {
    align-items: flex-end;
    gap: 16px;
    min-height: 260px;
    padding: 32px 24px 28px;
    border-radius: 24px;
  }
  .photo-instagram-group img {
    width: 180px;
  }
  .photo-instagram-copy h2 {
    margin-bottom: 20px;
    font-size: 17px;
    letter-spacing: 0.03em;
  }
  .photo-instagram-brand {
    grid-template-columns: 36px auto;
    column-gap: 10px;
  }
  .photo-instagram-brand svg {
    width: 36px;
    height: 36px;
  }
  .photo-instagram-brand span {
    font-size: 11px;
  }
  .photo-instagram-brand strong {
    font-size: 32px;
  }
  .photo-instagram-arrow {
    width: 48px;
    height: 48px;
  }
  .photo-instagram-arrow svg {
    width: 22px;
    height: 22px;
  }
}
.photo-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: calc(48 * var(--pc-unit, 1px)) calc(100 * var(--pc-unit, 1px));
  overflow: auto;
  border: 0;
  background: #282828;
  color: #fff;
}
.photo-dialog[open] {
  display: grid;
  place-items: center;
}
.photo-dialog::backdrop {
  background: #282828;
}
.photo-dialog-content {
  position: relative;
  width: min(calc(1200 * var(--pc-unit, 1px)), calc(calc(100 * var(--vw, 1vw)) - calc(320 * var(--pc-unit, 1px))));
}
.photo-dialog-figure {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}
.photo-dialog-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(calc(100 * var(--vh, 1dvh)) - calc(280 * var(--pc-unit, 1px)));
  object-fit: contain;
  border-radius: calc(24 * var(--pc-unit, 1px));
}
.photo-dialog figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(16 * var(--pc-unit, 1px));
  margin-top: calc(24 * var(--pc-unit, 1px));
  font-size: max(14px, calc(20 * var(--pc-unit, 1px)));
  line-height: max(22.4px, calc(32 * var(--pc-unit, 1px)));
}
.photo-dialog figcaption #photo-dialog-title {
  margin: 0;
  font-size: calc(24 * var(--pc-unit, 1px));
  font-weight: 700;
  line-height: calc(36 * var(--pc-unit, 1px));
}
.photo-dialog-control {
  display: grid;
  place-items: center;
  width: calc(64 * var(--pc-unit, 1px));
  height: calc(64 * var(--pc-unit, 1px));
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--orange);
  cursor: pointer;
}
.photo-page .photo-dialog-control:focus-visible {
  outline: calc(3 * var(--pc-unit, 1px)) solid var(--yellow);
  outline-offset: calc(5 * var(--pc-unit, 1px));
}
.photo-dialog-control:disabled {
  opacity: 0.4;
  cursor: default;
}
.photo-dialog-close {
  position: absolute;
  top: calc(48 * var(--pc-unit, 1px));
  right: max(calc(48 * var(--pc-unit, 1px)), calc((calc(100 * var(--vw, 1vw)) - calc(1440 * var(--pc-unit, 1px))) / 2));
  width: calc(56 * var(--pc-unit, 1px));
  height: calc(56 * var(--pc-unit, 1px));
}
.photo-dialog-prev,
.photo-dialog-next {
  position: absolute;
  top: calc((100% - calc(60 * var(--pc-unit, 1px))) / 2 - calc(32 * var(--pc-unit, 1px)));
}
.photo-dialog-prev {
  left: calc(-112 * var(--pc-unit, 1px));
}
.photo-dialog-next {
  right: calc(-112 * var(--pc-unit, 1px));
}
@media (min-width: 768px) {
  .photo-dialog-content {
    transform: translateY(calc(-6 * var(--pc-unit, 1px)));
  }
}
@media (max-width: 767.98px) {
  /* 狭い幅：英字を上、3列の写真を下に積み、写真の列は帯の下端へ流れ込ませる */
  .l-hero.photo-fv {
    --fv-gap: 12px;
    height: auto;
  }
  .photo-fv-inner {
    height: auto;
  }
  /* Figma SP 1343:4658（375）：カタカナ 32px を x20・y24、英字（298×106）をカタカナから x+36・下端-4 */
  .photo-fv .photo-fv-title {
    position: static;
    padding: 32px 32px 0;
    font-size: clamp(28px, calc(8.533333 * var(--vw, 1vw)), 44px);
    translate: none;
  }
  .photo-fv-en {
    width: 9.325em;
    margin: -0.12em 0 0 1.14em;
  }
  .photo-fv-columns {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    rotate: none;
    /* 下端の弧の分だけ伸ばし、写真が弧で切れるようにする */
    height: calc(clamp(300px, calc(72 * var(--vw, 1vw)), 440px) + var(--fv-arc));
    overflow: hidden;
  }
  .photo-gallery-section {
    padding: 48px 0 72px;
  }
  .photo-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 28px;
  }
  .photo-filters button {
    height: 41px;
    padding-inline: 8px;
    font-size: 14px;
  }
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }
  .photo-card-media {
    border-radius: 16px;
  }
  .photo-card-zoom {
    right: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
  }
  .photo-card-zoom svg {
    width: 16px;
    height: 16px;
  }
  .photo-card-title {
    margin-top: 8px;
    font-size: 14px;
    line-height: 21px;
  }
  .photo-more-row {
    margin-top: 32px;
  }
  .photo-more {
    width: 100%;
    justify-content: center;
    height: 56px;
    padding: 0 12px;
    font-size: 16px;
  }
  .photo-more > span {
    width: 40px;
    height: 40px;
  }
  .photo-empty {
    min-height: 100px;
    font-size: 16px;
  }
  .photo-dialog {
    padding: 100px 20px 32px;
  }
  .photo-dialog-content {
    width: min(640px, 100%);
  }
  .photo-dialog-image {
    max-height: calc(calc(100 * var(--vh, 1dvh)) - 320px);
    border-radius: 16px;
  }
  .photo-dialog figcaption {
    margin-top: 14px;
    font-size: 16px;
    line-height: 28px;
  }
  .photo-dialog figcaption #photo-dialog-title {
    font-size: 18px;
    line-height: 28px;
  }
  .photo-dialog-close {
    top: 24px;
    right: 20px;
    width: 48px;
    height: 48px;
  }
  .photo-dialog-nav {
    display: flex;
    justify-content: center;
    gap: 56px;
    margin-top: 32px;
  }
  .photo-dialog-prev,
  .photo-dialog-next {
    position: static;
    width: 56px;
    height: 56px;
  }
}
@media (min-width: 600px) and (max-width: 767.98px) {
  .photo-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 20px;
  }
}
@media (max-width: 767px) {
  .photo-fv .photo-fv-title {
    padding: 24px 20px 0;
  }
  .photo-fv-columns {
    width: calc(100% - 40px);
    margin-top: 16px;
  }
  .photo-fv-track img {
    border-radius: 12px;
  }
}

/* SP：FVの写真は横に流す（2段。上段は左へ、下段は右へ）。帯の幅いっぱいに流し、下の段は帯の下端の弧で切り抜く。
   767px幅まで継ぎ目なく流すと3段では写真が小さくなりすぎるため2段にし、上段と写真が重ならない3列目を下段に使う。 */
@media (max-width: 767.98px) {
  .photo-fv-columns {
    flex-direction: column;
    width: 100%;
    margin: 16px 0 0;
  }
  .photo-fv-column {
    flex: 1 1 0;
    min-height: 0;
    width: auto;
  }
  .photo-fv-column:nth-child(2) {
    display: none;
  }
  .photo-fv-track {
    flex-direction: row;
    width: max-content;
    height: 100%;
    padding: 0 var(--fv-gap) 0 0;
    animation-name: photo-fv-left;
  }
  .photo-fv-column:nth-child(3) .photo-fv-track {
    animation-name: photo-fv-right;
  }
  .photo-fv-track img {
    width: auto;
    height: 100%;
  }
}
@keyframes photo-fv-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@keyframes photo-fv-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

/* PC比率フェーズ2：固定属性・折り返しの補正。 */
@media (min-width: 768px) and (max-width: 1919.98px) {
  .photo-card-zoom svg {
    width: calc(20 * var(--pc-unit));
    height: calc(20 * var(--pc-unit));
  }
  .photo-instagram-brand svg {
    width: calc(48 * var(--pc-unit));
    height: calc(48 * var(--pc-unit));
  }
  .photo-dialog-control svg {
    width: calc(28 * var(--pc-unit));
    height: calc(28 * var(--pc-unit));
  }
  .photo-dialog-close svg {
    width: calc(24 * var(--pc-unit));
    height: calc(24 * var(--pc-unit));
  }
}
