/* ==========================================================================
   辺境ラボ — テーマ「薄明」(twilight)
   トンマナ: 安心感 / 寂寥感 / 落ち着き
   ・地は純白ではなく、わずかに温かい紙色。冷たい紺の文字と対にして「夜明け前の静けさ」を作る
   ・彩度は全体に低く。強い色はロゴと写真だけが持つ
   ・線は細く、余白は広く、影は使わない
   色の出どころ: ロゴ実測(紺 #142337 / ティール #407483)+ 地平線の残照(砂色)
   ========================================================================== */
:root {
  --paper: #f7f5f1;        /* 地。温かいオフホワイト = 安心感 */
  --surface: #fffdf9;      /* カード面 */
  --tint: #edeae3;         /* 面(表ヘッダ等) */
  --line: #e2ded6;         /* 罫線 */

  --navy: #16233a;         /* 見出し・フッター地。ロゴの紺 */
  --ink: #313d49;          /* 本文。純黒を避けた青みの墨 */
  --sub: #64737f;          /* 補助テキスト */

  --teal: #3f6f7e;         /* アクセント。ロゴのティールを落ち着かせた値 */
  --teal-soft: #9dbcc5;
  --sand: #a8794e;         /* 地平線の残照。控えめな温かさ */
  --sand-tint: #f3ebdf;
  --sand-line: #e4d5bd;

  --radius: 12px;
  --measure: 720px;        /* 本文の行長。狭いほど落ち着く */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
  font-feature-settings: "palt";
  color: var(--ink);
  background: var(--paper);
  line-height: 2;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------- ヘッダー */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(247, 245, 241, 0.88);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.site-header .brand { display: inline-flex; align-items: center; }
.site-header .brand img { height: 60px; width: auto; display: block; }

nav.site-nav { display: flex; flex-wrap: wrap; gap: 0.15rem; }

nav.site-nav a {
  color: var(--sub);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

nav.site-nav a:hover { color: var(--navy); background: var(--tint); }
nav.site-nav a[aria-current="page"] { color: var(--navy); background: var(--tint); }

@media (max-width: 480px) {
  .site-header .brand img { height: 46px; }
  nav.site-nav a { font-size: 0.82rem; padding: 0.25rem 0.6rem; }
}

/* ------------------------------------------------------------- ヒーロー帯 */
.hero-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--navy);
}

/* 写真: class で差し替える(photo-field = 星空の下に立つ人 / photo-horizon = 夜明け前の地平線 / photo-ventoux = 山頂の観測所 / photo-ventoux-night = 同・夜景)。
   使っていない写真は web-spare/assets/ にある。差し替えるときは画像を web/assets/ に戻してから class を変える(2026-09-10) */
/* 位置80%: 横長の画面ほど上下が切り取られるため、写真の主役(人影と地平線)が
   帯の下寄りに残るよう切り取り位置を下げている。縦長のスマホでは切り取りが起きず影響しない */
.hero-band.photo-field {
  background-image: url("assets/bg-night-field.jpg");
  background-position: center 80%;
  background-size: cover;
  background-repeat: no-repeat;
}
/* photo-ventoux = 山頂の観測所(モン・ヴァントゥ)。紺の二色調に加工済み。
   位置 60% 40%: 塔が横60%の位置にあるので、縦長のスマホで左右が切れても塔が残るようにしている */
.hero-band.photo-ventoux {
  background-image: url("assets/bg-ventoux-navy.jpg");
  background-position: 60% 40%;
  background-size: cover;
  background-repeat: no-repeat;
}
/* photo-ventoux-night = 同じ観測所の夜景(生成AIで編集・高解像度化、創業者の構図。2000px に縮小して使用)。写真自体が暗いので、
   ベールは通常の4割に弱める(通常の濃さだと窓の灯りと草の質感が沈む)。
   位置 72% 85%: 塔が横72%にあるので縦長のスマホでも塔が残る。横長の画面では空の上側を切り、草原と小道を残す */
