/* ============================ ファイルヘッダー ============================
   責務: 公開HP(ランディング)の見た目。本人サイト yamada-ryosuke.com のデザイン言語を継承:
   深い紺の海(#070b12系)・明朝のディスプレイ書体・ティール(#46e6d3)・漂う光のブロブ・
   斜めのセクション区切り(-2.6°)・漢字の透かし・スクロールリビール。
   見る場面: 公開HPの色・余白・レイアウトを変えるとき。デモ(/demo/)は実UIのCSSで別物。
   ========================================================================== */
:root {
  --bg: #070b12;
  --ink: #eef3f8;
  --muted: #94a7b9;
  --teal: #46e6d3;
  --teal-d: #1c9b92;
  --gold: #f2c66d;
  --line: rgba(255, 255, 255, 0.12);
  --card: rgba(12, 18, 28, 0.72);
  --serif: "Times New Roman", "Hiragino Mincho ProN", "YuMincho", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --maxw: 1080px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: #04070c; }
body {
  background: transparent; color: var(--ink); font-family: var(--sans);
  line-height: 1.95; letter-spacing: 0.02em; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.serif { font-family: var(--serif); font-weight: 400; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- 背景: 深海の空気(本人サイトと同じ言語) ---- */
.atmos { position: fixed; inset: 0; z-index: -2; background: radial-gradient(130% 95% at 50% 0, #0a1220, #05080e 72%); }
.atmos::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 3px 3px; opacity: 0.04; mix-blend-mode: overlay; }
.blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.blobs span { position: absolute; border-radius: 50%; filter: blur(74px); opacity: 0.24; }
.blobs span:nth-child(1) { width: 46vw; height: 46vw; left: -10vw; top: 6vh; background: radial-gradient(circle, rgba(70, 230, 211, 0.5), transparent 70%); animation: drift1 28s ease-in-out infinite; }
.blobs span:nth-child(2) { width: 40vw; height: 40vw; right: -8vw; top: 44vh; background: radial-gradient(circle, rgba(70, 150, 255, 0.4), transparent 70%); animation: drift2 34s ease-in-out infinite; }
.blobs span:nth-child(3) { width: 36vw; height: 36vw; left: 32vw; bottom: -12vh; background: radial-gradient(circle, rgba(120, 90, 255, 0.32), transparent 70%); animation: drift1 40s ease-in-out infinite reverse; }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(6vw, -4vh); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-5vw, 5vh); } }

/* 読書プログレス(本人サイトの虹バーと同じ位置・当社はティール1色) */
.rpbar { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 50; pointer-events: none;
  background: linear-gradient(90deg, var(--teal), var(--gold)); box-shadow: 0 0 12px rgba(70, 230, 211, 0.55); will-change: width; }

/* ---- ナビ ---- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px; background: linear-gradient(180deg, rgba(7, 11, 18, 0.85), rgba(7, 11, 18, 0)); transition: background 0.3s; }
.nav.solid-bg { background: rgba(7, 11, 18, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-size: 2.15rem; letter-spacing: 0.05em; line-height: 1.05; }
.brand b { color: var(--teal); font-weight: 400; }
.brand small { display: block; font-family: var(--sans); font-size: 0.64rem; letter-spacing: 0.3em; color: var(--muted); margin-top: 4px; }
nav.menu { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
nav.menu a { font-size: 0.86rem; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 9px 15px;
  transition: 0.2s; background: rgba(255, 255, 255, 0.03); }
nav.menu a:hover, nav.menu a.solid { color: #04110f; background: var(--teal); border-color: var(--teal); }
nav.menu a.solid:hover { background: #6ff0e0; }
@media (max-width: 820px) { .brand small { display: none; } nav.menu a { padding: 7px 11px; font-size: 0.76rem; } .nav { padding: 10px 12px; } nav.menu a:not(.solid) { display: none; } }

/* ---- ヒーロー(デモがそのまま生きている) ---- */
.hero { max-width: var(--maxw); margin: 0 auto; padding: clamp(108px, 16vh, 170px) 24px 40px; text-align: center; }
.kicker { color: var(--teal); font-size: 0.68rem; letter-spacing: 0.34em; font-weight: 600; margin-bottom: 18px; }
.hero h1 { font-size: clamp(42px, 8.5vw, 84px); line-height: 1.16; letter-spacing: 0.08em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.9); }
.hero h1 .serif { display: inline-block; margin-right: -1em; /* 末尾「。」+字間の空きを畳んで文字の重心を中央へ(実測で調整) */ }
.lead { max-width: 640px; margin: 26px auto 0; color: var(--muted); font-size: 15px; }
.lead strong { color: var(--ink); }

