/* MEBUKI 芽吹 — サイバーボタニカル・ラボ（架空）
   ダーク×ボタニカル。背景の桜は #bg の WebGL が全て描く。素材画像ゼロ。 */

:root {
  --bg: #0b070f;
  --bg-2: #140d1a;
  --ink: #f4ecf2;
  --ink-dim: #bda9c2;
  --ink-faint: #83718a;
  --pink: #eda7c5;
  --accent: #c79bf2;
  --accent-deep: #9a6ad9;
  --line: rgba(244, 236, 242, .13);
  --line-strong: rgba(244, 236, 242, .26);
  --glass: rgba(22, 14, 26, .52);
  --radius: 18px;
  --serif-en: "Cormorant Garamond", "Times New Roman", serif;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1100px 700px at 80% -10%, rgba(154, 106, 217, .16), transparent 60%),
    radial-gradient(900px 640px at 6% 12%, rgba(237, 167, 197, .08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* キービジュアル層（AI 静止画）。最背面。canvas が同 z で後勝ちして上に載る */
#kv {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden; background: var(--bg);
}
#kv img, #kv video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity 1.4s ease;
  will-change: opacity;
}
#kv .active { opacity: 1; }
/* スクリム。カメラが花の密集に寄ると画面が明るくなり、
   パネルを持たないステートメントの白文字が読めなくなるため一段落とす */
#kv::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6,3,9,.50) 0%, rgba(6,3,9,.18) 30%,
                    rgba(6,3,9,.22) 70%, rgba(6,3,9,.48) 100%);
}
/* 横顔カットは鼻先が左端。モバイルの cover 切り抜きで顔が欠けないよう寄せる */
#kv [data-kv="process"] { object-position: 38% 50%; }
/* ヒーローの人物は原板の右寄り。縦画面では人物側を表示する */
@media (max-width: 700px) {
  #kv [data-kv="hero"] { object-position: 66% 35%; }
}

/* WebGL キャンバス。KV の上に透過で重なる */
#bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block;
}
.no-webgl #bg { display: none; }

/* 周辺減光。canvas の直上・コンテンツの下 */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, transparent 52%, rgba(5, 3, 8, .52));
}

.content, .foot { position: relative; z-index: 1; }

::selection { background: rgba(199, 155, 242, .4); }

/* ── ガラスパネル共通 ─────────────────────── */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 18px 50px rgba(4, 2, 8, .45);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--accent);
}

/* ── ナビ ─────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 44px);
  transition: background .35s ease, backdrop-filter .35s ease;
}
.nav.scrolled {
  background: rgba(11, 7, 15, .55);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--pink); text-decoration: none;
}
.brand span {
  font-family: var(--serif-en); font-size: 21px; font-weight: 500;
  letter-spacing: .04em; color: var(--ink);
}
.brand em { font-style: normal; font-size: 13px; color: var(--ink-dim); margin-left: 2px; }
.links { display: flex; align-items: center; gap: 6px; }
.links a {
  font-family: var(--sans); font-size: 13px; letter-spacing: .1em;
  color: var(--ink-dim); text-decoration: none;
  padding: 8px 14px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.links a:hover { color: var(--ink); background: rgba(244, 236, 242, .07); }
.links .pill-btn {
  color: #1d1028; background: var(--accent); font-weight: 600;
  margin-left: 6px;
}
.links .pill-btn:hover { color: #1d1028; background: #d7b3fa; }
@media (max-width: 700px) {
  .links a:not(.pill-btn) { display: none; }
}

/* ── ヒーロー ─────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 0 clamp(18px, 4vw, 52px) clamp(64px, 9vh, 96px);
  position: relative;
}
.hero-panel {
  max-width: 620px;
  padding: clamp(28px, 4vw, 44px) clamp(26px, 4vw, 46px);
  position: relative;
}
.hero h1 {
  font-size: clamp(38px, 6.2vw, 74px);
  line-height: 1.22; font-weight: 500; letter-spacing: .01em;
  margin: 16px 0 18px;
}
.hero h1 em {
  font-style: italic; font-family: var(--serif-en);
  color: var(--pink); padding-right: .06em;
}
.hero .lead { font-size: clamp(13.5px, 1.5vw, 15.5px); color: var(--ink-dim); }
.orb {
  position: absolute; right: -26px; bottom: -26px;
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #1d1028;
  box-shadow: 0 14px 38px rgba(154, 106, 217, .45);
  transition: transform .25s ease, background .25s ease;
}
.orb:hover { transform: scale(1.08) rotate(-8deg); background: #d7b3fa; }
.scroll-cue {
  position: absolute; right: clamp(20px, 4vw, 48px); top: 50%;
  transform: rotate(90deg) translateX(-50%); transform-origin: right top;
  font-family: var(--sans); font-size: 10px; letter-spacing: .5em;
  color: var(--ink-faint);
}
@media (max-width: 700px) {
  .orb { right: 14px; bottom: -24px; width: 62px; height: 62px; }
  .scroll-cue { display: none; }
}

/* ── ステートメント ───────────────────────── */
.statement {
  min-height: 130svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 20vh clamp(18px, 5vw, 60px);
}
.statement .line {
  font-size: clamp(24px, 4.4vw, 46px);
  line-height: 1.75; font-weight: 500;
  text-shadow: 0 2px 24px rgba(11, 7, 15, .8);
}
.statement .line.small {
  font-size: clamp(14px, 1.8vw, 19px);
  color: var(--ink-dim); margin-top: 34px; letter-spacing: .08em;
}
.pill {
  display: inline-block; line-height: 1.4;
  background: var(--accent); color: #241531;
  border-radius: 999px; padding: .04em .55em .1em;
  margin: 0 .1em;
}
.pill.alt { background: var(--pink); }

