/* hikari — portfolio
   黒ベース・白文字・細い線・強調色は青緑の1色だけ */

:root {
  --bg: #070808;
  --fg: #f3f5f4;
  --mute: rgba(243, 245, 244, 0.56);
  --line: rgba(243, 245, 244, 0.16);
  --ac: #1fd6c4;
  --ac-soft: rgba(31, 214, 196, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --slow: 0.9s;
  --pad: clamp(20px, 5vw, 72px);
  --sec: clamp(120px, 24vh, 280px);
  --font: "Inter Tight", "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.is-loading { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.9;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
small { font-size: inherit; }
::selection { background: var(--ac); color: #041211; }
:focus-visible { outline: 1px solid var(--ac); outline-offset: 6px; }

/* ---------- 共通の部品 ---------- */

.label {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
}

.rule {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--line);
  transform-origin: left center;
}

.l { display: block; overflow: hidden; }
.li { display: block; }
.m { display: inline-block; overflow: hidden; vertical-align: top; }
.ch { display: inline-block; }

/* 線の長さを 1 として描く（pathLength="1"）。vector-effect: non-scaling-stroke と一緒に使うと、
   大きく表示したときに線の一部しか描かれず、描く前から切れはしが見えるので、使わない */
.draw circle, .draw path {
  stroke: var(--ac);
  stroke-width: 0.7;
  stroke-dasharray: 1;
}

.h-xl {
  font-weight: 400;
  font-size: clamp(2rem, 5.2vw, 5rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.h-xxl {
  font-weight: 300;
  font-size: clamp(3.4rem, 13vw, 12rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.sec {
  position: relative;
  padding: var(--sec) var(--pad);
}

.sec__head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(56px, 9vw, 130px);
}

/* 背景パネル（スクロールで文字と違う速さでずれる） */
.panel {
  position: absolute;
  display: block;
  border: 1px solid var(--line);
  pointer-events: none;
  will-change: transform;
}

/* ---------- 全体の背景：青緑の淡い光がゆっくり漂う ---------- */

.aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.aura span {
  position: absolute;
  width: 74vmax;
  height: 74vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 214, 196, 0.1) 0%, rgba(31, 214, 196, 0.04) 36%, rgba(31, 214, 196, 0) 68%);
  will-change: transform;
}
.aura span:nth-child(1) { top: -28vmax; left: -24vmax; animation: aura-a 48s ease-in-out infinite alternate; }
.aura span:nth-child(2) { bottom: -32vmax; right: -26vmax; animation: aura-b 62s ease-in-out infinite alternate; }
.aura span:nth-child(3) { top: 24%; left: 34%; width: 52vmax; height: 52vmax; opacity: 0.7; animation: aura-c 76s ease-in-out infinite alternate; }
@keyframes aura-a { to { transform: translate3d(28vw, 20vh, 0) scale(1.15); } }
@keyframes aura-b { to { transform: translate3d(-32vw, -24vh, 0) scale(0.9); } }
@keyframes aura-c { to { transform: translate3d(-20vw, 16vh, 0) scale(1.2); } }

/* トンネルが画面をおおっているあいだは、見えない淡い光の動きを止める */
html.is-covered .aura span { animation-play-state: paused; }

/* 背景に細い線が無造作に引かれていく（main.js がキャンバスに描く） */
.aura__lines { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

main, .site-foot { position: relative; z-index: 1; }

/* ---------- ローディング ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  /* JavaScript が動かなかったときの保険（8秒で消える） */
  animation: loader-failsafe 0s linear 8s forwards;
}
html.js .loader { display: flex; }
@keyframes loader-failsafe { to { visibility: hidden; } }

.loader__inner { width: min(72vw, 560px); }

.loader__word {
  visibility: hidden;
  font-weight: 300;
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.loader__line {
  display: block;
  height: 1px;
  margin-top: 18px;
  background: var(--ac);
  transform: scaleX(0);
  transform-origin: left center;
}

.loader__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

/* ---------- カーソル ---------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 0;
  height: 0;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}
html:not(.has-cursor) .cursor { display: none; }

/* カーソルの光の尾と、止まったときに散る小さな光（main.js が描く。マウスのときだけ） */
.trail {
  position: fixed;
  inset: 0;
  z-index: 89;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
html:not(.has-cursor) .trail { display: none; }

.cursor__shape {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: radial-gradient(circle, rgba(31, 214, 196, 0.85) 0%, rgba(31, 214, 196, 0.28) 38%, rgba(31, 214, 196, 0) 70%);
  transform: translate(-50%, -50%);
  transition:
    width var(--slow) var(--ease),
    height var(--slow) var(--ease),
    background-color var(--slow) var(--ease),
    border-color var(--slow) var(--ease),
    border-radius var(--slow) var(--ease);
}
/* リンクの上：光の玉 → 細い線の輪 */
.cursor.is-link .cursor__shape {
  width: 72px;
  height: 72px;
  background: radial-gradient(circle, rgba(31, 214, 196, 0.1) 0%, rgba(31, 214, 196, 0) 70%);
  border-color: var(--ac);
}
/* メールのボタンの上：横長の形 */
.cursor.is-pill .cursor__shape {
  width: 132px;
  height: 56px;
  border-radius: 28px;
}

/* ---------- ヘッダー ---------- */

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--pad);
  font-size: 13px;
  letter-spacing: 0.14em;
}
.site-head__logo { font-size: 16px; letter-spacing: 0.02em; }
.site-head__nav { display: flex; gap: clamp(18px, 3vw, 40px); text-transform: uppercase; }
.site-head a { position: relative; padding: 6px 0; }
.site-head a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--slow) var(--ease);
}
.site-head a:hover::after, .site-head a:focus-visible::after { transform: scaleX(1); transform-origin: left center; }

/* ---------- トップ ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px var(--pad) 28px;
  overflow: hidden;
}

.hero__bg { position: absolute; inset: 0; }

/* トップのバナー（HP用の色の版）。文字が読めるように、左と下を暗くする */
.hero__media { position: absolute; inset: -8% 0; container-type: size; overflow: hidden; }
/* 画像の枠（16:9）。入れ物をおおう大きさにして、横62%・縦42%の位置で合わせる（object-fit: cover と同じ見え方）。
   画像と、上に重ねる動きを同じ枠に入れるので、窓の大きさが変わっても絵とずれない */
.hero__art {
  --ox: 62%;
  --oy: 42%;
  position: absolute;
  left: var(--ox);
  top: var(--oy);
  width: max(100cqw, calc(100cqh * 16 / 9));
  aspect-ratio: 16 / 9;
  transform: translate(calc(-1 * var(--ox)), calc(-1 * var(--oy)));
}
.hero__art-in { position: absolute; inset: 0; }
.hero__art-in img { display: block; width: 100%; height: 100%; }

/* 画像の中の画面に重ねる、青緑の動き */
.hero__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx { stroke: #46efdf; stroke-width: 1.5; opacity: 0.62; }
/* トップが画面に出ていないあいだは、重ねた動きを止める */
.hero.is-off .hero__fx *, .hero.is-off .hero__scroll i::after { animation-play-state: paused; }
.fx-spin { transform-box: fill-box; transform-origin: center; animation: fx-spin var(--d, 40s) linear infinite; }
.fx-rev { animation-direction: reverse; }
.fx-pulse { animation: fx-pulse 4.6s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.fx-ring { transform-box: fill-box; transform-origin: center; animation: fx-ring 5.2s ease-out infinite; animation-delay: var(--delay, 0s); }
.fx-flow { stroke-width: 2; stroke-dasharray: 46 260; animation: fx-flow 7s linear infinite; animation-delay: var(--delay, 0s); }
.fx-twinkle { fill: #c4fff7; stroke: none; animation: fx-pulse 2.8s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.fx-dot { fill: #c4fff7; stroke: none; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@keyframes fx-pulse { 0%, 100% { opacity: 0.12; } 50% { opacity: 0.95; } }
@keyframes fx-ring { 0% { transform: scale(0.22); opacity: 0.85; } 100% { transform: scale(1); opacity: 0; } }
@keyframes fx-flow { to { stroke-dashoffset: -306; } }
/* 流れ星（線は main.js が足す） */
#heroStars line { stroke: url(#starGrad); stroke-width: 1.6; stroke-linecap: round; }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 8, 0.9) 0%, rgba(7, 8, 8, 0.5) 34%, rgba(7, 8, 8, 0.08) 72%),
    linear-gradient(0deg, rgba(7, 8, 8, 1) 8%, rgba(7, 8, 8, 0.55) 30%, rgba(7, 8, 8, 0) 58%),
    linear-gradient(180deg, rgba(7, 8, 8, 0.75) 0%, rgba(7, 8, 8, 0) 24%);
}

.hero__body { position: relative; }

.hero__lead {
  font-size: clamp(1.05rem, 1.9vw, 1.7rem);
  line-height: 1.7;
  letter-spacing: 0.08em;
  margin-bottom: clamp(12px, 2vw, 28px);
}

.hero__title {
  font-weight: 300;
  font-size: clamp(7rem, 26vw, 24rem);
  line-height: 1;
  letter-spacing: -0.055em;
  margin-left: -0.05em;
  padding-bottom: 0.06em;
}
.hero__title .m { padding-bottom: 0.04em; }

.hero__foot { position: relative; margin-top: clamp(22px, 4vw, 54px); }

.hero__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}

.hero__scroll { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); }
.hero__scroll i {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.hero__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ac);
  transform: translateX(-101%);
  animation: scroll-line 3.2s var(--ease) infinite;
}
@keyframes scroll-line {
  0% { transform: translateX(-101%); }
  55% { transform: translateX(0); }
  100% { transform: translateX(101%); }
}

