/* ============================================================
   STYLE
   カラーやフォントを変えたいときは :root の変数を編集
   ============================================================ */
:root {
  --c-bg: #0d0d0f;
  --c-bg-soft: #141417;
  --c-text: #f2f1ec;
  --c-text-dim: #9b9a94;
  --c-line: rgba(242, 241, 236, 0.14);
  --c-accent: #82cfd1;           /* アクセントカラー(RECREATIVE ブランドカラー) */
  --c-accent-text: #0d0d0f;
  --font-en: "Inter", sans-serif;
  --font-jp: "Noto Sans JP", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad-x: clamp(20px, 5vw, 80px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* hidden属性は display 指定のあるCSSにも必ず勝たせる
   (これがないと .modal__link { display:inline-block } 等が hidden を打ち消す) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-jp);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.02em;
  overflow-x: clip;   /* 横はみ出し抑制 */
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: normal; }
.pc-only { display: inline; }
@media (max-width: 768px) { .pc-only { display: none; } }

::selection { background: var(--c-accent); color: var(--c-accent-text); }

/* ============ ローディング ============ */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--c-bg);
  display: grid; place-items: center;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__inner { text-align: center; }
.loader__logo {
  display: block; width: auto;
  height: clamp(84px, 16vw, 128px);
  animation: loaderPulse 1.2s ease-in-out infinite alternate;
}
.loader__bar {
  display: block; height: 2px; margin-top: 16px;
  background: var(--c-accent);
  transform-origin: left;
  animation: loaderBar 1.1s var(--ease) forwards;
}
@keyframes loaderBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes loaderPulse { from { opacity: 0.45; } to { opacity: 1; } }

/* ============ スクロール進捗バー ============ */
.progress {
  position: fixed; top: 0; left: 0; z-index: 60;
  width: 100%; height: 2px;
  background: var(--c-accent);
  transform-origin: left;
  transform: scaleX(0);
  pointer-events: none;
}

/* ============ カスタムカーソル ============ */
@media (pointer: fine) {
  body { cursor: none; }
  a, button, .work-card, input, textarea, select, label { cursor: none; }

  .cursor { position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none; }
  .cursor__dot {
    position: fixed; top: -3px; left: -3px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--c-accent);
  }
  .cursor__ring {
    position: fixed; top: -18px; left: -18px;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid rgba(130, 207, 209,0.7);
    display: grid; place-items: center;
    transition: width 0.3s var(--ease), height 0.3s var(--ease),
                top 0.3s var(--ease), left 0.3s var(--ease),
                background 0.3s, border-color 0.3s;
  }
  .cursor__label {
    font-family: var(--font-en); font-weight: 700;
    font-size: 10px; letter-spacing: 0.18em;
    color: var(--c-accent-text);
    opacity: 0; transition: opacity 0.25s;
  }
  /* リンクホバー時: リング拡大 */
  .cursor.is-hover .cursor__ring {
    width: 56px; height: 56px; top: -28px; left: -28px;
    background: rgba(130, 207, 209,0.12);
  }
  /* ワークカードホバー時: 塗りつぶし + VIEWラベル */
  .cursor.is-view .cursor__ring {
    width: 76px; height: 76px; top: -38px; left: -38px;
    background: var(--c-accent);
    border-color: var(--c-accent);
  }
  .cursor.is-view .cursor__label { opacity: 1; }
  .cursor.is-view .cursor__dot { opacity: 0; }
}
@media (pointer: coarse) {
  .cursor { display: none; }
}

/* ============ 背景装飾 ============ */
.bg-deco {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  /* 時間経過で色相がじんわりドリフトする */
  animation: hueDrift 38s ease-in-out infinite alternate;
}
@keyframes hueDrift {
  from { filter: hue-rotate(-15deg); }
  to   { filter: hue-rotate(25deg); }
}
/* セクションごとの色ウォッシュ(不透明度はJSがスクロールに応じて制御) */
.bg-wash {
  position: absolute; inset: 0;
  opacity: 0;
  will-change: opacity;
}
.bg-wash--about   { background: radial-gradient(70% 90% at 18% 35%, rgba(93, 246, 166, 0.13), transparent 70%); }
.bg-wash--works   { background: radial-gradient(80% 100% at 82% 40%, rgba(93, 141, 246, 0.15), transparent 70%); }
.bg-wash--contact { background: radial-gradient(80% 90% at 50% 75%, rgba(246, 158, 93, 0.14), transparent 70%); }
.bg-deco__orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.16;
  animation: orbFloat 14s ease-in-out infinite alternate;
}
.bg-deco__orb--1 {
  width: 46vw; height: 46vw; min-width: 340px; min-height: 340px;
  background: var(--c-accent);
  top: -12%; right: -10%;
}
.bg-deco__orb--2 {
  width: 34vw; height: 34vw; min-width: 260px; min-height: 260px;
  background: #5d8df6;
  bottom: -14%; left: -8%;
  animation-delay: -7s;
}
@keyframes orbFloat {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-6vw, 5vh, 0) scale(1.15); }
}
/* 最下部でゆっくりうねる背景グラデーション(青→紫の広いにじみが、
   ふちを変形させながらゆっくり左右に揺れる) */
