/* =====================================================================
   EQUMUSEE — 水彩のアトリエ（showcase_sample3）
   コンセプト：白い紙の上で、色インクが流れて混ざり合う世界。
   ・背景は WebGL のインク流体（gl.js）＋カーソルの筆跡（main.js）
   ・動きは transform / opacity / clip-path / filter を中心に
   ・レスポンシブ：1080 / 900 / 640 / 420 の4段階
   ===================================================================== */
:root {
  --paper:   #fbfbfa;   /* 紙 */
  --paper-2: #f5f6f8;
  --mist:    #eef2f7;   /* 薄い霧 */
  --ink:     #354566;   /* 藍のインク */
  --ink-2:   #5b6785;
  --ink-3:   #8b95ad;
  --sky:     #b9cbe3;   /* 水彩の空 */
  --sky-2:   #dbe5f1;
  --sky-3:   #8fa8cc;
  --ink-hl:  #5568d6;   /* ナビのホバー・選択中にふんわり乗る色 */
  --line:    rgba(53, 69, 102, .18);
  --card:    rgba(255, 255, 255, .72);
  --shadow:  0 30px 60px -36px rgba(53, 69, 102, .35);

  /* 書体：丸ゴシック＋丸みのある欧文で、やわらかく親しみやすい印象に。
     Adobe Fonts に替えるときは、index.html にキットを読み込んだうえで
     ここのフォント名だけ差し替えれば全体に反映されます。
     例）--f-main: "fot-tsukuardgothic-std", "Zen Maru Gothic", sans-serif; */
  --f-main:   "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --f-display: "Dela Gothic One", "Zen Maru Gothic", sans-serif; /* ヒーローの見出し専用 */
  --f-en:     "Quicksand", "Zen Maru Gothic", sans-serif;
  --f-hand:   "Klee One", "Zen Maru Gothic", cursive;
  --f-script: "Caveat", cursive;
  --f-go:     "Zen Kaku Gothic New", sans-serif;

  --ease:      cubic-bezier(.16, 1, .3, 1);
  --ease-snap: cubic-bezier(.6, -0.28, .3, 1.4);
  --nav-h: 82px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* 横からスライドインする要素（.rv-l / .rv-r）が表示前に画面外へはみ出しても、
   スマホでページ幅が広がって横スクロールしないよう、ルートで切り取る */
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); overflow-x: clip; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-main);
  font-size: 15px;
  line-height: 2;
  letter-spacing: .06em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--sky); color: var(--ink); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
ul { list-style: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* カスタムカーソル使用時は既定のカーソルを隠す（ホバー可能な端末のみ） */
@media (hover: hover) and (pointer: fine) {
  body, a, button, label { cursor: none; }
  input, textarea { cursor: text; }
}

/* =====================================================================
   背景レイヤー（WebGL のインク・筆跡）
   ===================================================================== */
#gl, #trail {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
#gl { z-index: 0; opacity: 1; transition: opacity .3s linear; }
#trail { z-index: 140; mix-blend-mode: multiply; }
body.no-gl #gl { display: none; }
body.no-gl {
  background:
    radial-gradient(60% 50% at 78% 20%, rgba(185, 203, 227, .55), transparent 70%),
    radial-gradient(50% 40% at 15% 80%, rgba(219, 229, 241, .7), transparent 70%),
    var(--paper);
}
main, footer { position: relative; z-index: 2; }

/* =====================================================================
   ローダー — 水彩のにじみ
   ===================================================================== */
#loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  transition: clip-path .75s var(--ease);
  clip-path: circle(150% at 50% 50%);
}
#loader.done { clip-path: circle(0% at 50% 50%); }
#loader .blot {
  position: absolute; width: min(70vw, 520px); aspect-ratio: 1;
  background: radial-gradient(circle at 40% 40%, rgba(185, 203, 227, .75), rgba(219, 229, 241, .5) 55%, transparent 72%);
  border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%;
  transform: scale(.2); opacity: 0;
  animation: blot .9s var(--ease) forwards, blob 6s ease-in-out infinite;
  filter: blur(2px);
}
@keyframes blot { to { transform: scale(1); opacity: 1; } }
@keyframes blob {
  0%, 100% { border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%; }
  50%      { border-radius: 55% 45% 42% 58% / 45% 60% 40% 55%; }
}
#loader .loader-logo { position: relative; width: min(64vw, 320px); }
#loader .loader-logo .logo-img {
  width: 100%; height: auto;
  opacity: 0; animation: fadeup .6s var(--ease) .1s forwards;
}
@keyframes fadeup { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* =====================================================================
   カーソル
   ===================================================================== */
#cursor {
  position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: width .35s var(--ease), height .35s var(--ease), background .3s, opacity .3s;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
}
#cursor::before {
  content: ""; position: absolute; inset: -12px; border-radius: 50%;
  border: 1px solid var(--ink); opacity: .35;
  transition: inset .4s var(--ease), opacity .3s;
}
#cursor .lbl {
  font-family: var(--f-en); font-size: 12px; letter-spacing: .18em; color: #fff;
  opacity: 0; transition: opacity .2s; white-space: nowrap; transform: translateX(.09em);
}
#cursor.big { width: 68px; height: 68px; background: rgba(53, 69, 102, .9); }
#cursor.big::before { inset: -6px; opacity: 0; }
#cursor.big .lbl { opacity: 1; }
#cursor.text { width: 3px; height: 26px; border-radius: 2px; background: var(--sky-3); }
#cursor.text::before { opacity: 0; }
body.cursor-on #cursor { opacity: 1; }
@media (hover: none), (pointer: coarse) { #cursor, #trail { display: none; } }

/* スクロール進捗 */
.progress { position: fixed; left: 0; top: 0; right: 0; height: 2px; z-index: 110; pointer-events: none; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--sky-3), var(--ink)); transform: scaleX(0); transform-origin: left; }

