/* =========================================================
   IVYMOON — Retro / Warm portfolio
   palette は お気に入りデータ のカラーパレット画像から抽出
   ========================================================= */

:root {
  --cream:      #f4ede1;
  --cream-deep: #ebe0cf;
  --paper:      #fbf7f0;
  --ink:        #2b1b14;
  --ink-soft:   #6b5648;
  --maroon:     #7f0303;
  --ruby:       #a6171c;
  --tangelo:    #d54c15;
  --sunny:      #f1c045;
  --midnight:   #0f414a;
  --sky:        #8db6c7;

  /* rgba() で濃度を変えて使う用（テーマ差し替え時はここも一緒に変える） */
  --ink-rgb:   43, 27, 20;
  --cream-rgb: 244, 237, 225;
  --sunny-rgb: 241, 192, 69;

  /* ヒーロー見出しの回り込み（テーマごとに left / center を切り替える） */
  --hero-align: left;
  --card-radius: 10px;

  --shell: min(1240px, 92vw);
  --r:     18px;
  /* 画面の左右端の余白。ヘッダーとフッターで共有して、ロゴとCTAの端を揃える */
  --edge:  clamp(18px, 4vw, 48px);

  --serif:  "Playfair Display", "LINE Seed JP", "Times New Roman", serif;
  /* アクセント書体（speaks / & / works / 小見出し）— ロゴと同じディドネ */
  --accent: "Libre Bodoni", "Playfair Display", serif;
  --sans:  "Outfit", "LINE Seed JP", -apple-system, sans-serif;
  --jp:    "LINE Seed JP", -apple-system, "Hiragino Sans", sans-serif;
}

* { box-sizing: border-box; }

/* html には overflow を付けないこと。付けると html がスクロールコンテナになり、
   ページ末尾がスクロール範囲から外れる。横方向のはみ出しは body の clip で抑える。 */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--jp);
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: .02em;
  /* body に overflow-x を指定しないこと。
     hidden は body をスクロールコンテナにしてページ末尾（フッター）に
     到達できなくする。clip でも古いブラウザでは同種の問題が出るため、
     そもそも横にはみ出す要素を作らない方針にして指定自体を外している。 */
  -webkit-font-smoothing: antialiased;
}

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

/* 日本語を文節で折り返す（対応ブラウザのみ。非対応でも通常折り返しになるだけ） */
.hero__lead, .sec__note, .svc__txt, .price__desc, .contact__txt, .price__foot {
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}
a   { color: inherit; text-decoration: none; }

/* ---- 紙のざらつき（全面オーバーレイ） ---- */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: .32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'>\
<filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/>\
<feColorMatrix type='saturate' values='0'/></filter>\
<rect width='180' height='180' filter='url(%23n)' opacity='.5'/></svg>");
}

.shell { width: var(--shell); margin-inline: auto; }

/* =========================================================
   読み進めた量を示す細いバー（最上部）
   ========================================================= */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: var(--maroon);
  transform: scaleX(0); transform-origin: 0 50%;
  z-index: 900; pointer-events: none;
}

/* =========================================================
   ページ全体をふわっと出す
   ========================================================= */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: pageIn .5s ease both; }

/* =========================================================
   Header
   ========================================================= */
.hdr {
  position: fixed; inset: 0 0 auto 0;
  z-index: 800;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 16px var(--edge);
  transition: background .4s ease, box-shadow .4s ease, padding .4s ease;
}
.hdr.is-stuck {
  background: rgba(var(--cream-rgb), .93);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(var(--ink-rgb), .12);
  padding-block: 10px;
}
.hdr__logo img { width: clamp(112px, 12vw, 150px); }

.nav { display: flex; align-items: center; gap: clamp(20px, 3.4vw, 48px); }
.nav a {
  font-family: var(--sans);
  font-size: 13px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  position: relative; padding-block: 4px;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .38s cubic-bezier(.22,1,.36,1);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__cta {
  background: var(--maroon); color: var(--paper);
  padding: 9px 20px !important; border-radius: 999px;
  transition: transform .3s cubic-bezier(.22,1,.36,1), background .3s;
}
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--ruby); transform: translateY(-2px); }

/* =========================================================
   スマホ用メニュー（640px以下でのみ使う）
   ========================================================= */
.hdr__menu {
  display: none;
  width: 34px; height: 26px;
  border: 0; background: transparent; padding: 0;
  cursor: pointer; position: relative;
}
.hdr__menu span {
  display: block; position: absolute; left: 4px; right: 4px; height: 1.5px;
  background: var(--ink); border-radius: 2px;
  transition: transform .38s cubic-bezier(.22,1,.36,1), opacity .25s;
}
.hdr__menu span:nth-child(1) { top: 5px; }
.hdr__menu span:nth-child(2) { top: 12px; }
.hdr__menu span:nth-child(3) { top: 19px; }
.hdr__menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hdr__menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hdr__menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* メニューを開いている間はヘッダーのCONTACTを隠す（メニュー内と重複するため） */
.is-menu-open .nav__cta { opacity: 0; pointer-events: none; }
.nav__cta { transition: transform .3s cubic-bezier(.22,1,.36,1), background .3s, opacity .3s; }

