/* 株式会社ライズ コーポレートサイト
   主軸の参考: MotionSites「Ascend」（淡いスタジオ光・ガラスのリブ・朱色1色）
   補助: Refero ThoughtLab（大きく締まった見出し・色は1つ）／ Active Theory・Lusion（抽象3Dを主役にした空間）
   背景の3D（assets/js/scene.js）はスクロールで形と明暗が変わる。文字色はその明暗（html[data-theme]）に合わせる。 */

:root {
  --bg: #e9ebf0;
  --ink: #0e0f12;
  --ink-2: #4b4f58;
  --ink-3: #6f747e;
  --hair: rgba(14, 15, 18, 0.14);
  --glass: rgba(255, 255, 255, 0.52);
  --glass-line: rgba(255, 255, 255, 0.78);
  --glass-hi: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 30px 80px -40px rgba(20, 24, 33, 0.35);
  --chip: rgba(255, 255, 255, 0.72);
  --ember: #d93f0b;
  --ember-hover: #c63607;

  --font: "RISE Sans", system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  --e-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --e-quint: cubic-bezier(0.23, 1, 0.32, 1);
  --e-settle: cubic-bezier(0.2, 0.85, 0.3, 1);
  --gutter: clamp(20px, 5.4vw, 72px);
  --header-h: 64px;
  --max: 1440px;
  --theme-t: 0.9s;
  /* PC の大見出しの大きさ（ヒーローと各セクションの見出しで共通） */
  --display-pc: clamp(48px, 4.2vw, 72px);
}

html.gl[data-theme="dark"],
html:not(.gl) .sec-dark {
  --bg: #0b0c0f;
  --ink: #f1f2f4;
  --ink-2: #aeb3bc;
  --ink-3: #868b95;
  --hair: rgba(255, 255, 255, 0.14);
  --glass: rgba(20, 22, 28, 0.46);
  --glass-line: rgba(255, 255, 255, 0.12);
  --glass-hi: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
  --chip: rgba(255, 255, 255, 0.1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
  /* タップしたときに出る灰色の四角（チラつき）を出さない（オーナー指示・全サイト必須） */
  -webkit-tap-highlight-color: transparent;
  /* 背景の色（明暗の切り替えに合わせて変わる） */
  background: var(--bg);
  /* 上下の端でさらに引っぱったときの跳ね返りを止める。3D は画面に固定なので、跳ね返るとフッターの下に3Dの灰色が見えてしまう（2026-10-14 オーナー指摘） */
  overscroll-behavior-y: none;
  color: var(--ink);
  transition: background-color var(--theme-t) ease, color var(--theme-t) ease;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
::selection { background: rgba(120, 132, 152, 0.3); color: inherit; }

:where(p, dt, dd, li, small, h1, h2, h3, .eyebrow, .site-nav a, .ft-nav a) {
  transition: color var(--theme-t) ease;
}

/* リンク・ボタン：タップの強調を出さない／長押しで枠やプレビューを出さない
   iPhone は長押しでリンクを「持ち上げて」ドラッグの準備をし、後ろに白い四角が一瞬出るので、ドラッグもさせない */
a, button, [role="button"] {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
a, img, svg {
  -webkit-user-drag: none;
}
/* ヘッダー・メニュー・フッターのリンクとボタンは、長押しで文字が選ばれて色が付くこともない */
.site-header, .menu, .ft-nav, .brand, .btn, .head-cta, .menu-btn, .scroll-cue {
  -webkit-user-select: none;
  user-select: none;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}
/* ページ内の移動で見出しにカーソルを合わせたとき（読み上げのため）、枠は出さない */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible { outline: none; }

[data-bx] {
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}
/* 左揃えの本文：1文ごとに改行し、文節の切れ目でだけ折る（tools/build.mjs が <br class="sb"> と <wbr> を入れる） */
[data-bx="prose"] {
  text-wrap: pretty;
}
/* 句のまとまり：行に入りきらないときは句ごと次の行へ送る（＝「、」の所で折れる） */
[data-bx="prose"] .cl { display: inline-block; max-width: 100%; }
.nw { white-space: nowrap; }

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: none; }

/* ---------- ローディング（トップだけ。JS が無い・動きを減らす設定では出さない） ----------
   地平線が中心から伸び、その上に RISE が1文字ずつ昇る（線の下に朱色の光＝日の出）。
   線が光ったら、画面が線を境に上下へ割れて開く。 */
.loader { display: none; }
html.ld body { opacity: 1 !important; transition: none !important; }
html.ld .loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: block;
  color: #f1f2f4;
}
.ld-half {
  position: absolute;
  left: 0;
  right: 0;
  height: calc(50% + 1px);
  background: #0b0c0f;
  overflow: hidden;
  will-change: transform;
}
.ld-top { top: 0; }
.ld-bot { bottom: 0; }
.loader-logo {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 2.2vh, 22px);
  width: clamp(124px, 26vw, 196px);
  aspect-ratio: 516 / 106;
  transform: translateX(-50%);
  overflow: hidden;
}
.loader-logo .lt { position: absolute; inset: 0; }
.loader-logo .lt svg { display: block; width: 100%; height: 100%; }
.loader-logo .lt {
  transform: translateY(125%);
  animation: ld-rise 0.9s var(--e-expo) calc(0.32s + var(--i) * 0.08s) both;
}
.ld-horizon {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  margin-top: -0.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55) 22%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0.55) 78%, transparent);
  transform: scaleX(0);
  animation: ld-line 0.75s cubic-bezier(0.65, 0, 0.35, 1) 0.05s both;
}
/* 日の出：地平線の下にほのかに広がる朱色の光 */
.ld-glow {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(120vw, 1100px);
  height: min(46vh, 380px);
  transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 106, 32, 0.34), rgba(255, 106, 32, 0.08) 45%, transparent 70%);
  opacity: 0;
  animation: ld-glow 1.2s ease-out 0.35s both;
}
html.ld-quick .ld-horizon,
html.ld-quick .loader-logo .lt,
html.ld-quick .ld-glow { animation: none; opacity: 1; }
html.ld-quick .loader-logo .lt { transform: none; }
html.ld-quick .ld-horizon { transform: scaleX(1); }
@keyframes ld-rise { from { transform: translateY(125%); } to { transform: none; } }
@keyframes ld-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ld-glow { from { opacity: 0; } to { opacity: 1; } }

