/* =========================================================
   NOJIRU CREATIVE – portfolio
   モバイル（375px）基準のデザインを、そのまま中央カラムとして
   デスクトップでも表示する。飛沫（.splat）は絶対配置で
   カラムの縁から少しはみ出させる。
   ========================================================= */

:root {
  --col: 520px;              /* コンテンツカラム幅（PC） */
  --pad: 22px;               /* 左右余白 */
  --black: #111;
  --gray: #d9d9d9;           /* フォーム背景 */
  --c-magenta: #ff00e6;
  --c-cyan: #00f0ff;
  --c-yellow: #fff400;
  --c-purple: #7a00ff;
  --c-green: #2eff3c;
  --c-pink: #ff2d7a;
  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--black);
  font-family: var(--font-jp);
  font-size: 15px;
  line-height: 1.9;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---------- レイアウト ---------- */
.page {
  position: relative;
  max-width: var(--col);
  margin: 0 auto;
  overflow: hidden;          /* はみ出した飛沫を切る */
  background: #fff;
}
.inner { padding-left: var(--pad); padding-right: var(--pad); }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(4px);
}
.site-header .bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 8px 0 10px;
}
.site-header .bar::before {          /* ロゴとナビを貫く線 */
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 55%;
  height: 2px;
  background: var(--black);
  opacity: .9;
}
.site-header .logo { position: relative; width: 50px; }
.site-header .logo img { width: 50px; }
.nav {
  position: relative;
  width: 172px;
  aspect-ratio: 490 / 165;
  background: url("../assets/img/nav-group.png") center / contain no-repeat;
  display: flex;
}
.nav a {
  flex: 1 1 0;
  text-indent: -9999px;
  overflow: hidden;
}
.nav a:hover { filter: brightness(1.2); }

/* ---------- 見出し画像（筆文字） ---------- */
.h-img { position: relative; z-index: 2; }
.h-img img { width: 100%; }
.h-hero  { padding: 26px var(--pad) 0; }
.h-works { padding: 28px 70px 0; }
.h-about { padding: 26px 0 0 18px; width: 70%; }
.h-contact { padding: 30px 30px 0; }

h1.h-img { margin: 0; }
.lead-copy {
  position: relative; z-index: 2;
  margin: 14px var(--pad) 0;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
  letter-spacing: .02em;
}

/* ブラシの横線 */
.brush-line {
  height: 12px;
  margin: 8px var(--pad) 0;
  background: url("../assets/img/brush-line.png") center / 100% 100% no-repeat;
}
.brush-line.thin { height: 8px; }

/* ---------- スタンプ表示（見出しがバンッと出る） ---------- */
.js .stamp {
  opacity: 0;
  transform: scale(1.35);
  filter: blur(6px);
}
.stamp.is-in {
  animation: stamp .45s cubic-bezier(.2,1.4,.4,1) forwards;
}
@keyframes stamp {
  0%   { opacity: 0; transform: scale(1.35); filter: blur(6px); }
  60%  { opacity: 1; transform: scale(.96);  filter: blur(0); }
  100% { opacity: 1; transform: scale(1);    filter: blur(0); }
}

/* ---------- 飛沫（ペイント） ----------
   .splat        … 位置・サイズを持つラッパー（絶対配置）
   .splat img    … 飛沫画像
   data-splash   … これが付いた要素は、画面に入った時に「ビシャッ」と出る
*/
.splat {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  width: calc(var(--w, 120px) * var(--k, 1));
  transform: rotate(var(--r, 0deg)) scaleX(var(--fx, 1));
}
.splat img { width: 100%; }
.splat.over { z-index: 3; }          /* 画像の上に載せる時 */

