html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  color: #3a3a3a;
  line-height: 1.8;
  animation: pageFadeIn 1s ease;
}

@keyframes pageFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.section__title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 48px;
}

/* ===== ヘッダー ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-size: 1.25rem;
}

.header__nav {
  display: flex;
  gap: 32px;
}

.header__link {
  font-size: 0.9rem;
  transition: opacity 0.3s;
}

.header__link:hover {
  opacity: 0.6;
}

/* ===== メインビジュアル ===== */
.hero {
  position: relative;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  z-index: 0;
}

.hero__title {
  position: relative;
  z-index: 1;
  font-size: 3rem;
}

/* ===== 作品 ===== */
.works {
  padding: 80px 24px;
  background: #f9f9f9;
}

.works__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.works__card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: box-shadow 0.3s;
  display: block;
  cursor: pointer;
}

.works__card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.works__img,
.modal__img {
  width: 100%;
  overflow: hidden;
  background: #f0f0f0;
}

.works__img img,
.modal__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.works__img {
  aspect-ratio: 16 / 10;
}

.works__body {
  padding: 20px;
}

.works__category {
  display: inline-block;
  font-size: 0.7rem;
  color: #fff;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.works__category--web {
  background: #2563eb;
}

.works__category--banner {
  background: #c4a882;
}

.works__name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 4px;
  margin-bottom: 8px;
}

.works__desc {
  font-size: 0.85rem;
  color: #666;
}

/* ===== モーダル ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  justify-content: center;
  align-items: center;
}

.modal.is-open {
  display: flex;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  animation: overlayFadeIn 0.3s ease;
}

.modal__content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 94%;
  max-width: 1080px;
  max-height: 94vh;
  overflow-y: auto;
  z-index: 1;
  animation: modalSlideUp 0.3s ease;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s;
}

.modal__close:hover {
  opacity: 0.7;
}

.modal__img {
  aspect-ratio: 16 / 6;
  border-radius: 12px 12px 0 0;
}

.modal__details {
  display: flex;
  gap: 40px;
  padding: 32px;
}

.modal__left,
.modal__right {
  flex: 1;
  min-width: 0;
}

.modal__dl dt {
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 16px;
}

.modal__dl dt:first-child {
  margin-top: 0;
}

.modal__dl dd {
  font-size: 0.9rem;
  color: #555;
  margin-top: 2px;
}

.modal__dl dd a {
  color: #2563eb;
  text-decoration: underline;
}

.modal__subtitle {
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 20px;
}

.modal__subtitle:first-child {
  margin-top: 0;
}

.modal__right p {
  font-size: 0.9rem;
  color: #555;
  margin-top: 4px;
  white-space: pre-wrap;
}

/* ===== フッター ===== */
.footer {
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid #eee;
}

.footer__text {
  font-size: 0.8rem;
  color: #999;
}

/* ===== アニメーション ===== */
.object {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.object.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes overlayFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes modalSlideUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .hero__title {
    font-size: 1.75rem;
  }

  .works__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .header__nav {
    gap: 20px;
  }

  .header__link {
    font-size: 0.8rem;
  }

  .modal__details {
    flex-direction: column;
    gap: 24px;
    padding: 24px;
  }

  .modal__content {
    width: 95%;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .works__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