/* 線が光る → 上下に割れて開く */
html.ld-ready .ld-horizon { animation: ld-flash 0.4s ease-out both; }
@keyframes ld-flash {
  0% { transform: scaleX(1); filter: none; }
  40% { transform: scaleX(1); filter: brightness(2) drop-shadow(0 0 6px rgba(255, 140, 80, 0.9)); }
  100% { transform: scaleX(1); filter: none; }
}
html.ld-exit .loader { pointer-events: none; }
html.ld-exit .ld-top { animation: ld-open-up 1s cubic-bezier(0.76, 0, 0.24, 1) both; }
html.ld-exit .ld-bot { animation: ld-open-down 1s cubic-bezier(0.76, 0, 0.24, 1) both; }
html.ld-exit .ld-horizon { animation: ld-fade 0.35s ease-out both; }
html.ld-exit .loader-logo .lt { transform: none; animation: ld-out 0.6s cubic-bezier(0.55, 0, 0.75, 0) calc(var(--i) * 0.035s) both; }
@keyframes ld-open-up { from { transform: none; } to { transform: translateY(-101%); } }
@keyframes ld-open-down { from { transform: none; } to { transform: translateY(101%); } }
@keyframes ld-fade { from { opacity: 1; transform: scaleX(1); } to { opacity: 0; transform: scaleX(1.08); } }
@keyframes ld-out { from { transform: none; opacity: 1; } to { transform: translateY(-60%); opacity: 0; } }

/* ---------- 3D の舞台（全ページ共通の固定レイヤー） ---------- */
.stage {
  position: fixed;
  inset: 0 0 auto 0;
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}
.stage.is-ready .stage-canvas { opacity: 1; }
/* 3D の準備が終わるまで表示しない（最大2.5秒。head のスクリプトで必ず外れる） */
html.gl-wait body { opacity: 0 !important; }
html:not(.gl) .stage-canvas { display: none; }
.stage-veil {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  transition: background-color var(--theme-t) ease;
}
.stage-grain {
  position: absolute;
  inset: -50%;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.6 -0.3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

main, .site-footer { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* JS や WebGL が使えないときは、各セクションが自分の背景を持つ */
html:not(.gl) .sec-dark { background: var(--bg); color: var(--ink); }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  height: calc(var(--header-h) + env(safe-area-inset-top));
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(233, 235, 240, 0.6);
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--hair);
  opacity: 0;
  transition: opacity 0.5s ease, background-color var(--theme-t) ease, border-color var(--theme-t) ease;
}
html.is-scrolled .site-header::before { opacity: 1; }

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
  color: var(--ink);
  transition: color var(--theme-t) ease, opacity 0.25s ease;
}