/* 閉じているときは必ず消す。
   .menu の display:grid が hidden 属性より強く、これが無いと
   透明なメニューが画面全体に残ってスマホのタップを全部吸ってしまう。 */
.menu[hidden] { display: none; }
.menu {
  position: fixed; inset: 0; z-index: 790;
  height: 100dvh;   /* 拡大表示と同じ理由（スマホのURLバーぶんを見込む） */
  background: var(--cream);
  display: grid; place-items: center;
  opacity: 0; transition: opacity .38s ease;
}
.menu.is-open { opacity: 1; }
.menu__nav { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.menu__nav a {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(30px, 9vw, 44px); line-height: 1;
  letter-spacing: -.02em;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,1,.36,1);
}
.menu.is-open .menu__nav a { opacity: 1; transform: none; }
.menu.is-open .menu__nav a:nth-child(1) { transition-delay: .06s; }
.menu.is-open .menu__nav a:nth-child(2) { transition-delay: .12s; }
.menu.is-open .menu__nav a:nth-child(3) { transition-delay: .18s; }
.menu.is-open .menu__nav a:nth-child(4) { transition-delay: .24s; }
.menu__cta {
  font-family: var(--accent); font-style: italic; font-weight: 700;
  color: var(--maroon);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  /* 枠の上端 / 枠の内側の余白 / 枠の下端 を変数で持ち、
     上下の余白が必ず同じ値になるようにしている */
  --frame-top:    clamp(124px, 14vh, 152px);
  --frame-bottom: 16px;
  --frame-pad:    clamp(56px, 11vh, 108px);

  position: relative;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: calc(var(--frame-top) + var(--frame-pad)) 0
           calc(var(--frame-bottom) + var(--frame-pad));
  overflow: hidden;
}
.hero__frame {
  position: absolute;
  inset: var(--frame-top) clamp(14px, 3vw, 40px) var(--frame-bottom);
  border: 1.5px solid rgba(var(--ink-rgb), .32);
  border-radius: var(--r);
  pointer-events: none;
}
.hero__frame::before,
.hero__frame::after {
  content: "✳";
  position: absolute; font-size: 15px; color: var(--maroon);
  background: var(--cream); padding: 0 7px; line-height: 1;
}
.hero__frame::before { top: -8px;    left: 26px; }
.hero__frame::after  { bottom: -8px; right: 26px; }

.hero__inner { position: relative; z-index: 2; text-align: var(--hero-align); }

.hero__eyebrow {
  font-family: var(--sans);
  font-size: 12px; font-weight: 500;
  letter-spacing: .34em; text-transform: uppercase;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 12px;
  margin-top: 0;   /* p の既定マージンで上だけ12pxずれるのを防ぐ */
  margin-bottom: clamp(14px, 2.2vw, 24px);
}
.hero__inner[style], :root[data-hero="center"] .hero__eyebrow { justify-content: center; }
.hero__eyebrow::before {
  content: ""; width: clamp(28px, 6vw, 64px); height: 1px; background: currentColor;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 900;
  /* 幅だけでなく高さも見る。低いウィンドウでも3行が収まる */
  font-size: clamp(29px, min(6.2vw, 11vh), 92px);
  line-height: .84;
  letter-spacing: -.025em;
  margin: 0;
}
/* ---- 見出しを行ごとに下からせり上げる ---- */
.hero__title .line {
  display: block; overflow: hidden;
  /* イタリックの下方向のはみ出しが切れないよう少し逃がす */
  padding-bottom: .1em; margin-bottom: -.1em;
}
.hero__title .line > span {
  display: block;
  transform: translateY(110%);
  animation: lineUp .9s cubic-bezier(.22,1,.36,1) forwards;
}
.hero__title .line:nth-child(1) > span { animation-delay: .10s; }
.hero__title .line:nth-child(2) > span { animation-delay: .20s; }
.hero__title .line:nth-child(3) > span { animation-delay: .30s; }
@keyframes lineUp { to { transform: translateY(0); } }

