/* ページごとの部品 */

/* ---------- トップ:イントロ+ファーストビュー ---------- */
/* 背景の canvas は画面に貼り付いたまま(sticky)、その上をイントロとファーストビューが流れる */
.stage { position: relative; overflow: clip; }
#wave {
  position: sticky; top: 0; display: block; width: 100%;
  height: 100vh; margin-bottom: -100vh;
  height: 100svh; margin-bottom: -100svh;
}
.stage.no-gl { background:
  radial-gradient(60% 90% at 30% 20%, color-mix(in srgb, var(--neon) 16%, transparent), transparent 70%),
  radial-gradient(50% 80% at 76% 30%, color-mix(in srgb, var(--neon) 10%, transparent), transparent 70%), var(--bg); }

/* イントロ(ロゴだけの画面)。JS が有効なときだけ現れる */
.intro { display: none; }
.intro-on .intro { display: block; position: relative; height: 100vh; height: 100svh; }
/* JS が動く前の最初の一瞬も、ロゴを画面中央に大きく置いておく */
.intro-on .mark { top: 50vh; width: min(62vw, 56vh, 520px); animation: mark-in 1.6s ease both; }
@keyframes mark-in { from { opacity: 0; scale: .94; } to { opacity: 1; scale: 1; } }

/* ファーストビューは画面いっぱい。背景の canvas とぴったり重なる */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .wrap { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 28px; pointer-events: none; }
/* SFSG の文字:ふだんは銀一色。カーソルが重なった部分だけ、ロゴと同じメタリックな青の質感に変わる
   (位置は js/nav.js が --mx / --my に入れる) */
.hero h1 {
  position: relative; margin: 0 0 0 -0.02em; font-family: var(--poster); font-weight: 400;
  font-size: clamp(120px, 27vw, 400px); line-height: 1; letter-spacing: 0.005em;
}
.hero h1 span { display: block; -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-base { background-image: linear-gradient(180deg, var(--silver-hi) 8%, var(--silver) 46%, var(--silver-lo) 96%); }
.h-chrome {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(118deg,
    #F4FAFF 0, #7FB6FF 26px, #2F62C8 52px, #DDF0FF 74px, #FFFFFF 92px, #8D9BEA 120px,
    #3B6FD6 150px, #BFE6FF 178px, #F4FAFF 204px, #5E97EC 232px, #F4FAFF 260px);
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--neon) 45%, transparent));
  -webkit-mask-image: radial-gradient(circle var(--r, 120px) at var(--mx, -999px) var(--my, -999px), #000 45%, transparent 100%);
          mask-image: radial-gradient(circle var(--r, 120px) at var(--mx, -999px) var(--my, -999px), #000 45%, transparent 100%);
}
.hero-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 48px; }
.hero-copy { font-size: clamp(17px, 2.1vw, 26px); letter-spacing: 0.14em; color: var(--silver-hi); line-height: 1.7; }
.scroll { position: absolute; z-index: 2; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll i { display: block; width: 1px; height: 44px; background: linear-gradient(var(--ray), transparent); }

/* ---------- About ---------- */
.statement .label { margin-bottom: 40px; }
.statement .lead { font-size: clamp(22px, 3.5vw, 44px); line-height: 1.75; letter-spacing: 0.06em; color: var(--silver-hi); }
.statement .sub { margin-top: 44px; max-width: 34em; line-height: 2.1; }

/* ---------- 事業の柱 ---------- */
.pillars { border-top: 1px solid var(--line); }
.pillar { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px 64px; padding-block: clamp(48px, 7vw, 96px); border-bottom: 1px solid var(--line); }
.pillar h2, .pillar h3 {
  margin: 12px 0 0; font-family: var(--display); font-weight: 500;
  font-size: clamp(30px, 4.6vw, 60px); line-height: 1.1; letter-spacing: -0.02em; color: var(--silver-hi);
}
.pillar p { max-width: 32em; }
.tags { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { border: 1px solid var(--line); border-radius: 99px; padding: 3px 16px; font-size: 12px; }
.pillars + .more { margin-top: 56px; }

/* 事業内容ページ:項目の一覧 */
.items { margin: 40px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.items li { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); gap: 4px 24px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.items strong { font-weight: 400; color: var(--silver-hi); }
.items span { font-size: 13px; line-height: 1.9; }

/* 制作の流れ(順序に意味があるので番号を付ける) */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px 24px; counter-reset: flow; }
.flow li { counter-increment: flow; border-top: 1px solid var(--line); padding-top: 20px; }
.flow li::before { content: "0" counter(flow); font-family: var(--display); font-size: 12px; letter-spacing: 0.2em; color: var(--neon); }
.flow strong { display: block; margin-top: 10px; font-weight: 400; font-size: 17px; color: var(--silver-hi); }
.flow span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.9; }

/* ---------- 実績 ---------- */
.works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; }
.works-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px 40px; }
.thumb { aspect-ratio: 4 / 5; background: var(--bg-raise); position: relative; overflow: hidden; }
.works-grid.two .thumb { aspect-ratio: 16 / 10; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
/* 写真が入るまでの仮サムネイル */
.thumb::before { content: ""; position: absolute; inset: -20%; background: repeating-linear-gradient(var(--a, 100deg), transparent 0 13px, var(--line) 13px 14px); }
.thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--px, 30%) var(--py, 70%), var(--neon), transparent 46%); opacity: .34; transition: opacity .4s; }
.work:hover .thumb::after { opacity: .6; }
.work .meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.work h3 { margin: 6px 0 0; font-size: 16px; font-weight: 400; line-height: 1.7; color: var(--silver-hi); }
.work .fig { margin-top: 4px; font-size: 13px; color: var(--silver-lo); }
.note { margin-top: 40px; font-size: 12px; color: var(--silver-lo); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(40px, 6vw, 72px); }
.filters button {
  background: none; border: 1px solid var(--line); border-radius: 99px; padding: 4px 20px; cursor: pointer;
  color: var(--silver); font-family: var(--body); font-size: 13px; letter-spacing: 0.06em; line-height: 2; transition: border-color .25s, color .25s;
}
.filters button:hover { border-color: var(--silver-lo); }
.filters button[aria-pressed="true"] { border-color: var(--neon); color: var(--silver-hi); }