.wordmark { height: 15px; width: auto; aspect-ratio: 516 / 106; }

.site-nav { display: none; }
.head-cta { display: none; }

.menu-btn {
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -6px;
  border: 0;
  border-radius: 12px;
  background: var(--chip);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--theme-t) ease, color var(--theme-t) ease;
}
.menu-btn span {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1.6px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.35s var(--e-quint);
}
.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { top: 24px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 25;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 8px) var(--gutter) 28px;
  background: rgba(233, 235, 240, 0.86);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--hair);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.4s var(--e-quint);
}
.menu.is-open { opacity: 1; transform: none; }
.menu[hidden] { display: none; }
.menu-nav { display: grid; }
.menu-nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--hair);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  font-feature-settings: "palt";
}
/* 線は項目と項目の間だけ（いちばん上と下には引かない） */
.menu-nav a:first-child { border-top: 0; }
.menu-nav small { font-size: 12px; font-weight: 500; letter-spacing: 0.16em; color: var(--ink-3); }

/* ---------- 共通の部品 ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow-center { justify-content: center; }

.rule {
  display: block;
  width: min(100%, 520px);
  height: 1px;
  margin: 20px 0 32px;
  background: var(--hair);
  transform-origin: 0 50%;
  transition: background-color var(--theme-t) ease;
}

.h-display {
  font-size: clamp(32px, 9.4vw, 46px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: 0.01em;
  font-feature-settings: "palt";
  text-wrap: balance;
}

.ln {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.rv { display: inline-block; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  height: 56px;
  padding: 0 8px 0 26px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  font-feature-settings: "palt";
  white-space: nowrap;
  transition: transform 0.35s var(--e-settle), background-color 0.3s ease, box-shadow 0.35s ease;
}
.btn-ember {
  background: var(--ember);
  color: #fff;
  box-shadow: 0 18px 40px -18px rgba(217, 63, 11, 0.7);
}

.btn-dot {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: #fff;
  color: var(--ember);
}
.btn-dot svg { width: 12px; height: 12px; transition: transform 0.4s var(--e-settle); }




/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + clamp(24px, 7svh, 72px)) var(--gutter) max(28px, env(safe-area-inset-bottom));
  text-align: center;
}
.hero-head { grid-row: 1; }
.hero-title {
  /* スマホは「ビジネスを、／ワンランク上の／ステージへ。」の3行、タブレット・PC は2行 */
  font-size: clamp(34px, 11.2vw, 64px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-feature-settings: "palt";
}
.hero-sub {
  margin-top: 18px;
  font-size: clamp(16px, 4.5vw, 20px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.06em;
  font-feature-settings: "palt";
}
.hero-foot {
  grid-row: 3;
  display: grid;
  justify-items: center;
  gap: 18px;
}
.hero-lead {
  max-width: 330px;
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-wrap: balance;
}
.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: opacity 0.35s ease;
}
html.is-scrolled .scroll-cue { opacity: 0; pointer-events: none; }
.scroll-line {
  position: relative;
  width: 1px;
  height: 26px;
  overflow: hidden;
  background: var(--hair);
}
.scroll-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 40%;
  background: var(--ink-3);
  animation: scroll-drip 3s var(--e-quint) infinite;
}
@keyframes scroll-drip {
  0% { transform: translateY(-100%); }
  70%, 100% { transform: translateY(260%); }
}

/* スマホ・タブレット：スクロール案内はヒーローの下端に出す */
@media (max-width: 1023px) {
  .scroll-cue {
    position: absolute;
    left: 50%;
    bottom: max(20px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
  }
}

/* ---------- 理念 ---------- */
.philosophy {
  padding: 18vh 0 22vh;
  min-height: 130vh;
  display: flex;
  align-items: center;
}
.ph-col { max-width: 600px; }
.prose { margin-top: 36px; }
.prose p {
  font-size: 16px;
  line-height: 2.05;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-wrap: pretty;
}
.prose p + p { margin-top: 1.5em; }

/* ---------- 事業内容 ---------- */
.business { padding: 16vh 0 4vh; }
.bz-index { display: none; }
.bz-card {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 10vh 0;
}
.bz-panel {
  width: 100%;
  padding: 30px 24px 28px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);
  backdrop-filter: blur(26px) saturate(1.35);
  transition: background-color var(--theme-t) ease, border-color var(--theme-t) ease;
}
.bz-no {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}
.bz-title {
  margin-top: 14px;
  /* 3つとも同じ大きさで1行に収める（いちばん長いタイトルの幅から計算。文言を変えたら測り直す） */
  font-size: min(30px, calc((100vw - 2 * var(--gutter) - 50px) / 10.2));
  white-space: nowrap;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  font-feature-settings: "palt";
  word-break: keep-all;
}
/* 3つの本文は決まった行数（スマホ7・PC/タブレット5）。改行は build が入れる。
   文字の大きさは、いちばん長い行がカードの中に収まるように（--w* は行の長さ・em） */