.bg-deco__wave {
  position: absolute; left: 50%; bottom: -30vh;
  width: 150vw; height: 80vh; margin-left: -75vw;
  background: radial-gradient(closest-side,
    rgba(130, 207, 209, 0.40),
    rgba(93, 141, 246, 0.16) 55%,
    transparent 78%);
  filter: blur(64px);
  opacity: 0.72;
  border-radius: 42% 58% 62% 38% / 64% 54% 46% 36%;
  will-change: transform, border-radius;
  animation: bgWave 20s ease-in-out infinite;
}
@keyframes bgWave {
  0%, 100% {
    border-radius: 42% 58% 62% 38% / 64% 54% 46% 36%;
    transform: translate3d(-6%, 0, 0) rotate(-2deg) scale(1);
  }
  33% {
    border-radius: 64% 36% 42% 58% / 48% 64% 36% 52%;
    transform: translate3d(6%, -5%, 0) rotate(2.5deg) scale(1.08);
  }
  66% {
    border-radius: 50% 50% 66% 34% / 58% 40% 62% 42%;
    transform: translate3d(-3%, -2%, 0) rotate(-1deg) scale(1.04);
  }
}
/* 大きなリング(スクロールで回転・移動) */
.bg-deco__ring {
  position: absolute;
  width: clamp(420px, 44vw, 720px); height: auto;
  top: 30%; right: -12%;
  color: var(--c-text);
  opacity: 0.1;
  will-change: transform;
}
.bg-deco__grain {
  position: absolute; inset: -70px; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.9s steps(4) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-24px, 16px); }
  50%  { transform: translate(18px, -28px); }
  75%  { transform: translate(-12px, -14px); }
  100% { transform: translate(0, 0); }
}

/* ============ ヘッダー ============ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad-x);
  transition: padding 0.4s;
}
/* スクロール時の背景は疑似要素に持たせる
   (header自体に backdrop-filter を付けると、fixed配置の
    モバイルナビの基準がheaderになってしまうため) */
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(13, 13, 15, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-line);
  opacity: 0;
  transition: opacity 0.4s;
}
.header.is-scrolled { padding: 14px var(--pad-x); }
.header.is-scrolled::before { opacity: 1; }
.header__logo {
  font-family: var(--font-en); font-weight: 900;
  font-size: 15px; letter-spacing: 0.16em;
  display: flex; align-items: center; gap: 10px;
}
.header__logo-mark {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--c-accent);
  animation: loaderPulse 1.6s ease-in-out infinite alternate;
  flex: none;
}
.header__logo-img { height: 17px; width: auto; display: block; }
.header__nav { display: flex; gap: clamp(20px, 3vw, 44px); }
.header__link {
  position: relative; overflow: hidden;
  font-family: var(--font-en); font-weight: 700;
  font-size: 13px; letter-spacing: 0.14em;
  height: 1.4em; line-height: 1.4;
}
.header__link-en, .header__link-jp {
  display: block; transition: transform 0.45s var(--ease);
}
.header__link-jp {
  font-family: var(--font-jp); font-weight: 500; font-size: 12px;
  color: var(--c-accent);
}
.header__link:hover .header__link-en,
.header__link:hover .header__link-jp { transform: translateY(-1.4em); }

.header__menu-btn {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 7px;
}
.header__menu-btn span {
  display: block; width: 26px; height: 2px;
  background: var(--c-text);
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
.header__menu-btn.is-open span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.header__menu-btn.is-open span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

@media (max-width: 768px) {
  .header__menu-btn { display: flex; }
  .header__nav {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; align-items: center; gap: 36px;
    background: rgba(13, 13, 15, 0.96);
    opacity: 0; visibility: hidden;
    transition: opacity 0.45s var(--ease), visibility 0.45s;
  }
  .header__nav.is-open { opacity: 1; visibility: visible; }
  .header__link { font-size: 22px; height: auto; overflow: visible; text-align: center; }
  .header__link-jp { font-size: 13px; margin-top: 4px; }
  .header__link:hover .header__link-en,
  .header__link:hover .header__link-jp { transform: none; }
}

/* ============ ヒーロー ============ */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad-x) 80px;
  position: relative;
}
/* ヒーロー背景の「流れるラインの波」レイヤー */
.hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__wave {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block;
  opacity: 0.95;                     /* 見えつつ主役は白文字 */
  filter: saturate(1.75) blur(0.3px); /* 細線をシャープに保ちつつ発色 */
}
/* 文字の可読性を保つスクリム(中央は薄く、端を暗く) */
.hero__bg-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(130% 100% at 50% 42%, transparent 0%, rgba(13,13,15,0.18) 62%, rgba(13,13,15,0.6) 100%),
    linear-gradient(180deg, rgba(13,13,15,0.45) 0%, rgba(13,13,15,0.05) 40%, rgba(13,13,15,0.12) 62%, rgba(13,13,15,0.6) 100%);
}
/* ヒーローの中身は背景より前面に(hero__scroll の絶対配置は壊さない) */
.hero__eyebrow, .hero__title, .hero__lead { position: relative; z-index: 1; }
.hero__scroll { z-index: 1; }
.hero__eyebrow {
  font-family: var(--font-en); font-weight: 700;
  font-size: clamp(11px, 1.2vw, 13px); letter-spacing: 0.3em;
  color: var(--c-accent);
  margin-bottom: clamp(16px, 3vh, 32px);
}
.hero__title {
  font-family: var(--font-en); font-weight: 900;
  font-size: clamp(52px, 11vw, 168px);
  line-height: 0.98; letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero__line { display: block; overflow: hidden; }
.hero__word { display: inline-block; }
.hero__word--accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--c-accent);
}
/* 文字ごとのアニメーション用(JSで分割) */
.hero__char {
  display: inline-block;
  transform: translateY(110%);
  animation: charUp 0.9s var(--ease) forwards;
  animation-delay: calc(var(--i) * 0.035s + 0.9s);
}
@keyframes charUp { to { transform: translateY(0); } }