/* =====================================================================
   ナビゲーション
   ===================================================================== */
.nav {
  position: fixed; z-index: 100; left: 0; right: 0; top: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  transition: background .5s, box-shadow .5s, height .4s, transform .5s var(--ease);
}
.nav.scrolled {
  height: 66px;
  background: rgba(251, 251, 250, .78);
  backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
}
.nav.hide { transform: translateY(-110%); }
.logo { position: relative; display: inline-block; line-height: 1; padding: 6px 4px; }
/* ロゴ画像（assets/other/equmusee.webp）。白地・上下余白を含むので、余白をトリミングして白を背景になじませる */
.logo-img {
  display: block; aspect-ratio: 2172 / 360; height: auto;
  object-fit: cover; object-position: 50% 55%;
  mix-blend-mode: multiply;
}
.logo .logo-img { height: 28px; width: auto; transition: transform .5s var(--ease); }
.logo:hover .logo-img { transform: scale(1.04); }

.links { display: flex; gap: clamp(18px, 3vw, 40px); }
/* ホバー・選択中はふんわりと文字に色がつく（下線は引かない） */
.nl {
  position: relative; z-index: 0;
  font-size: .84rem; letter-spacing: .14em; padding: 6px 4px; color: var(--ink-2);
  transition: color .55s var(--ease), text-shadow .55s var(--ease), letter-spacing .55s var(--ease);
}
.nl::before {
  content: ""; position: absolute; z-index: -1; inset: -8px -12px;
  border-radius: 999px;
  background: radial-gradient(58% 72% at 50% 50%, rgba(107, 140, 232, .26), rgba(184, 130, 224, .14) 58%, transparent 78%);
  filter: blur(5px);
  opacity: 0; transform: scale(.72);
  transition: opacity .55s var(--ease), transform .7s var(--ease);
  pointer-events: none;
}
.nl:hover, .nl.active {
  color: var(--ink-hl);
  text-shadow: 0 0 14px rgba(93, 124, 224, .35);
  letter-spacing: .17em;
}
.nl:hover::before, .nl.active::before { opacity: 1; transform: none; }