.hero-band.photo-ventoux-night {
  background-image: url("assets/bg-ventoux-night.jpg");
  background-position: 72% 85%;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero-band.photo-ventoux-night::before {
  background:
    linear-gradient(90deg,
      rgba(11, 17, 30, 0.21) 0%,
      rgba(11, 17, 30, 0.10) 58%,
      rgba(11, 17, 30, 0.04) 100%),
    linear-gradient(180deg,
      rgba(11, 17, 30, 0.23) 0%,
      rgba(11, 17, 30, 0.11) 40%,
      rgba(11, 17, 30, 0.18) 76%,
      rgba(11, 17, 30, 0.24) 100%);
}
.hero-band.photo-horizon {
  background-image: url("assets/bg-night-horizon.jpg");
  background-position: center 55%;
  background-size: cover;
  background-repeat: no-repeat;
}

/* 文字を読ませるための紺のベール。
   文字が乗る左側を濃く(横方向)、加えて上下を締める(縦方向)。
   写真のどこが明るくても白文字が沈まないようにする */
.hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg,
      rgba(11, 17, 30, 0.52) 0%,
      rgba(11, 17, 30, 0.26) 58%,
      rgba(11, 17, 30, 0.10) 100%),
    linear-gradient(180deg,
      rgba(11, 17, 30, 0.58) 0%,
      rgba(11, 17, 30, 0.28) 40%,
      rgba(11, 17, 30, 0.46) 76%,
      rgba(11, 17, 30, 0.60) 100%);
}

/* 下端を紙色へ溶かす。控えめに(効かせすぎると写真が白く飛ぶ) */
.hero-band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12%;
  z-index: 0;
  background: linear-gradient(180deg, rgba(247, 245, 241, 0) 0%, var(--paper) 100%);
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-height: clamp(380px, 60vh, 740px);
  max-width: 1040px;
  margin: 0 auto;
  /* 上を薄く・下を厚くして、文字の塊をやや上寄りに置く(頭上の空きを詰める) */
  padding: clamp(1.75rem, 4vw, 3.25rem) 1.5rem clamp(3.5rem, 7vw, 6rem);
}

.hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.4rem;
  color: var(--teal-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
/* ロゴの「— HENKYO LAB —」の意匠を引用した細線 */
.hero .kicker::before,
.hero .kicker::after {
  content: "";
  height: 1px;
  width: 1.8rem;
  background: currentColor;
  opacity: 0.7;
}

.hero h1 {
  margin: 0 0 1.2rem;
  max-width: 16em;
  font-size: clamp(1.65rem, 4.4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.hero .lede {
  margin: 0 0 2.2rem;
  max-width: 30em;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
}

/* ------------------------------------------------------------- ボタン */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.7rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary { background: var(--navy); color: var(--paper); }
.btn-primary:hover { background: #223452; color: var(--paper); }
.btn-ghost { color: var(--navy); background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

/* 暗い写真の上では明暗を反転させる */
.hero .btn-primary { background: var(--paper); color: var(--navy); }
.hero .btn-primary:hover { background: #ffffff; }
.hero .btn-ghost { color: #ffffff; border-color: rgba(255, 255, 255, 0.5); }
.hero .btn-ghost:hover { border-color: #ffffff; background: rgba(255, 255, 255, 0.08); }

/* ------------------------------------------------------------- 本文 */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 1.5rem clamp(4rem, 8vw, 6rem);
}

h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: var(--navy);
}

/* セクションの小見出し(ティールの細線つき)。ロゴの意匠と揃える */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 3.6rem 0 0.4rem;
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  height: 1px;
  width: 1.6rem;
  background: currentColor;
  opacity: 0.55;
}
.eyebrow + h1,
.eyebrow + h2 { margin-top: 0; }

h2 {
  margin: 3rem 0 0.9rem;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: var(--navy);
}

h3 { margin: 0 0 0.5rem; font-size: 1.02rem; font-weight: 600; color: var(--navy); }

p, li { font-size: 0.96rem; }

.lede { color: var(--sub); font-size: 1.02rem; }
.small { color: var(--sub); font-size: 0.9rem; margin-top: 0.6rem; }

a { color: var(--teal); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

/* ------------------------------------------------------------- 部品 */
.card {
  margin: 1.2rem 0;
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.badges { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.9rem 0 0.4rem; padding: 0; list-style: none; }
.badges li {
  padding: 0.2rem 0.85rem;
  border: 1px solid rgba(63, 111, 126, 0.28);
  border-radius: 999px;
  color: var(--teal);
  background: transparent;
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

ul.feature-list { padding-left: 0; list-style: none; }
ul.feature-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.7rem; }
ul.feature-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.75;
}

table.info {
  width: 100%;
  margin: 1.2rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--surface);
}

table.info th,
table.info td {
  padding: 0.85rem 1.1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.9;
}
table.info tr:last-child th,
table.info tr:last-child td { border-bottom: none; }

table.info th {
  width: 32%;
  white-space: nowrap;
  color: var(--sub);
  font-weight: 600;
  background: var(--tint);
}

table.info small { color: var(--sub); font-size: 0.84em; line-height: 1.8; display: inline-block; margin-top: 0.3rem; }

/* 多列データ表(プライバシーポリシー等)用。2列前提のth幅指定を解除する */
table.info.wide th { width: auto; white-space: normal; background: var(--tint); }

code {
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  background: var(--tint);
  font-size: 0.88em;
}

/* 未確定・注記。警告色ではなく地平線の残照の色でまとめる */
.placeholder {
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  color: var(--sand);
  background: var(--sand-tint);
  font-size: 0.9em;
}

.notice {
  margin: 1.6rem 0;
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--sand-line);
  border-radius: var(--radius);
  background: var(--sand-tint);
  font-size: 0.9rem;
}
.notice strong { color: #8a6438; }
.notice .placeholder { background: rgba(255, 255, 255, 0.6); }

/* ------------------------------------- 締めの帯(本文からフッターへの継ぎ目) */
/* 文字は置かない。紙色 → 星空 → フッターの紺、へ静かに沈めるためだけの帯。画像は web-spare/assets/bg-horizon-strip.jpg に退避。
   創業者指示(2026-09-10)で全ページから外した。規則は控えとして残す */
.closing-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: clamp(120px, 14vw, 170px);
  background: var(--navy) url("assets/bg-horizon-strip.jpg") center 45% / cover no-repeat;
}
.closing-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    var(--paper) 0%,
    rgba(247, 245, 241, 0) 42%,
    rgba(14, 22, 38, 0.30) 74%,
    var(--navy) 100%);
}

/* ------------------------------------------------------------- フッター */
footer.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 3rem 1.5rem 2.6rem;
  text-align: center;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
}

/* 自社生成の等高線を極薄で。地形図のような奥行きを出す */
footer.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("assets/bg-contours-light.png") center / cover no-repeat;
  opacity: 0.05;
}

footer.site-footer > * { position: relative; z-index: 1; }

.foot-logo { display: block; height: 46px; width: auto; margin: 0 auto 1.4rem; }

footer.site-footer a { color: rgba(255, 255, 255, 0.7); text-decoration: none; }
footer.site-footer a:hover { color: #ffffff; text-decoration: underline; }

.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.4rem; margin: 0 0 1rem; }

.foot-meta { margin: 0; color: rgba(255, 255, 255, 0.38); font-size: 0.78rem; letter-spacing: 0.04em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* アプリ名の隣に置くアプリアイコン(2026-09-10) */
.app-title { display: flex; align-items: center; gap: 14px; }
.app-icon { flex: none; border-radius: 22.37%; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
h1.app-icon, h1 .app-icon { width: 72px; height: 72px; }
h3 .app-icon { width: 56px; height: 56px; }

/* アプリ名の横の英語名(小さく) */
.app-title .app-en { font-size: 0.55em; font-weight: 500; color: var(--sub); margin-left: 0.15em; white-space: nowrap; }

/* 404 */
.notfound { text-align: center; padding: 3rem 1.5rem 4rem; }
.notfound .eyebrow { justify-content: center; }
.notfound h1 { margin-bottom: 0.6rem; }
.notfound .btn-row { justify-content: center; margin-top: 1.6rem; }