.hero__lead {
  margin-top: clamp(24px, 4vh, 48px);
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--c-text-dim);
}
.hero__scroll {
  position: absolute; right: var(--pad-x); bottom: 40px;
  width: 110px; height: 110px;
  display: grid; place-items: center;
}
.hero__badge {
  position: absolute; inset: 0;
  animation: badgeSpin 14s linear infinite;
}
@keyframes badgeSpin { to { transform: rotate(360deg); } }
.hero__badge-text {
  font-family: var(--font-en); font-weight: 700;
  font-size: 11.5px; letter-spacing: 0.24em;
  fill: var(--c-text-dim);
}
.hero__badge-arrow {
  font-size: 18px; color: var(--c-accent);
  animation: arrowBob 1.6s var(--ease) infinite;
}
@keyframes arrowBob {
  0%, 100% { transform: translateY(-3px); }
  50% { transform: translateY(3px); }
}
@media (max-width: 600px) { .hero__scroll { width: 88px; height: 88px; bottom: 24px; } }

/* ============ 右端スキャンライン ============ */
/* スクロール進捗(--sp: 0→1)に追従して、右端を光点が上から下へ動く。
   縦レール(うっすら)＋進捗トレイル(accent)＋先端の光点(beam)。 */
.scanrail {
  position: fixed; z-index: 55;
  right: clamp(14px, 2.4vw, 30px);
  top: 104px; bottom: 104px;
  width: 1px;
  background: var(--c-line);
  pointer-events: none;
}
/* 上端から進捗ぶんだけ伸びるトレイル */
.scanrail__trail {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  background: var(--c-accent); opacity: 0.5;
  transform-origin: top center; transform: scaleY(var(--sp, 0));
}
/* 先端の光: 横tick + 光点。進捗位置(上→下)へ移動 */
.scanrail__beam {
  position: absolute; left: 50%; top: calc(var(--sp, 0) * 100%);
  width: 22px; height: 2px; margin: -1px 0 0 -11px;
  background: var(--c-accent); box-shadow: 0 0 10px 1px var(--c-accent);
}
.scanrail__beam::after {
  content: ""; position: absolute; right: -2px; top: 50%;
  width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: var(--c-accent); box-shadow: 0 0 10px 2px var(--c-accent);
}
@media (max-width: 600px) { .scanrail { display: none; } }
@media (prefers-reduced-motion: reduce) { .scanrail { display: none; } }

/* ============ クリック波紋 ============ */
/* クリック地点から、ライムの輪がふわっと広がって消える(JSで生成) */
.ripple {
  position: fixed; z-index: 80;
  border: 1.5px solid var(--c-accent);
  border-radius: 50%;
  pointer-events: none;
  animation: rippleOut 0.7s var(--ease) both;
}
@keyframes rippleOut {
  0%   { width: 8px;   height: 8px;   margin: -4px 0 0 -4px;     opacity: 0.75; }
  100% { width: 300px; height: 300px; margin: -150px 0 0 -150px; opacity: 0; }
}