/* ---------- 自己紹介 ---------- */

.about { overflow: hidden; padding-bottom: clamp(60px, 9vh, 110px); }

.panel--d {
  top: 8%;
  right: -6%;
  width: clamp(200px, 30vw, 520px);
  aspect-ratio: 4 / 5;
}

.about__grid {
  position: relative;
  display: grid;
  /* 左の大きな文字（文字の幅ぴったり）のすぐ右に説明文を置き、2つをひとかたまりで中央に置く */
  grid-template-columns: max-content minmax(0, 36em);
  justify-content: center;
  gap: clamp(32px, 5vw, 96px);
  align-items: end;
}

.about__text { display: grid; gap: 1.6em; max-width: 30em; color: var(--mute); font-size: clamp(1rem, 1.1vw, 1.75rem); word-break: auto-phrase; }

/* 写真：6枚を3つの列に並べる（重ねない）。左右の列は同じ高さ、真ん中の列だけ少し下げる */
.photos {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 44px);
  align-items: start;
  margin-top: clamp(90px, 14vw, 220px);
}
.photos__col { display: grid; gap: clamp(14px, 2.4vw, 44px); min-width: 0; }
.photos__col--mid { margin-top: clamp(28px, 5vw, 96px); }

.photo { position: relative; will-change: transform, opacity; }
.photo--1 { aspect-ratio: 4 / 5; }
.photo--4 { aspect-ratio: 1 / 1; }
.photo--2 { aspect-ratio: 3 / 4; perspective: 1400px; }
.photo--5 { aspect-ratio: 12 / 11; }
.photo--3 { aspect-ratio: 1 / 1; }
.photo--6 { aspect-ratio: 4 / 5; }

