/* ==========================================================
   Fate Theater Creative Studio — 共通スタイル
   ========================================================== */
:root {
  --abyss: #0c0e13;       /* いちばん深い背景 */
  --stone: #161a21;       /* 面の背景 */
  --stone-2: #232833;     /* 境界・浮いた面 */
  --stone-3: #39404d;     /* 罫線 */
  --parchment: #e8dcc2;   /* 本文 */
  --parchment-dim: #b4aa95;
  --ember: #f2a65a;       /* 松明の灯り：リンク・CTA */
  --ember-deep: #c9772f;
  --verdigris: #6fb3a5;   /* 青銅の緑青：小さな印 */

  --f-latin: "Cinzel", "Shippori Mincho B1", serif;
  --f-head: "Shippori Mincho B1", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --f-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;

  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.2rem;
  --step-4: clamp(2.4rem, 5vw, 3.6rem);

  --gutter: clamp(16px, 4vw, 48px);
  --measure: 40em;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--abyss);
  color: var(--parchment);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.9;
  letter-spacing: .02em;
  font-feature-settings: "palt" 0;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: var(--ember); text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover { color: #ffc98f; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 600; line-height: 1.45; letter-spacing: .04em; margin: 0; word-break: auto-phrase; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--ember); color: var(--abyss); padding: 8px 14px; z-index: 100; }
.skip-link:focus { top: 8px; }

/* ---------- 石の質感（全ページ共通の下地） ---------- */
.stone-bg {
  background-color: var(--stone);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .95  0 0 0 0 .85  0 0 0 .06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  background: rgba(12, 14, 19, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stone-2);
}
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--parchment); line-height: 1.1; }
.brand-mark { font-family: var(--f-latin); font-weight: 600; font-size: 1.2rem; letter-spacing: .14em; }
.brand-sub { font-family: var(--f-latin); font-size: .68rem; letter-spacing: .32em; color: var(--verdigris); margin-top: 4px; }
.brand:hover { color: var(--parchment); }

.gnav ul { list-style: none; display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.gnav a { color: var(--parchment); text-decoration: none; font-size: .95rem; padding: 6px 0; border-bottom: 1px solid transparent; }
.gnav a:hover, .gnav a[aria-current="page"] { border-bottom-color: var(--ember); color: var(--parchment); }
.gnav .nav-cta a {
  border: 1px solid var(--ember); color: var(--ember); padding: 8px 18px; border-radius: 2px;
}
.gnav .nav-cta a:hover { background: var(--ember); color: var(--abyss); }

.nav-toggle { display: none; background: none; border: 1px solid var(--stone-3); color: var(--parchment); width: 44px; height: 44px; border-radius: 2px; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 1px; background: currentColor; margin: 5px auto; transition: transform .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .gnav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--abyss); border-bottom: 1px solid var(--stone-2);
    padding: 12px var(--gutter) 28px;
    display: none;
  }
  .gnav.is-open { display: block; }
  .gnav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .gnav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--stone-2); }
  .gnav .nav-cta { margin-top: 16px; }
  .gnav .nav-cta a { text-align: center; }
}

/* ---------- 下層ページの見出し帯 ---------- */
.page-hero {
  position: relative;
  padding: clamp(56px, 10vw, 120px) var(--gutter) clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--stone-2);
  overflow: hidden;
}
.page-hero::after {
  /* アーチの輪郭：入口の記号として下層にも残す */
  content: ""; position: absolute; right: clamp(-80px, -4vw, -20px); bottom: -2px;
  width: clamp(180px, 26vw, 340px); aspect-ratio: 2 / 3;
  border: 1px solid rgba(111, 179, 165, .28); border-bottom: 0;
  border-radius: 999px 999px 0 0;
  pointer-events: none;
}
@media (max-width: 640px) { .page-hero::after { display: none; } }
.page-hero-inner { max-width: 1120px; margin: 0 auto; position: relative; z-index: 1; }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--step--1); color: var(--parchment-dim); margin-bottom: 28px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--stone-3); }
.breadcrumb a { color: var(--parchment-dim); }
.page-hero h1 { font-size: var(--step-4); max-width: 16em; }
.page-hero .lead { margin-top: 20px; font-size: var(--step-1); line-height: 1.8; max-width: 30em; color: var(--parchment); }

/* ---------- 本文レイアウト ---------- */
.section { padding: clamp(56px, 8vw, 104px) var(--gutter); }
.section + .section { border-top: 1px solid var(--stone-2); }
.wrap { max-width: 1120px; margin: 0 auto; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.split > h2 { font-size: var(--step-3); position: sticky; top: calc(var(--header-h) + 32px); }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split > h2 { position: static; font-size: var(--step-2); }
}
.prose { max-width: var(--measure); }
.prose h3 { font-size: var(--step-1); margin: 2em 0 .6em; }
.prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin-bottom: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--verdigris); }