/* ============ セクション共通 ============ */
.section {
  padding: clamp(90px, 14vh, 160px) var(--pad-x);
  position: relative;
  overflow: clip;
}
/* 背景の巨大ウォーターマーク文字(スクロールで横に流れる) */
.section__bg-text {
  position: absolute; top: clamp(10px, 4vh, 40px); left: 0;
  font-family: var(--font-en); font-weight: 900;
  font-size: clamp(120px, 24vw, 340px);
  line-height: 1; letter-spacing: 0.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 241, 236, 0.07);
  pointer-events: none; user-select: none;
  will-change: transform;
}
.section__head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: clamp(48px, 8vh, 88px);
  border-bottom: 1px solid var(--c-line);
  padding-bottom: 24px;
}
.section__num {
  font-family: var(--font-en); font-weight: 700;
  font-size: 13px; letter-spacing: 0.1em;
  color: var(--c-accent);
}
.section__title {
  font-family: var(--font-en); font-weight: 900;
  font-size: clamp(38px, 7vw, 88px);
  line-height: 1; letter-spacing: -0.01em;
}
/* タイトル文字の1文字ずつスライドイン(JSで分割) */
.section__title-text { display: inline-block; overflow: hidden; vertical-align: bottom; }
.section__title-text .tchar {
  display: inline-block;
  transform: translateY(115%) rotate(4deg);
  transition: transform 0.8s var(--ease);
  transition-delay: calc(var(--i) * 0.05s);
}
.section__head.is-visible .tchar { transform: translateY(0) rotate(0deg); }
.section__title-jp {
  font-family: var(--font-jp); font-weight: 500;
  font-size: clamp(12px, 1.4vw, 15px); letter-spacing: 0.14em;
  color: var(--c-text-dim);
  margin-left: 18px;
}

/* スクロール出現アニメーション */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ============ ABOUT ============ */
.about__statement { max-width: 920px; margin-bottom: clamp(64px, 10vh, 120px); }
.about__copy {
  font-size: clamp(26px, 4.4vw, 52px);
  font-weight: 900; line-height: 1.45; letter-spacing: 0.03em;
  margin-bottom: 32px;
}
/* アンダーライン(ハイライト帯)は ABOUT が画面に入った瞬間に
   左→右へ伸びて出現する。反復再生できるよう data-reveal とは別の
   専用オブザーバ(initAboutUnderline)で is-underline を付与する。 */
.about__copy-accent {
  background-image: linear-gradient(var(--c-accent), var(--c-accent));
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0% 32%;
  color: var(--c-text);
  transition: background-size 1.1s var(--ease);
}
.about__copy-accent.is-underline { background-size: 100% 32%; }
.about__text { color: var(--c-text-dim); font-size: clamp(14px, 1.6vw, 16px); }

.about__services {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--c-line);
  border-left: 1px solid var(--c-line);
  margin-bottom: clamp(64px, 10vh, 120px);
}
@media (max-width: 768px) { .about__services { grid-template-columns: 1fr; } }
/* S01〜S04 は「読み物としての情報カード」。
   クリックできる要素ではないため、リンクに見えるホバー演出は付けない。
   左上に固定のアクセントティックだけ置いて、区切りとして機能させる。 */
.service {
  padding: clamp(28px, 4vw, 48px);
  border-right: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  position: relative;
}
.service::after {
  content: ""; position: absolute; left: 0; top: clamp(28px, 4vw, 48px);
  width: 2px; height: 26px;
  background: var(--c-accent);
}
.service__num {
  font-family: var(--font-en); font-size: 12px; letter-spacing: 0.14em;
  color: var(--c-accent);
}
.service__name {
  font-family: var(--font-en); font-weight: 900;
  font-size: clamp(24px, 3vw, 36px);
  margin: 12px 0 14px;
}
/* 英字タイトル: アクセント色(水色)が左→右に流れて塗られるワイプ。
   文字を背景グラデーションで塗り、その位置をずらして「塗られる」動きを出す。
   初期は白、発火で水色に塗り替わる。 */
.service__name-en {
  display: inline-block;
  background-image: linear-gradient(90deg, var(--c-accent) 50%, var(--c-text) 50%);
  background-size: 220% 100%;
  background-position: 100% 0;      /* 右寄せ = 白い側を表示 */
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: background-position 0.55s var(--ease);
}
/* PC: カードにホバーするとタイトルが左→右に水色へ塗られ、離すと白へ戻る */
@media (hover: hover) {
  .service:hover .service__name-en { background-position: 0 0; }
}
/* タッチ端末: ホバーが無いので、カードが画面に入ったら一度だけ塗る(順番に) */
@media (hover: none) {
  .service.is-visible .service__name-en { background-position: 0 0; }
  .about__services .service:nth-child(1) .service__name-en { transition-delay: 0.10s; }
  .about__services .service:nth-child(2) .service__name-en { transition-delay: 0.20s; }
  .about__services .service:nth-child(3) .service__name-en { transition-delay: 0.30s; }
  .about__services .service:nth-child(4) .service__name-en { transition-delay: 0.40s; }
}
.service__name-jp {
  font-family: var(--font-jp); font-weight: 500;
  font-size: 13px; color: var(--c-text-dim);
  margin-left: 14px; letter-spacing: 0.12em;
}
.service__desc { font-size: 14px; color: var(--c-text-dim); }

