:root {
  --bg: #0e0a09;
  --card: #1a1513;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f5efe8;
  --muted: rgba(245, 239, 232, 0.66);
  --amber: #e8b05c;
  --safelight: #c23a22;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Segoe UI", "Noto Sans JP", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.8;
}
a { color: var(--amber); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(14, 10, 9, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.02em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }

/* ヒーロー */
.hero { position: relative; min-height: 88vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url("hero.jpg") center / cover no-repeat; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,10,9,0.15) 0%, rgba(14,10,9,0.35) 45%, var(--bg) 100%);
}
.hero .wrap { position: relative; padding-bottom: 72px; padding-top: 120px; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.28em; color: var(--amber); text-transform: uppercase; }
.hero h1 { font-family: var(--serif); font-size: clamp(40px, 8vw, 76px); line-height: 1.2; margin: 14px 0 18px; font-weight: 700; }
.hero p { font-size: clamp(16px, 2.4vw, 19px); color: var(--muted); max-width: 560px; margin: 0 0 28px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--text); color: #111; text-decoration: none;
  padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: 15px;
}
.badge small { display: block; font-size: 11px; font-weight: 500; opacity: 0.7; line-height: 1.2; }
.badge span { line-height: 1.25; }

/* セクション */
section { padding: 88px 0; }
.section-title { font-family: var(--serif); font-size: clamp(28px, 4.6vw, 40px); line-height: 1.35; margin: 10px 0 14px; }
.lead { color: var(--muted); max-width: 640px; margin: 0; }

/* 工程 */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 40px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 22px; }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--serif); font-size: 30px; color: var(--amber); display: block; line-height: 1; margin-bottom: 12px; }
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* スクリーンショット */
.shots { display: flex; gap: 18px; overflow-x: auto; padding: 36px 16px 12px; margin: 0 -16px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; }
.shots figure { flex: 0 0 auto; width: min(64vw, 250px); margin: 0; scroll-snap-align: start; }
.shots img { border-radius: 26px; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.shots figcaption { font-size: 13px; color: var(--muted); margin-top: 12px; text-align: center; }

/* 特徴 */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 40px; }
.feature { background: var(--bg); padding: 28px; }
.feature h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.safelight { background: radial-gradient(ellipse at top, rgba(194,58,34,0.28), transparent 70%); }

/* フッター */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* 文書ページ（プライバシーポリシー） */
.doc { max-width: 760px; padding-top: 56px; padding-bottom: 80px; }
.doc h1 { font-family: var(--serif); font-size: clamp(30px, 5vw, 42px); line-height: 1.3; margin: 10px 0 6px; }
.doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 36px; }
.doc h2 { font-size: 19px; margin: 44px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.doc p, .doc li { color: rgba(245, 239, 232, 0.86); font-size: 15.5px; }
.doc ul { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 14px 0; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid var(--line); }
.doc th { background: var(--card); font-weight: 600; white-space: nowrap; }

@media (max-width: 560px) {
  .site-nav .hide-sm { display: none; }
  section { padding: 64px 0; }
  .hero { min-height: 80vh; }
}

/* 狭い画面では表の各行をカードのように縦に並べる */
@media (max-width: 560px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc thead { display: none; }
  .doc tr { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 12px; background: var(--card); }
  .doc td { border: 0; border-top: 1px solid var(--line); padding: 10px 14px; }
  .doc td:first-child { border-top: 0; font-weight: 600; }
  .doc td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 12px; color: var(--amber); letter-spacing: 0.04em; }
}

/* three.js の演出（ヒーローの現像・波紋・塵） */
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero { touch-action: pan-y; }

/* スクリーンショット：奥から起き上がって並ぶ。マウスを乗せると傾く */
.shots { perspective: 1200px; }
.shots figure.tilt-in {
  opacity: 0;
  transform: rotateY(-38deg) translateX(60px) translateZ(-80px);
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.9s ease;
}
.shots figure.tilt-in.is-in { opacity: 1; transform: none; }
.shots img { transition: transform 0.25s ease-out; will-change: transform; }
