/**
 * Page scale wrapper — 1920px 基準デザインを transform: scale() でビューポートにフィット。
 * page-scale.js が --page-scale / --page-height を動的に更新する。
 */

html, body {
  overflow-x: hidden;
}

/* sticky ヘッダー分のスクロールオフセット
   (アンカーリンクや section ジャンプ時に heading がヘッダー裏に隠れないように)
   --lm-header-h は @media で widthごとに上書き */
:root {
  --lm-header-h: 100px;
}
html {
  scroll-padding-top: var(--lm-header-h);
}
.lm-section,
section[id] {
  scroll-margin-top: var(--lm-header-h);
}

@media (max-width: 1024px) {
  :root {
    --lm-header-h: 80px;
  }
}

#stage {
  width: 100%;
  height: var(--page-height, auto);
  overflow: hidden;
}

#root {
  width: 1920px;
  transform-origin: top left;
  transform: scale(var(--page-scale, 1));
}

/* ≤1199px: page-scale を切って #root を viewport 幅にフィット
   (page-scale.js も同じ閾値で scale=1 を返す) */
@media (max-width: 1024px) {
  #stage {
    height: auto;
    overflow: visible;
  }
  #root {
    width: 100%;
    transform: none;
  }
}

/* Company page is already responsive in site.css. Match the static company.html
   behavior and keep it out of the global 1920px transform scaling. */
body.page-template-page-company #stage {
  height: auto !important;
  overflow: visible;
}

body.page-template-page-company #root {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  transform: none;
}