.burger { display: none; width: 44px; height: 44px; position: relative; z-index: 101; }
.burger i {
  position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--ink);
  transition: transform .5s var(--ease), top .5s var(--ease);
}
.burger i:first-child { top: 17px; } .burger i:last-child { top: 26px; }
.burger[aria-expanded="true"] i:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] i:last-child  { top: 21px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(251, 251, 250, .96);
  clip-path: circle(0px at calc(100% - 42px) 41px);
  transition: clip-path .9s var(--ease);
  display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(28px, 8vw, 80px);
  pointer-events: none;
}
.menu.open { clip-path: circle(160% at calc(100% - 42px) 41px); pointer-events: auto; }
.menu a {
  font-size: clamp(1.7rem, 7vw, 2.6rem); letter-spacing: .12em; padding: 10px 0;
  display: flex; align-items: baseline; gap: 16px;
  opacity: 0; transform: translateX(-20px); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.menu a small { font-family: var(--f-en); font-size: .8rem; letter-spacing: .2em; color: var(--ink-3); }
/* メニューも同じく、ふんわりと文字に色がつく */
.menu a { transition: opacity .6s var(--ease), transform .6s var(--ease), color .5s var(--ease), text-shadow .5s var(--ease); }
.menu a:hover { color: var(--ink-hl); text-shadow: 0 0 22px rgba(93, 124, 224, .3); }
.menu a:hover small { color: var(--ink-hl); }
/* 遅延は登場（opacity / transform）だけに効かせ、色はすぐ反応させる */
.menu.open a { opacity: 1; transform: none; transition-delay: calc(.25s + var(--i) * .07s), calc(.25s + var(--i) * .07s), 0s, 0s; }
.menu .menu-note { margin-top: 30px; font-family: var(--f-hand); color: var(--ink-2); letter-spacing: .15em; opacity: 0; transition: opacity .8s .7s; }
.menu.open .menu-note { opacity: 1; }
.menu .menu-blob {
  position: absolute; right: -10%; bottom: -10%; width: 60vw; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(circle at 40% 40%, rgba(185, 203, 227, .6), rgba(219, 229, 241, .3) 55%, transparent 72%);
  border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%;
  animation: blob 8s ease-in-out infinite; filter: blur(2px);
}

/* =====================================================================
   共通：リビール / 文字分割 / 手書き
   ===================================================================== */
.rv, .rv-l, .rv-r, .rv-blur {
  opacity: 0;
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.rv { transform: translateY(36px); }
.rv-l { transform: translateX(-48px); }
.rv-r { transform: translateX(48px); }
.rv-blur { filter: blur(10px); transform: scale(.97); }
.rv.in, .rv-l.in, .rv-r.in, .rv-blur.in { opacity: 1; transform: none; filter: none; }

[data-chars] .cw { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 0 .12em; margin-bottom: -.12em; }
[data-chars] .ch { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease); transition-delay: calc(var(--i, 0) * .045s); }
[data-chars].in .ch { transform: none; }

[data-hand] .hc { display: inline-block; opacity: 0; filter: blur(5px); transform: translateY(5px) rotate(-3deg); transition: opacity .5s, filter .6s, transform .6s var(--ease); transition-delay: calc(var(--i, 0) * .07s + var(--d, 0s)); }
[data-hand].in .hc { opacity: 1; filter: none; transform: none; }

/* セクション共通 */
.sec { position: relative; padding: clamp(70px, 10vw, 130px) 0; }
.sec-mist { background: rgba(238, 242, 247, .66); }
.sec-mist::before, .sec-mist::after {
  content: ""; position: absolute; left: 0; right: 0; height: 40px; pointer-events: none;
  background: linear-gradient(to bottom, var(--paper), transparent); top: 0; opacity: .8;
}
.sec-mist::after { top: auto; bottom: 0; transform: rotate(180deg); }
.sec-head { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); margin-bottom: clamp(38px, 6vw, 70px); flex-wrap: wrap; }
.sec-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 500; letter-spacing: .1em; line-height: 1.4; white-space: nowrap; }
.sec-line { flex: 1; min-width: 40px; height: 1px; background: var(--ink); opacity: .6; transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease) .35s; }
.sec-head.in .sec-line { transform: scaleX(1); }
.sec-sub { font-size: .84rem; color: var(--ink-2); letter-spacing: .1em; line-height: 2; white-space: nowrap; }

/* =====================================================================
   HERO
   ===================================================================== */
#hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding-top: var(--nav-h); }
.hero-inner { display: grid; grid-template-columns: 1.45fr .55fr; align-items: center; gap: clamp(20px, 3vw, 40px); width: 100%; }
.hero-copy { position: relative; z-index: 2; padding: 40px 0 60px; }
.eyebrow { font-size: .9rem; letter-spacing: .16em; color: var(--ink-2); margin-bottom: 26px; line-height: 2.1; }
/* Dela Gothic One はウェイトが1種類だけなので font-weight は 400 のまま。
   字面が大きく重いので、サイズと字間はひとまわり控えめにしている */