.bz-panel { container-type: inline-size; }
.bz-body br { display: none; }
.bz-body { white-space: nowrap; }
.bz-body br.b7 { display: inline; }
.bz-body {
  margin-top: 18px;
  font-size: min(15.5px, calc(100cqi / var(--w7, 17)));
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-wrap: pretty;
}
.bz-sub {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}
.tags { margin-top: 10px; display: grid; gap: 2px; }
.tags li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 5px 0;
  font-size: 14.5px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.tags li::before {
  content: "";
  flex: none;
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

/* ---------- 会社概要 ---------- */
.company {
  padding: 18vh 0 22vh;
  min-height: 130vh;
  display: flex;
  align-items: center;
}
.co-col { width: 100%; max-width: 620px; }
.co-table { margin-top: 36px; }
.co-table > div {
  display: grid;
  grid-template-columns: 6.6em 1fr;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--hair);
  transition: border-color var(--theme-t) ease;
}
.co-table > div:last-child { border-bottom: 1px solid var(--hair); }
.co-table dt { font-size: 13px; font-weight: 500; line-height: 1.85; letter-spacing: 0.08em; color: var(--ink-3); }
.co-table dd { font-size: 15.5px; font-weight: 500; line-height: 1.75; letter-spacing: 0.04em; }
.co-table .sep { margin: 0 0.4em; color: var(--ink-3); }
@media (max-width: 719px) {
  .co-table > div { grid-template-columns: 1fr; gap: 4px; padding: 18px 0; }
  .co-table dt { font-size: 12.5px; }
  .co-table dd { font-size: 16px; }
  .company { min-height: 100vh; min-height: 100svh; }
}

/* ---------- お問い合わせ ---------- */
.contact {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 14vh var(--gutter);
  text-align: center;
}
.ct-inner { width: 100%; max-width: 560px; }
@media (min-width: 720px) {
  .ct-inner { max-width: 440px; }
}
.contact .h-display { margin-top: 20px; }
.ct-body { margin-top: 24px; font-size: 16px; line-height: 2; letter-spacing: 0.04em; color: var(--ink-2); }

/* ---------- フッター ---------- */
.site-footer {
  padding: 56px 0 max(28px, env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--bg) 46%);
  transition: background-color var(--theme-t) ease;
}
/* フッターの上の細い線は引かない（2026-10-14 オーナー指示）。余白はそのまま */
.ft-top {
  display: grid;
  gap: 28px;
  padding-top: 32px;
}
.ft-brand { display: grid; gap: 10px; }
.ft-brand .brand { margin-right: 0; justify-self: start; }
.ft-brand p { font-size: 13px; line-height: 1.7; letter-spacing: 0.06em; color: var(--ink-2); }
.ft-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.ft-nav a,
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  transition: opacity 0.25s ease, color var(--theme-t) ease;
}

.ft-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  text-align: center;
  transition: border-color var(--theme-t) ease;
}
.ft-bottom small { font-size: 12px; letter-spacing: 0.04em; color: var(--ink-3); }

/* ---------- 404 ---------- */
.site-header-simple { position: absolute; }
.nf {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  padding: 120px var(--gutter);
  text-align: center;
}
.nf-body { max-width: 420px; color: var(--ink-2); }
.nf .btn { margin-top: 12px; }

