/* Home: transparent hero, two paper sections, native canvas/SVG enhancement. */
#scene-home .hm-story { position:relative; }
#scene-home .hm-part { position:relative; min-height:calc(100vh - var(--header-h)); min-height:calc(100dvh - var(--header-h)); }
#scene-home .hm-hero { width:var(--shell-w); margin:auto; display:flex; align-items:center; padding:44px 0; z-index:1; }
#scene-home .hm-fx { position:absolute; inset:0; pointer-events:none; }
#scene-home .hm-dots, #scene-home .hm-reveal { position:absolute; inset:0; width:100%; height:100%; }
#scene-home .hm-dots { z-index:2; mask-image:linear-gradient(90deg,currentColor 58%,transparent 94%); }
#scene-home .hm-reveal { z-index:0; opacity:.34; }
#scene-home .hm-copy { position:relative; z-index:5; width:min(100%,680px); }
#scene-home .hm-kick { display:flex; align-items:center; gap:10px; margin:0 0 26px; color:var(--muted-strong); font:500 .72rem/1.5 var(--font-mono); letter-spacing:.12em; }
#scene-home .hm-sq { width:6px; height:6px; flex:none; background:var(--accent); }
#scene-home .hm-title { margin:0; font:700 clamp(2rem,3.05vw,3rem)/1.28 var(--font-display); letter-spacing:-.055em; }
#scene-home .hm-line { display:block; position:relative; white-space:nowrap; }
#scene-home .hm-line + .hm-line { margin-top:8px; }
#scene-home .hm-sum { max-width:470px; margin:26px 0 0; color:var(--muted-strong); font-size:.94rem; line-height:1.85; }
#scene-home .hm-cta { display:flex; gap:12px; margin-top:30px; }
#scene-home .hm-btn { display:inline-flex; align-items:center; justify-content:space-between; gap:28px; min-height:48px; padding:0 20px; background:var(--bg); border:1px solid var(--line-strong); color:var(--text); font-size:.8rem; cursor:pointer; }
#scene-home .hm-btn.is-main { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
#scene-home .hm-btn:hover { border-color:var(--accent); }
#scene-home .hm-btn.is-main:hover { background:var(--accent-hover); }
#scene-home .hm-btn svg, #scene-home .hm-all svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.6; }
#scene-home :is(button,a):focus-visible { outline:2px solid var(--accent); outline-offset:5px; }
#scene-home .hm-deco { position:absolute; z-index:3; right:-1%; bottom:3%; width:51%; height:92%; transition:transform 180ms var(--ease); }
#scene-home .hm-room { width:100%; height:100%; overflow:visible; color:var(--text); }
#scene-home .hm-room :is(path,circle) { fill:none; stroke:currentColor; stroke-width:1.35; stroke-linejoin:round; stroke-linecap:round; }
#scene-home .hm-room :is(.b,.g) { fill:var(--bg); }
#scene-home .hm-room .d { stroke-dasharray:4 5; opacity:.6; }
#scene-home .hm-room .t { stroke-width:1; }
#scene-home .hm-room .w { opacity:.8; }
#scene-home .hm-room :is(.a,.n,.c) { stroke:var(--accent); }
#scene-home .hm-room .c { stroke-dasharray:3 4; }
#scene-home .hm-room .l1 { stroke-width:7; }
#scene-home .hm-room .l2 { stroke:var(--bg); stroke-width:4.4; }
#scene-home .hm-signal { position:absolute; left:0; bottom:34px; width:min(31vw,460px); height:176px; z-index:2; opacity:.7; fill:none; stroke:var(--accent); stroke-width:1.2; }
#scene-home .hm-dial { transform-origin:82px 88px; animation:hm-spin 20s linear infinite; }
#scene-home .hm-dial .o { stroke-dasharray:4 10 34 14; }
#scene-home .hm-dial .i { stroke:var(--line-strong); stroke-dasharray:62 18 3 12; }
#scene-home .hm-dial .x, #scene-home .hm-base { stroke:var(--line-strong); stroke-width:1; }
#scene-home .hm-flow { stroke-width:1.6; stroke-dasharray:8 7; animation:hm-flow 2.4s linear infinite; }
#scene-home .hm-node { fill:var(--bg); stroke-width:1.4; transform-box:fill-box; transform-origin:center; animation:hm-pulse 2.8s ease-in-out infinite; }
#scene-home .hm-node:nth-of-type(2) { animation-delay:.35s; }
#scene-home .hm-node:nth-of-type(3) { animation-delay:.7s; }
#scene-home .hm-node:nth-of-type(4) { animation-delay:1.05s; }
@keyframes hm-spin { to { transform:rotate(360deg); } }
@keyframes hm-flow { to { stroke-dashoffset:-45; } }
@keyframes hm-pulse { 0%,100% { opacity:.42; transform:scale(.82); } 50% { opacity:1; transform:scale(1.2); } }
#scene-home :is(.hm-hang,.hm-feat) { background-color:var(--bg); background-image:linear-gradient(color-mix(in srgb,var(--line) 30%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--line) 30%,transparent) 1px,transparent 1px); background-size:40px 40px; border-top:1px solid var(--line-strong); box-shadow:0 -12px 30px var(--shadow); overflow:hidden; }
#scene-home .hm-hang { z-index:2; }
#scene-home .hm-feat { z-index:3; }
#scene-home .hm-in { width:var(--shell-w); margin:auto; padding:64px 0; position:relative; z-index:1; }
#scene-home .hm-hang .hm-in { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:48px; align-items:center; }
#scene-home .hm-about { position:relative; max-width:520px; }
#scene-home .hm-idx { display:flex; gap:14px; align-items:center; margin:0 0 26px; font:500 .64rem/1.4 var(--font-mono); color:var(--muted); letter-spacing:.1em; }
#scene-home .hm-idx > span:first-child { color:var(--accent); }
#scene-home .hm-idx i { width:24px; height:1px; background:var(--accent); }
#scene-home .hm-h { font:700 clamp(2.6rem,4.7vw,4.2rem)/1.06 var(--font-display); letter-spacing:-.055em; margin:0 0 32px; }
#scene-home .hm-p { color:var(--muted-strong); font-size:.9rem; line-height:1.9; margin:0 0 20px; }
#scene-home .hm-stamp { position:absolute; right:4px; top:25px; width:74px; height:74px; border:2px solid var(--accent); color:var(--accent); display:grid; place-items:center; font:700 1.05rem var(--font-mono); transform:rotate(-13deg); opacity:.65; }
#scene-home .hm-likes { list-style:none; padding:20px 0 0; margin:26px 0 0; border-top:1px solid var(--line); display:grid; grid-template-columns:1fr 1fr; gap:14px 24px; font-size:.75rem; }
#scene-home .hm-likes li { display:flex; gap:20px; }
#scene-home .hm-likes li span:first-child { font-family:var(--font-mono); color:var(--accent); font-size:.6rem; }
#scene-home .hm-field { position:relative; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
#scene-home .hm-card { margin:0; min-width:0; transform-origin:50% 0; }
#scene-home .hm-cb { padding:8px 8px 12px; background:var(--surface-raised); border:1px solid var(--line-strong); box-shadow:0 5px 14px var(--shadow); transform-origin:50% 0; }
#scene-home .hm-cb > svg { display:block; width:100%; background:var(--surface); aspect-ratio:1; stroke:var(--muted-strong); stroke-width:1.4; fill:none; }
#scene-home .hm-cb .k { stroke:var(--accent); }
#scene-home .hm-cb figcaption { display:flex; gap:7px; padding-top:12px; font:500 .61rem/1.4 var(--font-mono); }
#scene-home .hm-cb figcaption > span:first-child { color:var(--accent); font-size:.55rem; }
#scene-home .hm-ropes { display:none; position:absolute; inset:0; width:100%; height:100%; fill:none; stroke:var(--line-strong); stroke-width:1; overflow:visible; pointer-events:none; }
#scene-home .hm-buffer { height:36dvh; min-height:220px; max-height:360px; }
#scene-home .hm-k1 { left:3%; top:5%; border-width:2px 0 0 2px; }
#scene-home .hm-k2 { right:3%; bottom:5%; border-width:0 2px 2px 0; }
#scene-home .hm-r1 { right:0; top:13%; width:27%; }
#scene-home .hm-r2 { left:4%; bottom:0; height:22%; }
#scene-home .hm-feat .hm-orn { transform:scaleX(-1); }
#scene-home .hm-fhead { position:relative; padding-right:100px; }
#scene-home .hm-all { position:absolute; right:0; bottom:6px; display:flex; gap:18px; align-items:center; min-height:44px; color:var(--text); text-decoration:none; font-size:.75rem; }
#scene-home .hm-all:hover { color:var(--accent); }
#scene-home .hm-cards { display:grid; grid-template-columns:1fr 1fr; gap:30px; }
#scene-home .hm-pj { display:block; color:var(--text); text-decoration:none; border:1px solid var(--line-strong); background:var(--surface-raised); }
#scene-home .hm-pj:hover { border-color:var(--accent); }
#scene-home .hm-cover { height:clamp(160px,32dvh,420px); background:linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px),var(--surface); background-size:40px 40px; overflow:hidden; }
#scene-home .hm-cover svg { display:block; width:100%; height:100%; fill:none; stroke:var(--text); stroke-width:1.4; transition:transform .6s var(--ease); }
#scene-home .hm-cover circle { fill:var(--surface); }
#scene-home .hm-cover .m { stroke:var(--muted); opacity:.55; }
#scene-home .hm-cover .k { stroke:var(--accent); stroke-width:2; }
#scene-home .hm-cover .d { stroke-dasharray:5 7; }
#scene-home .hm-pj:hover .hm-cover svg { transform:translateY(-4px); }
#scene-home .hm-pt { border-top:1px solid var(--line); padding:22px 26px 26px; }
#scene-home .hm-pk { font:500 .6rem var(--font-mono); color:var(--muted); margin:0 0 12px; letter-spacing:.08em; }
#scene-home .hm-pk > span:first-child { color:var(--accent); }
#scene-home .hm-pt h3 { margin:0 0 12px; font:700 1.85rem/1.2 var(--font-display); letter-spacing:-.045em; }
#scene-home .hm-pt > p:last-child { margin:0; font-size:.78rem; line-height:1.7; color:var(--muted-strong); }
#scene-home .hm-rail { display:none; position:fixed; z-index:48; right:16px; top:50%; transform:translateY(-50%); gap:7px; }
#scene-home .hm-rail button { display:grid; grid-template-columns:24px 1fr; align-items:center; gap:7px; width:76px; height:28px; padding:0; border:0; background:none; color:var(--muted); cursor:pointer; }
#scene-home .hm-rail i { justify-self:end; width:10px; height:2px; background:currentColor; transition:width .22s var(--ease); }
#scene-home .hm-rail span { text-align:left; font:500 .62rem var(--font-mono); opacity:0; transform:translateX(4px); transition:.18s; }
#scene-home .hm-rail :is([aria-current],button:hover,button:focus-visible) { color:var(--accent); }
#scene-home .hm-rail :is([aria-current],button:hover,button:focus-visible) i { width:24px; }
#scene-home .hm-rail :is([aria-current],button:hover,button:focus-visible) span { opacity:1; transform:none; }
#scene-home .hm-ghost { position:absolute; pointer-events:none; white-space:pre-wrap; color:var(--text); }
#scene-home .hm-word { display:inline-block; white-space:nowrap; }
#scene-home .hm-letter { display:inline-block; animation:hm-char .62s var(--ease) both; animation-delay:var(--d); }
#scene-home .hm-play .hm-sum { animation:hm-rise .7s .18s var(--ease) both; }
#scene-home .hm-play .hm-cta { animation:hm-rise .7s .3s var(--ease) both; }
#scene-home .hm-play .hm-room { animation:hm-art .95s .15s var(--ease) both; }
@keyframes hm-char { from { opacity:0; filter:blur(12px); transform:translateY(18px) rotateX(-34deg); } to { opacity:1; filter:blur(0); transform:none; } }
@keyframes hm-rise { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }
@keyframes hm-art { from { opacity:0; clip-path:inset(100% 0 0); } to { opacity:1; clip-path:inset(0); } }
#scene-home .hm-intro { --k:1; position:fixed; inset:0; z-index:120; contain:strict; color:var(--surface-raised); animation:hm-intro calc(3.55s * var(--k)) linear both; }
#scene-home .hm-intro.is-short { --k:.62; }
#scene-home .hm-black { position:absolute; inset:0; background:#050505; animation:hm-black calc(3.55s * var(--k)) linear both; }
#scene-home .hm-igrid { position:absolute; inset:var(--header-h) 0 0; animation:hm-gridtone calc(3.55s * var(--k)) linear both; }
#scene-home .hm-igrid i { position:absolute; background:currentColor; opacity:.3; animation:hm-gridline calc(1s * var(--k)) var(--ease) both; animation-delay:var(--d); transform-origin:0 0; }
#scene-home .hm-igrid .hm-v { top:0; bottom:0; width:1px; }
#scene-home .hm-igrid .hm-hz { left:0; right:0; height:1px; }
#scene-home .hm-imark { position:absolute; inset:0; display:flex; gap:12px; align-items:center; justify-content:center; font:650 clamp(2.2rem,6vw,5rem) var(--font-display); letter-spacing:-.06em; animation:hm-mark calc(1.85s * var(--k)) var(--ease) both; }
#scene-home .hm-imark i { width:.12em; height:.12em; background:#f06449; }
#scene-home .hm-frame { position:absolute; border:1px solid currentColor; animation:hm-frame calc(.72s * var(--k)) var(--ease) both; animation-delay:var(--d); }
#scene-home .hm-frame:nth-child(even) { color:#f06449; }
@keyframes hm-intro { 0%,70% { opacity:1; } 100% { opacity:0; } }
@keyframes hm-black { 0%,58% { opacity:1; } 78%,100% { opacity:0; } }
@keyframes hm-gridtone { 0%,58% { color:var(--surface-raised); } 85%,100% { color:var(--line-strong); } }
@keyframes hm-gridline { from { transform:scale(0); } to { transform:scale(1); } }
@keyframes hm-frame { from { clip-path:inset(0 100% 0 0); } to { clip-path:inset(0); } }
@keyframes hm-mark { 0% { opacity:0; transform:scale(.965); } 30%,62% { opacity:1; transform:scale(1); } 100% { opacity:0; transform:scale(1.012); } }
@keyframes hm-sway { 0%,100% { transform:rotate(-1.6deg); } 50% { transform:rotate(1.6deg); } }
#scene-home .hm-title { position:relative; }
:root[data-theme="dark"] #scene-home .hm-intro { color:var(--text); }
:root:not(.js) #scene-home .hm-cta { display:none; }
@media (min-width:768px) {
  :root.js[data-scene="home"] #scene-home .hm-rail { display:grid; }
  #scene-home .hm-phys { display:block; height:590px; clip-path:inset(0 -120px -140px); }
  #scene-home .hm-phys .hm-card { position:absolute; top:0; left:0; width:120px; touch-action:none; user-select:none; cursor:grab; }
  #scene-home .hm-phys .hm-card:active { cursor:grabbing; }
  #scene-home .hm-phys .hm-ropes { display:block; }
  #scene-home .hm-phys .hm-calm .hm-cb { animation:hm-sway var(--sway,5.6s) ease-in-out infinite; }
}
@media (min-width:768px) and (min-height:600px) {
  :root.js #scene-home .hm-part { position:sticky; top:var(--hm-top,var(--header-h)); }
}
#scene-home:is(.is-pre,.is-entering,.is-leaving) :is(.hm-rail,.hm-intro) { visibility:hidden; }
@media (max-width:1080px) {
  #scene-home .hm-hero { padding:72px 0; }
  #scene-home .hm-copy { width:min(100%,640px); }
  #scene-home .hm-line { white-space:normal; }
  #scene-home .hm-title { font-size:3rem; }
  #scene-home .hm-deco { right:-2%; width:76%; opacity:.3; }
  #scene-home :is(.hm-reveal,.hm-signal) { display:none; }
  #scene-home .hm-hang .hm-in { gap:24px; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); }
  #scene-home .hm-phys { height:500px; }
  #scene-home .hm-phys .hm-card { width:108px; }
  #scene-home .hm-stamp { width:58px; height:58px; top:4px; font-size:.8rem; }
  #scene-home .hm-p { font-size:.85rem; }
  #scene-home .hm-in { padding:56px 0; }
}
@media (max-width:767px) {
  #scene-home .hm-hero { display:flex; flex-direction:column; align-items:stretch; padding:46px 0 24px; min-height:calc(100dvh - var(--header-h)); }
  #scene-home .hm-copy { order:0; }
  #scene-home .hm-fx { position:relative; order:1; height:300px; margin-top:20px; }
  #scene-home .hm-deco { inset:0; width:100%; height:100%; opacity:.7; transform:none!important; }
  #scene-home .hm-dots, #scene-home .hm-buffer { display:none; }
  #scene-home .hm-title { font-size:1.85rem; line-height:1.25; }
  #scene-home .hm-line { text-wrap:balance; }
  #scene-home .hm-kick { margin-bottom:22px; font-size:.62rem; }
  #scene-home .hm-sum { font-size:.86rem; line-height:1.75; margin-top:22px; }
  #scene-home .hm-btn { flex:1 1 0; padding:0 14px; gap:10px; }
  #scene-home .hm-hang .hm-in { display:block; }
  #scene-home .hm-field { margin:36px 4px 0; gap:20px; }
  #scene-home .hm-card { transform:none!important; }
  #scene-home .hm-cards { grid-template-columns:1fr; gap:26px; }
  #scene-home .hm-fhead { padding-right:0; }
  #scene-home .hm-all { position:static; width:max-content; margin:0 0 20px auto; }
  #scene-home .hm-h { font-size:2.8rem; }
  #scene-home .hm-cover { height:auto; aspect-ratio:16/10; }
}
#scene-home.hm-paused * { animation-play-state:paused!important; }
:root[data-reduced] #scene-home *, :root[data-reduced] #scene-home *::before, :root[data-reduced] #scene-home *::after { animation:none!important; transition:none!important; }
:root[data-reduced] #scene-home .hm-intro { display:none; }
@media (prefers-reduced-motion:reduce) {
  #scene-home *, #scene-home *::before, #scene-home *::after { animation:none!important; transition:none!important; }
  #scene-home .hm-intro { display:none; }
}
@media (forced-colors:active) {
  #scene-home canvas { display:none; }
  #scene-home svg :is(path,circle) { stroke:CanvasText; }
  #scene-home .hm-intro { display:none; }
}
@media (hover:none), (pointer:coarse) { #scene-home .hm-rail button { height:44px; } }