.about__profile { max-width: 720px; }
.about__profile-row {
  display: grid; grid-template-columns: 140px 1fr;
  padding: 18px 4px;
  border-bottom: 1px solid var(--c-line);
  font-size: 14px;
}
.about__profile-row dt { color: var(--c-text-dim); font-weight: 500; }
@media (max-width: 560px) {
  .about__profile-row { grid-template-columns: 96px 1fr; }
}
/* 事業内容内の自社サービスリンク(one for you / neko to mono) */
.about__link {
  color: var(--c-accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.about__link:hover { border-bottom-color: var(--c-accent); }

/* ============ WORKS ============ */

/* トップページの告知ブロック(実績は別ページ works.html に集約) */
.works__teaser { max-width: 760px; }
.works__teaser-copy {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700; line-height: 1.6; letter-spacing: 0.02em;
  margin-bottom: 24px;
}
.works__teaser-note {
  font-size: clamp(13px, 1.5vw, 15px);
  color: var(--c-text-dim); line-height: 1.9;
  margin-bottom: clamp(32px, 5vh, 48px);
}
.works__teaser-note strong { color: var(--c-text); font-weight: 700; }
.works__teaser-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.works__btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-en); font-weight: 700;
  font-size: 14px; letter-spacing: 0.1em;
  padding: 16px 32px; border-radius: 999px;
  border: 1px solid var(--c-line);
  transition: background 0.35s var(--ease), color 0.35s, border-color 0.35s, gap 0.3s, transform 0.2s;
}
.works__btn--primary { background: var(--c-accent); color: var(--c-accent-text); border-color: var(--c-accent); }
.works__btn--primary:hover { gap: 20px; transform: translateY(-2px); }
.works__btn--ghost:hover { border-color: var(--c-accent); color: var(--c-accent); transform: translateY(-2px); }
.works__btn-arrow { transition: transform 0.3s var(--ease); }
.works__btn--primary:hover .works__btn-arrow { transform: translateX(4px); }

/* ===== 実績一覧ページ(works.html) ===== */
.workspage {
  padding: clamp(120px, 16vh, 180px) var(--pad-x) clamp(90px, 14vh, 160px);
}
.workspage__intro { position: relative; margin-bottom: clamp(8px, 2vh, 24px); }
/* 背景の巨大 WORKS: 画面幅に収めて全体が読めるようにする(見切れ解消)。
   タイトルの背後に敷いて、ページ最上部で自然に全体が見える。 */
.workspage__bg-text {
  position: absolute; top: clamp(-6px, 1vh, 16px); left: -0.04em;
  font-size: clamp(64px, 17vw, 220px);
  line-height: 0.9;
  -webkit-text-stroke: 1px rgba(242, 241, 236, 0.09);
  transform: none !important;   /* JSパララックス無効(このページでは静的に全体表示) */
}
.works__lead {
  position: relative;
  max-width: 760px; margin-top: clamp(28px, 5vh, 44px);
  font-size: clamp(13px, 1.5vw, 15px); color: var(--c-text-dim); line-height: 1.9;
}

/* 追従カテゴリナビ: 最上部では通常フロー(透明)。スクロールで所定位置を
   通過したら position:fixed でヘッダー直下に固定する(sticky より確実)。 */
.worksnav {
  position: relative; z-index: 40;
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 14px 0;
  margin-bottom: clamp(20px, 4vh, 36px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
              backdrop-filter 0.35s var(--ease);
}
/* 吸着時: ヘッダーの高さ分だけ下げた位置に固定し、画面端まで帯を伸ばす */
.worksnav.is-stuck {
  position: fixed; left: 0; right: 0; top: var(--worksnav-top, 56px);
  margin: 0; padding: 12px var(--pad-x);
  background: rgba(13, 13, 15, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--c-line);
}
/* 固定に切り替わったとき、後続コンテンツが飛び上がらないよう高さを確保 */
.worksnav-spacer { height: 0; }
.worksnav-sentinel { height: 0; }
.worksnav-btn {
  font-family: var(--font-en); font-weight: 700;
  font-size: 13px; letter-spacing: 0.1em;
  padding: 10px 22px;
  border: 1px solid var(--c-line); border-radius: 999px;
  color: var(--c-text);
  transition: background 0.35s var(--ease), color 0.35s, border-color 0.35s, transform 0.2s;
}
.worksnav-btn em {
  font-family: var(--font-jp); font-weight: 500;
  font-size: 11px; margin-left: 8px; opacity: 0.65;
}
.worksnav-btn:hover { border-color: var(--c-accent); transform: translateY(-2px); }
.worksnav-btn.is-active {
  background: var(--c-accent); color: var(--c-accent-text); border-color: var(--c-accent);
}

/* カテゴリセクション */
.workscat { padding-top: clamp(40px, 7vh, 72px); scroll-margin-top: clamp(120px, 17vh, 150px); }
.workscat:first-child { padding-top: clamp(12px, 2vh, 24px); }
.workscat__head {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: clamp(24px, 4vh, 40px);
}
.workscat__title {
  font-family: var(--font-en); font-weight: 900;
  font-size: clamp(26px, 4vw, 44px); line-height: 1; letter-spacing: -0.01em;
}
.workscat__jp {
  font-family: var(--font-jp); font-weight: 500;
  font-size: clamp(12px, 1.3vw, 14px); color: var(--c-text-dim);
  margin-left: 14px; letter-spacing: 0.12em;
}
.workscat__count {
  font-family: var(--font-en); font-size: 12px; letter-spacing: 0.1em;
  color: var(--c-accent);
}

.works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
@media (max-width: 1024px) { .works__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .works__grid { grid-template-columns: 1fr; } }

.work-card {
  cursor: pointer;
  opacity: 0; transform: translateY(30px);
  animation: cardIn 0.7s var(--ease) forwards;
  animation-delay: calc(var(--i) * 0.07s);
}
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }

.work-card { perspective: 800px; }
.work-card__media {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: var(--c-bg-soft);
  transition: transform 0.25s ease-out;
  will-change: transform;
}
.work-card__media img,
.work-card__media .work-card__ph {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
/* gallery流用の縦長キャプチャは上端(ヒーロー部分)を見せる */
.work-card__media img.work-card__img--top { object-position: top center; }
.work-card:hover .work-card__media img,
.work-card:hover .work-card__ph { transform: scale(1.06); }

/* 画像なし時のプレースホルダー */
.work-card__ph {
  display: grid; place-items: center;
  font-family: var(--font-en); font-weight: 900;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: 0.06em;
  color: rgba(242, 241, 236, 0.2);
}
.work-card__ph--graphic { background: linear-gradient(135deg, #2b2e18, #171a0c); }
.work-card__ph--video   { background: linear-gradient(135deg, #16224a, #0e1226); }
.work-card__ph--web     { background: linear-gradient(135deg, #12333a, #0b1a1e); }
.work-card__ph--lp      { background: linear-gradient(135deg, #3a1a2a, #1e0e16); }

.work-card__badge {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-en); font-weight: 700;
  font-size: 10px; letter-spacing: 0.14em;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(13, 13, 15, 0.65);
  backdrop-filter: blur(6px);
  color: var(--c-accent);
  border: 1px solid rgba(130, 207, 209,0.35);
}
.work-card__view {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(13, 13, 15, 0.45);
  opacity: 0; transition: opacity 0.45s var(--ease);
}
.work-card:hover .work-card__view { opacity: 1; }
.work-card__view span {
  font-family: var(--font-en); font-weight: 700;
  font-size: 12px; letter-spacing: 0.2em;
  padding: 12px 24px;
  border: 1px solid var(--c-accent); border-radius: 999px;
  color: var(--c-accent);
}
.work-card__info { padding: 16px 4px 0; }
.work-card__title { font-size: 16px; font-weight: 700; line-height: 1.5; }
.work-card__meta {
  display: flex; gap: 14px; margin-top: 6px;
  font-family: var(--font-en); font-size: 11px; letter-spacing: 0.1em;
  color: var(--c-text-dim);
}

/* ============ CONTACT ============ */
.contact__body { text-align: center; padding: clamp(20px, 4vh, 60px) 0; }
.contact__copy {
  font-family: var(--font-en); font-weight: 900;
  font-size: clamp(44px, 9vw, 120px);
  line-height: 1.02; letter-spacing: -0.02em;
}
.contact__dot { color: var(--c-accent); }
.contact__text { margin: 28px 0 40px; color: var(--c-text-dim); font-size: 15px; }
.contact__btn {
  display: inline-flex; align-items: center; gap: 16px;
  font-family: var(--font-en); font-weight: 700;
  font-size: 15px; letter-spacing: 0.14em;
  padding: 20px 44px;
  border: 1px solid var(--c-text); border-radius: 999px;
  transition: background 0.4s var(--ease), color 0.4s, border-color 0.4s, gap 0.3s,
              transform 0.4s var(--ease);
  will-change: transform;
}
.contact__btn:hover {
  background: var(--c-accent); color: var(--c-accent-text);
  border-color: var(--c-accent); gap: 26px;
}

/* ============ フッター ============ */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 32px var(--pad-x);
  border-top: 1px solid var(--c-line);
  flex-wrap: wrap; gap: 12px;
}
.footer__logo { line-height: 0; }
.footer__logo-img { height: 15px; width: auto; display: block; }
.footer__copy { font-family: var(--font-en); font-size: 11px; color: var(--c-text-dim); letter-spacing: 0.08em; }

/* ============ モーダル ============ */
.modal {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.modal__panel {
  position: relative;
  width: min(880px, 100%);
  max-height: min(86vh, 86svh);
  overflow-y: auto;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  transform: translateY(30px) scale(0.98);
  transition: transform 0.5s var(--ease);
}
.modal.is-open .modal__panel { transform: translateY(0) scale(1); }
.modal__close {
  position: sticky; top: 14px; margin-left: auto; margin-right: 14px;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  font-size: 20px; line-height: 1;
  background: rgba(13, 13, 15, 0.7); color: var(--c-text);
  border: 1px solid var(--c-line); border-radius: 50%;
  cursor: pointer; z-index: 2;
  transition: background 0.3s, color 0.3s;
}
.modal__close:hover { background: var(--c-accent); color: var(--c-accent-text); }
.modal__media { margin-top: -54px; }
.modal__media img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.modal__media .modal__ph {
  width: 100%; aspect-ratio: 16 / 9;
  display: grid; place-items: center;
  font-family: var(--font-en); font-weight: 900;
  font-size: clamp(32px, 6vw, 64px);
  color: rgba(242, 241, 236, 0.18);
}
.modal__media iframe {
  display: block; width: 100%; aspect-ratio: 16 / 9; border: 0;
  background: #000;
}
/* 動画モーダル:
   画面の高さ(56vh)から16:9で逆算した幅にパネルを合わせる。
   さらに、Googleドライブのプレイヤーは再生時に下部コントロールバーの
   領域(約60px)を確保して映像エリアが縦に縮むため、枠の高さに
   +60pxの余裕を持たせて映像の上下が切れないようにしている */
.modal--video { --panel-w: min(920px, 94vw, calc(56vh * 16 / 9)); }
.modal--video .modal__panel { width: var(--panel-w); }
.modal--video .modal__media iframe {
  aspect-ratio: auto;
  height: calc(var(--panel-w) * 9 / 16 + 60px);
}
/* 静止画モーダル: バナーを切らずに全体表示(ポップアップで完結) */
.modal--image .modal__panel { width: min(680px, 94vw); }
.modal--image .modal__media { margin-top: 0; padding: 14px 14px 0; }
.modal--image .modal__media img {
  aspect-ratio: auto; width: auto; max-width: 100%;
  max-height: min(66vh, 620px);
  margin: 0 auto; object-fit: contain;
  border-radius: 4px;
}
/* 動画URL未設定時のプレイヤー風表示(再生アイコン + 案内) */
.modal__ph--player {
  display: grid; place-items: center; place-content: center;
  gap: 18px;
}
.modal__play-icon {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid rgba(242, 241, 236, 0.5);
  background: rgba(13, 13, 15, 0.45);
  position: relative;
}
.modal__play-icon::after {
  content: ""; position: absolute;
  left: 55%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent rgba(242, 241, 236, 0.75);
}
.modal__play-note {
  font-family: var(--font-jp); font-weight: 400;
  font-size: 12px; line-height: 1.9; text-align: center;
  color: var(--c-text-dim);
}
.modal__body { padding: clamp(24px, 4vw, 44px); }
.modal__meta {
  display: flex; gap: 16px;
  font-family: var(--font-en); font-weight: 700;
  font-size: 12px; letter-spacing: 0.16em;
  color: var(--c-accent);
  margin-bottom: 12px;
}
.modal__title { font-size: clamp(20px, 3vw, 28px); font-weight: 900; line-height: 1.4; }
.modal__client {
  font-family: var(--font-en); font-size: 12px; letter-spacing: 0.14em;
  color: var(--c-text-dim); margin: 8px 0 20px;
}
.modal__desc { font-size: 14.5px; color: var(--c-text); }
.modal__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.modal__tags li {
  font-size: 11.5px; padding: 5px 14px;
  border: 1px solid var(--c-line); border-radius: 999px;
  color: var(--c-text-dim);
}
.modal__link {
  display: inline-block; margin-top: 26px;
  font-family: var(--font-en); font-weight: 700;
  font-size: 13px; letter-spacing: 0.14em;
  color: var(--c-accent);
  border-bottom: 1px solid var(--c-accent);
  padding-bottom: 3px;
}

/* モーダル表示中は背景スクロールを止める */
body.is-modal-open { overflow: hidden; }

/* ============ 閲覧制限ゲート ============ */
.gate {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(10, 10, 12, 0.9);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.gate.is-unlocked { opacity: 0; visibility: hidden; }
.gate__box {
  width: min(420px, 100%);
  text-align: center;
}
.gate.is-error .gate__box { animation: gateShake 0.45s var(--ease); }
@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}
.gate__logo {
  font-family: var(--font-en); font-weight: 900;
  font-size: 18px; letter-spacing: 0.26em;
  margin-bottom: 18px;
}
.gate__logo::after {
  content: ""; display: block;
  width: 34px; height: 2px; margin: 18px auto 0;
  background: var(--c-accent);
}
.gate__text {
  font-size: 13px; color: var(--c-text-dim);
  margin-bottom: 28px;
}
.gate__form { display: flex; gap: 10px; }
.gate__input {
  flex: 1; min-width: 0;
  padding: 14px 18px;
  font-family: var(--font-en); font-size: 14px; letter-spacing: 0.14em;
  color: var(--c-text);
  background: rgba(242, 241, 236, 0.05);
  border: 1px solid var(--c-line); border-radius: 8px;
  outline: none;
  transition: border-color 0.3s;
}
.gate__input:focus { border-color: var(--c-accent); }
.gate__btn {
  padding: 14px 22px;
  font-family: var(--font-en); font-weight: 700;
  font-size: 12px; letter-spacing: 0.14em;
  color: var(--c-accent-text);
  background: var(--c-accent);
  border: 0; border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.2s;
}
.gate__btn:hover { opacity: 0.85; transform: translateY(-1px); }
.gate__error {
  min-height: 1.6em; margin-top: 14px;
  font-size: 12px; color: #f66d5d;
}
.gate__expired { font-size: 14px; color: var(--c-text-dim); }
/* パスワードを持たない人向けのお問い合わせ導線 */
.gate__contact {
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid var(--c-line);
}
.gate__contact-text {
  display: block; font-size: 12px; color: var(--c-text-dim);
  margin-bottom: 14px;
}
.gate__contact-btn {
  display: inline-block;
  font-family: var(--font-en); font-weight: 700;
  font-size: 12px; letter-spacing: 0.12em;
  padding: 12px 24px; border-radius: 8px;
  border: 1px solid var(--c-line); color: var(--c-text);
  transition: border-color 0.3s, color 0.3s, transform 0.2s;
}
.gate__contact-btn:hover { border-color: var(--c-accent); color: var(--c-accent); transform: translateY(-1px); }

/* ============ 詳細ページ (work.html) ============ */
/* 上部バー(トップの固定ヘッダーとは別の、静的なシンプルバー) */
.dheader {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad-x);
  border-bottom: 1px solid var(--c-line);
}
.dheader__logo img { height: 18px; width: auto; display: block; }
.dheader__back {
  font-family: var(--font-en); font-weight: 700;
  font-size: 12px; letter-spacing: 0.14em;
  color: var(--c-text-dim);
  transition: color 0.3s;
}
.dheader__back:hover { color: var(--c-accent); }

.workdetail {
  max-width: 1080px; margin: 0 auto;
  padding: clamp(48px, 8vh, 96px) var(--pad-x) clamp(60px, 10vh, 120px);
}
.workdetail__head {
  border-bottom: 1px solid var(--c-line);
  padding-bottom: clamp(28px, 4vh, 44px);
  margin-bottom: clamp(32px, 5vh, 56px);
}
.workdetail__meta {
  display: flex; gap: 16px;
  font-family: var(--font-en); font-weight: 700;
  font-size: 12px; letter-spacing: 0.16em;
  color: var(--c-accent);
  margin-bottom: 16px;
}
.workdetail__title {
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 900; line-height: 1.25; letter-spacing: 0.01em;
}
.workdetail__client {
  font-family: var(--font-en); font-size: 12px; letter-spacing: 0.14em;
  color: var(--c-text-dim); margin-top: 14px;
}
.workdetail__desc {
  margin-top: 20px; max-width: 720px;
  font-size: clamp(14px, 1.6vw, 16px); color: var(--c-text-dim);
}
.workdetail__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.workdetail__tags li {
  font-size: 11.5px; padding: 5px 14px;
  border: 1px solid var(--c-line); border-radius: 999px;
  color: var(--c-text-dim);
}

/* 画像ギャラリー(縦積み) */
.workdetail__gallery {
  display: flex; flex-direction: column;
  gap: clamp(16px, 2.5vw, 28px);
}
.workdetail__img {
  display: block; width: 100%; height: auto;
  border-radius: 8px; border: 1px solid var(--c-line);
}
.workdetail__ph {
  width: 100%; aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  border-radius: 8px;
  font-family: var(--font-en); font-weight: 900;
  font-size: clamp(32px, 6vw, 64px);
  color: rgba(242, 241, 236, 0.18);
}
.workdetail__placeholder-note {
  font-size: 13px; color: var(--c-text-dim); line-height: 1.9;
  padding: 16px 18px; margin-bottom: 4px;
  border-left: 2px solid var(--c-accent);
  background: var(--c-bg-soft);
  border-radius: 0 8px 8px 0;
}

.workdetail__foot {
  display: flex; flex-wrap: wrap; gap: 16px 28px;
  align-items: center;
  margin-top: clamp(40px, 6vh, 72px);
  padding-top: clamp(28px, 4vh, 44px);
  border-top: 1px solid var(--c-line);
}
.workdetail__sitelink, .workdetail__back-btn {
  font-family: var(--font-en); font-weight: 700;
  font-size: 13px; letter-spacing: 0.12em;
  padding-bottom: 3px;
}
.workdetail__sitelink {
  color: var(--c-accent);
  border-bottom: 1px solid var(--c-accent);
}
.workdetail__back-btn { color: var(--c-text-dim); transition: color 0.3s; }
.workdetail__back-btn:hover { color: var(--c-text); }

.workdetail__notfound {
  text-align: center; padding: clamp(80px, 16vh, 160px) var(--pad-x);
}
.workdetail__notfound-title {
  font-size: 18px; font-weight: 700; margin-bottom: 24px;
}

/* 動きを減らす設定のユーザーへの配慮 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