/* ---------- スマホ・タブレット ---------- */
/* 会社概要だけ中央にそろえる（理念・事業内容は左そろえのまま。2026-10-14 オーナー指示） */
@media (max-width: 1023px) {
  .company .eyebrow { justify-content: center; }
  .company .rule { width: 56px; margin-left: auto; margin-right: auto; transform-origin: 50% 50%; }
  .company .h-display { text-align: center; }
  .co-col { margin-left: auto; margin-right: auto; }
  .company .co-table > div { grid-template-columns: 1fr; gap: 4px; text-align: center; }
  /* 事業内容は「Webサービス・メディア」と「広告／マーケティング」の2行 */
  .co-table .co-list > .nw:first-child { display: block; }
  .co-table .co-list > .sep:nth-child(2) { display: none; }
  /* ヒーロー：見出しと説明文をひとまとまりにして、下に布を見せる */
  .hero { grid-template-rows: auto auto 1fr; padding-top: calc(var(--header-h) + env(safe-area-inset-top) + clamp(28px, 12svh, 130px)); }
  .hero-foot { grid-row: 2; margin-top: clamp(40px, 6.5svh, 64px); }
}

@media (min-width: 720px) {
  .bz-body br.b7 { display: none; }
  .bz-body br.b5 { display: inline; }
  .bz-body { font-size: min(15.5px, calc(100cqi / var(--w5, 22))); }
}

@media (max-width: 359px) {
  .bz-panel { padding-left: 18px; padding-right: 18px; }
}

/* ---------- タブレット ---------- */
@media (min-width: 720px) {
  :root { --header-h: 76px; }
  .wordmark { height: 16px; }
  /* 2行。長いほうの行（「ワンランク上のステージへ。」約12.6字分の幅）が収まる大きさ */
  .hero-title { font-size: min(calc((100vw - 2 * var(--gutter) - 16px) / 12.8), 80px); }
  /* 「ワンランク上の」「ステージへ。」を同じ行に並べて2行にする */
  .hero-title .ln2, .hero-title .ln3 { display: inline-block; vertical-align: top; }
  .hero-lead { max-width: 480px; font-size: 15.5px; }
  .h-display { font-size: clamp(40px, 5.6vw, 56px); }
  .bz-panel { padding: 44px 44px 40px; border-radius: 26px; }
  .prose p { font-size: 17px; }
  .co-table > div { grid-template-columns: 9em 1fr; padding: 24px 0; }
  .co-table dd { font-size: 16.5px; }
  .ft-top { grid-template-columns: 1fr auto; align-items: end; }
}
/* スマホのフッター：すべて中央 */
@media (max-width: 719px) {
  .ft-top { justify-items: center; text-align: center; }
  .ft-brand { justify-items: center; }
  .ft-brand .brand { justify-self: center; }
  .ft-nav { justify-content: center; }
}

/* ---------- PC ---------- */
@media (min-width: 1024px) {
  .menu-btn, .menu { display: none !important; }
  .site-header { gap: 40px; }
  .site-nav {
    display: flex;
    gap: 36px;
  }
  .head-cta {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 20px;
    border-radius: 10px;
    background: var(--chip);
    border: 1px solid var(--glass-line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    font-feature-settings: "palt";
    transition: transform 0.3s var(--e-settle), background-color var(--theme-t) ease, border-color var(--theme-t) ease;
  }


  .hero { padding-top: calc(var(--header-h) + clamp(48px, 10vh, 120px)); }
  /* PC は2行。大きさは理念の見出し（.h-display）とそろえる（2026-10-14 オーナー指示） */
  .hero-title { font-size: var(--display-pc); line-height: 1.2; }
  /* 説明文を SCROLL の案内から離す */
  .hero-foot { gap: 40px; }
  .hero-sub { margin-top: 22px; font-size: clamp(19px, 1.5vw, 24px); }
  .hero-lead { max-width: 520px; font-size: 16px; }

  .h-display { font-size: var(--display-pc); line-height: 1.2; }
  .philosophy .ph-col { margin-left: clamp(0px, 3vw, 64px); }
  .prose { margin-top: 44px; }

  .bz-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
    gap: 6vw;
  }
  .bz-lead {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    display: flex;
    flex-direction: column;
    padding: calc(var(--header-h) + 10vh) 0 10vh;
  }
  .bz-index {
    display: grid;
    gap: 2px;
    margin-top: auto;
    font-size: 14px;
    letter-spacing: 0.06em;
    color: var(--ink-3);
  }
  .bz-index li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    transition: color 0.5s ease, transform 0.6s var(--e-expo);
  }
  .bz-index li span {
    font-size: 12px;
    letter-spacing: 0.2em;
    width: 2.4em;
  }
  .bz-index li::before {
    content: "";
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.6s var(--e-expo);
  }
  .bz-index[data-active="0"] li:nth-child(1),
  .bz-index[data-active="1"] li:nth-child(2),
  .bz-index[data-active="2"] li:nth-child(3) { color: var(--ink); }
  .bz-index[data-active="0"] li:nth-child(1)::before,
  .bz-index[data-active="1"] li:nth-child(2)::before,
  .bz-index[data-active="2"] li:nth-child(3)::before { width: 28px; }
  .business { padding: 0; }
  .bz-card { padding: 12vh 0; }

  .company .co-col { margin-left: clamp(0px, 3vw, 64px); }
  .co-table { margin-top: 44px; }

  .ft-top { padding-top: 40px; }
}

