/* =============================================================================
   page.css — 文書全体と、すべてのセクションの背後にある地の面
   html / body、Hero からページ末尾まで途切れずに続く背景（About でネイビー → 青、
   カルチャーの引用の背後は暖色、Services で再び青）、そしてオープニングのロゴ演出の
   固定レイヤー。
   ============================================================================= */

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  scrollbar-gutter: stable;
}

body {
  overflow-x: clip;
  margin: 0;
  background: #fff;
  color: var(--text);
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: fixed;
  left: 20px;
  top: -100px;
  background: #fff;
  padding: 12px;
  z-index: 100;
}

.skip:focus {
  top: 20px;
}

.hero-flow-marker {
  height: 0;
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (min-width:761px) {
  /* デスクトップ用の左右余白。 */
  body.variant-b {
    --gutter: 3.6vw;
  }
}

.page-content {
  position: relative;
  isolation: isolate;
}

.page-content::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 90% 15%,#40b7e980,transparent 58%),linear-gradient(120deg,#1746af,#167bb9 68%,#299fcc);
  opacity: var(--business-tone,0);
}

.page-content > .growth:has(> #culture) {
  background: transparent;
  animation: none;
}

/* Hero、About、カルチャーの導入にまたがる 1 枚の連続した地の面。
   --flow-light（About の導きの光が閃くのに合わせて js/motion.js が設定）で、ネイビーを含まない
   青 → 水色のグラデーションを上に重ねてフェードインさせ、About Activarch 以降はすべて青と
   シアンだけの上に載るようにする。2 つの要素が同じ変数を読むので、継ぎ目に段差が出ない。 */
.hero-about-flow,
.page-content,
.page-ground {
  --page-ground: linear-gradient(180deg,rgb(22 68 175/var(--flow-light,0)),rgb(36 127 202/var(--flow-light,0)) 48%,rgb(64 183 233/var(--flow-light,0))),linear-gradient(90deg,rgb(2 6 24/.34) 0%,rgb(2 6 24/.15) 26%,transparent 52%),radial-gradient(85% 72% at 0% 100%,rgb(2 6 24/.42) 0%,rgb(2 6 24/.14) 44%,transparent 72%),radial-gradient(ellipse at 84% 24%,rgb(22 68 175/.78) 0%,rgb(22 68 175/.34) 38%,transparent 62%),linear-gradient(180deg,var(--c-navy-deep),var(--c-navy) 15%,var(--c-blue) 34%,var(--c-blue-mid) 64%,var(--c-cyan));
}

.hero-about-flow,
.page-content {
  background: var(--page-ground);
  background-attachment: fixed;
  background-size: 100vw 100vh;
  animation: none;
}

/* カルチャーの引用の背後の暖色シーン（--warm-scene、js/motion.js が設定）。全面オレンジで、
   左上は深く、右下に向かって明るいオレンジへ抜ける（以前はそこで水色に変わっていた）。
   漂う動きはさせない。 */
.page-content::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(115deg,var(--c-orange) 0%,#f0670e 28%,#f8852a 52%,#fca452 78%,#fdc07a 100%);
  background-size: 100% 100%;
  animation: none;
  opacity: var(--warm-scene,0);
  /* 切り替わりは 0.3 秒のフェードで（速いスクロールで一気にオレンジになるときもパッと変わらない） */
  transition: opacity .3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .page-content::after {
    transition: none;
  }
}

.page-ground {
  display: none;
}

/* iPhone / iPad の Safari は background-attachment: fixed を無視する。すると上の地の面がページと
   一緒に流れ、100vw × 100vh の 1 枚がページの長さぶん繰り返されて、画面 1 枚ごとに縞が出ていた
   （2026-10-29 実機）。iOS だけ、同じグラデーションをビューポートに固定した層で描き、
   clip-path: inset(0) でそれぞれの範囲に切り抜く（固定の子も切り抜かれる）。
   .page-content 自体は切り抜かない：その ::before / ::after（業務の青・暖色のシーン）は
   範囲の外、フッターの背後にも見えている。地の面は専用の要素（.page-ground）が範囲いっぱいに
   広がって切り抜きを受け持ち、固定の層はその ::before。z-index: -2 で 2 つのシーンより下に敷く。 */
@supports (-webkit-touch-callout: none) {
  .hero-about-flow,
  .page-content {
    background: none;
  }

  .hero-about-flow,
  .page-ground {
    clip-path: inset(0);
  }

  .page-ground {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
  }

  .hero-about-flow::before,
  .page-ground::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--page-ground);
  }
}

html.logo-intro-pending {
  overflow: hidden;
}

/* オープニングのロゴ演出（js/logo-intro.js）。canvas は Hero に対して直接スクリーン合成するので、
   isolation を作る祖先を挟まず <body> の直下に置いたままにすること。 */
.light-intro-logo {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  transition: opacity .45s ease;
}

.light-intro-logo svg {
  display: block;
  overflow: visible;
}

.light-intro-canvas {
  position: fixed;
  inset: 0;
  /* canvas は置換要素なので、inset だけではビットマップのサイズ（ビューポート × devicePixelRatio）
     のまま残る。2 倍解像度のディスプレイでは光の位置とサイズが 2 倍になり、リングとブルームが
     エンブレムからずれていた（「ロゴの周りの円がずれている」という報告）。ボックスに
     ビューポートいっぱいに広がるよう明示する必要がある。 */
  width: 100%;
  height: 100%;
  z-index: 10001;
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity .45s ease;
}