/* 対応範囲：定義リスト */
.scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--stone-3); }
.scope div { padding: 22px 0; border-bottom: 1px solid var(--stone-2); }
.scope dt { font-family: var(--f-head); font-size: var(--step-1); margin-bottom: 6px; }
.scope dd { margin: 0; color: var(--parchment-dim); font-size: .95rem; line-height: 1.8; }
@media (max-width: 640px) { .scope { grid-template-columns: 1fr; } }

/* 進め方：本当に順番があるので番号を使う */
.flow { list-style: none; counter-reset: step; border-left: 1px solid var(--stone-3); margin-left: 14px; }
.flow li { counter-increment: step; position: relative; padding: 0 0 28px 36px; }
.flow li:last-child { padding-bottom: 0; }
.flow li::before {
  content: counter(step); position: absolute; left: -15px; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--abyss); border: 1px solid var(--verdigris); color: var(--verdigris);
  font-family: var(--f-latin); font-size: .85rem; display: grid; place-items: center; line-height: 1;
}
.flow strong { display: block; font-family: var(--f-head); font-size: var(--step-1); font-weight: 600; margin-bottom: 4px; }
.flow span { color: var(--parchment-dim); }

/* よくある質問 */
.faq { border-top: 1px solid var(--stone-3); }
.faq details { border-bottom: 1px solid var(--stone-2); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--f-head); font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-size: 1.4rem; color: var(--ember); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 22px; color: var(--parchment-dim); max-width: var(--measure); }

/* サービス一覧（行型。カードを並べない） */
.service-rows { list-style: none; border-top: 1px solid var(--stone-3); }
.service-rows li { border-bottom: 1px solid var(--stone-2); }
.service-rows a {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) 28px; gap: 24px; align-items: baseline;
  padding: 26px 0; color: var(--parchment); text-decoration: none;
  transition: padding-left .25s ease, background-color .25s;
}
.service-rows a:hover { padding-left: 14px; background: linear-gradient(90deg, rgba(242,166,90,.08), transparent 70%); }
.service-rows h3 { font-size: 1.4rem; }
.service-rows p { margin: 0; color: var(--parchment-dim); font-size: .95rem; }
.service-rows .go { color: var(--ember); font-family: var(--f-latin); font-size: 1.3rem; transition: transform .25s; }
.service-rows a:hover .go { transform: translateX(4px); }
@media (max-width: 720px) {
  .service-rows a { grid-template-columns: 1fr 24px; gap: 6px 12px; }
  .service-rows p { grid-column: 1 / 2; }
  .service-rows .go { grid-row: 1; grid-column: 2; }
}

