/*
 * CRATER Company Profile — style.css v7
 * テンプレートデザイン完全準拠
 * フォント: urw-din（英数）/ Noto Sans JP（日本語）
 */

:root {
  --c-base:    #C8C8C8;
  --c-black:   #111111;
  --c-text:    #111111;
  --c-sub:     #555555;
  --c-white:   #FFFFFF;
  --c-border:  rgba(0,0,0,0.15);

  --font-en: 'urw-din', sans-serif;
  --font-ja: 'Noto Sans JP', sans-serif;
}

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

body {
  background: #FFFFFF;
  font-family: var(--font-ja);
  color: var(--c-text);
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}


/* ============================================================
   SLIDE STAGE — 16:9 フルビューポート
   ============================================================ */
.slide-stage {
  width: 100vw;
  height: 100vh;
  background: #FFFFFF;
  overflow: hidden;
  position: relative;
}

/* 1920×1080固定 → JSでscale変換。cqwは常に1cqw=19.2pxで安定 */
.slide {
  width: 1920px;
  height: 1080px;
  position: absolute;
  top: 50%;
  left: 50%;
  overflow: hidden;
  background: var(--c-base);
  container-type: inline-size;
  display: none;
  transform-origin: center center;
}
.slide.active {
  display: flex;
  flex-direction: column;
}

/* 日本語禁則 */
:lang(ja) { line-break: strict; }
h1, h2, h3 { word-break: normal; overflow-wrap: normal; text-wrap: balance; line-break: strict; }
p, li { word-break: normal; overflow-wrap: normal; text-wrap: pretty; line-break: strict; }


/* ============================================================
   共通パーツ
   ============================================================ */

/* 黒バッジ（日付・セクション名） */
.badge {
  display: inline-block;
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--font-ja);
  font-size: 0.9cqw;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.3cqw 0.8cqw;
  border-radius: 0;
}

/* フッターコピーライト（各スライドで個別配置） */
.copy {
  font-family: var(--font-en);
  font-size: 0.75cqw;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--c-sub);
}
.copy-white {
  font-family: var(--font-en);
  font-size: 0.75cqw;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
}


/* ============================================================
   UI オーバーレイ（px固定）
   ============================================================ */
.nav-prev, .nav-next {
  position: fixed; top: 0; width: 50%; height: 100%;
  z-index: 100; cursor: pointer;
}
.nav-prev { left: 0; }
.nav-next { right: 0; }

.status-bar {
  position: fixed; top: 16px; right: 64px;
  font-family: var(--font-en); font-size: 11px; letter-spacing: 0.1em;
  color: rgba(0,0,0,0.3); z-index: 200; pointer-events: none;
}

.menu-btn {
  position: fixed; top: 12px; right: 16px;
  width: 36px; height: 36px; z-index: 300;
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px; padding: 6px;
}
.menu-btn span {
  display: block; width: 20px; height: 1.5px;
  background: var(--c-text); border-radius: 0;
}

.progress-bar {
  position: fixed; bottom: 0; left: 0;
  height: 2px; background: var(--c-black);
  transition: width 0.3s ease; z-index: 200; width: 0;
}

.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 400; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }

.sidebar {
  position: absolute; top: 0; right: -300px; bottom: 0;
  width: 280px; background: var(--c-black); color: var(--c-white);
  transition: right 0.3s ease; display: flex; flex-direction: column;
  overflow-y: auto;
}
.sidebar-overlay.open .sidebar { right: 0; }

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo {
  font-family: var(--font-en); font-size: 16px;
  font-weight: 600; letter-spacing: 0.1em;
}
.sidebar-close {
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 13px; cursor: pointer; padding: 4px;
}
.sidebar-close:hover { color: var(--c-white); }

.sidebar-list { padding: 12px 0; flex: 1; }
.sidebar-item {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 11px 24px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-ja); font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; color: rgba(255,255,255,0.4);
  text-align: left; transition: all 0.15s;
}
.sidebar-item:hover { color: var(--c-white); background: rgba(255,255,255,0.06); }
.sidebar-item.active { color: rgba(255,255,255,0.9); }
.sidebar-num { font-family: var(--font-en); font-size: 10px; opacity: 0.25; min-width: 20px; }

/* テキストページネーション */
.pagination {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0;
  z-index: 200;
  pointer-events: auto;
}

.pagination-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ja);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(0,0,0,0.25);
  white-space: nowrap;
  transition: color 0.15s;
  position: relative;
}
.pagination-item::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 10px;
  background: rgba(0,0,0,0.15);
}
.pagination-item:last-child::after { display: none; }
.pagination-item:hover { color: rgba(0,0,0,0.5); }
.pagination-item.active {
  color: var(--c-text);
  font-weight: 700;
}
.pagination-num {
  font-family: var(--font-en);
  font-size: 9px;
  opacity: 0.4;
}