.hero-title {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2rem, 3.9vw, 3.6rem); line-height: 1.42; letter-spacing: .02em;
  margin-bottom: 26px;
}
.hero-title .row { display: block; white-space: nowrap; }
.hero-title .cw { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 0 .1em; margin-bottom: -.1em; }
.hero-title .ch { display: inline-block; transform: translateY(115%) rotate(4deg); filter: blur(6px); transition: transform 1.1s var(--ease), filter 1.1s var(--ease); transition-delay: calc(var(--i, 0) * .05s + .1s); }
#hero.in .hero-title .ch { transform: none; filter: none; }
.hero-title .em { position: relative; display: inline-block; white-space: nowrap; }
.lead { font-size: .95rem; letter-spacing: .14em; color: var(--ink-2); margin-bottom: 54px; }
/* ヒーローの下端・中央。.rv が transform を使うので、中央寄せは left/right + margin:auto で行う */
.scroll-cue {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(20px, 4vh, 40px); width: max-content; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--f-en); font-size: .78rem; letter-spacing: .32em; color: var(--ink-2);
}
/* letter-spacing の分だけ文字が左に寄って見えるので、右側の余りを打ち消す */
.scroll-cue span { margin-right: -.32em; }
.scroll-cue i { width: 1px; height: 46px; background: var(--ink); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%; background: var(--paper); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { top: -100%; } 60%, 100% { top: 100%; } }
.scroll-cue::after { content: ""; width: 7px; height: 7px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: rotate(45deg); margin-top: -12px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(45deg); } 50% { transform: translateY(5px) rotate(45deg); } }

/* 右側は背景のインクを見せるための余白 */
.hero-visual { position: relative; align-self: stretch; min-height: 420px; }

/* インクのバケツ（タップで倒れて背景にインクをぶちまける。main.js） */
.bucket {
  /* ヒーローの左上の端（ナビのすぐ下）に固定する */
  position: absolute; z-index: 3; left: clamp(10px, 2vw, 28px); top: calc(var(--nav-h) + 20px);
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px; background: none; border: 0; cursor: pointer;
  color: var(--ink); -webkit-tap-highlight-color: transparent;
  --bucket-ink: #385cad; /* 中身の色。main.js がパレットの色に差し替える */
}
.bucket:focus-visible { outline: 2px solid var(--sky-3); outline-offset: 4px; border-radius: 8px; }
.bucket-svg { width: clamp(58px, 6vw, 72px); height: auto; overflow: visible; }
.bucket-body { transform-box: fill-box; transform-origin: 85% 100%; }
.bucket-handle, .bucket-can, .bucket-rim { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bucket-can { fill: rgba(255, 255, 255, .85); }
.bucket-ink, .bucket-drip { fill: var(--bucket-ink); transition: fill .6s; }
.bucket:hover .bucket-body { animation: bucketWobble .9s ease-in-out; }
@keyframes bucketWobble { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-5deg); } 65% { transform: rotate(4deg); } }
.bucket-label { font-family: var(--f-hand); font-size: .74rem; letter-spacing: .12em; color: var(--ink-2); white-space: nowrap; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   作れるもの（IT × ART）
   ===================================================================== */
.duo { display: grid; grid-template-columns: 1fr 150px 1fr; align-items: stretch; }
.card {
  position: relative; height: 100%;
  background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
  will-change: transform;
}
.card:hover { box-shadow: var(--shadow); }
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .6), transparent 42%);
  opacity: 0; transition: opacity .4s;
}
.card:hover::after { opacity: 1; }
.duo-card { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; padding: clamp(24px, 3vw, 36px) clamp(20px, 3vw, 34px); gap: 16px; min-height: 320px; }
.duo-card.art { grid-template-columns: 1.1fr .9fr; }
.card-art { position: relative; }
.card-art svg { width: 100%; height: auto; overflow: visible; }
.card-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; line-height: 1; }
.card-title .big { font-family: var(--f-en); font-weight: 400; font-size: clamp(2.4rem, 3.4vw, 3rem); letter-spacing: .06em; }
/* 積み上げ：タップするたびに項目が上から落ちてきて、下から順に積み重なる（main.js）。
   未表示の項目も場所だけは取っておき、カードの高さが途中で変わらないようにする */
[data-stack] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[data-stack]:focus-visible { outline: 2px solid var(--sky-3); outline-offset: 4px; }
.card-list { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 7px; }
.card-list li {
  position: relative; font-size: .9rem; letter-spacing: .08em; line-height: 1.5;
  padding: 7px 14px; background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-left: 3px solid var(--sky-3); border-radius: 4px;
  box-shadow: 0 8px 14px -10px rgba(53, 69, 102, .55);
  max-width: calc(100% - var(--x, 0px)); /* 横にずらしてもカードからはみ出さない */
  opacity: 0; transform: translateX(var(--x, 0px)) rotate(var(--r, 0deg));
}
.card-list li.on { opacity: 1; }
.stack-hint {
  font-family: var(--f-en); font-size: .72rem; font-weight: 600; letter-spacing: .24em; color: var(--ink-3);
  animation: hintBob 1.8s ease-in-out infinite;
}
@keyframes hintBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.duo-card.art .card-body { order: 1; }
.duo-card.art .card-art { order: 2; }

