/* ================================================================
   Works（実績一覧）: works.html 専用
   映像背景・白系の文字・金のアクセントは top.css の下層ページと同じ言語。
   テキストの背後にベール（暗い帯）は敷かない。暗い面はカードのサムネイル下地のみ。
================================================================ */

/* mf.css の body { overflow-x: hidden } は body をスクロールコンテナにして sticky を無効化する。
   このページだけ clip に替える（横はみ出しは html の overflow-x: hidden で引き続き切られる） */
html.mf-seq-on body.mf-works-page { overflow-x: clip; }

/* ヒーロー: 中央に見出し、背後に巨大で薄い英字 */
html.mf-seq-on main > .mf-service-hero.mf-works-hero {
  position: relative;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: clip;
}
html.mf-seq-on .mf-works-hero > .mf-container { position: relative; z-index: 1; }
html.mf-seq-on .mf-works-hero h1 { margin-bottom: 0; }
html.mf-seq-on .mf-works-hero-bg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(96px, 23vw, 320px);
  line-height: 1;
  letter-spacing: .02em;
  color: rgba(184, 149, 56, .14);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* パンくず */
html.mf-seq-on .mf-works-crumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 500 11px/1.8 var(--font-en);
  letter-spacing: .16em;
  color: var(--mf-top-muted);
}
html.mf-seq-on .mf-works-crumb li { display: flex; align-items: center; gap: 12px; }
html.mf-seq-on .mf-works-crumb li + li::before { content: '>'; color: var(--gold-light); }
html.mf-seq-on .mf-works-crumb li[aria-current] { font-family: var(--font-jp); letter-spacing: .08em; color: var(--mf-top-ink); }
html.mf-seq-on .mf-works-crumb a { color: #d1bd80; text-decoration: none; }
html.mf-seq-on .mf-works-crumb a:hover { color: var(--gold-light); }

/* 本文: 左に縦の英字ラベル（PC は sticky）、右にコンテンツ */
html.mf-seq-on .mf-works-section { padding-top: 56px; }
html.mf-seq-on .mf-works-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
html.mf-seq-on .mf-works-side {
  position: sticky;
  top: 140px;
  margin: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 88px;
  line-height: 1;
  letter-spacing: .08em;
  color: var(--gold-light);
  text-shadow: 0 3px 32px rgba(0,0,0,.7);
  user-select: none;
}
html.mf-seq-on .mf-works-content { min-width: 0; }

/* カテゴリのタブ + タグで検索 */
html.mf-seq-on .mf-works-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--mf-top-rule);
}
html.mf-seq-on .mf-works-tabs {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
html.mf-seq-on .mf-works-tabs::-webkit-scrollbar { display: none; }
html.mf-seq-on .mf-works-tab {
  flex: none;
  padding: 10px 18px;
  border: 1px solid var(--mf-top-rule);
  background: rgba(3,6,9,.65);
  color: #e3d2a0;
  font: 500 12px/1.4 var(--font-en);
  letter-spacing: .12em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
html.mf-seq-on .mf-works-tab:hover { border-color: var(--gold-light); background: rgba(155,122,31,.3); }
html.mf-seq-on .mf-works-tab[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #fff; }
html.mf-seq-on .mf-works-tab:focus-visible { outline-offset: 3px; }
html.mf-seq-on .mf-works-search {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--mf-top-muted);
  letter-spacing: .06em;
}
html.mf-seq-on .mf-works-year {
  appearance: none;
  -webkit-appearance: none;
  min-width: 150px;
  padding: 9px 36px 9px 14px;
  border: 1px solid rgba(184,149,56,.4);
  border-radius: 0;
  background: rgba(5,8,11,.88) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23B89538' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--mf-top-ink);
  color-scheme: dark;
  font: 400 14px/1.5 var(--font-jp);
  cursor: pointer;
}
html.mf-seq-on .mf-works-year:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-color: var(--gold-light); }
html.mf-seq-on .mf-works-note {
  margin: 16px 0 28px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--mf-top-muted);
}

/* カード */
html.mf-seq-on .mf-works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 28px;
}
html.mf-seq-on .mf-works-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* .reveal（mf.css）の出現アニメーションの opacity を残しつつ、hover の持ち上げは短く */
  transition: opacity .8s ease, transform .3s ease;
}
html.mf-seq-on .mf-works-card[hidden] { display: none; }
html.mf-seq-on .mf-works-thumb {
  aspect-ratio: 16 / 9.5;
  padding: 12px;
  background: rgba(3,6,9,.82);
  border: 1px solid var(--mf-top-rule);
  transition: border-color .3s ease;
}
html.mf-seq-on .mf-works-thumb svg { display: block; width: 100%; height: 100%; }
html.mf-seq-on .mf-works-card:hover { transform: translateY(-4px); }
html.mf-seq-on .mf-works-card:hover .mf-works-thumb { border-color: var(--gold-light); }
html.mf-seq-on .mf-works-body { display: flex; flex-direction: column; flex: 1; padding-top: 18px; }
html.mf-seq-on .mf-works-title {
  margin: 0;
  font-family: var(--font-jp);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--mf-top-ink);
  text-shadow: 0 2px 16px #000;
}
html.mf-seq-on .mf-works-client {
  margin: 6px 0 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--mf-top-rule);
  font-size: 12px;
  line-height: 1.8;
  color: var(--mf-top-muted);
  text-shadow: 0 1px 10px #000;
}
html.mf-seq-on .mf-works-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: .04em;
  color: #d1bd80;
  text-shadow: 0 1px 10px #000;
}
html.mf-seq-on .mf-works-empty {
  margin: 0;
  padding: 48px 0;
  text-align: center;
  font-size: 15px;
  color: var(--mf-top-ink);
  text-shadow: 0 2px 16px #000;
}
html.mf-seq-on .mf-works-empty[hidden] { display: none; }

@media (max-width: 1100px) {
  html.mf-seq-on .mf-works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.mf-seq-on .mf-works-layout { gap: 40px; }
  html.mf-seq-on .mf-works-side { font-size: 72px; }
}
@media (max-width: 880px) {
  html.mf-seq-on .mf-works-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  html.mf-seq-on .mf-works-side {
    position: static;
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 40px;
    letter-spacing: .04em;
  }
  html.mf-seq-on .mf-works-toolbar { flex-direction: column; align-items: stretch; }
  html.mf-seq-on .mf-works-search { justify-content: flex-end; }
}
@media (max-width: 700px) {
  html.mf-seq-on main > .mf-service-hero.mf-works-hero { min-height: 240px; }
  html.mf-seq-on .mf-works-section { padding-top: 40px; }
  html.mf-seq-on .mf-works-tab { padding: 9px 14px; }
  /* iOS は 16px 未満の select にフォーカスすると画面を拡大するため */
  html.mf-seq-on .mf-works-year { font-size: 16px; }
  html.mf-seq-on .mf-works-title { font-size: 17px; }
}
@media (max-width: 640px) {
  html.mf-seq-on .mf-works-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html.mf-seq-on .mf-works-card { transition: none; }
  html.mf-seq-on .mf-works-card:hover { transform: none; }
}