.script-trigger {
  position: fixed; bottom: 0; left: 0; right: 0; height: 48px; z-index: 150;
}
.script-panel {
  position: fixed; bottom: -100%; left: 0; right: 0;
  max-height: 28vh; background: rgba(17,17,17,0.94);
  color: rgba(255,255,255,0.85); padding: 20px 48px;
  font-family: var(--font-ja); font-size: 14px; line-height: 1.9;
  letter-spacing: 0.02em; overflow-y: auto;
  z-index: 150; transition: bottom 0.2s ease; backdrop-filter: blur(8px);
}
.script-panel.visible { bottom: 0; }


/* ============================================================
   S01: 表紙
   グレー背景 × 左寄せ × 本文縦中央 × CRATERフッター左下
   ============================================================ */
.s01 {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5cqw;
}

/* 縦中央に配置するためflexで押し込む */
.s01-body {
  display: flex;
  flex-direction: column;
  gap: 1.4cqw;
  /* 上下余白を均等にするためmargin autoで中央寄せ */
  margin-top: auto;
  margin-bottom: auto;
}

.s01-client {
  font-family: var(--font-ja);
  font-size: 1.45cqw;
  font-weight: 400;
  color: var(--c-text);
  letter-spacing: 0.04em;
  line-height: 1;
}

.s01-title {
  font-family: var(--font-ja);
  font-size: 5.8cqw;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--c-text);
  text-wrap: balance;
}

/* バッジはtitleの直下に小さめに */
.s01-body .badge {
  align-self: flex-start;
  margin-top: 0.4cqw;
}

.s01-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8cqw;
}

.s01-logo {
  width: 8cqw;
  height: auto;
  display: block;
}

.s01-copy {
  font-family: var(--font-en);
  font-size: 0.75cqw;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--c-sub);
  line-height: 1;
}


/* ============================================================
   S02: ミッション
   グレー背景 × 黒バッジ左上 × 大ステートメント中央
   ============================================================ */
.s02 {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 5cqw;
  position: relative;
}

.s02-top {
  flex-shrink: 0;
}

.s02-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3cqw;
}

.s02-statement {
  font-family: var(--font-ja);
  font-size: 4.8cqw;
  font-weight: 900;
  line-height: 1.45;
  color: var(--c-text);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.s02-body {
  font-family: var(--font-ja);
  font-size: 1.5cqw;
  font-weight: 400;
  line-height: 1.9;
  color: var(--c-sub);
  letter-spacing: 0.02em;
}

.s02-copy {
  position: absolute;
  right: 5cqw;
  bottom: 5cqw;
  font-family: var(--font-en);
  font-size: 0.75cqw;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--c-sub);
}


/* ============================================================
   S04SVC: 事業領域
   グレー背景 × 左ステートメント × 右サービスリスト
   ============================================================ */
.s04svc {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 5cqw;
  position: relative;
}

.s04svc-top {
  flex-shrink: 0;
}

.s04svc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3cqw;
}

.s04svc-statement {
  font-family: var(--font-ja);
  font-size: 3.2cqw;
  font-weight: 900;
  line-height: 1.45;
  color: var(--c-text);
  letter-spacing: -0.01em;
}

.s04svc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.s04svc-item {
  display: grid;
  grid-template-columns: 4cqw 14cqw 1fr;
  align-items: center;
  gap: 1.5cqw;
  padding: 1.0cqw 0;
  border-bottom: 0.08cqw solid var(--c-border);
}
.s04svc-item:last-child {
  border-bottom: none;
}

.s04svc-num {
  font-family: var(--font-en);
  font-size: 0.85cqw;
  font-weight: 400;
  color: var(--c-sub);
  letter-spacing: 0.05em;
}

.s04svc-name {
  font-family: var(--font-ja);
  font-size: 1.2cqw;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 0.02em;
}

.s04svc-desc {
  font-family: var(--font-ja);
  font-size: 1.05cqw;
  font-weight: 400;
  color: var(--c-sub);
  letter-spacing: 0.02em;
}

.s04svc-copy {
  position: absolute;
  right: 5cqw;
  bottom: 5cqw;
  font-family: var(--font-en);
  font-size: 0.75cqw;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--c-sub);
}


/* ============================================================
   S03: 実績数字
   全黒背景 × 白数字 × 左縦ラベル
   ============================================================ */