/* ---- ヒーローの前後の要素も順に出す ---- */
.hero__eyebrow,
.hero__meta,
.scroll-cue {
  opacity: 0;
  animation: fadeUp .8s cubic-bezier(.22,1,.36,1) forwards;
}
.hero__eyebrow { animation-delay: .05s; }
.hero__meta    { animation-delay: .55s; }
.scroll-cue    { animation-delay: .8s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* scroll-cue は縦位置の指定があるので、そこだけ別に動かす */
.scroll-cue { animation-name: fadeUpCue; }
@keyframes fadeUpCue {
  from { opacity: 0; transform: translateY(calc(-50% + 14px)); }
  to   { opacity: 1; transform: translateY(-50%); }
}

.hero__meta { position: relative; }

/* 見出しのアクセント語（speaks / & / works / do / guide / talk）は
   ロゴと同じディドネ（Bodoni Moda Italic）で差す */
.hero__title em,
.hero__title .amp,
.sec__title em,
.contact__ttl em {
  font-family: var(--accent);
  font-style: italic;
  font-weight: 700;
}
.hero__title em  { color: var(--maroon); }
.hero__title .amp {
  color: var(--tangelo);
  font-size: .95em;
}

.hero__lead {
  margin: clamp(26px, 4vw, 44px) 0 0;
  max-width: 30em;
  font-size: clamp(14px, 1.5vw, 16.5px);
  color: var(--ink-soft);
  line-height: 2.1;
}

/* 上下に細罫を引いた帯。ヒーローの囲み枠と線の太さを揃えている */
.hero__meta {
  margin-top: clamp(24px, 3.6vw, 42px);
  border-block: 1px solid rgba(var(--ink-rgb), .3);
  padding-block: 14px;
  display: flex; flex-wrap: wrap;
  gap: 10px 0;
  justify-content: space-between;
}
.chip {
  font-family: var(--sans);
  font-size: clamp(10px, 1.02vw, 12px);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
  border: 0; border-radius: 0; padding: 0;
  white-space: nowrap;
}

/* ---- ヒーロー下のスクロール誘導 ---- */
.scroll-cue {
  /* 見出しの右にできる余白を使う。縦組みにして枠の右端に沿わせる */
  position: absolute; z-index: 3;
  right: clamp(30px, 4.6vw, 68px);
  top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-family: var(--sans); font-size: 10px;
  text-transform: uppercase; color: var(--ink-soft);
  transition: color .3s;
}
.scroll-cue span { writing-mode: vertical-rl; letter-spacing: .32em; }
.scroll-cue:hover { color: var(--maroon); }
.scroll-cue i {
  width: 1px; height: 46px; background: currentColor; display: block;
  transform-origin: 50% 0;
  animation: cue 2.2s cubic-bezier(.55,0,.45,1) infinite;
}
@keyframes cue {
  0%        { transform: scaleY(0);   opacity: 0; }
  35%       { transform: scaleY(1);   opacity: 1; }
  70%, 100% { transform: scaleY(1);   opacity: 0; transform-origin: 50% 100%; }
}

/* =========================================================
   Section 共通
   ========================================================= */
.sec { padding: clamp(62px, 9vw, 118px) 0; }
.sec--paper { background: var(--paper); }

.sec__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin-bottom: clamp(28px, 4.2vw, 52px);
}
.sec__num {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .3em;
  color: var(--tangelo);
  display: block; margin-bottom: 10px;
}
.sec__title {
  font-family: var(--serif);
  font-size: clamp(32px, 5.8vw, 74px);
  font-weight: 900; line-height: .92; letter-spacing: -.02em;
  margin: 0;
}
.sec__title em { color: var(--maroon); }
.sec__note {
  font-size: 13.5px; color: var(--ink-soft); max-width: 26em; margin: 0;
  /* 見出しの横に置く短冊なので、右端をそろえる */
  text-align: justify;
  word-break: normal;
}
/* 2段に分けて書くとき。sec__head は space-between の flex なので、
   まとめて1つの子にしないと段落が左右に散る */
.sec__notes { max-width: 26em; }
.sec__note + .sec__note { margin-top: 1em; }
/* =========================================================
   Works
   ========================================================= */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(26px, 4vw, 44px); }
.filter {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid rgba(var(--ink-rgb), .28);
  background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: 8px 17px; cursor: pointer;
  transition: all .28s cubic-bezier(.22,1,.36,1);
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.filter i {
  font-style: normal; font-size: .82em; opacity: .55;
  margin-left: 7px; letter-spacing: 0;
}
.filter.is-on i { opacity: .75; }

/* TOPは3列（大きく見せる）、Works一覧ページは5列（一覧性を優先） */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 30px);
}
.grid--full { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* TOPの Works から一覧ページへ送る導線 */
.works__more { margin: clamp(30px, 4vw, 46px) 0 0; text-align: center; }
.works__more a {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink);
  border: 1px solid rgba(var(--ink-rgb), .34); border-radius: 999px;
  padding: 13px 30px;
  transition: background .35s ease, border-color .35s ease, color .35s ease;
}
.works__more a span { transition: transform .35s cubic-bezier(.22,1,.36,1); }
.works__more a:hover {
  background: var(--maroon); border-color: var(--maroon); color: var(--paper);
}
.works__more a:hover span { transform: translateX(4px); }

.card {
  position: relative;
  border: 0; padding: 0; margin: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit; color: inherit;
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1);
}
.card.is-in { opacity: 1; transform: none; }

.card__shot {
  position: relative;
  aspect-ratio: 1414 / 2000;
  /* 中身は画像1枚だけ。文字が入る余地を消しておく。
     こうしておくと、万一 img の前に空白文字が残っても
     行の高さが 0 になり、作品が下にずれない（iOS Safari 対策）*/
  font-size: 0; line-height: 0;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--cream-deep);
  box-shadow: 0 1px 2px rgba(var(--ink-rgb), .10), 0 10px 22px -14px rgba(var(--ink-rgb), .5);
  transition: transform .55s cubic-bezier(.22,1,.36,1), box-shadow .55s ease;
}
.card__shot img { width: 100%; height: 100%; object-fit: cover; }

/* 複数枚ある作品は、一覧では同じ場所で数秒ごとに入れ替える（app.js が is-on を付け替える）。
   全部を重ねて置き、表示中の1枚だけを見せるので、カードの位置も大きさも動かない。
   背景色を敷いた作品（.is-framed）は img がもともと四辺固定なので、そのまま重なる。 */