/* ---------- CTA ---------- */
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: clamp(36px, 6vw, 80px) clamp(24px, 5vw, 64px); border: 1px solid var(--line); transition: background .3s; }
.cta:hover { background: var(--bg-raise); }
.cta strong { font-size: clamp(22px, 3vw, 34px); font-weight: 400; line-height: 1.5; letter-spacing: 0.06em; color: var(--silver-hi); }
.cta p { max-width: 26em; }
.cta .btn { margin-top: 16px; }

/* ---------- お問い合わせ ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px 80px; }
.contact aside p + p { margin-top: 20px; }
.form { display: grid; gap: 36px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; color: var(--silver-hi); }
.field label small { margin-left: 10px; font-size: 11px; color: var(--ray); }
.field input, .field select, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 10px 0; color: var(--silver-hi); font: inherit; letter-spacing: 0.04em; transition: border-color .25s;
}
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background: linear-gradient(45deg, transparent 50%, var(--silver-lo) 50%) right 6px center / 6px 6px no-repeat,
              linear-gradient(-45deg, transparent 50%, var(--silver-lo) 50%) right 0 center / 6px 6px no-repeat; }
.field select option { background: var(--bg-raise); color: var(--silver-hi); }
.field textarea { min-height: 9em; resize: vertical; line-height: 1.9; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--neon); outline: none; }
.form .btn { justify-self: start; }
.form-msg { font-size: 13px; color: var(--silver-hi); border-left: 1px solid var(--ray); padding-left: 16px; }
.form-msg span { user-select: all; color: var(--neon); }

@media (max-width: 900px) {
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .pillar, .contact { grid-template-columns: minmax(0, 1fr); }
  .works-grid, .works-grid.two { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .thumb, .works-grid.two .thumb { aspect-ratio: 4 / 3; }
  .hero-row { flex-direction: column; align-items: flex-start; }
  .items li { grid-template-columns: minmax(0, 1fr); }
}