.photo__inner { position: absolute; inset: 0; }
/* 収まる瞬間に、縁を走る細い光（main.js が足して動かす） */
.photo__edge { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.photo__edge rect {
  x: 0.75px;
  y: 0.75px;
  width: calc(100% - 1.5px);
  height: calc(100% - 1.5px);
  fill: none;
  stroke: var(--ac);
  stroke-width: 1.5;
  stroke-dasharray: 0.22 0.78;
  stroke-dashoffset: 1;
  opacity: 0;
}
.photo--flip .photo__inner { transform-style: preserve-3d; }
.photo__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.photo__face--back { transform: rotateY(180deg); }

/* 仮の画像 */
.ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(to top right, transparent calc(50% - 0.5px), rgba(243, 245, 244, 0.07) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(160deg, #161b1a 0%, #0b0d0d 70%);
}
.ph span { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); }
.ph--2 { background: linear-gradient(200deg, #1b2221 0%, #0b0d0d 75%); }
.ph--3 {
  background:
    radial-gradient(circle at 70% 30%, rgba(243, 245, 244, 0.08), transparent 55%),
    linear-gradient(160deg, #131716 0%, #0a0c0c 70%);
}
.ph--back {
  border-color: var(--ac);
  background:
    radial-gradient(circle at 50% 38%, rgba(31, 214, 196, 0.28), transparent 60%),
    linear-gradient(180deg, #0c1615 0%, #080a0a 80%);
}
.ph--back span { color: var(--ac); }

/* ---------- できること ---------- */

/* 見出しと一覧をひとかたまりにして中央に置く（左右の空きを広げすぎない） */
.service > .h-xl, .service__list { width: min(100%, max(63vw, 900px)); margin-left: auto; margin-right: auto; }
.service { padding-top: clamp(80px, 12vh, 150px); }
.service__list { margin-top: clamp(56px, 8vw, 120px); }

.service__row {
  display: grid;
  /* タイトルの列は、いちばん長い名前が入る幅まで。説明をタイトルのすぐ右に寄せる */
  grid-template-columns: max(4rem, 4.7vw) max(170px, 21.5vw) minmax(0, 1fr);
  gap: max(16px, 2.5vw);
  /* 番号・タイトル・説明を、行の縦の中央でそろえる */
  align-items: center;
  padding: clamp(28px, 4.4vw, 62px) 0;
}

.service__no { font-size: 12px; letter-spacing: 0.2em; color: var(--ac); }

.service__name {
  font-weight: 300;
  font-size: max(1.9rem, 4.6vw);
  white-space: nowrap;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.service__name small {
  display: block;
  margin-top: 0.9em;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--mute);
}

/* 説明は1行に収まる幅にする。狭い画面で折り返すときは、言葉の切れ目で折る */
.service__desc { color: var(--mute); max-width: 31em; font-size: max(1rem, 1.15vw); word-break: auto-phrase; text-wrap: pretty; }

/* ---------- サンプル作品（トンネル） ---------- */

.works {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #050606;
}

.works__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.works__ui {
  position: absolute;
  inset: 0;
  padding: 96px var(--pad) 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
/* 文字の後ろをうっすら暗くして読みやすくする */
.works__ui::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 6, 6, 0.6) 0%, rgba(5, 6, 6, 0) 26%, rgba(5, 6, 6, 0) 68%, rgba(5, 6, 6, 0.7) 100%);
}
.works__ui > * { position: relative; }

.works__title {
  margin-top: 14px;
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.works__info { padding-bottom: 26px; }

.works__num {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.works__num span:first-child { color: var(--ac); }
.works__num i { display: block; width: 40px; height: 1px; background: var(--line); }

.works__name {
  margin-top: 10px;
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.works__cat { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mute); }

.works__bar {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: 30px;
  height: 1px;
  background: var(--line);
}
.works__bar span {
  position: absolute;
  inset: 0;
  background: var(--ac);
  transform: scaleX(0);
  transform-origin: left center;
}

/* 作品の一覧：ふだんは読み上げ用だけ。立体が使えないときは、これを見せる */
.works__list {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.works--static { height: auto; padding: var(--sec) var(--pad); background: var(--bg); }
.works--static .works__canvas,
.works--static .works__info,
.works--static .works__bar,
.works--static .works__ui::before { display: none; }
.works--static .works__ui { position: static; padding: 0; display: block; }
.works--static .works__list {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(14px, 2.4vw, 36px);
  margin-top: clamp(48px, 7vw, 100px);
}
.works--static .works__list li {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #121716 0%, #090b0b 70%);
}
.works--static .works__list li::before {
  content: attr(data-no);
  position: absolute;
  top: 16px;
  left: 20px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ac);
}
.works--static .works__list h3 { font-weight: 300; font-size: 1.4rem; line-height: 1.3; }
.works--static .works__list p { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); }

/* ---------- 制作の流れ ---------- */

.flow__grid {
  --flow-gap: clamp(40px, 7vw, 140px);
  display: grid;
  /* 見出し・線の絵・4つのステップをひとかたまりにして、左右の中央に置く */
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  width: min(100%, 82vw);
  margin-inline: auto;
  gap: var(--flow-gap);
  align-items: start;
}

.flow__body { position: relative; padding-left: clamp(28px, 4vw, 64px); }

.flow__track {
  position: absolute;
  top: 0.9em;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--line);
}
.flow__fill {
  position: absolute;
  inset: 0;
  background: var(--ac);
  transform: scaleY(0);
  transform-origin: center top;
}

.flow__step { position: relative; padding-bottom: clamp(52px, 8vw, 120px); }
.flow__step:last-child { padding-bottom: 0; }

/* 文字は、画面の幅に合わせて同じ割合で大きくする（縦横の比率はそのまま） */
.flow .h-xl { font-size: clamp(2.2rem, 5.6vw, 7.4rem); }
.flow__no { display: block; font-size: clamp(12px, 0.75vw, 19px); letter-spacing: 0.2em; color: var(--ac); }

.flow__step h3 {
  margin: 10px 0 14px;
  font-weight: 300;
  font-size: clamp(1.9rem, 3.5vw, 5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.flow__step h3 small {
  display: block;
  margin-top: 0.9em;
  font-size: clamp(12px, 0.75vw, 19px);
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--mute);
}
.flow__step p { color: var(--mute); max-width: 26em; font-size: clamp(1rem, 1.1vw, 1.75rem); word-break: auto-phrase; }

/* 線で描いていく絵 → 色のついたバナー */
.flow__side {
  position: sticky;
  top: clamp(90px, 13vh, 150px);
  display: grid;
  gap: clamp(36px, 4.5vw, 80px);
  min-width: 0;
}
.sketch { width: 100%; margin: 0; }
.sketch__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(7, 8, 8, 0.6);
}
.sketch__img, .sketch__svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.sketch__img { object-fit: cover; }
.sketch__art { position: absolute; inset: 0; }
html:not(.js) .sketch__svg { display: none; }

/* ---------- 絵の上に重ねる動き（自己紹介の PHOTO 01・06 と、制作の流れの絵） ---------- */

/* 画像・重ねる動き（SVG）・雨（キャンバス）を同じ枠にぴったり重ねる。枠ごと動かすので、絵とずれない */
.scene__art { position: absolute; inset: 0; }
.scene__art img, .scene__fx, .scene__rain { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.scene__art img { object-fit: cover; }
.scene__fx, .scene__rain { pointer-events: none; }
/* PHOTO の中に入れたときは、仮の絵と同じ細い線のふちを付ける */
.photo .scene__art { overflow: hidden; border: 1px solid var(--line); background: #05070a; }

/* 重ねる光（main.js が絵の中の位置に置く）。重ね合わせ（mix-blend）は使わず、ふちがぼけた薄い光を上に置く */
.sfx { transform-box: fill-box; transform-origin: center; }
.sfx-pulse { animation: sfx-pulse var(--d, 4s) ease-in-out var(--delay, 0s) infinite; }
.sfx-slow { animation: sfx-pulse var(--d, 9s) ease-in-out var(--delay, 0s) infinite; }
.sfx-flick { animation: sfx-flick var(--d, 7s) linear var(--delay, 0s) infinite; }
.sfx-twinkle { animation: sfx-twinkle var(--d, 3s) ease-in-out var(--delay, 0s) infinite; }
.sfx-win { animation: sfx-win var(--d, 9s) linear var(--delay, 0s) infinite; }
.sfx-wave { animation: sfx-wave 5.2s ease-in-out var(--delay, 0s) infinite; }
.sfx-sway { transform-origin: 50% 0; animation: sfx-sway var(--d, 4s) ease-in-out var(--delay, 0s) infinite; }
.sfx-hue-a { animation: sfx-hue 14s ease-in-out var(--delay, 0s) infinite; }
.sfx-hue-b { animation: sfx-hue 14s ease-in-out calc(var(--delay, 0s) - 7s) infinite; }
.sfx-sweep { transform-origin: 0 0; animation: sfx-sweep 17s linear var(--delay, 0s) infinite; }
.sfx-steam { animation: sfx-steam var(--d, 5s) ease-out var(--delay, 0s) infinite; }
.sfx-moon { animation: sfx-moon 8s ease-in-out infinite; }
.sfx-shimmer { animation: sfx-shimmer var(--d, 4s) ease-in-out var(--delay, 0s) infinite; }
@keyframes sfx-pulse { 0%, 100% { opacity: 0.12; } 50% { opacity: 1; } }
@keyframes sfx-flick { 0%, 90%, 92.4%, 95%, 100% { opacity: 0; } 91%, 93.6% { opacity: 1; } }
@keyframes sfx-twinkle { 0%, 100% { opacity: 0.1; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.25); } }
@keyframes sfx-win { 0%, 48% { opacity: 0; } 52%, 96% { opacity: 0.9; } 100% { opacity: 0; } }
@keyframes sfx-wave { 0%, 62%, 100% { opacity: 0.08; } 78% { opacity: 1; } }
@keyframes sfx-sway { 0%, 100% { transform: rotate(-3deg); opacity: 0.55; } 50% { transform: rotate(3deg); opacity: 0.95; } }
@keyframes sfx-hue { 0%, 100% { opacity: 0; } 50% { opacity: 0.95; } }
@keyframes sfx-sweep { 0%, 76% { transform: translateX(0) skewX(-18deg); opacity: 0; } 78% { opacity: 1; } 98% { opacity: 1; } 100% { transform: translateX(2800px) skewX(-18deg); opacity: 0; } }
@keyframes sfx-steam { 0% { transform: translateY(8px); opacity: 0; } 35% { opacity: 0.6; } 100% { transform: translateY(-46px); opacity: 0; } }
@keyframes sfx-moon { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.8; } }
@keyframes sfx-shimmer { 0%, 100% { opacity: 0.08; transform: scaleX(0.86); } 50% { opacity: 0.6; transform: scaleX(1.12); } }
/* 画面に出ていないあいだは、重ねた動きを止める */
.fxbox.is-off .sfx { animation-play-state: paused; }
.sk { stroke: rgba(243, 245, 244, 0.82); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.sk > * { vector-effect: non-scaling-stroke; }
.sk--ac { stroke: var(--ac); }
.sketch__cap { margin-top: 16px; }

/* ---------- ひとこと ---------- */

/* 高さは「フレーズ＋上下に同じ空き」だけにする（画面1枚ぶんには広げない）。フレーズは区切りの縦の中央 */
.words {
  --words-pad: clamp(110px, 16vh, 200px);
  padding-top: var(--words-pad);
  padding-bottom: var(--words-pad);
  overflow: hidden;
}
/* ラベルはフレーズのすぐ上に置く（空きの計算に入れない） */
.words .label { position: absolute; top: calc(var(--words-pad) - 52px); left: var(--pad); }
/* 前後の区切りとの間の余白は、上下で同じにする */
.flow { padding-bottom: clamp(70px, 10vh, 130px); }
.contact { padding-top: clamp(70px, 10vh, 130px); }

/* 四角は、画面の真ん中あたりから右の余白の手前まで広げる（真ん中にも右にも空きを作らない） */
.panel--e {
  top: 13%;
  bottom: 13%;
  left: 47%;
  right: var(--pad);
  background: linear-gradient(0deg, var(--ac-soft), rgba(31, 214, 196, 0) 60%);
}

.words__ring {
  position: absolute;
  left: -14%;
  bottom: -30%;
  width: clamp(360px, 52vw, 900px);
  height: auto;
  opacity: 0.45;
}

.words__text { position: relative; }

.words__text {
  font-size: clamp(2.2rem, 7.4vw, 7.4rem);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

/* ---------- 連絡先 ---------- */

.contact { padding-bottom: clamp(90px, 14vh, 180px); }

.contact__lead { margin-top: clamp(22px, 3vw, 44px); color: var(--mute); }

.contact__action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  margin-top: clamp(40px, 6vw, 84px);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(20px, 2.2vw, 30px) clamp(28px, 3.4vw, 48px);
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  letter-spacing: 0.12em;
  overflow: hidden;
  transition: color var(--slow) var(--ease), border-color var(--slow) var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ac);
  transform: translateY(101%);
  transition: transform var(--slow) var(--ease);
}
.btn > * { position: relative; }
.btn:hover, .btn:focus-visible { color: #041211; border-color: var(--ac); }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }

.btn__arrow {
  width: clamp(34px, 4vw, 56px);
  height: 1px;
  background: currentColor;
  position: relative;
  transition: transform var(--slow) var(--ease);
}
.btn__arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.btn:hover .btn__arrow, .btn:focus-visible .btn__arrow { transform: translateX(8px); }

.contact__note { font-size: 12px; letter-spacing: 0.14em; color: var(--mute); }

/* ---------- フッター ---------- */

.site-foot { padding: 0 var(--pad) 30px; }
.site-foot__row {
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}
.site-foot a { transition: color var(--slow) var(--ease); }
.site-foot a:hover { color: var(--ac); }

/* ---------- スマホ・タブレット ---------- */

@media (max-width: 820px) {
  body { line-height: 1.85; }

  .site-head { padding: 16px var(--pad); }

  .hero { padding-top: 96px; padding-bottom: 22px; }
  .aura span:nth-child(3) { display: none; }
  .sketch__frame { aspect-ratio: 4 / 3; }
  .flow__side { position: static; }
  .flow__grid, .service > .h-xl, .service__list { width: 100%; }
  /* 写真：左と真ん中の列を横に並べ、右の列はその下に2枚を横に並べる */
  .photos { grid-template-columns: 1fr 1fr; }
  .photos__col--mid { margin-top: 12vw; }
  .photos__col:last-child { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; align-items: start; }
  .photo--6 { aspect-ratio: 1 / 1; }
  .hero__art { --ox: 58%; --oy: 40%; }
  .hero__media::after {
    background:
      linear-gradient(0deg, rgba(7, 8, 8, 1) 10%, rgba(7, 8, 8, 0.7) 38%, rgba(7, 8, 8, 0.15) 70%),
      linear-gradient(180deg, rgba(7, 8, 8, 0.75) 0%, rgba(7, 8, 8, 0) 22%);
  }
  .hero__meta { flex-wrap: wrap; font-size: 10px; letter-spacing: 0.16em; }
  .hero__meta li:nth-child(2) { display: none; }

  .about__grid, .flow__grid { grid-template-columns: 1fr; }
  .panel--d { top: 4%; right: -14%; width: 52vw; }


  .service__row { grid-template-columns: 2.6rem 1fr; }
  .service__desc { grid-column: 2; }

  .works__ui { padding-top: 78px; padding-bottom: 28px; }
  .works__bar { bottom: 24px; }

  .panel--e { top: 12%; bottom: 12%; left: 44%; right: -6%; }
  .words__ring { left: -40%; bottom: -12%; width: 110vw; }

  .btn { width: 100%; justify-content: space-between; }
  .contact__note { width: 100%; }
}

/* 動きを減らす設定の人には、動きを止める */
@media (prefers-reduced-motion: reduce) {
  .hero__scroll i::after { animation: none; }
  .aura span { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