.card__shot.is-multi img {
  opacity: 0;
  transition: opacity .9s ease;
}
.card__shot.is-multi img.is-on { opacity: 1; }
.card__shot.is-multi:not(.is-framed) img { position: absolute; inset: 0; }

/* 複数枚あることは拡大表示の「1 / 2」で分かるので、一覧に枚数は出していない。
   （このバッジのスタイルは、出したくなったとき用に残してある） */
.card__count {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: grid; place-items: center;
  background: var(--maroon); color: var(--paper);
  font-family: var(--sans); font-size: 10.5px; font-weight: 600;
  letter-spacing: .04em; border-radius: 999px;
}
.card:not(.is-static):hover .card__shot {
  transform: translateY(-7px) rotate(-.7deg);
  box-shadow: 0 26px 40px -20px rgba(var(--ink-rgb), .55);
}
/* ホバーで出る「View」。下地の白箱はやめて文字だけ。
   作品の写真の上に直接のるので、細い影を敷いて明るい絵でも読めるようにしている */
.card__shot::after {
  content: "View";
  position: absolute; inset: auto 15px 14px auto;
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .13em; text-indent: .13em;   /* 字間ぶん右に空くのを打ち消す */
  line-height: 1;   /* 本文の 1.85 を継ぐと縦に伸びるので切る */
  color: var(--paper);
  text-shadow: 0 1px 3px rgba(0,0,0,.55), 0 0 10px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(8px);
  transition: all .4s cubic-bezier(.22,1,.36,1);
}
.card:not(.is-static):hover .card__shot::after { opacity: 1; transform: none; }

/* TOPの Works は見せるだけ（クリックしても拡大しない）。
   ただし触れたときに少しだけ浮くのは残す。
   「押せる」と誤解させる要素（指カーソル / VIEW ラベル / 写真のズーム）だけ止める。 */
.card.is-static { cursor: default; }
.card.is-static .card__shot::after { content: none; }
.card.is-static:hover .card__shot {
  transform: translateY(-5px);
  box-shadow: 0 22px 36px -20px rgba(var(--ink-rgb), .58);
}

/* 白いマットを太めに取り、額装したように見せる。
   色は works.js の bg を --bg として受け取る（app.js が style で渡す）*/
.card__shot.is-framed { border-width: 5px; background: var(--bg); }

/* ---- 作品ごとの背景色（works.js の bg）----
   作品画像は「背景・影なし」で書き出しておき、色と余白と影はサイト側で付ける。
   こうすると全カードで余白と影が揃い、色だけ作品に合わせて変えられる。

   余白は「四辺からの距離」で決める。padding や height:100% を使うと、
   iOS Safari で計算が合わずに作品が下へずれることがあるため、
   位置そのものを四辺に固定してしまう。これなら行の高さや余白の
   解釈が入り込む余地がなく、どのブラウザでも必ず中央にそろう。
   上下の % は幅基準に換算した値（カードは 1414:2000 なので 9 ÷ 1.414 ≒ 6.36）*/
.card__shot.is-framed { padding: 0; }
.card__shot.is-framed img {
  position: absolute;
  top: 6.36%; left: 9%;
  width: 82%; height: 87.28%;   /* 100% から上下左右の余白を引いた残り */
  object-fit: contain;
  padding: 0;
  filter: drop-shadow(4px 5px 5px rgba(var(--ink-rgb), .62));
}
/* 拡大表示は「一覧のカードをそのまま大きくしたもの」に見せる。
   枠の形（1414:2000）も中の余白も .card__shot と同じ値にそろえてあるので、
   作品が縦長でも横長でも正方形でも、開いたときの形と大きさは必ず同じになる。
   枠の幅だけは画面に合わせて app.js が px で入れる。 */
.lb__frame.is-framed {
  display: block; position: relative;
  aspect-ratio: 1414 / 2000;
  padding: 0;
  border: 5px solid #fffdf4;
  border-radius: 0;
}
.lb__frame.is-framed .lb__img {
  position: absolute;
  top: 6.36%; left: 9%;
  width: 82%; height: 87.28%;   /* 100% から上下左右の余白を引いた残り */
  max-width: none; max-height: none;
  object-fit: contain;
  filter: drop-shadow(4px 5px 5px rgba(var(--ink-rgb), .62));
}

/* works.js で shadow: false を指定した作品は影を付けない。
   スタンプのように絵が1点ずつ分かれていると、全部に影が落ちて重くなるため。 */
.card__shot.is-flat img,
.lb__frame.is-flat .lb__img { filter: none; }

@media (max-width: 640px) {
  .card__shot.is-framed img,
  .lb__frame.is-framed .lb__img {
    top: 5.3%; left: 7.5%;
    width: 85%; height: 89.4%;
  }
}

.card__meta { padding: 13px 2px 0; }
.card__client {
  font-size: 13px; font-weight: 500; line-height: 1.5;
}
.card__title {
  font-size: 12px; color: var(--ink-soft); line-height: 1.6;
}
.card__year {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .16em;
  color: var(--tangelo); margin-top: 3px;
}

/* =========================================================
   Service
   ========================================================= */