.duo-link { position: relative; display: flex; align-items: center; justify-content: center; }
.duo-curve { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.duo-curve path { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 340; stroke-dashoffset: 340; transition: stroke-dashoffset 1.8s var(--ease) .5s; opacity: .7; }
.duo-link.in .duo-curve path { stroke-dashoffset: 0; }

/* IT / ART イラスト（手描きの線画画像） */
.card-art .ill-img { display: block; width: 100%; max-width: 240px; height: auto; margin: 0 auto; mix-blend-mode: multiply; transition: transform .8s var(--ease); }
.duo-card.it:hover .ill-img { transform: rotate(-3deg) translateY(-4px); }
.duo-card.art:hover .ill-img { transform: translate(-6px, -6px) rotate(-4deg); }

/* =====================================================================
   制作例カルーセル（横スクロール＋スナップ。並び順は main.js でランダム化）
   ===================================================================== */
.gallery { margin-top: clamp(44px, 6vw, 76px); }
.gal-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.gal-title { font-size: 1rem; letter-spacing: .12em; color: var(--ink-2); }
.gal-nav { display: flex; gap: 10px; }
.gal-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .62); color: var(--ink-2);
  transition: color .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease), transform .45s var(--ease-snap), opacity .3s;
}
.gal-btn:hover { color: #fff; background: var(--ink); border-color: var(--ink); transform: translateY(-3px); }
.gal-btn:disabled { opacity: .28; pointer-events: none; }
.gal-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.gal-viewport {
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
}
.gal-viewport::-webkit-scrollbar { display: none; }
.gal-viewport:focus-visible { outline: 2px solid var(--sky-3); outline-offset: 4px; }
/* ドラッグ中はカードが持ち上がらないようにして、つかんだ感じを保つ */
.gal-viewport.dragging { cursor: grabbing; }
.gal-viewport.dragging .gal-card figure { transition: none; }
.gal-viewport.dragging .gal-card figure:hover { transform: none; box-shadow: none; }
/* 上下の余白は、ホバーで浮いたカードの影が切れないぶん */
.gal-track { display: flex; gap: clamp(14px, 1.8vw, 22px); padding: 10px 0 26px; }
.gal-card { flex: 0 0 clamp(250px, 27vw, 322px); scroll-snap-align: start; }
.gal-card figure {
  height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.gal-card figure:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
/* 画像は添えるくらいの比率にして、読ませたい文章に場所をゆずる */
.gal-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--mist); }
/* 画像全体を見せる。余白は同じ画像をぼかした背景（--blur-bg は main.js で設定）で埋める。
   ホバーの拡大は端が切れるので行わない */
.gal-img::before, .proj-art::before {
  content: ""; position: absolute; inset: -16px;
  background: var(--blur-bg, none) center / cover no-repeat;
  filter: blur(8px); opacity: .85;
}
.gal-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gal-card figcaption { padding: 18px 20px 22px; }
.gal-card h4 { font-size: 1rem; font-weight: 500; letter-spacing: .08em; line-height: 1.6; margin-bottom: 10px; }
.gal-card .lead-line { color: var(--ink); font-size: .82rem; margin-bottom: 8px; }
.gal-card p { font-size: .78rem; letter-spacing: .04em; line-height: 1.95; color: var(--ink-2); }

/* =====================================================================
   お金だけが、支払いじゃなくてもいい。
   ===================================================================== */
.barter-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(30px, 4vw, 50px); align-items: center; }
.big-title { font-size: clamp(1.8rem, 3.1vw, 2.5rem); font-weight: 500; letter-spacing: .08em; line-height: 1.6; margin-bottom: 26px; white-space: nowrap; }
.barter-copy p { font-size: .92rem; letter-spacing: .12em; color: var(--ink-2); margin-bottom: 36px; }
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 22px; overflow: hidden;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 17px 44px;
  font-family: var(--f-main); font-size: .95rem; letter-spacing: .22em;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), background .3s;
  box-shadow: 0 18px 30px -20px rgba(53, 69, 102, .8);
  will-change: transform;
}
.btn:hover { box-shadow: 0 26px 40px -22px rgba(53, 69, 102, .9); }
.btn .arrow { font-style: normal; font-family: var(--f-en); font-size: 1.2rem; transition: transform .5s var(--ease); }
.btn:hover .arrow { transform: translateX(8px); }
.btn .ink { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .28); transform: translate(-50%, -50%) scale(0); animation: ripple .8s var(--ease) forwards; pointer-events: none; }
@keyframes ripple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }
.btn > span, .btn > i { position: relative; z-index: 1; }