/* ブラウザ風フレーム(デモ埋め込み・本人サイト埋め込みで共用) */
.frame { display: block; border-radius: 16px; overflow: hidden; border: 1px solid rgba(120, 220, 220, 0.28);
  background: #0a0f18; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 60px rgba(70, 230, 211, 0.07); position: relative; }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid var(--line); }
.frame-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.frame-bar span:nth-child(1) { background: rgba(255, 105, 97, 0.75); }
.frame-bar span:nth-child(2) { background: rgba(255, 189, 46, 0.75); }
.frame-bar span:nth-child(3) { background: rgba(50, 215, 75, 0.75); }
.frame-bar em { font-style: normal; font-size: 11.5px; color: var(--muted); margin-left: 8px; letter-spacing: 0.06em; }
.demo-stage { max-width: 900px; margin: 34px auto 0; text-align: left; }
.demo-frame iframe { display: block; width: 100%; height: min(62vh, 620px); border: 0; background: #0b0b0e; }
/* 回転中は誤操作させない。正面で完全に止まったら解放(lp.jsのtickがfront-lockedを付ける) */
.demo-stage .spin3d iframe { pointer-events: none; }
.demo-stage .spin3d.front-locked iframe { pointer-events: auto; }
/* スマホ: スクロールがiframeに吸われないよう、最初の1タップで操作を解放する */
.touch-unlock { display: none; }
@media (max-width: 820px) {
  .demo-frame iframe { pointer-events: none; height: 74vh; }
  .demo-frame.on iframe { pointer-events: auto !important; }
  .touch-unlock { display: block; position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
    padding: 10px 22px; border-radius: 999px; border: 1px solid rgba(70, 230, 211, 0.5); background: rgba(7, 11, 18, 0.88);
    color: var(--teal); font-size: 13px; font-weight: 700; backdrop-filter: blur(6px); }
  .demo-frame.on .touch-unlock { display: none; }
}
.try { font-size: 12.5px; color: var(--muted); max-width: 640px; margin: 18px auto 0; }
.try strong { color: var(--ink); }
.bigdemo { margin-top: 14px; }
.bigdemo a { display: inline-block; padding: 12px 26px; border-radius: 999px; border: 1px solid rgba(70, 230, 211, 0.45);
  color: var(--teal); font-size: 13.5px; font-weight: 700; transition: 0.2s; }
.bigdemo a:hover { background: var(--teal); color: #04110f; }

/* CTA */
.cta { display: inline-block; padding: 13px 26px; border-radius: 999px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-d) 100%); color: #04211e; font-weight: 700; font-size: 14px;
  box-shadow: 0 6px 28px rgba(70, 230, 211, 0.25); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.cta:hover { transform: translateY(-1px); box-shadow: 0 10px 34px rgba(70, 230, 211, 0.35); }

/* ---- セクション(斜めの区切り+漢字の透かし=本人サイトの言語) ---- */
.sect { position: relative; padding: 120px 0 110px; z-index: 1; }
.skew { position: absolute; left: 0; right: 0; top: -8px; bottom: -8px; z-index: -1; overflow: hidden;
  transform: skewY(-2.6deg); background: linear-gradient(180deg, rgba(10, 15, 25, 0.9), rgba(7, 11, 18, 0.75));
  border-top: 1px solid rgba(120, 220, 220, 0.22); }
.skew.alt { background: linear-gradient(180deg, rgba(8, 18, 28, 0.9), rgba(12, 16, 26, 0.78)); }
.skew .kj { position: absolute; right: -1%; top: 50%; transform: translateY(-52%) skewY(2.6deg); font-family: var(--serif);
  font-size: min(44vh, 320px); line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgba(120, 220, 220, 0.1);
  user-select: none; pointer-events: none; }
.eyebrow { color: var(--teal); font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase; margin-bottom: 12px; position: relative; padding-left: 26px; }
.eyebrow::before { content: ""; position: absolute; left: 0; top: 50%; width: 18px; height: 2px; background: var(--teal); transform: translateY(-50%); }
.sect h2 { font-size: clamp(1.8rem, 4.6vw, 2.7rem); margin-bottom: 14px; letter-spacing: 0.06em; }
.sect h2 .sp { display: none; }
@media (max-width: 560px) { .sect h2 .sp { display: block; } }
.sect-lead { color: var(--muted); max-width: 660px; margin-bottom: 44px; }

/* スクロールリビール(段差つき) */
.reveal .eyebrow, .reveal h2, .reveal .sect-lead, .reveal .org, .reveal .policy, .reveal .founder-grid {
  opacity: 0; transform: translateY(34px); transition: opacity 0.85s cubic-bezier(0.2, 0.75, 0.2, 1), transform 0.85s cubic-bezier(0.2, 0.75, 0.2, 1); }
.reveal.in .eyebrow, .reveal.in h2, .reveal.in .sect-lead, .reveal.in .org, .reveal.in .policy, .reveal.in .founder-grid { opacity: 1; transform: none; }
.reveal.in h2 { transition-delay: 0.06s; } .reveal.in .sect-lead { transition-delay: 0.12s; }
.reveal .grid > * { opacity: 0; transform: translateY(40px) scale(0.97); transition: 0.8s cubic-bezier(0.2, 0.75, 0.2, 1); }
.reveal.in .grid > * { opacity: 1; transform: none; }
.reveal.in .grid > *:nth-child(1) { transition-delay: 0.06s; } .reveal.in .grid > *:nth-child(2) { transition-delay: 0.13s; }
.reveal.in .grid > *:nth-child(3) { transition-delay: 0.2s; } .reveal.in .grid > *:nth-child(4) { transition-delay: 0.27s; }
.reveal.in .grid > *:nth-child(5) { transition-delay: 0.34s; } .reveal.in .grid > *:nth-child(6) { transition-delay: 0.41s; }
.reveal.in .grid > *:nth-child(n+7) { transition-delay: 0.48s; } /* 7件目以降(SNSは増え続ける)も順に出る */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .reveal, .reveal * { opacity: 1 !important; transform: none !important; } }

/* 組織図 */
.org { text-align: center; }
.org-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.org-v { width: 1px; height: 26px; margin: 6px auto; background: linear-gradient(180deg, transparent, var(--teal)); }
.node { padding: 10px 20px; border-radius: 12px; font-size: 13.5px; font-weight: 600; background: var(--card); border: 1px solid var(--line); }
.node.owner { border-color: rgba(242, 198, 109, 0.4); color: var(--gold); }
.node.ceo { border-color: rgba(70, 230, 211, 0.45); color: var(--teal); }
.org-row.projects { gap: 20px; margin-top: 4px; align-items: stretch; }
.proj { flex: 1 1 280px; max-width: 420px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; transition: 0.25s; }
.proj:hover { transform: translateY(-4px); border-color: rgba(70, 230, 211, 0.45); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); }
.proj h3 { font-family: var(--serif); font-size: 19px; font-weight: 400; margin-bottom: 8px; color: var(--teal); letter-spacing: 0.08em; }
.proj p { font-size: 13.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chips span { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

/* 一日+つくっているもの */
.day { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 44px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px 20px; transition: 0.25s; }
.step:hover { transform: translateY(-4px); border-color: rgba(70, 230, 211, 0.4); }
.step .t { font-size: 11.5px; color: var(--teal); letter-spacing: 0.18em; font-weight: 700; }
.step h3 { font-size: 16px; margin: 8px 0 6px; }
.step p { font-size: 13px; color: var(--muted); }
.step strong { color: var(--ink); }
.makes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.make { background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.make h3 { font-size: 15.5px; margin-bottom: 8px; }
.make p { font-size: 13.5px; color: var(--muted); }
.policy { margin-top: 40px; font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--teal-d); padding-left: 14px; max-width: 680px; }
.policy strong { color: var(--ink); }

/* SNS: AIdea Labの実験アカウント(大きめのブロック) */
.featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 40px; }
.fcard { display: flex; flex-direction: column; gap: 10px; padding: 26px 26px 22px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); transition: 0.22s; position: relative; }
a.fcard:hover { border-color: rgba(70, 230, 211, 0.5); transform: translateY(-4px); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); }
.fcard .fhead { display: flex; align-items: center; gap: 10px; }
.fcard .fhead img { width: 22px; height: 22px; }
.fcard .fhead .fh { font-size: 12px; color: var(--muted); }
.fcard .fname { font-size: 16.5px; font-weight: 700; line-height: 1.5; }
.fcard .fdesc { font-size: 13px; color: var(--muted); line-height: 1.8; }
.fcard.nolink .fh::after { content: " ・リンクは準備中"; }
.sns-sub { font-size: 14.5px; color: var(--muted); font-weight: 600; margin-bottom: 14px; }