.svc { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: clamp(16px, 2.4vw, 26px); }
.svc__item {
  background: var(--cream);
  border: 1px solid rgba(var(--ink-rgb), .16);
  border-radius: var(--r);
  padding: clamp(22px, 2.9vw, 34px);
  position: relative; overflow: hidden;
  transition: transform .5s cubic-bezier(.22,1,.36,1), border-color .5s;
}
.sec--paper .svc__item { background: var(--paper); }
.svc__item:hover { transform: translateY(-6px); border-color: rgba(var(--ink-rgb), .4); }
.svc__no {
  font-family: var(--accent); font-style: italic;
  font-size: 54px; line-height: 1; color: var(--cream-deep);
  position: absolute; top: 14px; right: 18px;
}
.svc__ttl {
  font-family: var(--accent); font-style: italic; font-size: 25px; font-weight: 700;
  margin: 0 0 6px; letter-spacing: -.005em;
}
.svc__jp { font-size: 13px; color: var(--tangelo); margin: 0 0 16px; letter-spacing: .06em; }
.svc__txt {
  font-size: 13.5px; color: var(--ink-soft); margin: 0 0 18px; line-height: 2;
  /* 3枚のカードが横に並ぶので、左右の余白が揃うよう両端揃えにする。
     auto-phrase のままだと行が短くなって字間が開くので normal に戻す */
  text-align: justify;
  word-break: normal;
}
.svc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.svc__list li {
  font-size: 11.5px; color: var(--ink-soft);
  border: 1px solid rgba(var(--ink-rgb), .22); border-radius: 999px; padding: 3px 11px;
}

/* サービスカードの「こんな時に」 */
.svc__use {
  margin: 16px 0 0; padding-top: 14px;
  border-top: 1px solid rgba(var(--ink-rgb), .2);
  font-size: 11.5px; color: var(--ink-soft); line-height: 1.85;
}

/* =========================================================
   Flow — 制作の流れ
   ========================================================= */
/* 5列とも「本文の幅」と「罫線までの隙間」を揃える。
   1列目は左、5列目は右をセクション端にぴったり付けたいので、
   その2列だけ内側の余白1つぶん狭い列にしている（等幅の 1fr では
   端の列だけ本文が広くなるか、罫線までの隙間が広くなるかのどちらかになる） */
.flow {
  --flow-pad: clamp(16px, 1.8vw, 26px);
  --flow-col: calc((100% - 8 * var(--flow-pad)) / 5);
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns:
    calc(var(--flow-col) + var(--flow-pad))
    repeat(3, calc(var(--flow-col) + 2 * var(--flow-pad)))
    calc(var(--flow-col) + var(--flow-pad));
  gap: 0;
  border-top: 1.5px solid rgba(var(--ink-rgb), .32);
}
.flow__item {
  padding: clamp(22px, 2.8vw, 34px) var(--flow-pad) clamp(26px, 3.2vw, 40px);
  border-right: 1px solid rgba(var(--ink-rgb), .2);
  position: relative;
}
.flow__item:first-child { padding-left: 0; }
.flow__item:last-child { padding-right: 0; border-right: 0; }
.flow__no {
  font-family: var(--accent); font-style: italic; font-weight: 700;
  font-size: clamp(26px, 2.8vw, 38px); line-height: 1;
  color: var(--maroon); display: block; margin-bottom: 14px;
}
.flow__ttl {
  font-size: 14px; font-weight: 700; margin: 0 0 8px; letter-spacing: .04em;
}
.flow__txt {
  font-size: 12.5px; color: var(--ink-soft); margin: 0; line-height: 1.95;
  /* 5列で並ぶので右端をそろえて短冊の幅を合わせる。
     auto-phrase だと行が短くなりすぎて両端揃えの字間が開くため、ここでは使わない */
  text-align: justify;
  word-break: normal;
}

/* =========================================================
   FAQ
   ========================================================= */
.faq { border-top: 1.5px solid rgba(var(--ink-rgb), .32); }
.faq__item { border-bottom: 1px solid rgba(var(--ink-rgb), .2); }
.faq__q {
  list-style: none; cursor: pointer;
  padding: clamp(16px, 2.2vw, 24px) 44px clamp(16px, 2.2vw, 24px) 0;
  font-size: 15px; font-weight: 500; letter-spacing: .03em;
  position: relative;
  transition: color .3s;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--maroon); }
