/*!
 * Siam Works — テーマ層
 *
 * デザインカンプ（docs/claudedesign/）のインラインスタイルを、
 * デザインシステムのトークンを使ったクラスとして抽出したもの。
 * カンプは 1,200 箇所以上のインラインスタイルで書かれているため、
 * そのまま PHP に写さず、ここに集約している。
 *
 * 接頭辞：デザインシステムは k- 、テーマ層は sw- 。
 * ブレークポイント：940px（カンプの isDesktop / isMobile と同じ）
 */

/* =========================================================
   ページシェル
   ========================================================= */

body { margin: 0; }

.sw-page {
  /* カンプがラッパーに直接置いていたレスポンシブ変数 */
  --band-y: clamp(72px, 10vh, 120px);
  --stack-y: clamp(30px, 4.5vh, 48px);
  --type-statement-size: clamp(1.44rem, 5.2vw, 2.75rem);
  --type-heading-size: clamp(1.19rem, 4.4vw, 1.875rem);
  --text-xl: clamp(1.25rem, 3.4vw, 1.5rem);
  --text-lg: clamp(1.0625rem, 2.9vw, 1.25rem);
  --text-md: clamp(1rem, 2.4vw, 1.0625rem);

  background: var(--surface-page);
  color: var(--ink-900);
  font-family: var(--type-body-family);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.sw-page a { color: var(--blue-600); border: 0; }
.sw-page a:hover { color: var(--blue-700); }

/* スキップリンク */
.sw-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  background: var(--ink-900);
  color: #fff;
  padding: 12px 20px;
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
}
.sw-skip:focus { left: 12px; top: 12px; color: #fff; }

/* 内容の器 */
.sw-container {
  width: 100%;
  max-width: var(--layout-max, 1240px);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 64px);
  box-sizing: border-box;
}

.sw-band { padding-block: var(--band-y); position: relative; }
.sw-band--page { background: var(--surface-page); }
.sw-band--raised { background: var(--surface-raised); }
.sw-band--sunken { background: var(--surface-band); }
.sw-band--blue { background: var(--blue-500); color: #fff; }
.sw-band--blue a { color: #fff; }

/* ページ見出し（下層ページ共通） */
.sw-pagehead { padding-top: clamp(120px, 16vh, 200px); padding-bottom: var(--stack-y); }
.sw-crumb {
  font-family: var(--font-family-grotesk);
  font-size: var(--type-index-size);
  letter-spacing: var(--tracking-index);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.sw-crumb a { color: var(--text-muted); text-decoration: none; }
.sw-crumb a:hover { color: var(--blue-600); }
.sw-pagehead__latin {
  font-family: var(--font-family-grotesk);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--blue-500);
  margin: 0 0 10px;
}
.sw-pagehead__jp {
  font-family: var(--type-display-family);
  font-size: var(--type-heading-size);
  font-weight: 900;
  margin: 0 0 18px;
}
.sw-pagehead__lead {
  margin: 0;
  max-width: 44em;
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--text-secondary);
}

/* =========================================================
   ロゴ
   ========================================================= */

.sw-logo {
  position: relative;
  display: block;
  width: clamp(62px, 7.4vw, 88px);
  height: clamp(43px, 5.1vw, 61px);
  text-decoration: none;
}
.sw-logo svg { display: block; width: 100%; height: 100%; }

/* =========================================================
   ヘッダー
   ========================================================= */

.sw-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: clamp(14px, 2vw, 22px) clamp(16px, 2.2vw, 26px);
  pointer-events: none;
}
.sw-header > * { pointer-events: auto; }

.sw-header__nav-shell {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 22px;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid #fff;
  border-radius: var(--radius-full);
  padding: 13px 26px;
}

.sw-header__nav { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; }

.sw-header__link {
  text-decoration: none;
  color: var(--ink-900);
  font-family: var(--type-index-family);
  font-size: var(--type-index-size);
  font-weight: var(--type-index-weight);
  letter-spacing: var(--type-index-tracking);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s cubic-bezier(0.2, 0, 0.2, 1);
}
.sw-header__link:hover,
.sw-header__link[aria-current="page"] { color: var(--blue-600); }
.sw-header__link svg { flex: none; }