.s03 {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 5cqw;
  position: relative;
}

.s03-top {
  flex-shrink: 0;
}

.s03-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.s03-item {
  display: grid;
  grid-template-columns: 18cqw 1fr;
  align-items: center;
  gap: 3cqw;
  padding: 2.2cqw 0;
}

.s03-divider {
  width: 100%;
  height: 0.1cqw;
  background: var(--c-border);
}

.s03-num-row {
  display: flex;
  align-items: baseline;
  gap: 0.4cqw;
}

.s03-number {
  font-family: var(--font-en);
  font-size: 8cqw;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--c-text);
}

.s03-unit {
  font-family: var(--font-ja);
  font-size: 2.5cqw;
  font-weight: 900;
  color: var(--c-sub);
}

.s03-desc {
  font-family: var(--font-ja);
  font-size: 1.35cqw;
  font-weight: 400;
  line-height: 1.8;
  color: var(--c-sub);
  letter-spacing: 0.02em;
}

.s03-copy {
  position: absolute;
  right: 5cqw;
  bottom: 5cqw;
  font-family: var(--font-en);
  font-size: 0.75cqw;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--c-sub);
}


/* ============================================================
   S04: 会社概要
   グレー背景 × CRATERロゴ大 × シンプルテーブル（水平罫線のみ）
   ============================================================ */
.s04 {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 5cqw;
  gap: 0;
  position: relative;
}

.s04-top {
  flex-shrink: 0;
}

/* バッジ以外のコンテンツを上下センター */
.s04-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.6cqw;
}

.s04-logo {
  width: 14cqw;
  height: auto;
  display: block;
}

.s04-table {
  width: 100%;
  border-collapse: collapse;
  /* flex: 1 を外してテーブルを自然な高さに。下に余白が生まれる */
}

.s04-table tr {
  border-bottom: 0.08cqw solid var(--c-border);
}
.s04-table tr:last-child {
  border-bottom: none;
}

.s04-table th {
  text-align: left;
  font-family: var(--font-ja);
  font-size: 1.0cqw;
  font-weight: 400;
  color: var(--c-sub);
  padding: 0.8cqw 0;
  width: 12cqw;
  vertical-align: middle;
  white-space: nowrap;
}

.s04-table td {
  font-family: var(--font-ja);
  font-size: 1.2cqw;
  font-weight: 400;
  color: var(--c-text);
  padding: 0.8cqw 0 0.8cqw 2cqw;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.s04-copy {
  position: absolute;
  right: 5cqw;
  bottom: 5cqw;
  font-family: var(--font-en);
  font-size: 0.75cqw;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--c-sub);
}


/* ============================================================
   S05: 実績データ
   グレー背景 × 縦書きラベル × 大%数字 × 2行構成
   ============================================================ */
.s05 {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 5cqw;
  position: relative;
}

.s05-top {
  flex-shrink: 0;
}

.s05-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.s05-item {
  display: grid;
  grid-template-columns: 3cqw 14cqw 1fr;
  align-items: center;
  gap: 2.5cqw;
  padding: 2.8cqw 0;
}

.s05-divider {
  width: 100%;
  height: 0.08cqw;
  background: var(--c-border);
}

/* 縦書きラベル */
.s05-label-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.s05-label {
  font-family: var(--font-ja);
  font-size: 0.9cqw;
  font-weight: 400;
  color: var(--c-sub);
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* 数字 */
.s05-num-col {
  display: flex;
  align-items: baseline;
}

.s05-num-row {
  display: flex;
  align-items: baseline;
  gap: 0.2cqw;
}

.s05-number {
  font-family: var(--font-en);
  font-size: 9cqw;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--c-text);
}

.s05-unit {
  font-family: var(--font-en);
  font-size: 3.5cqw;
  font-weight: 400;
  color: var(--c-text);
  letter-spacing: -0.02em;
}

/* テキスト */
.s05-text-col {
  display: flex;
  flex-direction: column;
  gap: 0.8cqw;
}

.s05-desc {
  font-family: var(--font-ja);
  font-size: 1.3cqw;
  font-weight: 400;
  line-height: 1.9;
  color: var(--c-text);
  letter-spacing: 0.02em;
}

.s05-source {
  font-family: var(--font-ja);
  font-size: 0.8cqw;
  font-weight: 400;
  line-height: 1.6;
  color: var(--c-sub);
  letter-spacing: 0.02em;
}

.s05-copy {
  position: absolute;
  right: 5cqw;
  bottom: 5cqw;
  font-family: var(--font-en);
  font-size: 0.75cqw;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--c-sub);
}