.faq__q::after {
  content: ""; position: absolute; right: 10px; top: 50%;
  width: 11px; height: 11px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.faq__item[open] .faq__q { color: var(--maroon); }
.faq__item[open] .faq__q::after { transform: translateY(-20%) rotate(-135deg); }
.faq__a {
  padding: 0 44px clamp(20px, 2.6vw, 28px) 0;
  font-size: 13px; color: var(--ink-soft); line-height: 2.05;
  max-width: 80em; word-break: auto-phrase;
}
.faq__foot {
  margin-top: 26px; font-size: 13px; color: var(--ink-soft);
}
.faq__foot a {
  color: var(--maroon); border-bottom: 1px solid currentColor; padding-bottom: 1px;
}

/* =========================================================
   Price
   ========================================================= */
.price { border-top: 1px solid rgba(var(--ink-rgb), .22); }
.price__row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.5fr) minmax(0, .9fr);
  gap: 16px;
  align-items: baseline;
  padding: clamp(17px, 2.2vw, 26px) 4px;
  border-bottom: 1px solid rgba(var(--ink-rgb), .22);
  transition: background .35s ease, padding-inline .35s ease;
}
.price__row:hover { background: rgba(var(--sunny-rgb), .16); padding-inline: 14px; }
.price__name { font-family: var(--accent); font-style: italic; font-size: clamp(19px, 2.2vw, 25px); font-weight: 700; }
.price__name small {
  display: block; font-family: var(--jp);
  font-style: normal;   /* 親のイタリックを継いで和文が斜体になるのを止める */
  font-size: 12px; font-weight: 400; color: var(--ink-soft); letter-spacing: .04em;
}
.price__desc { font-size: 13px; color: var(--ink-soft); line-height: 1.95; }
.price__opt {
  display: block; margin-top: 7px;
  font-size: 11.5px; color: var(--ink-soft); line-height: 1.9;
}
.price__opt b { color: var(--maroon); font-weight: 700; }

.price__fee {
  font-family: var(--sans); font-size: clamp(15px, 1.8vw, 19px); font-weight: 600;
  /* 金額の桁数がバラバラなので、右揃えだと数字の頭がガタつく。左揃えで頭を通す */
  text-align: left; color: var(--maroon); white-space: nowrap;
}
.price__fee small { font-size: 11.5px; font-weight: 400; color: var(--ink-soft); }
.price__foot { margin-top: 22px; font-size: 12.5px; color: var(--ink-soft); }

/* ---- 下層ページ（料金など）はヒーローが無いのでヘッダー分の余白を足す ---- */
.is-sub .sec:first-of-type { padding-top: clamp(132px, 17vh, 196px); }

/* ---- 作品 ----
   ホバーで写真を拡大するのはやめている。作品側（チラシやカバー）が
   もともと持っている白フチまで一緒に拡大されて、白い枠が細くなって見えるため。 */
.card__client, .card__title { transition: color .35s ease; }
.card:not(.is-static):hover .card__client { color: var(--maroon); }

/* ---- 料金の行を上から順に ---- */
.price__row {
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1),
              background .35s ease, padding-inline .35s ease;
}
.price.is-in .price__row { opacity: 1; transform: none; }
.price.is-in .price__row:nth-child(1) { transition-delay: .05s; }
.price.is-in .price__row:nth-child(2) { transition-delay: .12s; }
.price.is-in .price__row:nth-child(3) { transition-delay: .19s; }
.price.is-in .price__row:nth-child(4) { transition-delay: .26s; }
.price.is-in .price__row:nth-child(5) { transition-delay: .33s; }
.price.is-in .price__row:nth-child(6) { transition-delay: .40s; }
.price.is-in .price__row:nth-child(7) { transition-delay: .47s; }
.price.is-in .price__row:nth-child(8) { transition-delay: .54s; }

/* ---- 制作フローを左から順に ---- */
.flow__item {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1);
}
.flow.is-in .flow__item { opacity: 1; transform: none; }
.flow.is-in .flow__item:nth-child(1) { transition-delay: .06s; }
.flow.is-in .flow__item:nth-child(2) { transition-delay: .15s; }
.flow.is-in .flow__item:nth-child(3) { transition-delay: .24s; }
.flow.is-in .flow__item:nth-child(4) { transition-delay: .33s; }
.flow.is-in .flow__item:nth-child(5) { transition-delay: .42s; }

/* ---- FAQ をなめらかに開閉する ---- */
.faq__item::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size .45s cubic-bezier(.22,1,.36,1), content-visibility .45s allow-discrete;
  interpolate-size: allow-keywords;
}
.faq__item[open]::details-content { block-size: auto; }
.faq__a {
  opacity: 0; transform: translateY(-6px);
  transition: opacity .4s ease .08s, transform .4s ease .08s;
}
.faq__item[open] .faq__a { opacity: 1; transform: none; }

/* =========================================================
   Contact
   ========================================================= */
.contact {
  background: var(--midnight); color: var(--cream);
  border-radius: 0;
  padding: clamp(40px, 6vw, 80px) clamp(22px, 4.4vw, 66px);
  text-align: center;
  position: relative; overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; inset: 12px;
  border: 1.5px solid rgba(var(--cream-rgb), .34); border-radius: 0;
  pointer-events: none;
}
.contact__ttl {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(34px, 6.6vw, 84px); line-height: .92; letter-spacing: -.02em;
  margin: 0 0 20px;
}
.contact__ttl em { color: var(--sunny); }
.contact__txt { font-size: 14px; color: rgba(var(--cream-rgb), .78); margin: 0 auto 36px; max-width: 30em; }
.btn-line {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--sunny); color: var(--ink);
  font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: .08em;
  padding: 17px 40px; border-radius: 999px;
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s;
}
.btn-line:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -14px rgba(0,0,0,.6); }
.btn-line span { transition: transform .35s cubic-bezier(.22,1,.36,1); display: inline-block; }
.btn-line:hover span { transform: translate(3px, -3px); }

/* Contact はページ末尾なので下余白を詰める（フッターが遠くならないように） */
#contact { padding-bottom: clamp(28px, 3.6vw, 48px); }