/* SNS: オーナー個人(小カード) */
.sns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.sns { display: flex; align-items: center; gap: 15px; padding: 22px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  font-size: 15.5px; font-weight: 700; transition: 0.22s; }
.sns:hover { border-color: rgba(70, 230, 211, 0.5); transform: translateY(-3px); background: rgba(70, 230, 211, 0.05); box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45); }
.sns .bl { width: 27px; height: 27px; flex: 0 0 auto; }
.sns .who { display: flex; flex-direction: column; min-width: 0; }
.sns .h { font-weight: 400; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sns .tag { margin-left: auto; font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; flex: 0 0 auto; }

/* 中の人(本人サイトのライブ埋め込み) */
.founder-grid { display: grid; grid-template-columns: minmax(280px, 4fr) minmax(340px, 7fr); gap: 44px; align-items: center; }
@media (max-width: 900px) { .founder-grid { grid-template-columns: 1fr; } }
.founder-name { font-size: 30px; letter-spacing: 0.12em; }
.founder-name span { display: block; font-family: var(--sans); font-size: 11px; color: var(--muted); letter-spacing: 0.34em; margin-top: 4px; }
.founder-bio { color: var(--muted); font-size: 14px; margin: 16px 0 0; }
.founder-bio strong { color: var(--ink); }
.founder-bio a { color: var(--teal); }
.spin-stage { perspective: 1700px; }
.spin3d { position: relative; transform-style: preserve-3d; will-change: transform; }
.spin3d .face { backface-visibility: hidden; }
/* 合成レイヤー化したiframeはbackface-visibilityが効かない環境がある(Safari/OOPIF)ため、
   面をtranslateZでわずかに分離+裏面表示中はJSがshowing-backを付けてiframeを隠す(下) */
.spin3d .face.front { transform: translateZ(1px); }
.spin3d.showing-back .site-slot iframe { visibility: hidden; }
.spin3d .face.back { position: absolute; inset: 0; transform: rotateY(180deg) translateZ(1px); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; border-radius: 16px; border: 1px solid rgba(120, 220, 220, 0.28);
  background: radial-gradient(120% 90% at 50% 0, #0d1a26, #05080e 78%); color: var(--muted); font-size: 13px; }
.spin3d .face.back b { font-size: 24px; color: var(--ink); font-weight: 400; letter-spacing: 0.1em; }
.site-cta { text-align: center; margin-top: 22px; }
.site-slot { position: relative; height: 580px; background: #04070c; }
.site-slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  pointer-events: none; /* 回転中は触れない。正面に完全に止まってから解放(lp.jsのtickがfront-lockedを付ける) */
  opacity: 0; transition: opacity 0.8s ease; }
.spin3d.front-locked .site-slot iframe { pointer-events: auto; }
.site-slot iframe.ready { opacity: 1; }
.site-slot .site-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 12px; color: var(--muted); font-size: 13px;
  background: radial-gradient(120% 90% at 50% 0, #0a1220, #05080e 75%); }
.site-slot .site-fallback b { font-family: var(--serif); font-size: 22px; color: var(--ink); font-weight: 400; letter-spacing: 0.1em; }

/* フッター */
footer { border-top: 1px solid var(--line); margin-top: 40px; position: relative; z-index: 1; background: rgba(7, 11, 18, 0.8); }
.foot-inner { padding: 56px 24px 72px; font-size: 15px; color: var(--muted); }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 24px; margin-bottom: 12px; letter-spacing: 0.08em; }
.foot-brand img { width: 24px; height: 24px; }
.foot-sub { font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-family: var(--sans); }
.foot-inner a { color: var(--teal); }
.foot-ai { margin-top: 6px; font-size: 13.5px; }
.foot-c { margin-top: 18px; font-size: 11.5px; color: rgba(148, 167, 185, 0.55); }
