/* ===== WORKS PAGE ===== */
#header{
  opacity: 1;
  pointer-events:all;
}
.header-nav a.active{
  pointer-events: none;
}
  /* ===== MAIN CONTENT ===== */
  main {
    padding-top: 64px;
  }

  /* ===== PAGE TITLE ===== */
  .page-title-area {
    padding: 60px 80px 30px;
  }
  .section-title-wrap {
    overflow: hidden;
    display: inline-block;
    position: relative;
  }
  .page-title {
    font-family: "avenir-next-lt-pro", sans-serif;
    font-size: clamp(40px, 13vw, 110px);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1;
    display: block;
    position: relative;
    opacity: 0;
  }

  /* ===== MASK REVEAL ===== */
  .reveal-wrap {
    position: relative;
    overflow: hidden;
  }
  .reveal-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--white);
    transform: scaleX(1);
    transform-origin: left center;
    z-index: 2;
    transition: transform 0.75s cubic-bezier(0.76, 0, 0.24, 1);
  }
  .reveal-inner {
    width: 100%;
    height: 100%;
    transform: scale(1.04);
    transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  /* object-fit: cover を使わず画像をそのまま表示 */
  .reveal-inner img {
    width: 100%;
    height: auto;
    display: block;
  }
  .reveal-wrap.revealed::after {
    transform: scaleX(0);
    transform-origin: right center;
  }
  .reveal-wrap.revealed .reveal-inner {
    transform: scale(1);
  }

  /* ===== HERO IMAGE ===== */
  .works-hero {
    margin: 0 auto 50px;
    padding: 0 80px;
    width: 100%;
    overflow: hidden;
  }
  .works-hero.reveal-wrap {
    padding: 0 80px;
    box-sizing: border-box;
  }

  /* ===== WORKS GRID ===== */
  .works-grid-section {
    padding: 48px 80px 0;
  }
  .works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px 32px;
  }
  .work-item {
    cursor: pointer;
    animation: fadeInUp 0.5s ease both;
  }
  .work-item:nth-child(1) { animation-delay: 0.05s; }
  .work-item:nth-child(2) { animation-delay: 0.1s; }
  .work-item:nth-child(3) { animation-delay: 0.15s; }
  .work-item:nth-child(4) { animation-delay: 0.2s; }
  .work-item:nth-child(5) { animation-delay: 0.25s; }
  .work-item:nth-child(6) { animation-delay: 0.3s; }
  .work-item:nth-child(7) { animation-delay: 0.35s; }
  .work-item:nth-child(8) { animation-delay: 0.4s; }
  .work-item:nth-child(9) { animation-delay: 0.45s; }
  .work-item:nth-child(10) { animation-delay: 0.5s; }
  .work-item:nth-child(11) { animation-delay: 0.55s; }
  .work-item:nth-child(12) { animation-delay: 0.6s; }
  .work-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
  }
  @media (max-width: 400px) {
    .work-thumb {
      aspect-ratio: unset;
      padding-top: 56.25%; /* 9/16 */
    }
  }
  .work-thumb img {
    transform: scale(1.04);
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.3s;
  }
  .work-item:hover .work-thumb img {
    transform: scale(1.08);
    opacity: 0.8;
  }
  .work-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }
  .work-play-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    border: 2px solid rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.3s;
  }
  .work-item:hover .work-play-circle {
    background: rgba(255,255,255,0.45);
    transform: scale(1.1);
  }
  .work-thumb .placeholder-img {
    width: 100%; height: 100%;
    background: #d0d0d0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: #aaa; letter-spacing: 0.1em;
  }
  .work-title { font-size: 16px; margin-top: 10px; letter-spacing: 0.02em; }

  /* ===== PAGINATION ===== */
  .pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 30px; padding: 56px 80px 48px;
  }
  .page-btn {
    font-family: "din-2014", sans-serif;
    font-weight: 700;
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; border: 1px solid var(--gray-border);
    cursor: pointer; transition: all 0.2s, color 0.2s, border-color 0.2s;
    background: var(--white); color: var(--black);
    color: #a5a5a5;
  }
  .page-btn:hover { background-color: var(--black);border-color: var(--black); color: var(--white); }
  .page-btn.active { background: var(--black); color: var(--white); border-color: var(--black); }
  .page-btn.arrow { color: var(--gray); border: 0; background: none; }
  .page-btn.arrow::before {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    border-right: 1px solid currentColor;
    border-top: 1px solid currentColor;
    position: relative;
  }
  .page-btn.arrow.next::before { transform: rotate(45deg); left: -15px; }
  .page-btn.arrow.prev::before { transform: rotate(-135deg); left: 15px; }
  .page-btn.arrow:hover { color: var(--blue); }

  /* ===== ANIMATIONS ===== */
  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ===== SP ===== */
  @media (max-width: 768px) {
    main { padding-top: 52px; }
    .page-title-area { padding: 28px 20px 0; }
    .page-title { font-size: clamp(48px, 14vw, 72px);letter-spacing: 0.08em; }
    .work-title{font-size: 13px;}
    .works-hero.reveal-wrap { padding: 0 20px;margin: 15px 0 10px; }
    .works-grid-section { padding: 32px 20px 0; }
    .works-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
    .pagination { padding: 40px 0px 32px;gap:23px; }
    .page-btn { width: 42px; height: 42px; font-size: 13px; flex-shrink: 0; }
    .page-btn.arrow.prev { order: -1; }
    .page-btn.arrow.next { order: 999; }
    .pagination.is-first { gap: 29px;margin-left: 7px; }
    .page-btn.arrow.next::before {
    left: -10px;
}
.page-btn.arrow::before {
    width: 16px;
    height: 16px;
}
  }
  @media(max-width:400px){
    .page-btn { width: 34px; height: 34px; }
    .pagination.is-first { gap: 29px; }
    .work-title{font-size: 12px;}
  }