/* =========================================================
   Footer
   ========================================================= */
/* .shell（中央寄せの本文幅）ではなくヘッダーと同じ左右余白にして、
   ロゴの左端と Credit の右端をヘッダーのロゴ／CONTACT と揃える */
.ftr {
  width: auto; max-width: none; margin-inline: 0;
  padding: clamp(24px, 3.2vw, 40px) var(--edge) 15px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
/* ロゴの大きさもヘッダーと同じに */
.ftr img { width: clamp(112px, 12vw, 150px); }
.ftr__info {
  font-family: var(--sans); font-size: 12.5px; letter-spacing: .08em;
  color: var(--ink); opacity: .78; text-align: right; line-height: 2.1;
}
.ftr__label {
  color: var(--maroon); letter-spacing: .06em;
  font-size: 11.5px; margin-right: 6px;
}

/* =========================================================
   Lightbox
   ========================================================= */
.lb {
  position: fixed; inset: 0; z-index: 9500;
  /* スマホは上のURLバーぶん画面が短くなる。inset:0 だけだと
     「バーが隠れている状態の高さ」で中央を取るので、中身が下にずれて見える。
     実際に見えている高さ（dvh）を使って中央に置く。 */
  height: 100dvh;
  background: rgba(21, 13, 9, .93);
  /* 画像の下にクレジットを置くので縦並び。画像はあまった高さのぶんだけ縮む */
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  gap: clamp(14px, 2.2vw, 24px);
  padding: clamp(16px, 4vw, 54px);
  /* 中身を置く高さは、いちばん短い状態（svh＝URLバーが出ているとき）にそろえる。
     dvh のまま中央ぞろえにすると、一覧の上のほう（スクロール0＝バーが出ている）と
     下のほう（スクロール後＝バーが隠れている）で画面の高さが変わり、
     タップした場所によって開く位置がズレてしまうため。
     差ぶんは下の余白として捨てる。PCでは差が 0 なので何も起きない。 */
  padding-bottom: calc(clamp(16px, 4vw, 54px) + (100dvh - 100svh));
  opacity: 0; transition: opacity .35s ease;
}
.lb.is-open { display: flex; }
.lb.is-shown { opacity: 1; }
.lb__frame {
  display: flex; min-height: 0; max-height: 100%; max-width: 100%;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.9);
  transform: scale(.96); transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.lb.is-shown .lb__frame { transform: none; }
.lb__img {
  max-width: 100%; max-height: 100%;
  min-height: 0;   /* flex の自動最小サイズを切って、縦に縮めるようにする */
  object-fit: contain; border-radius: 0;
}

/* ---- 拡大表示のクレジット ---- */
.lb__cap {
  flex: none; margin: 0;
  /* 高さは app.js が min-height で固定する（全作品のうちいちばん高いものに合わせる）。
     実際の行数のままだと、送るたびに上の枠の大きさがブレるため。 */
  max-width: min(560px, 100%);
  text-align: left;
  font-family: var(--sans);
  font-size: 12.5px; letter-spacing: .06em; line-height: 1.9;
  color: rgba(var(--cream-rgb), .82);
}
.lb__cap span { display: block; }
.lb__ttl {
  color: var(--cream); letter-spacing: .08em;
  margin-bottom: 9px;
}
/* 作品名のうしろに出す「1 / 2」。複数枚あることが開いた時点で分かるように、
   枠線付きの小さなピルにしている。
   セレクタは .lb__cap span（display:block）に負けないよう2つ重ねること。 */
.lb__cap .lb__page {
  display: inline-block; vertical-align: 2px;
  margin-left: 10px; padding: 2px 9px;
  border: 1px solid rgba(var(--cream-rgb), .38); border-radius: 999px;
  font-size: 10.5px; line-height: 1.5; letter-spacing: .08em;
  color: rgba(var(--cream-rgb), .72);
}
/* ラベルは幅を固定して、値の頭を縦に通す */
.lb__line i {
  display: inline-block; vertical-align: top;
  width: 12.5em; font-style: normal;
  color: rgba(var(--cream-rgb), .45);
}
.lb__size { color: rgba(var(--cream-rgb), .5); margin-top: 6px; }
/* ✕ と ← → は、HTMLの並びでは枠より前にあるので、そのままだと枠に隠れて押せない。
   画面が狭いと枠がボタンの位置まで広がるため、必ず前面に出しておく。 */
.lb__close, .lb__btn { z-index: 2; }

.lb__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(var(--cream-rgb), .4); background: rgba(0,0,0,.3);
  color: var(--cream); font-size: 18px; cursor: pointer;
  display: grid; place-items: center;
  transition: background .3s, border-color .3s;
}
.lb__btn:hover { background: rgba(var(--cream-rgb), .18); border-color: var(--cream); }
.lb__btn--prev { left: clamp(8px, 2vw, 26px); }
.lb__btn--next { right: clamp(8px, 2vw, 26px); }
.lb__close {
  position: absolute; top: clamp(12px, 2.5vw, 26px); right: clamp(12px, 2.5vw, 26px);
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(var(--cream-rgb), .4); background: transparent;
  color: var(--cream); font-size: 17px; cursor: pointer;
}
.lb__close:hover { background: rgba(var(--cream-rgb), .18); }