/* 出現前は縮んで透明 */
.js .splat[data-splash] .body {
  opacity: 0;
  transform: scale(.15) rotate(-18deg);
  filter: blur(6px);
  transform-origin: center;
  will-change: transform, opacity, filter;
}
.splat[data-splash].is-splashed .body {
  animation: splash var(--dur, .55s) cubic-bezier(.17, 1.35, .35, 1) forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes splash {
  0%   { opacity: 0; transform: scale(.15) rotate(-18deg); filter: blur(6px); }
  35%  { opacity: 1; transform: scale(1.18) rotate(4deg);  filter: blur(0); }
  60%  { transform: scale(.94) rotate(-1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); filter: blur(0); }
}

/* 飛び散る液滴（JS が生成） */
.splat .drops {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.splat .drop {
  position: absolute;
  left: 50%; top: 50%;
  width: var(--sz, 8px);
  height: var(--sz, 8px);
  margin: calc(var(--sz, 8px) / -2) 0 0 calc(var(--sz, 8px) / -2);
  border-radius: 50%;
  background: var(--c, var(--c-magenta));
  opacity: 0;
  animation: drop var(--dur, .7s) cubic-bezier(.1, .8, .3, 1) forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes drop {
  0%   { opacity: 1; transform: translate(0, 0) scale(.3); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); }
}

/* 液滴が落ちる「垂れ」。大きめの飛沫にだけ JS で足す */
.splat .drip {
  position: absolute;
  top: 60%;
  left: var(--x, 50%);
  width: var(--sz, 5px);
  height: 0;
  border-radius: 0 0 99px 99px;
  background: var(--c, var(--c-cyan));
  animation: drip 1.2s ease-out forwards;
  animation-delay: var(--delay, .3s);
}
@keyframes drip {
  0%   { height: 0; opacity: 1; }
  80%  { height: var(--len, 28px); opacity: 1; }
  100% { height: var(--len, 28px); opacity: .9; }
}

@media (prefers-reduced-motion: reduce) {
  .stamp, .splat[data-splash] .body { opacity: 1; transform: none; filter: none; animation: none !important; }
  .splat .drop, .splat .drip { display: none; }
}

/* ---------- トースト通知 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1000;
  max-width: calc(100% - var(--pad) * 2);
  padding: 14px 24px;
  background: var(--black);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .3s ease, transform .3s ease;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 600px) {
  .toast { width: calc(100% - var(--pad) * 2); text-align: center; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}

/* ---------- カルーセル ---------- */
.carousel {
  position: relative;
  margin-top: 26px;
  z-index: 2;
}
.carousel .track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel .track::-webkit-scrollbar { display: none; }
.carousel .slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  padding: 0 var(--pad);
}
.carousel .slide img { width: 100%; aspect-ratio: 990 / 1400; object-fit: cover; }
.carousel .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 44px;
  border: 0; padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 3;
}
.carousel .arrow::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--black);
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}
.carousel .arrow.next { right: 0; }
.carousel .arrow.next::before { clip-path: polygon(0 0, 100% 50%, 0 100%); }
.carousel .arrow.prev { left: 0; }
.carousel .dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.carousel .dots i { width: 6px; height: 6px; border-radius: 50%; background: #bbb; }
.carousel .dots i.on { background: var(--black); }

/* ---------- WORKS セクション ---------- */
.work-section { position: relative; margin-top: 40px; }
.work-section .head { position: relative; z-index: 2; padding: 0 var(--pad); }
.work-section .head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.3;
}
.work-section .head .en {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .04em;
}
.work-section .desc { position: relative; z-index: 2; margin: 14px var(--pad) 0; font-size: 14px; }
.work-section .desc p { margin: 0; }

.grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 26px var(--pad) 0;
}
.grid.wide { grid-template-columns: 1fr; }
.grid a { display: block; }
.grid img { width: 100%; }
.grid .thumb--portrait  img { aspect-ratio: 990 / 1400; object-fit: cover; }
.grid .thumb--landscape img { aspect-ratio: 16 / 10; object-fit: cover; }
.more {
  position: relative; z-index: 2;
  display: inline-block;
  margin: 18px var(--pad) 0;
  padding: 6px 18px;
  border: 2px solid var(--black);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .1em;
}
.more:hover { background: var(--black); color: #fff; }

/* ---------- ABOUT ---------- */
.about { position: relative; margin-top: 26px; padding: 0 var(--pad); }
.about .name {
  position: relative; z-index: 2;
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: .06em;
}
.about .body { position: relative; z-index: 2; display: flex; gap: 8px; margin-top: 12px; }
.about .text { flex: 1 1 0; font-size: 14px; }
.about .text p { margin: 0; }
.about .text .sns { margin-top: 20px; }
.about .text .sns a { text-decoration: underline; text-underline-offset: 4px; }
.about .avatar { flex: 0 0 34%; }
.about .avatar img { width: 100%; }

/* ---------- CONTACT ---------- */
.contact { position: relative; margin-top: 40px; }
.contact .lead { position: relative; z-index: 2; margin: 22px var(--pad) 0; font-size: 14px; }
.contact .lead p { margin: 0; }
.form {
  position: relative; z-index: 2;
  margin: 18px var(--pad) 0;
  padding: 18px 18px 20px;
  background: var(--gray);
}
.form label { display: block; font-size: 14px; font-weight: 700; margin-top: 14px; }
.form label:first-child { margin-top: 0; }
.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  margin-top: 6px;
  padding: 14px 16px;
  border: 0;
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--black);
}
.form input::placeholder, .form textarea::placeholder { color: #9a9a9a; }
.form textarea { min-height: 240px; resize: vertical; }
.form .radios { display: flex; gap: 22px; margin-top: 4px; font-size: 14px; }
.form .radios label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.form .agree { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; font-weight: 400; }
.form button {
  display: block;
  width: 80%;
  margin: 14px auto 0;
  padding: 14px;
  border: 0;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  font: inherit;
  font-size: 17px;
  letter-spacing: .3em;
  cursor: pointer;
}
.form button:hover { background: #333; }
.form button:disabled { background: #888; cursor: wait; }
.form .botcheck { display: none; }                 /* スパム用の罠。人間には見せない */
.form .captcha { display: flex; justify-content: center; margin-top: 16px; }
.form .form-result { margin: 12px 0 0; text-align: center; font-size: 14px; min-height: 1.5em; }
.form .form-result.is-ok { color: #0a7a2f; font-weight: 700; }
.form .form-result.is-error { color: #c0182f; font-weight: 700; }

/* ---------- フッター ---------- */
.site-footer {
  position: relative;
  margin-top: 40px;
  padding: 24px 8px 18px;
  text-align: center;
}
.site-footer .logo { position: relative; z-index: 2; width: 100%; }
.site-footer .copy {
  position: relative; z-index: 2;
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: .06em;
}

/* ---------- ライトボックス ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.9);
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .close {
  position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: #fff; color: #000;
  font-size: 22px; cursor: pointer;
}

/* ---------- タブレット（600〜899px）: スマホ版レイアウトを中央に ---------- */
@media (min-width: 600px) and (max-width: 899px) {
  body { font-size: 16px; }
  .page { box-shadow: 0 0 0 1px #eee; }
}

/* =========================================================
   PC（900px 以上）
   ========================================================= */
@media (min-width: 900px) {
  :root { --col: 1100px; --pad: 48px; }
  body { font-size: 16px; }
  .page { --k: 1.5; }                   /* 飛沫を 1.5 倍 */

  /* ヘッダー */
  .site-header .bar { height: 84px; padding: 0 var(--pad); }
  .site-header .logo, .site-header .logo img { width: 64px; }
  .nav { width: 230px; }

  /* 見出し画像 */
  .h-hero { max-width: 780px; margin: 0 auto; padding: 40px 0 0; }
  .h-works { max-width: 520px; margin: 0 auto; padding: 44px 0 0; }
  .h-about { width: auto; max-width: 440px; padding: 40px 0 0 var(--pad); }
  .h-contact { max-width: 560px; margin: 0 auto; padding: 48px 0 0; }
  .brush-line { height: 14px; margin-top: 12px; }
  .lead-copy { font-size: 15px; margin-top: 18px; max-width: 600px; margin-left: auto; margin-right: auto; }

  /* カルーセル: 3枚並び */
  .carousel { margin-top: 36px; }
  .carousel .track { padding: 0 calc(var(--pad) - 12px); scroll-padding: 0 calc(var(--pad) - 12px); }
  .carousel .slide { flex-basis: 33.3333%; padding: 0 12px; scroll-snap-align: start; }
  .carousel .arrow { width: 26px; height: 56px; }
  .carousel .arrow.prev { left: 10px; }
  .carousel .arrow.next { right: 10px; }
  .carousel .dots { margin-top: 16px; }

  /* WORKS セクション: 見出しと紹介文を横並び */
  .work-section {
    margin-top: 72px;
    display: grid;
    grid-template-columns: 380px 1fr;
    grid-template-areas:
      "head desc"
      "line line"
      "grid grid"
      "more more";
    column-gap: 40px;
    align-items: end;
  }
  .work-section .head { grid-area: head; }
  .work-section .head h2 { font-size: 30px; white-space: nowrap; }
  .work-section .head .en { font-size: 16px; }
  .work-section .brush-line { grid-area: line; }
  .work-section .desc { grid-area: desc; margin: 0 170px 6px 0; font-size: 15px; }
  .work-section .grid { grid-area: grid; }
  .work-section .more { grid-area: more; justify-self: start; }
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 24px;
    margin-top: 34px;
  }
  .grid.wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .grid a { transition: transform .25s ease; }
  .grid a:hover { transform: translateY(-4px); }
  .more { margin-top: 28px; padding: 8px 26px; font-size: 14px; }

  /* ABOUT */
  .about { margin-top: 40px; max-width: 900px; }
  .about .name { font-size: 30px; }
  .about .body { gap: 48px; margin-top: 20px; align-items: flex-start; }
  .about .text { font-size: 16px; line-height: 2.1; }
  .about .avatar { flex: 0 0 300px; margin-top: -60px; }

  /* CONTACT */
  .contact { margin-top: 80px; }
  .contact .lead { max-width: 640px; margin: 28px auto 0; text-align: center; font-size: 15px; }
  .contact .brush-line { max-width: 760px; margin-left: auto; margin-right: auto; }
  .form {
    max-width: 760px;
    margin: 24px auto 0;
    padding: 32px 40px 36px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
  }
  .form > label { margin-top: 16px; }
  .form > label:nth-of-type(-n+2) { margin-top: 0; }
  .form > label.full,
  .form > .radios,
  .form > label:has(textarea),
  .form > .agree,
  .form > .captcha,
  .form > .form-result,
  .form > button { grid-column: 1 / -1; }
  .form .radios { margin-top: 6px; }
  .form textarea { min-height: 200px; }
  .form button { width: 320px; margin-top: 18px; }

  /* フッター */
  .site-footer { margin-top: 80px; padding: 40px var(--pad) 24px; }
  .site-footer .logo { max-width: 640px; margin: 0 auto; }
  .site-footer .copy { margin-top: 14px; font-size: 13px; }
}

/* ---------- 動画サムネ / ライトボックス内メディア ---------- */
.thumb-video { position: relative; display: block; }
.thumb-video video { width: 100%; display: block; object-fit: cover; background: #000; }
.grid .thumb--portrait.thumb-video video  { aspect-ratio: 990 / 1400; }
.grid .thumb--landscape.thumb-video video { aspect-ratio: 16 / 10; }
.carousel .slide .thumb-video video { aspect-ratio: 990 / 1400; }
.thumb-video .play {
  position: absolute;
  left: 50%; top: 50%;
  width: 52px; height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  pointer-events: none;
  transition: opacity .2s;
}
.thumb-video .play::after {
  content: "";
  position: absolute;
  left: 20px; top: 15px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}
.thumb-video:hover .play { opacity: .35; }

.lightbox .lb-body { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.lightbox .lb-body img,
.lightbox .lb-body video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .lb-body iframe {
  width: min(100%, 1100px);
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}
.works-error { margin: 40px var(--pad); padding: 16px; background: #fff3cd; font-size: 14px; }