/* ── 接木シリーズ ─────────────────────────── */
.series {
  min-height: 130svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 16vh clamp(18px, 4vw, 52px);
  max-width: 1240px; margin: 0 auto;
}
.sec-head h2 {
  font-size: clamp(26px, 3.6vw, 40px); font-weight: 500;
  margin-top: 12px; text-shadow: 0 2px 20px rgba(11, 7, 15, .8);
}
.cards {
  display: grid; gap: 22px; margin-top: 46px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.card { padding: 26px 26px 24px; transition: transform .3s ease, border-color .3s ease; }
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.card .num {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .3em;
  color: var(--accent);
}
.card h3 { font-size: 22px; font-weight: 500; margin: 12px 0 10px; }
.card h3 small {
  display: block; font-family: var(--serif-en); font-style: italic; font-weight: 400;
  font-size: 13.5px; color: var(--ink-faint); letter-spacing: .12em; margin-top: 4px;
}
.card p { font-size: 13.5px; color: var(--ink-dim); }
.card .chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.card .chips i {
  font-style: normal; font-family: var(--sans); font-size: 10.5px; letter-spacing: .06em;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
  color: var(--ink-faint);
}

/* ── 過程 ─────────────────────────────────── */
.process {
  min-height: 120svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 16vh clamp(18px, 4vw, 52px);
  max-width: 880px; margin: 0 auto;
}
.steps { list-style: none; display: grid; gap: 14px; margin-top: 42px; }
.steps li {
  display: flex; align-items: baseline; gap: 22px;
  padding: 20px 26px;
}
.steps b {
  font-family: var(--serif-en); font-style: italic; font-weight: 500;
  font-size: 19px; color: var(--pink); white-space: nowrap; letter-spacing: .05em;
}
.steps span { font-size: 14px; color: var(--ink-dim); }
@media (max-width: 560px) {
  .steps li { flex-direction: column; gap: 6px; }
}

/* ── CTA ──────────────────────────────────── */
.cta {
  min-height: 110svh;
  display: grid; place-items: center;
  padding: 16vh clamp(18px, 4vw, 52px);
}
.cta-panel {
  max-width: 520px; width: 100%; text-align: center;
  padding: clamp(34px, 5vw, 52px) clamp(26px, 5vw, 48px);
}
.cta-panel .mark { color: var(--pink); }
.cta-panel h2 { font-size: clamp(21px, 2.6vw, 28px); font-weight: 500; margin: 18px 0 12px; white-space: nowrap; }
@media (max-width: 560px) { .cta-panel h2 { white-space: normal; } }
.cta-panel p { font-size: 13px; color: var(--ink-dim); }
#notify { display: grid; gap: 12px; margin-top: 26px; }
#notify input {
  font-family: var(--sans); font-size: 14px;
  background: rgba(11, 7, 15, .55); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; outline: none; text-align: center;
  transition: border-color .2s;
}
#notify input:focus { border-color: var(--accent); }
#notify input::placeholder { color: var(--ink-faint); }
#notify button {
  font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .2em;
  background: var(--accent); color: #1d1028;
  border: none; border-radius: 10px; padding: 15px 16px; cursor: pointer;
  transition: background .2s, transform .2s;
}
#notify button:hover { background: #d7b3fa; transform: translateY(-1px); }
.cta-panel .done { margin-top: 22px; color: var(--pink); font-size: 15px; }