/* バーガー */
.sw-burger {
  position: relative;
  z-index: 2;
  flex: none;
  width: clamp(42px, 11vw, 52px);
  height: clamp(42px, 11vw, 52px);
  border-radius: 50%;
  border: 1px solid var(--border-hairline);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s cubic-bezier(0.2, 0, 0.2, 1);
}
.sw-burger__bars { position: relative; display: block; width: 20px; height: 8px; }
.sw-burger__bars span {
  position: absolute;
  left: 0;
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue-500);
  transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}
.sw-burger__bars span:first-child { top: 0; }
.sw-burger__bars span:last-child { bottom: 0; }
.sw-burger[aria-expanded="true"] .sw-burger__bars span:first-child { transform: translateY(3px) rotate(45deg); }
.sw-burger[aria-expanded="true"] .sw-burger__bars span:last-child { transform: translateY(-3px) rotate(-45deg); }

@media (min-width: 940px) {
  .sw-header__nav-shell { display: flex; }
  .sw-burger { display: none; }
}

/* モバイルメニュー */
.sw-menu {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: var(--blue-500);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 104px 20px 40px;
  box-sizing: border-box;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.34s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.34s linear;
}
.sw-menu[data-open="true"] { opacity: 1; visibility: visible; }

.sw-menu__panel {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.34s cubic-bezier(0.16, 1, 0.3, 1), transform 0.46s cubic-bezier(0.16, 1, 0.3, 1);
}
.sw-menu[data-open="true"] .sw-menu__panel { opacity: 1; transform: none; }

.sw-menu__item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.sw-menu__item:hover { opacity: 0.62; }
.sw-menu__labels { display: flex; flex-direction: column; gap: 3px; }
.sw-menu__latin {
  font-family: var(--font-family-grotesk);
  font-size: var(--type-heading-size);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--blue-500);
  line-height: 1.1;
}
.sw-menu__gloss { font-size: var(--type-gloss-size); font-weight: 700; color: var(--blue-500); }
.sw-menu__item svg { stroke: var(--blue-500); }

@media (min-width: 940px) { .sw-menu { display: none; } }

/* =========================================================
   フッター
   ========================================================= */

.sw-footer { position: relative; z-index: 1; background: #0870ca; color: #fff; }
.sw-footer a { color: #fff; text-decoration: none; }

.sw-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 64px);
  justify-content: space-between;
  padding-block: clamp(48px, 7vw, 80px);
}

.sw-footer__brand { display: flex; flex-direction: column; gap: 16px; }
.sw-footer__logo { display: block; width: 104px; height: 72px; }
.sw-footer__logo svg { display: block; width: 100%; height: 100%; }
.sw-footer__copyright {
  margin: 0;
  font-size: var(--type-meta-size);
  font-family: var(--font-family-mono);
  color: rgba(255, 255, 255, 0.78);
}

.sw-footer__nav { display: flex; flex-direction: column; gap: 18px; }
.sw-footer__link {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 10px;
  transition: opacity 0.2s cubic-bezier(0.2, 0, 0.2, 1);
}
.sw-footer__link:hover { opacity: 0.62; }
.sw-footer__arrow { color: rgba(255, 255, 255, 0.78); }
.sw-footer__latin {
  font-family: var(--font-family-grotesk);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sw-footer__gloss { font-size: var(--type-gloss-size); color: rgba(255, 255, 255, 0.88); }

/* =========================================================
   スクロールリベール
   ========================================================= */

/* 初期状態を隠すのは JS が動くときだけ。
   JS が読み込めなかった場合に本文が永久に見えなくなるのを防ぐ。 */
.sw-js .sw-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1), transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}
.sw-js .sw-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .sw-js .sw-reveal { opacity: 1; transform: none; transition: none; }
}