/* 会社情報テーブル */
.info-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--stone-3); }
.info-table th, .info-table td { text-align: left; vertical-align: top; padding: 18px 0; border-bottom: 1px solid var(--stone-2); }
.info-table th { width: 9em; font-family: var(--f-head); font-weight: 600; color: var(--parchment-dim); padding-right: 16px; }
@media (max-width: 560px) {
  .info-table th, .info-table td { display: block; width: auto; }
  .info-table th { padding-bottom: 0; border-bottom: 0; }
}

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  font-family: var(--f-body); font-size: 1rem; font-weight: 500; letter-spacing: .08em;
  border: 1px solid var(--ember); border-radius: 2px; color: var(--abyss); background: var(--ember);
  text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s;
}
.btn:hover { background: #ffbf80; color: var(--abyss); box-shadow: 0 0 28px rgba(242,166,90,.35); }
.btn-ghost { background: transparent; color: var(--ember); }
.btn-ghost:hover { background: rgba(242,166,90,.12); color: #ffc98f; }

/* お問い合わせ誘導 */
.cta-band { text-align: left; }
.cta-band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.cta-band h2 { font-size: var(--step-3); }
.cta-band p { margin: 12px 0 0; color: var(--parchment-dim); max-width: 34em; }
@media (max-width: 720px) { .cta-band .wrap { grid-template-columns: 1fr; } }

/* 開発中ラベル */
.status {
  display: inline-block; font-size: .8rem; line-height: 1; padding: 6px 10px; border-radius: 2px;
  border: 1px solid var(--verdigris); color: var(--verdigris); vertical-align: middle; margin-left: 10px;
  font-family: var(--f-body); letter-spacing: .06em;
}

/* フォーム */
.form { max-width: 720px; display: grid; gap: 22px; }
.field label { display: block; font-weight: 500; margin-bottom: 8px; }
.field .req { color: var(--ember); font-size: .8rem; margin-left: 8px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--parchment); background: var(--abyss);
  border: 1px solid var(--stone-3); border-radius: 2px; padding: 12px 14px; min-height: 50px;
}
.field textarea { min-height: 200px; resize: vertical; line-height: 1.8; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(242,166,90,.2); }
.field .hint { font-size: .85rem; color: var(--parchment-dim); margin-top: 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; cursor: pointer; }
.checks input { width: 18px; height: 18px; min-height: 0; accent-color: var(--ember); }
.hp { position: absolute; left: -9999px; }
.notice { border-left: 2px solid var(--verdigris); padding: 12px 18px; background: var(--stone); margin-bottom: 28px; }
.notice.error { border-left-color: #e0705a; }

/* ---------- フッター ---------- */
.site-footer { padding: 56px var(--gutter) 32px; font-size: .92rem; }
.footer-grid { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 40px; }
.site-footer address { font-style: normal; color: var(--parchment-dim); line-height: 1.9; }
.site-footer h2 { font-family: var(--f-body); font-size: .85rem; font-weight: 500; color: var(--verdigris); letter-spacing: .1em; margin-bottom: 12px; }
.site-footer ul { list-style: none; }
.site-footer li a { color: var(--parchment); text-decoration: none; display: inline-block; padding: 3px 0; }
.site-footer li a:hover { color: var(--ember); }
.copy { max-width: 1120px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--stone-2); color: var(--parchment-dim); font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* フッター背景：松明の並ぶ回廊の石壁（_build/scenes.html?scene=foot_wall で作成） */
.site-footer { position: relative; }
.site-footer::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  /* 上端はページの地色（--abyss）とほぼ同じ暗さから始めて、下へ向かって壁が見えてくる */
  background:
    linear-gradient(to bottom, rgba(12,14,19,.97) 0%, rgba(12,14,19,.85) 12%, rgba(12,14,19,.62) 42%, rgba(12,14,19,.7) 100%),
    url("../img/footer-wall.webp") center 40% / cover no-repeat;
}
/* 「まずは、お話を」の帯の下端を、フッター上端の暗さへ溶かす */
.cta-band { position: relative; }
.cta-band::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: clamp(48px, 7vw, 80px);
  background: linear-gradient(to bottom, rgba(12,14,19,0), rgba(12,14,19,.97));
  pointer-events: none;
}
.cta-band .wrap { position: relative; z-index: 1; }
.copy { position: relative; z-index: 1; }
@media (max-width: 820px) {
  .site-footer::before {
    background:
      linear-gradient(to bottom, rgba(12,14,19,.97) 0%, rgba(12,14,19,.8) 15%, rgba(12,14,19,.72) 45%, rgba(12,14,19,.8) 100%),
      url("../img/footer-wall.webp") 50% 60% / cover no-repeat;
  }
}

/* ---------- 下層ページの見出し：ダンジョンの部屋を背景に ---------- */
.page-hero.has-scene {
  background: var(--abyss);
  min-height: clamp(400px, 40vw, 580px);
  /* 説明文の有無やタイトルの長さに関係なく、タイトルの書き出し位置を全ページでそろえる */
  display: flex; flex-direction: column; justify-content: flex-start;
  padding-top: clamp(96px, 13vw, 190px);
}
.page-hero.has-scene::after { display: none; }
.page-hero .scene { position: absolute; inset: 0; z-index: 0; }
.page-hero .scene img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 55%; }
.page-hero.has-scene::before {
  /* 左に見出しの文字が乗るので、左側と下端を暗く落とす */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(12,14,19,.93) 0%, rgba(12,14,19,.8) 30%, rgba(12,14,19,.3) 58%, rgba(12,14,19,0) 78%),
    linear-gradient(to top, var(--abyss) 0%, rgba(12,14,19,0) 30%),
    linear-gradient(to bottom, rgba(12,14,19,.7) 0%, rgba(12,14,19,0) 22%);
}
.page-hero.has-scene .page-hero-inner { width: 100%; z-index: 2; }
.page-hero.has-scene h1 { max-width: 13em; font-size: clamp(2.2rem, 4.2vw, 3.2rem); }
.page-hero.has-scene h1, .page-hero.has-scene .lead { text-shadow: 0 2px 16px rgba(0,0,0,.85); }
@media (max-width: 720px) {
  .page-hero.has-scene { min-height: 520px; padding-top: 150px; }
  .page-hero .scene img { object-position: 74% 50%; }
  .page-hero.has-scene::before {
    background:
      linear-gradient(to top, var(--abyss) 8%, rgba(12,14,19,.82) 45%, rgba(12,14,19,.25) 75%, rgba(12,14,19,.45) 100%);
  }
}

/* 料金の目安 */
.price { margin: 0; border-top: 1px solid var(--stone-3); }
.price div { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--stone-2); }
.price dt { font-family: var(--f-head); font-size: var(--step-1); }
.price dd { margin: 0; font-family: var(--f-head); font-size: var(--step-3); color: var(--ember); letter-spacing: .04em; white-space: nowrap; }
.price-note { margin-top: 14px; color: var(--parchment-dim); font-size: .92rem; max-width: var(--measure); }