.barter-visual { position: relative; display: flex; align-items: center; }
.eg { font-size: .95rem; letter-spacing: .12em; line-height: 2.1; padding-left: clamp(18px, 2.2vw, 30px); border-left: 1px solid rgba(53, 69, 102, .18); }
.eg-head { color: var(--ink-2); margin-bottom: 4px; }
.eg-list li { padding-left: 1.2em; opacity: 0; transform: translateX(10px); transition: opacity .7s, transform .7s var(--ease); transition-delay: calc(.6s + var(--i, 0) * .22s); }
.rv-r.in .eg-list li { opacity: 1; transform: none; }
.eg-foot { padding-left: 1.2em; margin-top: 4px; color: var(--ink-2); opacity: 0; transition: opacity .8s 1.5s; }
.rv-r.in .eg-foot { opacity: 1; }

/* =====================================================================
   プロジェクト / メンバー（2カラムカード）
   ===================================================================== */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.4vw, 30px); }
.proj { display: grid; grid-template-columns: .95fr 1.15fr; min-height: 280px; overflow: hidden; }
/* 左カラムはサムネイルのスロット。文字が主役の画像なので、切り抜かず全体を見せる */
.proj-art {
  position: relative; overflow: hidden; background: var(--mist);
  display: grid; place-items: center; padding: clamp(16px, 2vw, 26px);
}
/* 縦長のサムネが行の高さを引っぱりすぎないよう頭打ちにする */
.proj-img { position: relative; width: 100%; height: auto; max-height: 260px; object-fit: contain; transition: transform 1.2s var(--ease); }
.proj:hover .proj-img { transform: scale(1.04); }
/* 横長のキービジュアルは余白を取らず、目いっぱい大きく見せる */
.proj-atelimeets .proj-art { padding: 0; }
.proj-body { padding: 30px 30px 30px 26px; display: flex; flex-direction: column; }
.proj-body h3 { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; margin-bottom: 14px; }
/* タイトルはロゴ画像。カナ入りロゴは比率が違うので --logo-h で見た目をそろえる */
.proj-logo { height: var(--logo-h, clamp(24px, 2.4vw, 30px)); width: auto; max-width: 100%; object-fit: contain; }
.proj-atelimeets { --logo-h: clamp(36px, 3.6vw, 44px); }
.proj-body h3 .kana { font-size: .72rem; letter-spacing: .3em; color: var(--ink-2); margin-top: 10px; }
.proj-body p { font-size: .82rem; letter-spacing: .06em; color: var(--ink-2); line-height: 1.9; }
.more { position: relative; margin-top: auto; align-self: flex-end; padding-top: 18px; font-size: .84rem; letter-spacing: .16em; display: inline-flex; align-items: center; gap: 10px; }
.more i { font-style: normal; font-family: var(--f-en); transition: transform .5s var(--ease); }
.more::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.more:hover i, .proj-link:hover .more i { transform: translateX(8px); }
.more:hover::after, .proj-link:hover .more::after { transform: scaleX(1); transform-origin: left; }
/* カード全体をリンクにする場合のラッパー */
.proj-link { display: block; height: 100%; color: inherit; text-decoration: none; }
.proj-link:focus-visible { outline: 2px solid var(--sky-3); outline-offset: 4px; }

/* メンバー：写真が上、説明が下の縦積みカード。
   自動折り返しなので、人数が半端でも余った分は自然に左端からそろう */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: clamp(18px, 2.4vw, 30px); }
