/* =========================================================
   ポートフォリオサイト スタイルシート
   シンプルでモノトーンなデザイン。
   色を変えたいときは、下の :root の値を変えてください
   （サイト全体に反映されます）。
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-alt: #f4f4f2;
  --hero-bg: #101012;
  --hero-sub: #b9b9be;
  --text: #141416;
  --muted: #7c7c81;
  --line: #e6e6e3;
  --thumb-bg: #ececea;
  --radius: 4px;
  --max-width: 1040px;
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans",
          "Noto Sans JP", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.8;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--text);
  color: #fff;
}

.inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
}

.site-name {
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.18em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ---------- タイトル部分 ---------- */
.hero {
  background: var(--hero-bg);
  color: #ffffff;
  padding: 112px 0 96px;
}

.hero-label {
  margin: 0 0 20px;
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  color: var(--hero-sub);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.25;
}

.hero-sub {
  margin: 0;
  color: var(--hero-sub);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

/* ---------- セクション共通 ---------- */
.section {
  scroll-margin-top: 84px;
  padding: 88px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  margin: 0 0 40px;
  padding-bottom: 16px;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  border-bottom: 1px solid var(--line);
}

.group-title {
  margin: 38px 0 18px;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.section-note {
  margin: -22px 0 30px;
  color: var(--muted);
  font-size: 0.88rem;
}

.about-text {
  max-width: 720px;
  margin: 0;
  white-space: pre-wrap;
}

/* ---------- 作品カード（動画・LP共通） ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 28px;
}

.work-card {
  background: transparent;
  transition: transform 0.25s ease;
}

.work-card:hover {
  transform: translateY(-4px);
}

.work-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--thumb-bg);
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  overflow: hidden;
}

.work-thumb img,
.work-thumb iframe,
.work-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}

/* 動画コンテンツ：最初から本来の比率で全体を表示（余白は薄いグレー） */
#video-content .work-thumb video {
  object-fit: contain;
  background: var(--thumb-bg);
}

.video-thumb {
  aspect-ratio: 16 / 9;
}

.lp-thumb {
  aspect-ratio: 4 / 3;
}

.work-title {
  margin: 16px 2px 2px;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.work-desc {
  margin: 0 2px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- バナー ---------- */
.banner-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.banner-card {
  background: transparent;
}

.banner-thumb {
  aspect-ratio: 16 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--thumb-bg);
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  overflow: hidden;
}

.banner-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- お問い合わせ ---------- */
.contact-section {
  text-align: center;
}

.contact-section .section-title {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 20px;
}

.contact-text {
  margin: 0 0 30px;
  color: var(--muted);
}

.contact-button {
  display: inline-block;
  background: var(--text);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 15px 40px;
  border-radius: 999px;
  transition: opacity 0.2s ease;
}

.contact-button:hover {
  opacity: 0.75;
}

.contact-mail {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- フッター ---------- */
.site-footer {
  background: var(--hero-bg);
  padding: 30px 0;
  text-align: center;
  color: var(--hero-sub);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

.site-footer p {
  margin: 0;
}

/* ---------- スマホ表示 ---------- */
@media (max-width: 820px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: 76px 0 64px;
  }

  .section {
    padding: 64px 0;
  }
}

@media (max-width: 540px) {
  .work-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .section {
    padding: 52px 0;
  }
}

/* 動画CR：1080×1920の縦長サムネイル */
.cr-thumb {
  aspect-ratio: 9 / 16;
  position: relative;
}

#video-cr .work-thumb video {
  object-fit: contain;
  background: var(--thumb-bg);
}

/* 音声ON/OFFボタン（動画の左上） */
.sound-toggle {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 6px 12px;
  border: 1px solid rgba(16, 16, 18, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #101012;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.sound-toggle.is-on {
  background: #101012;
  color: #fff;
  border-color: #101012;
}

/* カード全体のリンク（記事LP） */
.work-card > a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* PDFビューア */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #f4f4f2;
  display: flex;
  flex-direction: column;
}

.viewer[hidden] {
  display: none;
}

.viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: #101012;
  color: #fff;
}

.viewer-title {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.viewer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.viewer-pdf {
  color: #fff;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.viewer-close {
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.viewer-body {
  overflow-y: auto;
  padding: 24px 16px 48px;
}

.viewer-group img {
  display: block;
  width: min(820px, 94vw);
  height: auto;
  margin: 0 auto 18px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(16, 16, 18, 0.12);
}

.contact-mail a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero {
  scroll-margin-top: 84px;
}

/* ---------- バナー画像グリッド ---------- */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  align-items: start;
}

.banner-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  background: var(--thumb-bg);
}

.banner-grid .banner-wide {
  grid-column: 1 / -1;
}

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

.sns-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  background: var(--thumb-bg);
}

@media (max-width: 640px) {
  .banner-grid {
    grid-template-columns: 1fr;
  }

  .sns-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