/* ── フッター ─────────────────────────────── */
.foot {
  padding: 40px clamp(18px, 4vw, 52px) 56px;
  border-top: 1px solid var(--line);
  background: rgba(11, 7, 15, .6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--sans); font-size: 12px; color: var(--ink-faint);
  display: grid; gap: 6px;
}

/* ── 出現アニメーション（JS 有効時のみ隠す）── */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .orb, .card { transition: none; }
}

/* ──────────────────────────────────────────────────────────────
   和文タイポグラフィ調整
   1. palt        … 句読点・括弧まわりの余分なアキを詰める
   2. auto-phrase … 文節単位で折り返す（「書」「く。」のような分断を防ぐ）
   3. balance     … 見出しの行長を揃え、1文字だけ落ちる行を作らない
   4. strict      … 禁則処理を厳密にし、行頭に 。 、 」 が来ないようにする
   auto-phrase / balance / pretty は非対応ブラウザでは無視されるだけで、
   崩れることはない（プログレッシブ・エンハンスメント）。
   ────────────────────────────────────────────────────────────── */
body {
  font-feature-settings: "palt" 1;
  font-kerning: normal;
  line-break: strict;
  word-break: normal;
}
h1, h2, h3, h4, h5, .kicker, dt {
  word-break: auto-phrase;
  text-wrap: balance;
}
p, li, dd, td, .note, .desc, .caption,
.lede, .lead, .statement, blockquote, figcaption {
  word-break: auto-phrase;
  text-wrap: pretty;
}
/* 手動改行は広い画面でのみ効かせ、狭い画面では自動折り返しに任せる */
@media (max-width: 640px) {
  h1 br, h2 br, h3 br,
  .lede br, .lead br, .statement br { display: none; }
}

/* 本文は palt の効く明朝を優先する。
   Google Fonts の Shippori Mincho は palt を含まないため、読点のあとに
   全角ぶんのアキが残ってしまう。見出しは意匠優先でそのまま、
   読点が多く出る本文だけシステム明朝に寄せて字面を締める。 */
p, li, dd, td, .lede, .lead, .note, .desc, figcaption, blockquote {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Shippori Mincho", serif;
}


/* ── 書体設計（見出し＝個性 / 本文＝可読性） ──────────────────────
   見出し: Hina Mincho
   本文  : BIZ UDPMincho（Google Fonts の和文で palt が効く数少ない書体。
           読点のあとのアキが締まり、Mac / Windows で見え方が揃う）
   欧文は先頭に置いた書体から取り、和文だけが差し替わる。 */
h1, h2, h3, h4, .lede, .lead, .kicker, .statement, blockquote {
  font-family: "Cormorant Garamond", "Hina Mincho", serif;
}
p, li, dd, td, .note, .desc, .caption, figcaption, small {
  font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
}


/* ── 本文書体の適用を確実にする ──
   サイト側に .card p のような具体的な指定があると本文書体が上書きされてしまうため、
   html body を前置きして優先度を上げる。等幅を意図した要素は除外する。 */
html body :is(p, li, dd, td, .note, .desc, .caption, figcaption, .body, .txt, .text):not(code):not(pre):not([class*="mono"]):not([class*="code"]) {
  font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
}