/* スマホでだけ改行したいところに入れる。PCでは無視される。
   例）「こんなの作れますか？」<br class="br-sp">の一言からで大丈夫です。 */
.br-sp { display: none; }
@media (max-width: 640px) { .br-sp { display: inline; } }

/* =========================================================
   スクロール表示アニメ（汎用）
   ========================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.22,1,.36,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) { .grid--full { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px)  {
  .grid      { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--full { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow__item:nth-child(2n) { border-right: 0; }
  .flow__item { border-bottom: 1px solid rgba(var(--ink-rgb), .2); }
  /* 2列のときは左列＝左端、右列＝右端がセクション端に付く */
  .flow__item { padding-left: var(--flow-pad); padding-right: var(--flow-pad); }
  .flow__item:nth-child(2n+1) { padding-left: 0; }
  .flow__item:nth-child(2n)   { padding-right: 0; }
}
@media (max-width: 560px) {
  .flow { grid-template-columns: 1fr; }
  .flow__item { border-right: 0; padding-left: 0 !important; padding-right: 0; }
  .flow__no { font-size: 22px; margin-bottom: 8px; }
}

@media (max-width: 880px) {
  .nav { gap: 14px; }
  .nav a { font-size: 11.5px; letter-spacing: .1em; }
  .nav__cta { padding: 8px 16px !important; }
  .price__row { grid-template-columns: 1fr; gap: 6px; }
  .price__fee { text-align: left; }
  .ftr { flex-direction: column; align-items: flex-start; }
  .ftr__info { text-align: left; }
}

@media (max-width: 640px) {
  /* スマホはハンバーガーだけにする。
     CONTACT はメニューの中にあるので、ヘッダーには出さない */
  .nav { display: none; }
  .hdr__logo img { width: 96px; }
  .ftr img { width: 96px; }
  .hdr__menu { display: block; }
  .hdr { gap: 12px; }

  /* スマホのフッターは縦に間延びしやすいので詰める。
     ロゴと文字の間・行間・上下の余白をまとめて縮めている */
  .ftr { padding-top: 20px; padding-bottom: 18px; gap: 10px; }
  .ftr__info { font-size: 11.5px; line-height: 1.85; }

  /* スマホではクレジット（Credit Daya / Shiro.）を出さず、
     著作権表示だけを中央に置く。フッターも中央ぞろえに戻す */
  .ftr__credit { display: none; }
  .ftr { align-items: center; }
  .ftr__info { text-align: center; width: 100%; }

  /* LINEボタンは縦を詰めて横を広げる（指で押しやすい形にする） */
  .btn-line { padding: 12px 58px; }

  /* 拡大表示は上に ✕ のぶんの場所を空けておく。
     中央ぞろえの枠が上まで来ると ✕ に重なって押せなくなるため
     （枠の上端が ✕ より下に来る値にする）。
     ここを広げても、枠の大きさは残りの高さから計算し直されるので崩れない。 */
  .lb { padding-top: 62px; padding-bottom: calc(16px + (100dvh - 100svh)); }
}

/* 641px以上ではメニューを完全に無効化 */
@media (min-width: 641px) {
  .menu { display: none !important; }
}

/* ---- スマホ：ヒーローの主従を整える ---- */
@media (max-width: 640px) {
  .hero {
    --frame-top: clamp(96px, 13vh, 120px);
    --frame-pad: clamp(24px, 4vh, 40px);
  }
  /* 装飾の囲み枠は狭い画面ではタグの罫線とぶつかるので出さない */
  .hero__frame { display: none; }
  .scroll-cue { display: none; }
  .hero__title { font-size: clamp(34px, 9.4vw, 48px); }
  .hero__eyebrow { font-size: 10.5px; letter-spacing: .26em; }
  .hero__eyebrow::before { width: 22px; }
  .hero__meta {
    margin-top: 22px; padding-block: 11px;
    justify-content: center; gap: 6px 16px;
  }
  .chip { font-size: 9.5px; letter-spacing: .14em; }
}

/* ---- スマホ：本文まわりの文字を少しだけ小さくする ----
   PCの指定は px 直書きが多いので、ここでまとめて1段階落としている */
@media (max-width: 640px) {
  body { font-size: 14px; }
  .sec__note      { font-size: 12.5px; }
  .filter         { font-size: 11px; padding: 7px 14px; }
  .works__more a  { font-size: 11.5px; padding: 12px 26px; }
  .svc__jp        { font-size: 12px; }
  .svc__txt       { font-size: 12.5px; }
  .svc__list li,
  .svc__use       { font-size: 11px; }
  .flow__ttl      { font-size: 13px; }
  .flow__txt      { font-size: 12px; }
  .faq__q         { font-size: 14px; }
  .faq__a,
  .faq__foot      { font-size: 12.5px; }
  .price__desc    { font-size: 12px; }
  .price__opt     { font-size: 11px; }
  .price__foot    { font-size: 12px; }
  .contact__txt   { font-size: 13px; }
  .lb__cap        { font-size: 11.5px; }
}

@media (max-width: 560px) {
  .grid, .grid--full { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card__client { font-size: 12px; }
  .card__title  { font-size: 11px; }
  .hero__frame  { inset: 66px 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