.member { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.member-photo { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--mist); }
.member-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .8s; filter: saturate(.7); }
.member:hover .member-photo img { transform: scale(1.06); filter: saturate(1); }
/* 画像が無いときは頭文字の水彩プレートを出す */
.member-photo.no-img img { display: none; }
.member-photo.no-img::after {
  content: attr(data-initial);
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 42% 38%, var(--sky-2), var(--mist) 70%);
  font-family: var(--f-main); font-size: 2.6rem; letter-spacing: 0; color: var(--sky-3);
}
.member-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.member-body .name { font-family: var(--f-main); font-weight: 500; font-size: clamp(1.15rem, 1.5vw, 1.32rem); letter-spacing: .08em; line-height: 1.4; transition: letter-spacing .6s var(--ease); }
.member:hover .name { letter-spacing: .14em; }
.member-body .role { font-size: .74rem; letter-spacing: .12em; color: var(--ink-2); margin: 4px 0 12px; }
.member-body .msg { font-size: .8rem; letter-spacing: .06em; color: var(--ink-2); line-height: 1.85; }
/* 外部リンクは各サービスのロゴで出す。カード下端にそろえる */
.member-links { margin-top: auto; padding-top: 16px; display: flex; gap: 10px; }
.ml-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .6); color: var(--ink-2);
  transition: color .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease), transform .45s var(--ease-snap);
}
.ml-btn:hover { color: #fff; background: var(--ink); border-color: var(--ink); transform: translateY(-3px); }
.ml-btn .ico { width: 16px; height: 16px; overflow: visible; }

/* =====================================================================
   お問い合わせ
   ===================================================================== */
/* 入力欄のみ。中央に寄せて置く */
.contact-inner { display: block; }
.form { display: flex; flex-direction: column; gap: 14px; max-width: 620px; margin: 0 auto; }
/* 背景（紙＋インク）と同化しないよう、枠線をつけて入力欄をはっきり見せる */
.field {
  position: relative; display: block; border-radius: 6px; overflow: hidden;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--ink-3);
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.field:hover { border-color: var(--ink-2); }
.field:focus-within { background: #fff; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(143, 168, 204, .22); }
.field .fl { position: absolute; left: 18px; top: 14px; font-size: .8rem; letter-spacing: .14em; color: var(--ink-3); transition: top .35s var(--ease), font-size .35s var(--ease), color .3s; pointer-events: none; }
.field input, .field textarea { width: 100%; background: none; border: 0; outline: none; font-family: var(--f-go); font-size: .95rem; color: var(--ink); padding: 24px 18px 8px; letter-spacing: .04em; resize: vertical; line-height: 1.7; }
.field textarea { min-height: 120px; }
.field:focus-within .fl, .field input:not(:placeholder-shown) ~ .fl, .field textarea:not(:placeholder-shown) ~ .fl { top: 5px; font-size: .62rem; color: var(--ink-2); }
.field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.field:focus-within::after { transform: scaleX(1); }
.field.err { animation: shake .5s var(--ease); border-color: #c96a6a; box-shadow: 0 0 0 3px rgba(201, 106, 106, .16); }
.field.err::after { background: #c96a6a; transform: scaleX(1); }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.form .btn { align-self: flex-end; margin-top: 6px; }
.form .btn.sent { background: var(--sky-3); }

/* 紙飛行機 */
.plane { position: fixed; left: 0; top: 0; z-index: 155; width: 42px; height: 42px; pointer-events: none; opacity: 0; fill: var(--ink); }
.plane.fly { animation: fly-away 1.6s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes fly-away {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(-10deg) scale(.8); }
  30% { transform: translate(calc(-50% + 60px), calc(-50% - 20px)) rotate(-20deg) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + 70vw), calc(-50% - 80vh)) rotate(-35deg) scale(.4); }
}
/* トースト */
.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 160; transform: translate(-50%, 30px);
  background: var(--ink); color: #fff; padding: 12px 26px; border-radius: 999px;
  font-size: .85rem; letter-spacing: .14em; opacity: 0; transition: opacity .4s, transform .5s var(--ease);
  pointer-events: none; white-space: nowrap; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* トップへ */
.totop { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 68px; height: 68px; opacity: 0; transform: translateY(20px) scale(.8); transition: opacity .5s, transform .6s var(--ease); pointer-events: none; }
.totop.show { opacity: 1; transform: none; pointer-events: auto; }
.totop svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.totop .ring { animation: spin 16s linear infinite; transform-origin: center; }
.totop text { font-family: var(--f-en); font-size: 9.5px; letter-spacing: .28em; fill: var(--ink-2); }
.totop .arr { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
.totop:hover .arr { transform: translateY(-3px); }

/* =====================================================================
   フッター
   ===================================================================== */
.foot { border-top: 1px solid var(--line); padding: 40px 0 26px; background: rgba(251, 251, 250, .7); }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-logo .logo-img { height: 22px; width: auto; }
.foot-copy { font-size: .78rem; letter-spacing: .14em; color: var(--ink-2); }
.foot-links { display: flex; gap: 14px; font-size: .74rem; letter-spacing: .12em; color: var(--ink-2); align-items: center; }
.foot-links a { position: relative; }
.foot-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--ink); transform: scaleX(0); transition: transform .4s var(--ease); }
.foot-links a:hover::after { transform: scaleX(1); }
.socials { display: flex; gap: 14px; }
.socials a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); transition: background .3s, transform .4s var(--ease-snap); }
.socials a:hover { background: var(--ink); color: #fff; transform: rotate(-8deg) scale(1.08); }
.socials svg { width: 16px; height: 16px; fill: currentColor; }
.copyright { text-align: center; font-family: var(--f-en); font-size: .72rem; letter-spacing: .24em; color: var(--ink-3); margin-top: 26px; }

/* 一時的に非表示にする要素（プライバシーポリシー・利用規約・SNS）。
   表示したくなったら HTML 側の is-hidden クラスを外すだけでよい。 */
.is-hidden { display: none !important; }

/* =====================================================================
   レスポンシブ
   ===================================================================== */
@media (max-width: 1080px) {
  .duo { grid-template-columns: 1fr 110px 1fr; }
  .duo-card, .duo-card.art { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  /* 積み上げはカードの底にそろえる（左右のカードで床の高さを合わせる） */
  .duo-card .card-body { display: flex; flex-direction: column; }
  .duo-card .card-list { margin-top: auto; }
  .duo-card .card-art { max-width: 240px; margin: 0 auto; }
  .duo-card.art .card-art { order: 1; }
  .duo-card.art .card-body { order: 2; }
}
@media (max-width: 900px) {
  :root { --nav-h: 70px; }
  .links { display: none; }
  .burger { display: block; }
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { padding: 30px 0 10px; order: 2; }
  .hero-visual { order: 1; min-height: 0; height: min(34vw, 180px); }
  /* 狭い画面でも IT と ART は横並びのまま。つなぐ曲線は省いてカードに幅をゆずる */
  .duo { grid-template-columns: 1fr 1fr; gap: 14px; }
  .duo-link { display: none; }
  .barter-inner { grid-template-columns: 1fr; }
  .barter-visual { min-height: 0; }
  .eg { width: max-content; }
  .grid2 { grid-template-columns: 1fr; }
  .member-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .sec-head { gap: 14px; }
  .sec-line { order: 3; width: 100%; flex: 0 0 100%; }
  .sec-sub { order: 2; width: 100%; }
  .sec-title { white-space: normal; font-size: 1.4rem; letter-spacing: .06em; }
  .barter-inner { gap: 20px; }
  .big-title { font-size: 1.6rem; letter-spacing: .05em; }
  .proj { grid-template-columns: 1fr; }
  /* 1カラムでは画像が上に来るので高さを持たせる */
  .proj-art { min-height: 210px; }
  .proj-body { padding: 22px 24px 26px; }
  .member-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .member-body { padding: 16px 16px 20px; }
  .gal-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .foot-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .totop { right: 14px; bottom: 14px; width: 58px; height: 58px; }
  .btn { padding: 15px 34px; font-size: .9rem; }
  .form .btn { align-self: stretch; justify-content: center; }
}
@media (max-width: 640px) {
  .hero-title .row { white-space: normal; }
  .big-title { white-space: normal; }
  .sec-sub { white-space: normal; }
}
@media (max-width: 420px) {
  /* Dela Gothic One は字面が大きいので、ここで詰めて「アートでもっと面白く」を1行に保つ */
  .hero-title { font-size: 1.95rem; letter-spacing: .01em; }
  .eyebrow { font-size: .82rem; }
  .member-grid { grid-template-columns: 1fr 1fr; }
  .card-title .big { font-size: 2.2rem; }
  /* 横並びの積み上げカードは幅が半分になるので、詰めて長い項目は折り返す */
  .duo { gap: 10px; }
  .duo-card { padding: 20px 12px 22px; min-height: 0; }
  .duo-card .card-art { max-width: 130px; }
  .card-title { flex-direction: column; gap: 6px; margin-bottom: 14px; }
  .card-list li { font-size: .74rem; letter-spacing: .04em; padding: 6px 9px; }
}

/* 動きを減らす設定の尊重 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  .rv, .rv-l, .rv-r, .rv-blur, [data-chars] .ch, [data-hand] .hc, .card-list li, .eg-list li, .eg-foot { opacity: 1 !important; transform: none !important; filter: none !important; }
  #trail { display: none; }
}
/* ?snap：検証用に全アニメーションを最終状態にする（縦長ウィンドウで撮るためヒーロー高さも固定） */
html.snap #loader { display: none; }
html.snap *, html.snap *::before, html.snap *::after { transition: none !important; }
html.snap #hero { min-height: 900px; }
@media (max-width: 900px) { html.snap #hero { min-height: 780px; } }
html.snap .rv, html.snap .rv-l, html.snap .rv-r, html.snap .rv-blur, html.snap [data-chars] .ch, html.snap [data-hand] .hc, html.snap .card-list li, html.snap .eg-list li, html.snap .eg-foot, html.snap .hero-title .ch { opacity: 1 !important; transform: none !important; filter: none !important; }
html.snap .sec-line { transform: scaleX(1) !important; }
html.snap .duo-curve path { stroke-dashoffset: 0 !important; }