/* 背の低いPC画面：ヒーローを高さに合わせて詰め、アーチの内側に説明文を収める */
@media (min-width: 1024px) and (max-height: 860px) {
  .hero { padding-top: calc(var(--header-h) + clamp(20px, 6vh, 64px)); }
  .hero-sub { margin-top: 14px; font-size: clamp(17px, 2.6vh, 22px); }
  .hero-lead { font-size: 15px; line-height: 1.85; }
}
@media (min-width: 1024px) and (max-height: 700px) {
  .scroll-cue { display: none; }
}

/* ---------- 登場の動き（最初の一度だけ。終わったらクラスごと消える） ---------- */
html.anim .site-header > *,
html.anim .hero-sub,
html.anim .hero-lead,
html.anim .scroll-cue > * { opacity: 0; }
html.anim .hero-title .rv { transform: translateY(105%); }
.hero-title .rv { white-space: nowrap; }

html.anim-run .site-header > * { animation: lift 0.7s var(--e-quint) 0.8s both; }
html.anim-run .site-header > :nth-child(2) { animation-delay: 0.86s; }
html.anim-run .site-header > :nth-child(3),
html.anim-run .site-header > :nth-child(4) { animation-delay: 0.92s; }
/* 見出しは1行ずつ、見えない線の下からせり上がる（上の行から順に） */
html.anim-run .hero-title .ln1 .rv { animation: rise 1.35s var(--e-expo) 0.3s both; }
html.anim-run .hero-title .ln2 .rv { animation: rise 1.35s var(--e-expo) 0.44s both; }
html.anim-run .hero-title .ln3 .rv { animation: rise 1.35s var(--e-expo) 0.58s both; }
html.anim-run .hero-sub { animation: lift-soft 1.1s var(--e-expo) 0.72s both; }
html.anim-run .hero-lead { animation: lift-soft 1.1s var(--e-expo) 0.86s both; }
/* スクロール案内は中身だけをふわっと出す（本体の不透明度はスクロールで消すために空けておく） */
html.anim-run .scroll-cue > * { animation: fade-in 0.7s ease 2s both; }

@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes lift-soft { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes lift { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

/* スクロールで現れる */
html.sr [data-reveal]:not([data-reveal="lines"]) {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--e-quint) var(--d, 0s), transform 1.2s var(--e-expo) var(--d, 0s), background-color var(--theme-t) ease, border-color var(--theme-t) ease;
}
html.sr .rule[data-reveal] {
  opacity: 1;
  transform: scaleX(0);
  transition: transform 1.4s var(--e-expo) var(--d, 0s), background-color var(--theme-t) ease;
}
html.sr [data-reveal="lines"] .rv {
  transform: translateY(110%);
  transition: transform 1.2s var(--e-expo);
}
html.sr [data-reveal="lines"] .ln:nth-child(2) .rv { transition-delay: 0.09s; }
html.sr [data-reveal].in:not([data-reveal="lines"]) { opacity: 1; transform: none; }
html.sr [data-reveal="lines"].in .rv { transform: none; }
.prose p:nth-child(2) { --d: 0.06s; }
.prose p:nth-child(3) { --d: 0.12s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html.sr [data-reveal], html.sr [data-reveal] .rv, html.anim .hero-title .rv { opacity: 1 !important; transform: none !important; }
  .loader { display: none !important; }
  .scroll-line::after { display: none; }
}

/* ---------- マウスで指したときだけの変化（スマホでは押したあとに残るので付けない） ---------- */
@media (hover: hover) and (pointer: fine) {
  .brand:hover { opacity: 0.6; }
  .btn-ember:hover { background: var(--ember-hover); transform: translateY(-2px); box-shadow: 0 22px 44px -18px rgba(217, 63, 11, 0.8); }
  .btn:hover .btn-dot svg { transform: translateY(2px); }
  .nf .btn:hover .btn-dot svg { transform: translateX(2px); }
  .ft-nav a:hover,
  .site-nav a:hover { opacity: 0.55; }
  .head-cta:hover { transform: translateY(-1px); }
}
